Method and device for determining user interest value and storage medium
By constructing the knowledge map update feature vector and combined with the prediction model, the problem of poor recommendation of users in existing technologies has been solved, and higher recommendation accuracy and user experience are realized.
Patent Information
- Application Number
- CN202411386577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The prior art is difficult to quickly and accurately determine the items of interest to the user from a large amount of data and information, and fails to effectively consider the correlation between the user and the item, resulting in poor recommendation results and affecting the user experience.
By constructing the knowledge map of multiple historical objects and interaction information of users and each historical object, it updates the characteristic vector of the evaluation objects and historical objects, combined with the predictive model output user's interest in the evaluation object.
Strengthen the interaction between users and objects, improve the matching between users and objects, increase the accuracy of recommendation, and enhance the user experience.
Smart Images

Figure CN119337979A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for determining a user interest value. Background Art
[0002] The existing methods of recommending items of interest to users are generally based on content recommendation, collaborative filtering recommendation or hybrid recommendation. However, with the rapid development of Internet technology, people have access to more and more data information, and the existing recommendation methods can no longer quickly and accurately determine the items of interest to users from a large amount of data information. In addition, the above three methods are also affected by the lack of interaction between users and items, and fail to consider the correlation between users and items, resulting in the inability to accurately determine the probability of users' interest in items, resulting in poor item recommendation effects and affecting user experience. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device and storage medium for determining a user interest value, so as to solve the problem in the prior art that the correlation between items and users is weak and the items of interest to the user cannot be accurately determined.
[0004] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for determining a user interest value, the method comprising:
[0005] For any new object to be evaluated, determining a first feature vector of the object to be evaluated;
[0006] Acquire multiple historical objects that the user has interacted with, and determine a second feature vector for each historical object;
[0007] updating the first feature vector based on a knowledge graph corresponding to the user, and updating each second feature vector based on the knowledge graph, wherein the knowledge graph is constructed based on multiple historical objects of the user and interaction information between the user and each historical object;
[0008] Determine a third feature vector of the user according to the weight of each historical object and all updated second feature vectors;
[0009] The updated first eigenvector and the third eigenvector are concatenated to obtain a fourth eigenvector corresponding to the object to be evaluated;
[0010] The fourth eigenvector is input into the trained prediction model, so as to output the user's interest value in the object to be evaluated through the trained prediction model.
[0011] In an embodiment of the present application, the knowledge graph includes multiple directly or indirectly connected nodes, and updating the first feature vector based on the knowledge graph corresponding to the user includes: determining the first node in the knowledge graph that matches the first feature vector; determining the first neighbor node in the knowledge graph that is directly or indirectly connected to the first node; determining the feature vector of the first node and the feature vector of each first neighbor node; and concatenating the first feature vector, the feature vector of the first node, and the feature vectors of all first neighbor nodes to obtain an updated first feature vector.
[0012] In an embodiment of the present application, the knowledge graph includes multiple directly or indirectly connected nodes, and updating each second feature vector based on the knowledge graph includes: determining the second node in the knowledge graph that matches each second feature vector; for each second feature vector, determining the second neighbor node in the knowledge graph that is directly or indirectly connected to the second node that matches the second feature vector; for each second feature vector, determining the feature vector of the second node of the second feature vector and the feature vector of each second neighbor node of the second node of the second feature vector; for each second feature vector, concatenating the second feature vector, the feature vector of the second node of the second feature vector, and the feature vectors of all corresponding second neighbor nodes to obtain an updated second feature vector.
[0013] In an embodiment of the present application, determining the third feature vector of the user based on the weight of each historical object and all updated second feature vectors includes: for each historical object, determining the product between the weight of the historical object and the updated second feature vector of the historical object; and determining the sum of the products of each historical object as the third feature vector of the user.
[0014] In an embodiment of the present application, the method also includes a training step for the prediction model, the training step including: constructing a training set, the training set including multiple training samples, each training sample generated by multiple historical objects of the user; inputting the multiple training samples in the training set into the prediction model in sequence, and determining the loss value of each training sample based on the output of the prediction model and the loss function; when the loss value is within a preset range, determining that the prediction model training is completed.
[0015] In an embodiment of the present application, constructing a training set includes: selecting one historical object from all historical objects in turn; determining the historical feature vectors of the selected historical object and each historical object that is not selected respectively; updating each historical feature vector based on the knowledge graph; determining the user's historical feature vector based on the weight of the unselected historical object and the updated historical feature vector of the unselected historical object; concatenating the updated historical feature vector of the selected historical object and the user's historical feature vector to obtain a training sample; and determining all training samples as a training set.
[0016] In an embodiment of the present application, the method also includes: when the loss value is outside a preset range, collecting a preset optimization algorithm to adjust each model parameter of the prediction model, and returning to the step of inputting multiple training samples in the training set into the prediction model in sequence until the loss value is within the preset range.
[0017] In the embodiment of the present application, the loss function is shown in expression (1):
[0018]
[0019] Among them, Loss is the loss value, y is the true label, and the value is 1 or 0. is the output of the prediction model, λ is a hyperparameter, Θ is all the parameters to be trained in the prediction model, for The logarithmic function of for The logarithmic function of .
[0020] A second aspect of the present application provides a device for determining a user interest value, comprising:
[0021] a memory configured to store instructions;
[0022] The processor is configured to call instructions from the memory and implement the above method for determining the user interest value when executing the instructions.
[0023] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned method for determining a user interest value.
[0024] Through the above technical solution, the first feature vector of the object to be evaluated and the second feature vector of each historical object with which the user has interacted are determined; the first feature vector is updated based on the knowledge graph corresponding to the user, and each second feature vector is updated based on the knowledge graph; the third feature vector of the user is determined according to the weight of each historical object and all the updated second feature vectors, so as to concatenate the updated first feature vector and the third feature vector to obtain a fourth feature vector corresponding to the object to be evaluated; the fourth feature vector is input into the trained prediction model, so as to output the user's interest value in the object to be evaluated through the trained prediction model, thereby strengthening the interactivity between the user and the object, improving the matching degree between the user and the object, increasing the accuracy of the recommendation, and improving the user experience.
[0025] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0027] Figure 1 A schematic diagram of a process for determining a user interest value according to an embodiment of the present application is shown;
[0028] Figure 2 A schematic diagram schematically shows a method for determining a user interest value according to an embodiment of the present application;
[0029] Figure 3 The internal structure of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0031] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0032] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0033] Figure 1 The following schematically shows a flow chart of a method for determining a user interest value according to an embodiment of the present application. Figure 1As shown, an embodiment of the present application provides a method for determining a user interest value, which may include the following steps.
[0034] Step 101: for any new object to be evaluated, determine a first feature vector of the object to be evaluated.
[0035] Step 102: Acquire multiple historical objects that the user has interacted with, and determine a second feature vector for each historical object.
[0036] Step 103: Update the first feature vector based on the knowledge graph corresponding to the user, and update each second feature vector based on the knowledge graph, wherein the knowledge graph is constructed based on multiple historical objects of the user and interaction information between the user and each historical object.
[0037] The object to be evaluated can be an object with a real form or a virtual object. For any new object to be evaluated, the processor can determine the first feature vector of the object to be evaluated, and the first feature vector can be a numerical vector obtained after the object to be evaluated is initialized. The processor can obtain multiple historical objects that the user has interacted with, and determine the second feature vector of each historical object, and the second feature vector of each historical object can be a numerical vector obtained after each historical object is initialized. After determining the first feature vector of the object to be evaluated and the second feature vector of each historical object, the processor can update the first feature vector based on the knowledge graph corresponding to the user, and update each second feature vector based on the knowledge graph, wherein the knowledge graph is constructed based on multiple historical objects of the user and the interaction information between the user and each historical object, and the knowledge graph represents the strong correlation between the user and the object. The knowledge graph is a knowledge base that represents entities in the objective world and the relationships between them in the form of a graph.
[0038] In an embodiment of the present application, the knowledge graph includes multiple directly or indirectly connected nodes, and updating the first feature vector based on the knowledge graph corresponding to the user includes: determining the first node in the knowledge graph that matches the first feature vector; determining the first neighbor node in the knowledge graph that is directly or indirectly connected to the first node; determining the feature vector of the first node and the feature vector of each first neighbor node; and concatenating the first feature vector, the feature vector of the first node, and the feature vectors of all first neighbor nodes to obtain an updated first feature vector.
[0039] The knowledge graph may include multiple directly or indirectly connected nodes. The processor may update the first feature vector based on the knowledge graph corresponding to the user. Specifically, the processor may determine the first node in the knowledge graph that matches the first feature vector, and determine the first neighbor node in the knowledge graph that is directly or indirectly connected to the first node. After determining the first node and the first neighbor node, the processor may determine the feature vector of the first node and the feature vector of each first neighbor node, and the feature vector of the first node and the feature vector of each first neighbor node may be numerical vectors obtained based on message passing and message aggregation of the knowledge graph attention network. After determining the feature vector of the first node and the feature vector of each neighbor node, the processor may concatenate the first feature vector, the feature vector of the first node, and the feature vectors of all first neighbor nodes to obtain an updated first feature vector.
[0040] In an embodiment of the present application, the knowledge graph includes multiple directly or indirectly connected nodes, and updating each second feature vector based on the knowledge graph includes: determining the second node in the knowledge graph that matches each second feature vector; for each second feature vector, determining the second neighbor node in the knowledge graph that is directly or indirectly connected to the second node that matches the second feature vector; for each second feature vector, determining the feature vector of the second node of the second feature vector and the feature vector of each second neighbor node of the second node of the second feature vector; for each second feature vector, concatenating the second feature vector, the feature vector of the second node of the second feature vector, and the feature vectors of all corresponding second neighbor nodes to obtain an updated second feature vector.
[0041] The knowledge graph includes multiple directly or indirectly connected nodes, and the processor can update each second feature vector based on the knowledge graph. Specifically, the processor can determine the second node in the knowledge graph that matches each second feature vector. For each second feature vector, the processor can determine the second neighbor node in the knowledge graph that is directly or indirectly connected to the second node that matches the second feature vector. For example, the historical objects interacted by user UserA include Question1 and Question3, the historical objects interacted by user UserB include Question1, the historical objects interacted by user UserC include Question3, and the historical objects interacted by user UserD include Question2 and Question3. For the historical object Question2 interacted by user UserD, the processor can initialize the historical object Question2 to obtain the second feature vector of the historical object Question2. The processor may determine the second characteristic vector The processor may determine the feature vector of the second node as follows: The eigenvector of the second neighbor node Answer1 is The feature vector of the second neighbor node Tag2 is The eigenvector of the second neighbor node Answer2 is and will Concatenate to get the updated second eigenvector Among them, all updated second eigenvectors can be represented by the vector set express, represents the updated second feature vector corresponding to the first historical object that user u has interacted with, represents the updated second feature vector corresponding to the i-th historical object interacted by user u, The updated second feature vector corresponding to the nth historical object interacted by user u is represented. The neighbor entities of each historical object are aggregated based on the knowledge graph attention network to capture the complex relationship between users and objects and strengthen the association between users and objects.
[0042] Step 104: Determine the user's third feature vector according to the weight of each historical object and all updated second feature vectors.
[0043] After obtaining the updated second feature vector, the processor may determine the third feature vector of the user according to the weight of each historical object and all the updated second feature vectors. The third feature vector may be a numerical vector used to characterize the user's features.
[0044] In an embodiment of the present application, determining the third feature vector of the user based on the weight of each historical object and all updated second feature vectors includes: for each historical object, determining the product between the weight of the historical object and the updated second feature vector of the historical object; and determining the sum of the products of each historical object as the third feature vector of the user.
[0045] The processor may determine the third feature vector of the user based on the weight of each historical object and all updated second feature vectors. Specifically, for each historical object, the processor may determine the product between the weight of the historical object and the updated second feature vector of the historical object. After obtaining the product corresponding to each historical object, the processor may determine the sum of the products of each historical object as the third feature vector of the user. The weight of each historical object may be determined based on the correlation between each historical object and the object to be evaluated, and the weight of the historical object with high correlation is greater than the weight of the historical object with low correlation.
[0046] Step 105: concatenate the updated first feature vector and the third feature vector to obtain a fourth feature vector corresponding to the object to be evaluated.
[0047] Step 106: Input the fourth feature vector into the trained prediction model, so as to output the user's interest value in the object to be evaluated through the trained prediction model.
[0048] After determining the third feature vector of the user, the processor may concatenate the updated first feature vector and the third feature vector to obtain a fourth feature vector corresponding to the object to be evaluated. After obtaining the fourth feature vector, the processor may input the fourth feature vector into the trained prediction model to output the user's interest value for the object to be evaluated through the trained prediction model. Q and the third eigenvector d to obtain the fourth eigenvector x corresponding to the object to be evaluated, x=concat(e Q ,d). The processor may input the fourth feature vector x into the trained prediction model to output the user's interest value for the object to be evaluated through the trained prediction model. The prediction model can be a three-layer fully connected neural network, and the output of the fourth eigenvector x in the prediction model includes h1=ReLU(w1x+b1), h2=ReLU(w2h1+b2), wherein w1, w2, w3, b1, b2, b3 are model parameters of the prediction model, h1 is the output of the first layer of fully connected neural network and serves as the input of the second layer of fully connected neural network, and h2 is the output of the second layer of fully connected neural network and serves as the input of the third layer of fully connected neural network. ReLU(w1x+b1) is the activation function of the first layer of fully connected neural network, ReLU(w2h1+b2) is the activation function of the second layer of fully connected neural network, and sigmoid(w3h2+b3) is the activation function of the third layer of fully connected neural network.
[0049] In an embodiment of the present application, the method also includes a training step for the prediction model, the training step including: constructing a training set, the training set including multiple training samples, each training sample generated by multiple historical objects of the user; inputting the multiple training samples in the training set into the prediction model in sequence, and determining the loss value of each training sample based on the output of the prediction model and the loss function; when the loss value is within a preset range, determining that the prediction model training is completed.
[0050] The processor can construct a training set, which can include multiple training samples, each of which can be generated by multiple historical objects of the user. After constructing the training set, the processor can sequentially input multiple training samples in the training set into the prediction model, and determine the loss value of each training sample based on the output of the prediction model and the loss function. In the embodiment of the present application, the loss function is shown in expression (1):
[0051]
[0052] Among them, Loss is the loss value, y is the true label, and the value is 1 or 0. is the output of the prediction model, λ is a hyperparameter, Θ is all the parameters to be trained in the prediction model, for The logarithmic function of for The logarithmic function of .
[0053] After determining the loss value of each training sample, the processor can determine whether the loss value is within a preset range. When the loss value is within the preset range, the processor can determine that the prediction model training is completed. In a specific embodiment, the prediction model can be obtained by modeling the spliced feature vector using a three-layer fully connected neural network. Specifically, the number of neurons in the first layer of the fully connected neural network can be 512, and the activation function can be a ReLU function (Linear rectification function, also known as a corrected linear unit), which is an activation function commonly used in artificial neural networks, usually referring to a nonlinear function represented by a ramp function and its variants. The number of neurons in the second layer of the fully connected neural network can be 256, and the activation function is a ReLU function. The number of neurons in the third layer of the fully connected neural network can be 1, and the activation function can be a sigmoid function, also called a Logistic function, which is used for the output of hidden layer neurons, with a value range of (0, 1). It can map a real number to an interval of (0, 1) and can be used for binary classification.
[0054] In a specific embodiment, the trained prediction model is compared with the existing representative baseline models CQARank, QR-DSSM, and KGQR to determine whether the trained prediction model has the best performance in various evaluation indicators. The evaluation indicators include the metric precision (Precision@k), normalized discounted cumulative gain (NDCG@k), and mean reciprocal rank (MRR). The values of k are 3, 5, and 10. The comparison results are shown in Tables 1, 2, and 3, respectively.
[0055] Table 1 Comparison of model Precision@k
[0056]
[0057] Table 2 Comparison of model NDCG@k
[0058]
[0059] Table 3 Model MRR comparison
[0060]
[0061] In an embodiment of the present application, the method also includes: when the loss value is outside a preset range, collecting a preset optimization algorithm to adjust each model parameter of the prediction model, and returning to the step of inputting multiple training samples in the training set into the prediction model in sequence until the loss value is within the preset range.
[0062] When the loss value is outside the preset range, the processor can use a preset optimization algorithm to adjust the model parameters of the prediction model, and return to the step of sequentially inputting multiple training samples in the training set into the prediction model until the loss value is within the preset range. In a specific embodiment, the preset optimization algorithm can be an optimization algorithm based on gradient descent.
[0063] In an embodiment of the present application, constructing a training set includes: selecting one historical object from all historical objects in turn; determining the historical feature vectors of the selected historical object and each historical object that is not selected respectively; updating each historical feature vector based on the knowledge graph; determining the user's historical feature vector based on the weight of the unselected historical object and the updated historical feature vector of the unselected historical object; concatenating the updated historical feature vector of the selected historical object and the user's historical feature vector to obtain a training sample; and determining all training samples as a training set.
[0064] The processor can construct a training set. Specifically, the processor can select one historical object from all historical objects in turn, and determine the historical feature vectors of the selected historical object and the unselected historical objects respectively. After determining the historical feature vector of each historical object, the processor can update each historical feature vector based on the knowledge graph. After updating each historical feature vector, the processor can determine the user's historical feature vector based on the weight of the unselected historical object and the updated historical feature vector of the unselected historical object. After determining the user's historical feature vector, the processor can splice the updated historical feature vector of the selected historical object and the user's historical feature vector to obtain a training sample. The processor can determine all training samples as a training set.
[0065] In the embodiments of the present application, Figure 2 As shown, the processor can use KGAT (Knowledge Graph Attention Network) to process the new item entity (corresponding to the object to be evaluated above) and the candidate user historical interaction item entity (corresponding to the historical object above) to obtain the new item Embedding (vector) and each historical interaction item vector. The processor can use the Attention Network to process the new item entity and a historical interaction item entity to determine the weight of the historical interaction item entity. Specifically, in the attention network, the Concat function is used to splice the new item entity and a historical interaction item entity, and then the Dropout function (regularization), Relu function, and Sigmoid function are processed to assign weights to each historical interaction item entity, and each historical interaction item entity and the corresponding weight are weighted and summed to obtain the user Embedding (vector). The processor can use the Concat function to splice the new item Embedding and the user Embedding, and then process them through the Dropout function and the Sigmoid function to obtain the probability that the user is interested in the new item entity (corresponding to the interest value above). When there are multiple new item entities, the processor can determine the probability that the user is interested in each new item entity, and recommend the new item entity with the highest probability of interest to the user to meet the user's needs and improve the user experience.
[0066] Through the above technical solutions, the interactivity between users and objects is enhanced, the matching degree between users and objects is improved, the accuracy of recommendations is increased, and the user experience is improved.
[0067] Figure 1 FIG. 1 is a flow chart of a method for determining a user interest value in one embodiment. Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0068] The present application also provides a device for determining a user interest value, including:
[0069] a memory configured to store instructions;
[0070] The processor is configured to call instructions from the memory and implement the above method for determining the user interest value when executing the instructions.
[0071] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned method for determining a user interest value.
[0072] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as a first feature vector, a second feature vector, a third feature vector, a fourth feature vector and an interest value. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for determining a user interest value is implemented.
[0073] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0074] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the program: for any new object to be evaluated, determining a first feature vector of the object to be evaluated; obtaining multiple historical objects with which the user has interacted, and determining a second feature vector for each historical object; updating the first feature vector based on a knowledge graph corresponding to the user, and updating each second feature vector based on the knowledge graph, wherein the knowledge graph is constructed based on multiple historical objects of the user and interaction information between the user and each historical object; determining a third feature vector of the user based on a weight of each historical object and all updated second feature vectors; concatenating the updated first feature vector and the third feature vector to obtain a fourth feature vector corresponding to the object to be evaluated; and inputting the fourth feature vector into a trained prediction model to output the user's interest value in the object to be evaluated through the trained prediction model.
[0075] In one embodiment, the knowledge graph includes multiple directly or indirectly connected nodes, and updating the first feature vector based on the knowledge graph corresponding to the user includes: determining the first node in the knowledge graph that matches the first feature vector; determining the first neighbor node in the knowledge graph that is directly or indirectly connected to the first node; determining the feature vector of the first node and the feature vector of each first neighbor node; and concatenating the first feature vector, the feature vector of the first node, and the feature vectors of all first neighbor nodes to obtain an updated first feature vector.
[0076] In one embodiment, the knowledge graph includes multiple directly or indirectly connected nodes, and updating each second feature vector based on the knowledge graph includes: determining the second node in the knowledge graph that matches each second feature vector; for each second feature vector, determining the second neighbor node in the knowledge graph that is directly or indirectly connected to the second node that matches the second feature vector; for each second feature vector, determining the feature vector of the second node of the second feature vector and the feature vector of each second neighbor node of the second node of the second feature vector; for each second feature vector, concatenating the second feature vector, the feature vector of the second node of the second feature vector, and the feature vectors of all corresponding second neighbor nodes to obtain an updated second feature vector.
[0077] In one embodiment, determining the third feature vector of the user based on the weight of each historical object and all updated second feature vectors includes: determining, for each historical object, the product between the weight of the historical object and the updated second feature vector of the historical object; and determining the sum of the products of each historical object as the third feature vector of the user.
[0078] In one embodiment, the method also includes a training step for the prediction model, the training step includes: constructing a training set, the training set includes multiple training samples, each training sample is generated by multiple historical objects of the user; inputting the multiple training samples in the training set into the prediction model in sequence, and determining the loss value of each training sample based on the output of the prediction model and the loss function; when the loss value is within a preset range, determining that the prediction model training is completed.
[0079] In one embodiment, constructing a training set includes: selecting one historical object from all historical objects in turn; determining the historical feature vectors of the selected historical object and each historical object that is not selected respectively; updating each historical feature vector based on the knowledge graph; determining the user's historical feature vector based on the weight of the unselected historical object and the updated historical feature vector of the unselected historical object; concatenating the updated historical feature vector of the selected historical object and the user's historical feature vector to obtain a training sample; and determining all training samples as a training set.
[0080] In one embodiment, the method further includes: when the loss value is outside a preset range, collecting a preset optimization algorithm to adjust each model parameter of the prediction model, and returning to the step of inputting multiple training samples in the training set into the prediction model in sequence until the loss value is within the preset range.
[0081] In one embodiment, the loss function is as shown in expression (1):
[0082]
[0083] Among them, Loss is the loss value, y is the true label, and the value is 1 or 0. is the output of the prediction model, λ is a hyperparameter, Θ is all the parameters to be trained in the prediction model, for The logarithmic function of for The logarithmic function of .
[0084] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the steps of the method for determining a user interest value.
[0085] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may 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 may 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.) that contain computer-usable program code.
[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing 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.
[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing 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.
[0089] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0090] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0091] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0092] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0093] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for determining a user interest value, characterized in that: The method comprises: For any new object to be evaluated, determining a first feature vector of the object to be evaluated; Acquire multiple historical objects that the user has interacted with, and determine a second feature vector for each historical object; updating the first feature vector based on a knowledge graph corresponding to the user, and updating each second feature vector based on the knowledge graph, wherein the knowledge graph is constructed based on a plurality of historical objects of the user and interaction information between the user and each historical object; Determine a third feature vector of the user according to the weight of each historical object and all updated second feature vectors; Concatenate the updated first feature vector and the third feature vector to obtain a fourth feature vector corresponding to the object to be evaluated; The fourth feature vector is input into the trained prediction model, so as to output the user's interest value for the object to be evaluated through the trained prediction model.
2. The method for determining a user interest value according to claim 1, characterized in that: The knowledge graph includes a plurality of directly or indirectly connected nodes, and updating the first feature vector based on the knowledge graph corresponding to the user includes: Determine a first node in the knowledge graph that matches the first feature vector; Determine a first neighbor node in the knowledge graph that is directly or indirectly connected to the first node; Determine a feature vector of the first node and a feature vector of each first neighbor node; The first feature vector, the feature vector of the first node, and the feature vectors of all first neighboring nodes are concatenated to obtain an updated first feature vector.
3. The method for determining a user interest value according to claim 1, characterized in that: The knowledge graph includes a plurality of directly or indirectly connected nodes, and updating each second feature vector based on the knowledge graph includes: Determine a second node in the knowledge graph that matches each second feature vector; For each second feature vector, determining a second neighbor node in the knowledge graph that is directly or indirectly connected to a second node matching the second feature vector; For each second eigenvector, determining an eigenvector of a second node of the second eigenvector and an eigenvector of each second neighboring node of the second node of the second eigenvector; For each second eigenvector, the second eigenvector, the eigenvector of the second node of the second eigenvector, and the eigenvectors of all corresponding second neighboring nodes are concatenated to obtain an updated second eigenvector.
4. The method for determining a user interest value according to claim 1, characterized in that: Determining the third feature vector of the user according to the weight of each historical object and all updated second feature vectors comprises: For each historical object, determining a product between a weight of the historical object and an updated second feature vector of the historical object; The sum of the products of each history object is determined as the third feature vector of the user.
5. The method for determining a user interest value according to claim 1, characterized in that: The method further comprises a training step for the prediction model, wherein the training step comprises: Constructing a training set, wherein the training set includes a plurality of training samples, each training sample being generated by a plurality of historical objects of the user; Inputting a plurality of training samples in the training set into the prediction model in sequence, and determining a loss value of each training sample based on an output of the prediction model and a loss function; When the loss value is within a preset range, it is determined that the training of the prediction model is completed.
6. The method for determining a user interest value according to claim 5, characterized in that: The constructing of the training set comprises: Select one historical object in turn from all historical objects; Determine the historical feature vectors of the selected historical object and each of the unselected historical objects respectively; Update each historical feature vector based on the knowledge graph; Determine the historical feature vector of the user according to the weight of the unselected historical object and the updated historical feature vector of the unselected historical object; splicing the updated historical feature vector of the selected historical object and the historical feature vector of the user to obtain a training sample; All training samples are determined as the training set.
7. The method for determining a user interest value according to claim 5, characterized in that: The method further comprises: When the loss value is outside the preset range, a preset optimization algorithm is collected to adjust each model parameter of the prediction model, and the process returns to the step of inputting multiple training samples in the training set into the prediction model in sequence until the loss value is within the preset range.
8. The method for determining a user interest value according to claim 5, characterized in that: The loss function is shown in expression (1): Among them, Loss is the loss value, y is the true label, and the value is 1 or 0. is the output of the prediction model, λ is a hyperparameter, Θ is all the parameters to be trained in the prediction model, for The logarithmic function of for The logarithmic function of .
9. A device for determining a user interest value, characterized in that: include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the method for determining a user interest value according to any one of claims 1 to 8 when executing the instructions.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the method for determining a user interest value according to any one of claims 1 to 8.
Citation Information
Patent Citations
Interest point recommendation method and device based on node relation, equipment and medium
CN117390285A
Information recommendation method and device based on time sequence knowledge graph
CN117909583A
Determination method and device of interest point prediction model, prediction method and device and medium
CN118312683A
Knowledge graph recommendation method and system based on improved KGAT model
WO2023097929A1