Article recommendation method and device, equipment and medium
By comprehensively considering the correlation between users and items and the correlation between different items, combining application service topology data and user portrait characteristics, the pre-trained recommendation model is used to screen and sort items, which solves the problem of low recommendation accuracy in the existing technology and achieves efficient item recommendation.
Patent Information
- Application Number
- CN202411686785.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-15
AI Technical Summary
When providing users with diverse item recommendation services, the prior art may provide large or preferred recommendations for items with low user preferences, resulting in lower recommendation accuracy and poor user experience.
By comprehensively considering the correlation between users and items and the correlation between different items, we determine the target recommended item candidate set, and obtain application service topology data from the log files of each network node. Combining user portrait characteristics and item characteristics, we use a pre-trained recommendation model to filter and sort items to obtain an item recommendation list.
On the premise of ensuring the diversification of item recommendations, improve the recommendation accuracy of item recommendations and improve user experience.
Smart Images

Figure CN119831670A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent recommendation technology, and in particular to an item recommendation method, device, equipment and medium. Background Art
[0002] In order to meet the needs of new network services and lightweight and dynamic computing in the future, the integration of network and computing has become a new development trend. As a result, the industry has proposed the concept of intelligent perception network (also referred to as intelligent perception network): intelligent perception of the user portrait characteristics of target users and the characteristics of different items, and based on this, provide users with a variety of item recommendation services.
[0003] However, the information that can be reflected by the user portrait features of the target user and the features of different items is limited, so that when providing users with a variety of item recommendation services, items with low user preference (or interest) may be recommended in large quantities or with priority, resulting in low recommendation accuracy and poor user experience. Summary of the invention
[0004] In view of the above problems, embodiments of the present application provide an item recommendation method, apparatus, device and medium to overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect of an embodiment of the present application, a method for recommending an item is provided, the method comprising:
[0006] Based on the correlation between users and items and the correlation between different items, a candidate set of target recommended items is determined for the target user;
[0007] Obtaining application service topology between the target recommended item candidate set and each previously determined recommended item set from log files of each network node to obtain a topology data set, wherein the application service topology includes at least one of: transaction behavior information of the same user, transaction behavior information of the same item, transaction behavior information of users in the same age group, and transaction behavior information of users in the same geographical area;
[0008] According to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted through a pre-trained recommendation model to obtain an item recommendation list.
[0009] As a possible implementation, determining a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items includes:
[0010] For each item in the predetermined item candidate set, determining a target score for the item according to the relevance between the target user and the item and a set importance score for the item;
[0011] The user portrait features of the target user, the item features of each item in the item candidate set, and the target score are input into the target model to obtain the target recommended item candidate set, wherein the target model is: a pre-trained deep learning-based determinant process method DPP model.
[0012] As a possible implementation, the item candidate set is determined by a maximum margin relevance MMR model, and the MMR model is expressed as follows:
[0013]
[0014] Among them, S represents the result set of the currently returned item candidate set; R represents the set of all items to be selected; Q represents the user portrait feature; D i represents the items in R except those in S; D j represents the items in S; Sim1 represents D i The correlation between Q and the value of Sim1 is equal to D i Target score; Sim2 means D i With D j The correlation between them; λ represents the hyperparameter used to balance the weights of the two correlations.
[0015] As a possible implementation manner, the items in the target recommended item candidate set are screened and sorted by a pre-trained recommendation model according to the user portrait feature of the target user, the item features of each item in the target recommended item candidate set, and the topological data set to obtain an item recommendation list, including:
[0016] Determining information about the scene in which the target user is located according to the behavior information of the target user;
[0017] According to the information of the scene in which the target user is located, the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted through a pre-trained recommendation model to obtain an item recommendation list.
[0018] As a possible implementation, the recommendation model includes first networks unique to different scenarios and second networks shared by all scenarios, and each of the first networks and the second networks forms a star topology structure centered on the second network;
[0019] The recommendation model is trained by the following steps:
[0020] Using the training data associated with each scenario, respectively training each first network to be trained to obtain each first network;
[0021] The second network to be trained is trained using the training data associated with each scenario to obtain the second network.
[0022] As a possible implementation manner, before obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node and obtaining the topology data set, the method further includes:
[0023] Monitoring log file operation events of each network node by deploying a fanotify component on each network node;
[0024] For a network node that detects a log file operation event, obtaining the latest log file of the network node, and updating the log files of each network node in a preset storage area according to the latest log file;
[0025] The method of obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node to obtain a topology data set includes:
[0026] The application service topology between the target recommended item candidate set and each previously determined recommended item set is obtained from the log files of each network node in the preset storage area to obtain a topology data set.
[0027] As a possible implementation, the method further includes:
[0028] For a network node that has monitored a log file operation event, detecting whether the network node has a malicious access risk based on information about the log file operation event;
[0029] In the case that the network node has a risk of malicious access, the log file in the preset storage area is used to reset the log file of the network node.
[0030] According to a second aspect of an embodiment of the present application, there is provided an item recommendation device, the device comprising:
[0031] A first processing module, configured to determine a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items;
[0032] A data acquisition module, configured to acquire, from log files of each network node, application service topologies between the target recommended item candidate set and each previously determined recommended item set, to obtain a topology data set, wherein the application service topology includes at least one of: transaction behavior information of the same user, transaction behavior information of the same item, transaction behavior information of users in the same age group, and transaction behavior information of users in the same geographical area;
[0033] The second processing module is used to screen and sort the items in the target recommended item candidate set according to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set through a pre-trained recommendation model to obtain an item recommendation list.
[0034] Optionally, the first processing module includes:
[0035] A first processing submodule is used to determine, for each item in the predetermined item candidate set, a target score of the item according to the correlation between the target user and the item and a set importance score of the item;
[0036] The second processing submodule is used to input the user portrait features of the target user, the item features of each item in the item candidate set and the target score into the target model to obtain the target recommended item candidate set, wherein the target model is: a pre-trained deep learning-based determinant process method DPP model.
[0037] Optionally, the item candidate set is determined by a maximum margin relevance (MMR) model, and the MMR model is expressed as follows:
[0038]
[0039] Among them, S represents the result set of the currently returned item candidate set; R represents the set of all items to be selected; Q represents the user portrait feature; D i represents the items in R except those in S; D j represents the items in S; Sim1 represents D i The correlation between Q and the value of Sim1 is equal to D i Target score; Sim2 means D i With D j The correlation between them; λ represents the hyperparameter used to balance the weights of the two correlations.
[0040] Optionally, the second processing module includes:
[0041] A third processing submodule, configured to determine information about a scene in which the target user is located according to the behavior information of the target user;
[0042] The fourth processing submodule is used to determine the item recommendation list through a pre-trained recommendation model according to the information of the scene in which the target user is located, the user portrait characteristics of the target user, the item characteristics of each item in the target recommended item candidate set and the topological data set.
[0043] Optionally, the recommendation model includes first networks unique to different scenarios and second networks shared by all scenarios, and each of the first networks and the second networks forms a star topology structure centered on the second network;
[0044] The device also includes:
[0045] A first training module, configured to train each first network to be trained respectively using the training data associated with each scenario to obtain each first network;
[0046] The second training module is used to train the second network to be trained using the training data associated with each scenario to obtain the second network.
[0047] Optionally, the device further comprises:
[0048] An event monitoring module, used to monitor log file operation events of each network node through a fanotify component deployed on each network node;
[0049] A file update module, for obtaining the latest log file of a network node that detects a log file operation event, and updating the log files of each network node in a preset storage area according to the latest log file;
[0050] The data acquisition module comprises:
[0051] The data acquisition submodule is used to obtain the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node in the preset storage area to obtain a topology data set.
[0052] Optionally, the device further comprises:
[0053] A risk detection module is used to detect, for a network node that has monitored a log file operation event, whether the network node has a malicious access risk based on information about the log file operation event;
[0054] The file resetting module is used to reset the log file of the network node using the log file in the preset storage area when there is a risk of malicious access to the network node.
[0055] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the item recommendation method described in the first aspect are implemented.
[0056] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the item recommendation method described in the first aspect are implemented.
[0057] The embodiments of the present application include the following advantages: comprehensively considering the correlation between users and items and the correlation between different items to determine a target recommended item candidate set, thereby realizing diversified item recommendations for target users; then obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node, and obtaining a topological data set to increase the richness of information on which item recommendations are based; finally, through a pre-trained recommendation model, combined with the user portrait features of the target user, the item features of each item in the target recommended item candidate set, and the topological data set, the items in the target recommended item candidate set are screened and sorted to obtain an item recommendation list, thereby improving the recommendation accuracy of item recommendations while ensuring the diversification of item recommendations, thereby improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 is an implementation flow chart of an item recommendation method in an embodiment of the present application;
[0060] Figure 2 It is a schematic diagram of the physical meaning of a matrix determinant in an embodiment of the present application;
[0061] Figure 3 is a schematic diagram of a core matrix network parameter of a DPP algorithm in an embodiment of the present application;
[0062] Figure 4is a schematic diagram of a recommended model in an embodiment of the present application;
[0063] Figure 5 is a schematic diagram of a perception module in an embodiment of the present application;
[0064] Figure 6 is a structural schematic diagram of an item recommendation device in an embodiment of the present application;
[0065] Figure 7 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In conjunction with the accompanying drawings, an item recommendation method, device, equipment and medium provided by the embodiments of the present application are described in detail through some embodiments and their application scenarios.
[0067] First, refer to Figure 1 FIG. 1 is a flowchart of an implementation method of an item recommendation method provided in an embodiment of the present application. The method may include the following steps:
[0068] Step S11: Based on the correlation between the user and the item and the correlation between different items, a target recommended item candidate set is determined for the target user.
[0069] In specific implementation, the algorithm model related to item diversification recommendation, such as the Maximum Marginal Relevance (MMR) model and the Determinantal Point Process (DPP) model, can be used to determine the candidate set of target recommended items. Alternatively, the deep learning model can be trained in advance to obtain a deep learning model with the ability to recommend items diversification (hereinafter referred to as a diversified recommendation model).
[0070] It is understandable that the algorithm model related to the diversified recommendation (or the diversified recommendation model) can determine the correlation between the user and each item in the set of all items to be selected, and the correlation between each item in the set of all items to be selected, based on the user portrait features of the user (such as the target user), such as the user's age, occupation, region and interests, and the features of each item in the set of all items to be selected, such as the brand, color and model of each item in the set of all items to be selected, and then select each item with a high correlation with the user and a low correlation with other items (i.e., a high diversity of items) from the set of all items to be selected, thereby obtaining a candidate set of target recommended items. Among them, the user portrait features and item features can be represented using an embedding representation vector.
[0071] Step S12: Obtain application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node to obtain a topology data set, wherein the application service topology includes at least one of transaction behavior information of the same user, transaction behavior information of the same item, transaction behavior information of users in the same age group, and transaction behavior information of users in the same geographical area.
[0072] In a specific implementation, a historical recommended item set previously determined for the target user and / or for other users (such as a set of items in a historical item recommendation list) may be used as the previously determined recommended item set.
[0073] For each recommended item set, the relevant transaction behavior information associated with the recommended item set is queried in the log file of the relevant network node, that is, the information of the transaction behavior performed by each historical user under the influence of the recommended item set (such as information about the user who performs the transaction behavior, and information about the traded items, etc.) is queried.
[0074] Then, from the above-queried information, the transaction behavior information of the same user associated with the target recommended item candidate set, the same item associated with the target recommended item candidate set, the users in the same age group associated with the target recommended item candidate set, or the users in the same geographical area associated with the target recommended item candidate set is extracted (which reflects rich information such as the behavioral correlation between users, the correlation between items, the user's interest in other items, etc.), thereby obtaining the application service topology between the target recommended item candidate set and the recommended item set.
[0075] Finally, the application service topologies obtained for each recommended item set are summarized to obtain the topological data set. Thus, the decoupling of complex multi-dimensional information can be achieved, thereby reducing the difficulty of subsequent model execution data analysis and improving model performance. Moreover, based on the topological data set, the recommendation model can analyze the impact of the recommended item set associated with the target recommended item candidate set on multiple dimensions of user transaction behavior, so that the item recommendation list determined by the model can achieve more accurate recommendations for target users while ensuring item diversity.
[0076] It can be understood that the present application is designed to use different network nodes (such as network nodes corresponding to different trading platforms, or network nodes for processing relevant transaction behavior information of different recommended item sets, etc.) to collect information on the transaction behavior of users associated with each determined recommended item set (i.e., users who received the recommended item set), and store the information in the form of log files, thereby providing more information sources for item recommendations, thereby increasing the richness of the information on which item recommendations are based.
[0077] Step S13: According to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted by a pre-trained recommendation model to obtain an item recommendation list.
[0078] The recommendation model can be obtained by training a deep learning model.
[0079] In specific implementation, the recommendation model will determine the distribution probability (i.e., recommendation score) of each item in the target recommended item candidate set based on the user portrait features of the target user, the item features of each item in the target recommended item candidate set, and the topological data set.
[0080] Subsequently, the recommendation model selects each item with a recommendation score higher than a set value, or selects the top N items with the highest recommendation scores, wherein N is a preset number of recommended items.
[0081] Finally, the recommendation model sorts the selected items in descending order of the recommendation scores to obtain the item recommendation list.
[0082] By adopting the technical solution of the embodiment of the present application, the correlation between users and items and the correlation between different items are comprehensively considered to determine a target recommended item candidate set, thereby realizing diversified item recommendations for target users; then, the application service topology between the target recommended item candidate set and each previously determined recommended item set is obtained from the log files of each network node to obtain a topological data set to increase the richness of the information on which the item recommendation is based; finally, through a pre-trained recommendation model, combined with the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted to obtain an item recommendation list, thereby improving the recommendation accuracy of item recommendations while ensuring the diversity of item recommendations, thereby improving the user experience.
[0083] As a possible implementation, multiple models for diversified item recommendations may be established in advance based on different algorithm models (and / or deep learning models).
[0084] Then, the target user's portrait features and the features of each item in the set of all items to be selected are respectively input into the multiple models to obtain the recommended item candidate sets determined by the multiple models for the target user. The actual input data of the multiple models can be adjusted according to the characteristics of the relevant models. For example, the input of the relevant model may include not only the user portrait features and the features of each item in the set of all items to be selected, but also the refined ranking scores of each item in the set of all items to be selected, and the refined ranking scores are used to characterize the correlation between the items and the user.
[0085] After obtaining the recommended item candidate sets determined by the multiple models for the target user, the multiple recommended item candidate sets can be comprehensively considered based on intersection calculation or weighted sum calculation to determine the target recommended item candidate set.
[0086] For example, an intersection of a plurality of the recommended item candidate sets may be determined as the target recommended item candidate set.
[0087] For another example, a deep learning model for result fusion may be pre-trained, and the deep learning model for result fusion may be capable of determining a target recommended item candidate set based on the recommended item candidate sets output by the multiple models.
[0088] As a possible implementation, determining a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items includes:
[0089] For each item in the predetermined item candidate set, determining a target score for the item according to the relevance between the target user and the item and a set importance score for the item;
[0090] The user portrait features of the target user, the item features of each item in the item candidate set, and the target score are input into the target model to obtain the target recommended item candidate set, wherein the target model is: a pre-trained deep learning-based determinant process method DPP model.
[0091] The candidate item set may be a set of all items to be selected, for example, a set of all commodities in a shopping platform.
[0092] During specific implementation, the set importance score of each item (i.e., commodity or product) in the item candidate set can be determined based on actual business needs; for example, a higher set importance score can be determined for newly released commodities or commodities with higher transaction amounts, so that these specific commodities have a greater probability of being recommended to users, and have a greater probability of being in a relatively forward position in the recommended item list to obtain better user exposure, thereby enabling item recommendations to better meet actual business needs.
[0093] It should be noted that the kernel matrix L is the core of the DPP algorithm model. The DPP algorithm model uses the determinant det(L) of the kernel matrix L to measure the diversity and relevance of the recommendation set.
[0094] A matrix can be regarded as a set of vectors, and the physical meaning of the matrix determinant is the volume of the parallel polyhedron composed of the vectors in the matrix. Figure 2 The schematic diagram of the physical meaning of the matrix determinant shown in the figure shows that the more dissimilar these vectors are to each other, the larger the angle between them will be, which will make the volume of the parallel polyhedron composed of these vectors larger, and thus the determinant of the matrix will be larger, which means that the diversity of the recommendation set corresponding to the determinant will be higher. Therefore, by introducing the kernel matrix L, the DPP algorithm model converts complex probability calculations into simple determinant calculations.
[0095] Specifically, the element L in the kernel matrix L ii It can be determined by the following formula:
[0096]
[0097] Among them, q i represents the target score of the i-th item, q j represents the target score of the jth item, D ijrepresents the correlation (i.e., similarity) between the ith item and the jth item, and α and δ represent hyperparameters, which are used to balance relevance and diversity in this formula.
[0098] The target recommended item candidate set can be obtained by selecting a K×K submatrix with the largest determinant value from the above-mentioned kernel matrix L, where K is a positive integer.
[0099] It is understandable that the target recommended item candidate set can be determined by the above-mentioned parameterized DPP algorithm model, or by using a deep learning-based DPP (Deep Learning DPP) model, so as to avoid the step of manually setting hyperparameters for balancing relevance and diversity.
[0100] Reference Figure 3 The schematic diagram of the kernel matrix network parameters of the DPP algorithm shown in FIG. 1 is a schematic diagram of the kernel matrix network parameters of the DPP algorithm. The difference between the deep learning-based DPP model and the above-mentioned parameterized DPP algorithm model mainly lies in the way the kernel matrix is generated.
[0101] The element L in the kernel matrix L of the deep learning-based DPP model is ii It can be determined by the following formula:
[0102] L ii =f(q i )g(φ i ) T g(φ j )f(q j )+δ|| i=j
[0103] Among them, q i represents the target score of the i-th item, q j represents the target score of the jth item, δ represents the hyperparameter, and the functions f() and g() are calculated using two shallow neural networks in the DPP model to achieve feature mapping. In practical applications, the neural network used to calculate the f() function can be relatively shallow, and the neural network used to calculate the g() function can be slightly deeper, so as to convert the feature φ of the i-th item i and the feature φ of the jth item j , remapped into a more discriminative representation space.
[0104] Optionally, the item candidate set is determined by a maximum margin relevance (MMR) model, and the MMR model is expressed as follows:
[0105]
[0106] Among them, S represents the result set of the currently returned item candidate set; R represents the set of all items to be selected; Q represents the user portrait feature; D i represents the items in R except those in S; D j represents the items in S; Sim1 represents D i The correlation between Q and the value of Sim1 is equal to D i Target score; Sim2 means D i With D j The correlation between them; λ represents the hyperparameter used to balance the weights of the two correlations.
[0107] In this embodiment, the MMR and DPP algorithms are combined to determine the target recommended item candidate set, which can avoid the limitations of using a single algorithm, thereby making preliminary improvements to the user relevance and item diversity of the target recommended item candidate set, thereby ensuring that the recommended item sequence finally determined can have good user relevance and item diversity.
[0108] As a possible implementation manner, the items in the target recommended item candidate set are screened and sorted by a pre-trained recommendation model according to the user portrait feature of the target user, the item features of each item in the target recommended item candidate set, and the topological data set to obtain an item recommendation list, including:
[0109] Determining information about the scene in which the target user is located according to the behavior information of the target user;
[0110] According to the information of the scene in which the target user is located, the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted through a pre-trained recommendation model to obtain an item recommendation list.
[0111] In specific implementation, the information of the scene in which the target user is located can be determined based on the information of the target user's browsing, purchasing, searching, commenting and other related behaviors. The scene can be divided according to actual business needs, for example, different scenes can be divided according to different types of items, or different scenes can be divided according to different platforms.
[0112] For example, based on the target user's search behavior, it can be determined that the target user is in a scenario of purchasing electrical appliances (or clothing, etc.), so that the identifier of the corresponding scenario can be used as information about the scenario in which the target user is located.
[0113] For another example, based on the target user's browsing or login behavior, it can be determined that the target user is in a scenario of shopping on a certain shopping platform, so that the identifier of the corresponding scenario can be used as information about the scenario in which the target user is located.
[0114] After obtaining the information of the scene in which the target user is located, the information of the scene in which the target user is located, the user portrait features of the target user, the item features of each item in the target recommended item candidate set, and the topological data set are input into a pre-trained recommendation model, so that the recommendation model can determine the item recommendation list in combination with the scene information, thereby further improving the user experience.
[0115] For example, when the target model knows, based on the input scenario information, that the target user is in a scenario of shopping on a certain shopping platform, it can increase the proportion of goods sold by the shopping platform in the item recommendation list to avoid recommending a large number of goods that are not sold on the shopping platform to the target user.
[0116] For another example, when the target model knows that the target user is in a clothing purchasing scenario based on the input scenario information, it can increase the proportion of clothing products in the item recommendation list to avoid recommending a large number of products that are not related to clothing (such as electrical appliances, food, etc.) to the target user.
[0117] Optionally, the recommendation model includes first networks unique to different scenarios and second networks shared by all scenarios, and each of the first networks and the second networks forms a star topology structure centered on the second network;
[0118] The recommendation model is trained by the following steps:
[0119] Using the training data associated with each scenario, respectively training each first network to be trained to obtain each first network;
[0120] The second network to be trained is trained using the training data associated with each scenario to obtain the second network.
[0121] In the specific implementation, the same or different neural networks are selected as the first network to be trained and the second network to be trained. Multiple sample data (including user portrait features, item features of each item in the target recommended item candidate set, and topological data set) are collected for different scenarios, and the item recommendation list labels corresponding to each of the multiple sample data are determined. Then, the multiple sample data associated with each scenario and the corresponding item recommendation list labels are summarized to obtain the training data associated with each scenario.
[0122] After obtaining the training data associated with each scene, each first network to be trained is trained separately using the training data associated with each scene, so that each first network to be trained can learn the unique information of the scene associated with each scene in a targeted manner during the training process, thereby obtaining a first network unique to different scenes; at the same time, the second network to be trained is trained using the training data associated with each scene, so that the second network to be trained can learn the common information of different scenes during the training process, thereby obtaining a second network shared by all scenes.
[0123] Finally, each of the first networks and the second network is formed into a star topology structure with the second network as the center. For example, the second network can use the output of each of the first networks (such as the preliminarily determined item recommendation list) as its own input to finally determine the item recommendation list; or, each of the first networks can also use the output of the second network (such as the preliminarily determined item recommendation list) as its own input to finally determine the item recommendation list.
[0124] Alternatively, each of the first networks to be trained and the second networks to be trained may be formed into a star topology structure with the second network to be trained as the center, thereby obtaining a recommendation model to be trained. Then, the recommendation model to be trained is trained using the training data associated with each scenario; wherein, when the recommendation model to be trained is trained using the training data associated with a certain scenario, the parameters of the second models to be trained associated with other scenarios are fixed.
[0125] After the recommendation model is trained, the recommendation model can determine an item recommendation list for a target user based on the input scenario information and by combining the second network with the first network associated with the scenario information.
[0126] It is understandable that, in addition to using a star topology, the first network and each of the first networks may also be used in combination by calculating intersection or weighted sum (compared to the star topology, the computational complexity will increase). For example, the scene information, user portrait features, item features of each item in the target recommended item candidate set, and the topological data set are respectively input into the first network and each of the first networks, and then the outputs of the first network and each of the first networks are intersected to obtain the final item recommendation list.
[0127] For example, refer to Figure 4Schematic diagram of the recommendation model shown, which is built based on a fully convolutional network (FCN), including a shared FCN (i.e., a second network shared by all scenarios) and multiple scenario-specific FCNs (i.e., first networks unique to different scenarios).
[0128] Assuming there are M scenarios in total, the above recommendation model will contain M+1 networks. For a single scenario, the model parameters of the recommendation model associated with the scenario are and It can be expressed as follows:
[0129]
[0130]
[0131] Among them, W p 、b p W represents the model parameters of the first network associated with the scene, and W and b represent the model parameters of the second network.
[0132] Furthermore, the output of the recommendation model associated with the scenario (i.e., the item recommendation list) can be expressed as follows:
[0133]
[0134] Among them, out p Represents the output of the recommendation model. Function φ() is calculated by the recommendation model. p Represents the input of the recommendation model.
[0135] As a possible implementation manner, before obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node and obtaining the topology data set, the method further includes:
[0136] Monitoring log file operation events of each network node by deploying a fanotify component on each network node;
[0137] For a network node that detects a log file operation event, obtaining the latest log file of the network node, and updating the log files of each network node in a preset storage area according to the latest log file;
[0138] Among them, fanotify is a file monitoring technology that can obtain file operation events that are used to characterize file system changes (including file creation, modification, and access) and generate notifications.
[0139] In this embodiment, the present application uses a fanotify component to perform file monitoring on the log files in each network node. When the network node performs log file operations such as writing new data or changing existing data, the fanotify component deployed on the network node will monitor the corresponding log file operation events and generate notifications, thereby achieving real-time perception of changes in log files in the network node, so that the latest log files of the network node can be obtained in time and stored in the preset storage area to ensure the timeliness of the log files of each network node in the preset storage area.
[0140] When recommending items to a target user, the application service topology between the target recommended item candidate set and each previously determined recommended item set can be obtained from the log files of each network node in the preset storage area to obtain a topology data set. This can avoid a large amount of communication overhead generated by accessing each network node and improve the efficiency of item recommendation.
[0141] Optionally, the method further comprises:
[0142] For a network node that has monitored a log file operation event, detecting whether the network node has a malicious access risk based on information about the log file operation event;
[0143] In the case that the network node has a risk of malicious access, the log file in the preset storage area is used to reset the log file of the network node.
[0144] In this real-time mode, by detecting whether the network node has a malicious access risk and resetting the log file in time for the network node with malicious access risk (such as the risk of being attacked by a virus), the operation stability and data reliability of the network node can be improved.
[0145] For example, refer to Figure 5 The schematic diagram of the perception module shown in FIG. 1 includes a decision component, an execution component, a perception component and a fanotify component. Taking the perception module executing the above-mentioned steps of log file monitoring and processing as an example, the relevant implementation process of log file monitoring and processing is illustrated. Specifically, the implementation process includes:
[0146] Step 1 (Perception): The fanotify component deployed on each network node monitors the log file operation events of the respective network node in real time. If a file operation event is detected, the file operation event is sent to the perception component to realize intelligent perception analysis of the log file operation event; the perception component aggregates the received log file operation events, and aggregates the log files uploaded by each node at the same time, finds out the data part that is inconsistent with the last uploaded log file, and caches it as a data asset to be processed.
[0147] Step 2 (Decision): The perception component sends the aggregated file operation events and log files to the decision component. The decision component determines whether the log files are at risk of malicious access such as ransomware intrusion based on the file operation events. For example, the decision component can count the number of log file operations that occur within a period of time based on the log file operation events, and determine whether the log file operations of each network node are consistent within the same period of time, and judge whether the log files are at risk of malicious access based on this.
[0148] Step 3 (execution): If the decision component determines that the log file has a risk of malicious access (such as being invaded by a ransomware virus), the decision component will send a signal to the execution component, which will reset the relevant log files in the network node accordingly. Optionally, the execution component can also delete the relevant data assets in the cache.
[0149] Step 4 (Storage): If the decision component determines that there is no risk of malicious access to the log file, the relevant data assets in the cache (such as information on related recommended items and user transaction behavior) are stored in the preset storage area.
[0150] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0151] Second, Figure 6 : is a schematic diagram of the structure of an item recommendation device according to an embodiment of the present application, the device comprising:
[0152] A first processing module 610 is used to determine a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items;
[0153] The data acquisition module 620 is used to acquire the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node, and obtain a topology data set, wherein the application service topology includes at least one of the transaction behavior information of the same user, the transaction behavior information of the same item, the transaction behavior information of users in the same age group, and the transaction behavior information of users in the same geographical area;
[0154] The second processing module 630 is used to filter and sort the items in the target recommended item candidate set according to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set through a pre-trained recommendation model to obtain an item recommendation list.
[0155] By adopting the technical solution of the embodiment of the present application, the correlation between users and items and the correlation between different items are comprehensively considered to determine a target recommended item candidate set, thereby realizing diversified item recommendations for target users; then, the application service topology between the target recommended item candidate set and each previously determined recommended item set is obtained from the log files of each network node to obtain a topological data set to increase the richness of the information on which the item recommendation is based; finally, through a pre-trained recommendation model, combined with the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted to obtain an item recommendation list, thereby improving the recommendation accuracy of item recommendations while ensuring the diversity of item recommendations, thereby improving the user experience.
[0156] Optionally, the first processing module 610 includes:
[0157] A first processing submodule is used to determine, for each item in the predetermined item candidate set, a target score of the item according to the correlation between the target user and the item and a set importance score of the item;
[0158] The second processing submodule is used to input the user portrait features of the target user, the item features of each item in the item candidate set and the target score into the target model to obtain the target recommended item candidate set, wherein the target model is: a pre-trained deep learning-based determinant process method DPP model.
[0159] Optionally, the item candidate set is determined by a maximum margin relevance (MMR) model, and the MMR model is expressed as follows:
[0160]
[0161] Among them, S represents the result set of the currently returned item candidate set; R represents the set of all items to be selected; Q represents the user portrait feature; D i represents the items in R except those in S; D j represents the items in S; Sim1 represents D i The correlation between Q and the value of Sim1 is equal to D i Target score; Sim2 means D i With D j The correlation between them; λ represents the hyperparameter used to balance the weights of the two correlations.
[0162] Optionally, the second processing module 630 includes:
[0163] A third processing submodule, configured to determine information about a scene in which the target user is located according to the behavior information of the target user;
[0164] The fourth processing submodule is used to determine the item recommendation list through a pre-trained recommendation model according to the information of the scene in which the target user is located, the user portrait characteristics of the target user, the item characteristics of each item in the target recommended item candidate set and the topological data set.
[0165] Optionally, the recommendation model includes first networks unique to different scenarios and second networks shared by all scenarios, and each of the first networks and the second networks forms a star topology structure centered on the second network;
[0166] The device also includes:
[0167] A first training module, configured to train each first network to be trained respectively using the training data associated with each scenario to obtain each first network;
[0168] The second training module is used to train the second network to be trained using the training data associated with each scenario to obtain the second network.
[0169] Optionally, the device further comprises:
[0170] An event monitoring module, used to monitor log file operation events of each network node through a fanotify component deployed on each network node;
[0171] A file update module, for obtaining the latest log file of a network node that detects a log file operation event, and updating the log files of each network node in a preset storage area according to the latest log file;
[0172] The data acquisition module 620 includes:
[0173] The data acquisition submodule is used to obtain the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node in the preset storage area to obtain a topology data set.
[0174] Optionally, the device further comprises:
[0175] A risk detection module is used to detect, for a network node that has monitored a log file operation event, whether the network node has a malicious access risk based on information about the log file operation event;
[0176] The file resetting module is used to reset the log file of the network node using the log file in the preset storage area when there is a risk of malicious access to the network node.
[0177] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0178] The present application also provides an electronic device, referring to Figure 7 , Figure 7 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 7 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be executed on the processor 120 to implement the steps in the item recommendation method disclosed in the embodiment of the present application.
[0179] The embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the item recommendation method disclosed in the embodiment of the present application is implemented.
[0180] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the item recommendation method disclosed in the embodiment of the present application.
[0181] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0182] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0183] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0184] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0186] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0187] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0188] The above is a detailed introduction to an item recommendation method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An item recommendation method, characterized in that: The method comprises: Based on the correlation between users and items and the correlation between different items, a candidate set of target recommended items is determined for the target user; Obtaining application service topology between the target recommended item candidate set and each previously determined recommended item set from log files of each network node to obtain a topology data set, wherein the application service topology includes at least one of: transaction behavior information of the same user, transaction behavior information of the same item, transaction behavior information of users in the same age group, and transaction behavior information of users in the same geographical area; According to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted through a pre-trained recommendation model to obtain an item recommendation list.
2. The method according to claim 1, characterized in that The step of determining a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items includes: For each item in the predetermined item candidate set, determining a target score for the item according to the relevance between the target user and the item and a set importance score for the item; The user portrait features of the target user, the item features of each item in the item candidate set, and the target score are input into the target model to obtain the target recommended item candidate set, wherein the target model is: a pre-trained deep learning-based determinant process method DPP model.
3. The method according to claim 2, characterized in that The item candidate set is determined by a maximum margin relevance (MMR) model, which is expressed as follows: Among them, S represents the result set of the currently returned item candidate set; R represents the set of all items to be selected; Q represents the user portrait feature; D i represents the items in R except those in S; D j represents the items in S; Sim1 represents D i The correlation between Q and the value of Sim1 is equal to D i Target score; Sim2 means D i With D j The correlation between them; λ represents the hyperparameter used to balance the weights of the two correlations.
4. The method according to claim 1, characterized in that: The method of screening and sorting the items in the target recommended item candidate set by using a pre-trained recommendation model according to the user portrait feature of the target user, the item features of each item in the target recommended item candidate set, and the topological data set to obtain an item recommendation list includes: Determining information about the scene in which the target user is located according to the behavior information of the target user; According to the information of the scene in which the target user is located, the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set, the items in the target recommended item candidate set are screened and sorted through a pre-trained recommendation model to obtain an item recommendation list.
5. The method according to claim 4, characterized in that The recommendation model includes first networks unique to different scenarios and second networks shared by all scenarios, and each of the first networks and the second networks forms a star topology structure centered on the second network; The recommendation model is trained by the following steps: Using the training data associated with each scenario, respectively training each first network to be trained to obtain each first network; The second network to be trained is trained using the training data associated with each scenario to obtain the second network.
6. The method according to any one of claims 1 to 5, characterized in that: Before obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node to obtain the topology data set, the method further includes: Monitoring log file operation events of each network node by deploying a fanotify component on each network node; For a network node that detects a log file operation event, obtaining the latest log file of the network node, and updating the log files of each network node in a preset storage area according to the latest log file; The method of obtaining the application service topology between the target recommended item candidate set and each previously determined recommended item set from the log files of each network node to obtain a topology data set includes: The application service topology between the target recommended item candidate set and each previously determined recommended item set is obtained from the log files of each network node in the preset storage area to obtain a topology data set.
7. The method according to claim 6, characterized in that The method further comprises: For a network node that has monitored a log file operation event, detecting whether the network node has a malicious access risk based on information about the log file operation event; In the case that the network node has a risk of malicious access, the log file in the preset storage area is used to reset the log file of the network node.
8. An item recommendation device, characterized in that: The device comprises: A first processing module, configured to determine a target recommended item candidate set for a target user based on the correlation between the user and the item and the correlation between different items; A data acquisition module, used to acquire application service topology between the target recommended item candidate set and each previously determined recommended item set from log files of each network node, and obtain a topology data set, wherein the application service topology includes at least one of the following: transaction behavior information of the same user, transaction behavior information of the same item, transaction behavior information of users in the same age group, and transaction behavior information of users in the same geographical area; The second processing module is used to screen and sort the items in the target recommended item candidate set according to the user portrait features of the target user, the item features of each item in the target recommended item candidate set and the topological data set through a pre-trained recommendation model to obtain an item recommendation list.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the item recommendation method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the item recommendation method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
AI customized furniture precision marketing system and method based on user portrait
CN121526751A