Project recommendation method and device, electronic equipment and storage medium

The low-dimensional feature vectors of users and projects are extracted through the autoencoder, and combined with generalized matrix decomposition and multi-layer perceptron model, the interaction probability between users and projects is predicted, which solves the accuracy of the recommendation system in sparse matrix decomposition and improves the performance and user experience of the recommendation system.

CN120407903APending Publication Date: 2025-08-01TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410131039.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

When the existing recommendation system faces sparse user-project matrix, the matrix decomposition performance is affected, resulting in cold start problems and increased difficulty in model training, making it difficult to accurately recommend projects.

Method used

Low-dimensional feature vectors of users and projects are extracted through the autoencoder, combined with generalized matrix decomposition and multi-layer perceptron model, the interaction probability between users and projects is predicted, and the hidden features of users and projects are used for project recommendation.

Benefits of technology

Improve the accuracy of project recommendations, enhance user experience, and improve hit rate and normalized loss cumulative gain performance indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407903A_ABST
    Figure CN120407903A_ABST
Patent Text Reader

Abstract

The invention relates to a project recommendation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a first feature vector, a second feature vector, a first potential feature vector and a second potential feature vector, the first feature vector represents the feature of the interaction relationship between a first user and each project, and the second feature vector represents the feature of the interaction relationship between the first user and each project; the second feature vector represents the feature of the interaction relationship between the first item and each user, the first potential feature vector represents the hidden feature of the first user, and the second potential feature vector represents the hidden feature of the first item; and inputting the first feature vector, the second feature vector, the first potential feature vector and the second potential feature vector into a prediction model to obtain an interaction probability between the first user and the first item. According to the embodiment of the invention, the interaction probability between the user and the project can be obtained by utilizing the feature vectors of the user and the project, and the project recommendation accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of personalized recommendation, and particularly to an item recommendation method, an apparatus, an electronic device, and a storage medium. Background Art

[0002] A search engine provides as comprehensive information as possible after a user puts forward a clear demand, while a recommendation system provides the most needed information to the user after effectively understanding the user's demand. Among this information, some is directly needed by the user, and some may be something the user didn't think of but will like. At the same time, the emergence of the recommendation system enables long-tail products with a relatively small number of views to have more opportunities to be discovered. Since the 1990s, after decades of development, there have been many types of recommendation systems, which can be mainly divided into three categories: content-based recommendation algorithms, collaborative filtering-based recommendation algorithms, and hybrid recommendation algorithms. Among them, the most widely used is the collaborative filtering-based recommendation algorithm.

[0003] Matrix factorization is effective for collaborative filtering, but its performance is affected by the simple choice of the interaction function - the inner product. The inner product simply linearly combines the multiplication of latent features, which may not be sufficient to capture the complex structure of user interaction data. And in practical applications, the user-item matrix used by the recommendation system is often very sparse, and this sparsity will affect the performance of algorithm prediction and also bring the cold start problem. In neural networks, sparsity also further increases the difficulty of model training. Therefore, how to use sparse data to obtain a project recommendation system with good performance has become an urgent problem to be solved currently. Summary of the Invention

[0004] In view of this, the present disclosure provides an item recommendation method, an apparatus, an electronic device, and a storage medium, which can predict the interaction probability between a user and an item by using the interaction features of the user, the interaction features of the item, the latent features of the user, and the latent features of the item, and improve the accuracy of item recommendation.

[0005] According to one aspect of the present disclosure, an item recommendation method is provided. The method includes: obtaining a first feature vector, a second feature vector, a first latent feature vector, and a second latent feature vector, where the first feature vector represents the features of the interaction relationship between a first user and each item, the second feature vector represents the features of the interaction relationship between a first item and each user, the first latent feature vector represents the hidden features of the first user, and the second latent feature vector represents the hidden features of the first item; inputting the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item.

[0006] In a possible implementation, the obtaining of the first feature vector and the second feature vector includes: inputting the first interaction vector into a first autoencoder to obtain the first feature vector, and inputting the second interaction vector into a second autoencoder to obtain the second feature vector, where the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors, the first interaction vector represents the interaction relationship between a first user and each item, and the second interaction vector represents the interaction relationship between a first item and each user.

[0007] In a possible implementation, the method further includes a first training step for the first autoencoder, and the first training step includes: obtaining a third interaction vector, setting the parameters of the first autoencoder, where the third interaction vector represents the interaction relationship between a second user and each item; inputting the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and using the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector; calculating a first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and the cross-entropy function, and using the first loss to update the parameters of the first autoencoder until the training is completed to obtain the first autoencoder.

[0008] In a possible implementation, the method further includes a second training step for the second autoencoder, and the second training step includes: obtaining a fourth interaction vector, setting the parameters of the second autoencoder, where the fourth interaction vector represents the interaction relationship between a second item and each user; inputting the fourth interaction vector into the encoder of the second autoencoder to be trained for feature extraction to obtain a fourth feature vector, and using the decoder of the second autoencoder to be trained to decode the fourth feature vector to obtain a second decoded vector; calculating a second loss of the second autoencoder to be trained according to the fourth interaction vector, the second decoded vector, and the cross-entropy function, and using the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder.

[0009] In a possible implementation, the obtaining of the first interaction vector and the second interaction vector includes: performing binarization processing on the interaction relationship data between each user and each item to construct a user-item interaction matrix, where each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item; using the elements in the row corresponding to the first user in the user-item interaction matrix as the first interaction vector, and using the elements in the column corresponding to the first item in the user-item interaction matrix as the second interaction vector.

[0010] In a possible implementation, the obtaining of the first latent feature vector and the second latent feature vector includes: performing one-hot encoding on the first user and the first item to obtain corresponding first user vector and first item vector; obtaining a user latent feature matrix and an item latent feature matrix; multiplying the first user vector by the user latent feature matrix to obtain the first latent feature vector, and multiplying the first item vector by the item latent feature matrix to obtain the second latent feature vector.

[0011] In a possible implementation, the inputting of the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item includes: concatenating the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenating the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenating the first feature matrix and the second feature matrix to obtain a third feature matrix; inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

[0012] In a possible implementation, the prediction model includes a first prediction model and a second prediction model, and the inputting of the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, and inputting the third feature matrix into the second prediction model to obtain a second result; concatenating the first result and the second result to obtain a result matrix, multiplying the result matrix by a first weight and adding a first parameter, and then passing it through a first activation function to obtain the interaction probability between the first user and the first item.

[0013] In a possible implementation, the first prediction model is a generalized matrix factorization model, and the inputting of the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: taking the Kronecker product of the first feature matrix and the second feature matrix to obtain a first result.

[0014] In a possible implementation, the second prediction model is a multi-layer perceptron model, and the inputting of the third feature matrix into the second prediction model to obtain a second result includes: inputting the third feature matrix into a multi-layer neural network to obtain a second result, where the neural network includes a second weight, a second parameter, and a second activation function.

[0015] According to one aspect of the present disclosure, there is provided an item recommendation device, the device comprising: an acquisition module, configured to acquire a first feature vector, a second feature vector, a first latent feature vector, and a second latent feature vector, where the first feature vector represents the features of the interaction relationship between a first user and each item, the second feature vector represents the features of the interaction relationship between a first item and each user, the first latent feature vector represents the hidden features of the first user, and the second latent feature vector represents the hidden features of the first item; an interaction probability prediction module, configured to input the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item.

[0016] In a possible implementation manner, the acquisition module is further configured to: input a first interaction vector into a first autoencoder to obtain the first feature vector, and input a second interaction vector into a second autoencoder to obtain the second feature vector, where the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors, the first interaction vector represents the interaction relationship between a first user and each item, and the second interaction vector represents the interaction relationship between a first item and each user.

[0017] In a possible implementation manner, the device further includes a first training module for the first autoencoder, and the first training module is configured to: acquire a third interaction vector, set the parameters of the first autoencoder, where the third interaction vector represents the interaction relationship between a second user and each item; input the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and use the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector; calculate the first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and the cross-entropy function, and use the first loss to update the parameters of the first autoencoder until the training is completed to obtain the first autoencoder.

[0018] In a possible implementation, the device further includes a second training module for a second autoencoder, and the second training module is configured to: obtain a fourth interaction vector, set parameters of the second autoencoder, where the fourth interaction vector represents the interaction relationship between a second item and each user; input the fourth interaction vector into an encoder of the to-be-trained second autoencoder for feature extraction to obtain a fourth feature vector, and use a decoder of the to-be-trained second autoencoder to decode the fourth feature vector to obtain a second decoded vector; calculate a second loss of the to-be-trained second autoencoder according to the fourth interaction vector, the second decoded vector, and a cross-entropy function, and use the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder.

[0019] In a possible implementation, obtaining the first interaction vector and the second interaction vector includes: binarizing interaction relationship data between each user and each item to construct a user-item interaction matrix, where each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item; using a row of elements corresponding to the first user in the user-item interaction matrix as the first interaction vector, and using a column of elements corresponding to the first item in the user-item interaction matrix as the second interaction vector.

[0020] In a possible implementation, the obtaining module is further configured to: perform one-hot encoding on the first user and the first item to obtain corresponding first user vector and first item vector; obtain a user latent feature matrix and an item latent feature matrix; multiply the first user vector and the user latent feature matrix to obtain the first latent feature vector, and multiply the first item vector and the item latent feature matrix to obtain the second latent feature vector.

[0021] In a possible implementation, the interaction probability prediction module is further configured to: concatenate the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenate the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenate the first feature matrix and the second feature matrix to obtain a third feature matrix; input the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

[0022] In a possible implementation, the prediction model includes a first prediction model and a second prediction model. The process of inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, and inputting the third feature matrix into the second prediction model to obtain a second result; concatenating the first result and the second result to obtain a result matrix, multiplying the result matrix by a first weight and adding a first parameter, and then passing the result through a first activation function to obtain the interaction probability between the first user and the first item.

[0023] In a possible implementation, the first prediction model is a generalized matrix factorization model. The process of inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: performing a Kronecker product on the first feature matrix and the second feature matrix to obtain a first result.

[0024] In a possible implementation, the second prediction model is a multi-layer perceptron model. The process of inputting the third feature matrix into the second prediction model to obtain a second result includes: inputting the third feature matrix into a multi-layer neural network to obtain a second result. The neural network includes a second weight, a second parameter, and a second activation function.

[0025] According to one aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to call the instructions stored in the memory to execute the above method.

[0026] According to one aspect of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.

[0027] In the embodiment of the present disclosure, a first feature vector representing the interaction relationship between the first user and each item, a second feature vector representing the interaction relationship between the first item and each user, a first latent feature vector representing the hidden feature of the user, and a second latent feature vector representing the hidden feature of the item are put into a prediction model composed of an autoencoder, a generalized matrix factorization model, and a multi-layer perceptron model to predict the interaction probability between the first user and the first item. The interaction probability is used to determine whether to recommend the first item to the first user. Thus, the accuracy of item recommendation is improved and the user experience is enhanced.

[0028] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Description of the Drawings

[0029] The accompanying drawings herein are incorporated into the specification and form a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0030] Figure 1 A flowchart showing a project recommendation method according to an embodiment of the present disclosure.

[0031] Figure 2 A schematic diagram showing a training network of a first autoencoder according to an embodiment of the present disclosure.

[0032] Figure 3 A schematic diagram showing a prediction model according to an embodiment of the present disclosure.

[0033] Figure 4 A schematic diagram showing a prediction model according to an embodiment of the present disclosure.

[0034] Figures 5a - 5f A schematic diagram showing a performance index curve according to an embodiment of the present disclosure.

[0035] Figure 6 A schematic diagram showing the structure of a project recommendation device according to an embodiment of the present disclosure.

[0036] Figure 7 A block diagram showing an electronic device 1900 according to an embodiment of the present disclosure. Detailed Embodiments

[0037] The various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0038] The special term "exemplary" herein means "serving as an example, embodiment, or illustration". Any embodiment described as "exemplary" here is not necessarily to be construed as superior to or better than other embodiments.

[0039] As used herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the term "at least one" as used herein means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0040] In addition, for a better illustration of the present disclosure, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can also be implemented without certain specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail to highlight the gist of the present disclosure.

[0041] The key to a personalized recommendation system lies in modeling the user's preferences for items based on the user's past interactions (such as ratings and clicks), which is so-called collaborative filtering. Among various collaborative filtering techniques, matrix factorization is one of the most popular ones. It uses latent feature vectors to represent users or items, projects users and items into a shared latent space. Then, the interaction between a user and an item is modeled as the inner product of their latent vectors.

[0042] With the development of deep learning, more and more research applies neural networks to recommendation models. Among them, neural collaborative filtering that combines neural networks with matrix factorization has received great attention. Neural collaborative filtering uses a neural network to replace the inner product operation in matrix factorization, improving the expressive ability of matrix factorization. However, in practical applications, the user-item matrix used by the recommendation system is often very sparse. This sparsity affects the performance of algorithm prediction and also brings the cold start problem. In neural networks, the sparsity of data also further increases the difficulty of model training.

[0043] To solve the above technical problems, the embodiments of the present disclosure propose a method for item recommendation, which can predict the interaction probability between a user and an item by using the user's interaction features, the item's interaction features, the user's latent features, and the item's latent features, improving the accuracy of item recommendation. Figure 1 The flowchart showing the method for item recommendation according to the embodiments of the present disclosure is as follows. As Figure 1 shown, the method for item recommendation may include:

[0044] Step S11: Obtain a first feature vector, a second feature vector, a first latent feature vector, and a second latent feature vector. The first feature vector represents the features of the interaction relationship between a first user and each item. The second feature vector represents the features of the interaction relationship between a first item and each user. The first latent feature vector represents the hidden features of the first user. The second latent feature vector represents the hidden features of the first item.

[0045] Step S12: Input the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item.

[0046] After obtaining the information and data of the user in the item recommendation method, combined with the information and data of each item stored in the background, items that the user may be interested in can be recommended to the user. In step S11, in addition to the features of the interaction relationship between the user and each item and the features of the interaction relationship between the item and each user, implicit feedback information (i.e., the hidden features of the user and the item) is also utilized. For example, behaviors such as the user watching videos, purchasing products, and clicking on items indirectly reflect the user's preferences. Compared with explicit feedback (such as ratings and evaluations), hidden features are easier to collect. However, since the user's satisfaction is not observed, it is prone to errors. Therefore, in the embodiments of the present disclosure, the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector are all obtained, and the relationship between new users and items is predicted using feature vectors of different dimensions.

[0047] In a possible implementation manner, obtaining the first feature vector and the second feature vector may include: inputting a first interaction vector into a first autoencoder to obtain the first feature vector, and inputting a second interaction vector into a second autoencoder to obtain the second feature vector. Wherein, the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors. The first interaction vector represents the interaction relationship between the first user and each item, and the second interaction vector represents the interaction relationship between the first item and each user.

[0048] In a possible implementation manner, obtaining the first interaction vector and the second interaction vector may include: binarizing the interaction relationship data between each user and each item to construct a user-item interaction matrix. Each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item; taking the elements of the row corresponding to the first user in the user-item interaction matrix as the first interaction vector, and taking the elements of the column corresponding to the first item in the user-item interaction matrix as the second interaction vector.

[0049] In the embodiments of the present disclosure, a user-item interaction matrix is constructed based on the relationships between the collected users and items. By means of the user-item interaction matrix, the interaction relationships between each user and each item can be intuitively observed. In the user-item interaction matrix, each row can represent a user, and each column can represent an item. Therefore, the interaction vectors of users and items can be extracted from the user-item interaction matrix. When it is desired to obtain the interaction relationships between a first user and various items, the corresponding row of the first user can be extracted from the user-item matrix as the first interaction vector. When it is desired to obtain the interaction relationships between a first item and various users, the corresponding column of the first item can be extracted from the user-item matrix as the second interaction vector.

[0050] In the embodiments of the present disclosure, the user-item interaction matrix can be obtained from the interaction data of users and items. The data of users and items can indicate whether a user gives an explicit feedback or a hidden feedback on an item. For example, if user 1 gives an evaluation on item 1, then there is an interaction relationship between user 1 and item 1. If user 1 has viewed item 2, then there is also an interaction relationship between user 1 and item 2. By collecting the interaction relationships between each user and each item, the interaction data of users and items can be obtained.

[0051] After obtaining the interaction data of users and items, it can be processed by binarization to construct a user-item interaction matrix. The expression is:

[0052] X = UV T (Formula 1)

[0053] where the user-item interaction matrix X ∈ R m×n , m is the number of users, n is the number of items, U ∈ R m×k , V ∈ R n×k , and k represents the dimension of the latent feature space. U and V respectively represent the low-dimensional latent feature matrices of users and items.

[0054] As described above, each row in X represents a user, and each column represents an item. The elements in matrix X represent the relationships such as ratings or clicks between the corresponding users and the corresponding items, and the elements in matrix X are binarized, that is, 0 indicates no relationship, and 1 indicates a relationship. When the value of an element is 1, it only means that the corresponding user and the corresponding item are related, that is, there is an interaction between the user and the item. However, this does not necessarily mean that the user really likes the item. Similarly, the value of 0 for an element does not necessarily mean that the user dislikes the item, because it is also possible that the corresponding user is not aware of the item.

[0055] For selected users and projects, there may be an unobserved state between the user and the project. That is, the first user may not observe the first project. Through the project recommendation method, the interaction probability between the first user and the first project is predicted. Through the interaction probability, the interaction relationship between the first user and the first project can be determined. The number of the first user and the first project is not limited and can be set according to the needs of the user. For example, after the first user is determined, there are multiple projects as candidate projects. At this time, multiple projects can be used as the first project respectively to predict the interaction probability with the first user, sort the multiple projects according to the interaction probability, and select multiple projects with the top ranking according to the needs for recommendation to the user.

[0056] In an actual system, the number of users m and the number of projects n are often very large. Therefore, X is a matrix with extremely large scale and extremely high sparsity. Therefore, this sparse user-item interaction matrix X can be matrix factorized and mapped to two low-dimensional matrices U that can represent the latent features of users and V that can represent the latent features of projects respectively. As described above, U ∈ R m×k , V ∈ R n×k , where m and n represent the number of users and projects respectively, and k represents the dimension of the latent feature space. The dimension of the latent feature space and the meaning represented by each dimension can be set by the user himself. Each dimension in the latent feature space can be independent of each other or related to each other.

[0057] In a possible implementation manner, the obtaining of the first latent feature vector and the second latent feature vector may include: performing one-hot encoding on the first user and the first project to obtain corresponding first user vector and first project vector; obtaining a user latent feature matrix and a project latent feature matrix; multiplying the first user vector by the user latent feature matrix to obtain the first latent feature vector, and multiplying the first project vector by the project latent feature matrix to obtain the second latent feature vector.

[0058] In the embodiments of the present disclosure, the user latent feature matrix contains the latent feature vectors of all users, and the project latent feature matrix contains the latent feature vectors of all projects. Similar to the user-item interaction matrix, the y-th row in the user latent feature matrix can represent the latent feature vector of the y-th user, and the z-th row in the project latent feature matrix can represent the latent feature vector of the z-th project.

[0059] In the embodiments of the present disclosure, after obtaining the user latent feature matrix and the item latent feature matrix, the latent feature vector of the corresponding user and the latent feature vector of the item can be obtained from the two matrices. After determining the first user, it can be encoded with a one-hot code to obtain the corresponding first user vector, and the first latent feature vector of the first user can be extracted from the user latent feature matrix through the first user vector. Similarly, after determining the first item, it can be encoded with a one-hot code to obtain the corresponding first item vector, and the second latent feature vector of the first item can be extracted from the item latent feature matrix through the first item vector.

[0060] After determining the first user, it can be transformed into a sparse first user vector through one-hot encoding. For example, if there are m users in total, then each user will be transformed into a 1×m vector. If the i-th user is determined as the first user, then the first user vector is represented as [0, 0, ……, 0, 1, 0, ……, 0]. 1×m , where the i-th element is 1 and the rest of the elements are 0. After determining the first item, it can also be transformed into a sparse first item vector through one-hot encoding.

[0061] After obtaining the first user vector and the first item vector, multiplying the first user vector by the user latent feature matrix can extract the first latent feature vector from the user latent feature matrix. Multiplying the first item vector by the item latent feature matrix can extract the second latent feature vector from the item latent feature matrix.

[0062] In the embodiments of the present disclosure, after determining the user-item interaction matrix, the first interaction vector and the second interaction vector can be extracted from it. In the user-item interaction matrix, the j-th row represents the first interaction vector of the j-th user, which is a binary vector. Similarly, in the user-item interaction matrix, the k-th column represents the second interaction vector of the k-th item, which is also a binary vector. After determining the first user and the first item, the interaction vectors can be extracted from the corresponding rows and columns of the matrix to obtain the first interaction vector and the second interaction vector.

[0063] As mentioned above, the user-item interaction matrix is a matrix with a very high degree of sparsity. It can be imagined that the first interaction vector and the second interaction vector directly extracted from the rows and columns of the user-item interaction matrix are also relatively sparse. Whether in the process of training the prediction model or in the process of using the prediction model, using the relatively sparse first interaction vector and second interaction vector may affect the performance of the prediction model, and there is a problem of inaccurate prediction. Therefore, the features in the sparse interaction vectors can be extracted, and the low-dimensional first feature vector and second feature vector can be directly used to train the model or predict the interaction probability between the user and the item.

[0064] In the embodiments of the present disclosure, the features in the interaction vector can be extracted by using an autoencoder to obtain a feature vector. The basic idea of an autoencoder (AE) is to use a neural network for unsupervised learning. It takes the sample as both the input and output of the neural network to learn the representation of the sample. A typical structure has more neurons in the input layer and output layer and fewer neurons in the middle layer. The data is compressed through the fitting ability of the neural network to reduce the dimension of the data.

[0065] In a possible implementation manner, the method further includes a first training step for the first autoencoder. The first training step includes: obtaining a third interaction vector, setting the parameters of the first autoencoder, where the third interaction vector represents the interaction relationship between the second user and each item; inputting the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and using the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector; calculating a first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and the cross-entropy function, and updating the parameters of the first autoencoder using the first loss until the training is completed to obtain the first autoencoder.

[0066] An autoencoder consists of an encoder part and a decoder part. When data is input into the autoencoder, the encoder part can encode the data to obtain the features of the data, that is, summarize the features of the original data through the encoder part. The encoded features are input into the decoder to restore the features, and the restoration target is the original data. When using an autoencoder for feature extraction of data, the encoder part of the autoencoder can be directly used to extract the features through the encoder part of the autoencoder.

[0067] Figure 2 The schematic diagram of the training network of the first autoencoder according to the embodiments of the present disclosure is shown. As Figure 2 shown, the third interaction vector x u is used as the input and output of the autoencoder to train the autoencoder. The corresponding expression is:

[0068] x u = g d_u (g e_u (x u )) (Formula 2)

[0069] where x u is the interaction vector of the user, g e_u represents the encoder for extracting features from the interaction vector of the user, and g d_u represents the corresponding decoder.

[0070] In an embodiment of the present disclosure, the first training step includes: constructing a first autoencoder, setting parameters g for the encoder part of the first autoencoder e_u , setting parameters g for the decoder part of the autoencoder d_u , taking each row in the user-item interaction matrix as x u and inputting it into the constructed first autoencoder. Through Figure 2 It can be seen that the third interaction vector x u is input into the encoder part to obtain the extracted third feature vector p u , using the decoding part of the first autoencoder to decode the third feature vector to obtain the first decoded vector x u , that is, the first decoded vector output by the decoding part should be the same as the third interaction vector received by the encoding part. Using the cross-entropy function to calculate the first loss between the third interaction vector and the first decoded vector, and using the first loss to update the parameters of the first autoencoder to obtain the first autoencoder

[0071] After the first autoencoder is trained, it can be used:

[0072] p u_AE = g e_u (q u ) (Formula 3)

[0073] where p u_AE is the first feature vector obtained through the first autoencoder

[0074] After determining the first interaction vector of the first user according to the user-item interaction matrix, input the first interaction vector into the first autoencoder, and extract the features in the first interaction vector through the encoder part of the first autoencoder to obtain the first feature vector

[0075] In a possible implementation, the method further includes a second training step for a second autoencoder. The second training step includes: obtaining a fourth interaction vector, setting parameters of the second autoencoder, where the fourth interaction vector represents the interaction relationship between the second item and each user; inputting the fourth interaction vector into the encoder of the second autoencoder to be trained for feature extraction to obtain a fourth feature vector, and using the decoder of the second autoencoder to be trained to decode the fourth feature vector to obtain a second decoded vector; calculating the second loss of the second autoencoder to be trained according to the fourth interaction vector, the second decoded vector, and the cross-entropy function, and using the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder

[0076] In an embodiment of the present disclosure, taking the fourth interaction vector x iTrain the second autoencoder as the input and output of the autoencoder. The corresponding expression is:

[0077] x i = g d_i (g e_i (x i )) (Formula 4)

[0078] where x i is the item interaction vector, and g e_i represents the encoder that extracts features from the item interaction vector, and g d_i represents the corresponding decoder.

[0079] In the embodiment of the present disclosure, the second training step includes: constructing a second autoencoder, setting the parameter g e_i for the encoder part of the second autoencoder, setting the parameter g d_i for the decoder part of the second autoencoder, taking each column in the user-item interaction matrix as x i and inputting it into the constructed second autoencoder. The fourth interaction vector x i is input into the encoder part to obtain the extracted fourth feature vector p i . The fourth feature vector is decoded by the decoding part of the second autoencoder to obtain the second decoded vector x i '. The second loss between the fourth interaction vector and the second decoded vector is calculated using the cross-entropy function, and the second autoencoder is updated with the second loss to obtain the second autoencoder.

[0080] After the second autoencoder is trained, it can be used:

[0081] p i_AE = g i_u (q i ) (Formula 5)

[0082] where p i_AE is the second feature vector obtained through the second autoencoder.

[0083] After determining the second interaction vector of the first item according to the user-item interaction matrix, input the second interaction vector into the second autoencoder, and the features in the second interaction vector are extracted by the encoder part of the second autoencoder to obtain the second feature vector.

[0084] In a possible implementation, the step of inputting the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item may include: inputting the first latent feature vector and the second latent feature vector into the prediction model to obtain the interaction probability between the first user and the first item.

[0085] The prediction model may sample a neural collaborative filtering algorithm. Figure 3 A schematic diagram of the prediction model according to an embodiment of the present disclosure is shown. As Figure 3 shown, the prediction model may be divided into four layers, namely an input layer, an embedding layer, a neural collaborative filtering layer, and an output layer. Among them, in the input layer, a first user vector is obtained by one-hot encoding the first user and the first item. and a first item vector The embedding layer is used to extract the latent features in the first user vector and the first item vector to obtain a first latent feature vector and a second latent feature vector, and respectively multiply the first user vector and the first item vector encoded by one-hot with the user latent feature matrix U and the item latent feature matrix V to obtain a first latent feature vector p u and a second latent feature vector p i ; The neural collaborative filtering layer is used to interact the first latent feature vector and the second latent feature vector obtained by the embedding layer, and use p u and p i as inputs to obtain an intermediate value in the neural collaborative filtering layer. The output layer is used to utilize the result obtained by the neural collaborative filtering layer to predict the interaction probability. Inputting into the output layer, the interaction probability can be obtained through a neural network. Its expression is:

[0086]

[0087] Among them, is the interaction probability output by the prediction model, U and V respectively represent the user latent feature matrix and the item latent feature matrix, f(·) represents a neural network model that maps the latent feature vector to the corresponding interaction probability, and θ represents the parameters of the prediction model.

[0088] Since the neural network model f(·) can have different structures, different prediction models can be adopted to implement the item recommendation method, such as the generalized matrix factorization (GMF) model and the multi-layer perception (MLP) model, etc. The present disclosure places no restrictions thereon.

[0089] In the embodiments of the present disclosure, the generalized matrix factorization model can be regarded as an extended model of matrix factorization, that is, matrix factorization is a special case of the generalized factorization model. The generalized matrix factorization model multiplies the corresponding elements of the first latent vector and the second latent vector and obtains an output value through a layer of neural network. Its expression is:

[0090]

[0091]

[0092] Wherein, respectively refer to the first latent feature vector and the second latent feature vector in the generalized matrix factorization model; is the inner product operator; is the neural collaborative filtering layer of the generalized matrix factorization model, which is obtained by multiplying the corresponding elements of the first latent feature vector and the second latent feature vector. Therefore, its length is the same as that of the first latent feature vector and the second latent feature vector; σ(·) is the activation function; is the interaction probability obtained by the generalized matrix factorization model.

[0093] In Formula 7, it is necessary to multiply the corresponding elements of the first latent feature vector and the second latent feature vector. As mentioned above, the first latent feature vector is obtained from the user latent feature matrix, and the second latent feature vector is obtained from the item latent feature matrix. Therefore, the dimension of the first latent feature vector is determined by the user latent feature matrix, and the dimension of the second latent feature vector is determined by the item latent feature vector matrix. In one example, the latent feature matrices of the user and the item are U∈R m×k , V∈R n×k , where m and n respectively represent the number of users and items, and k represents the dimension of the latent feature space. It can be seen that the dimensions of both the first latent feature vector and the second latent feature vector are 1×k. Therefore, multiplying the corresponding elements of the two vectors still results in a 1×k vector.

[0094] In Equation 8, h and σ respectively represent the weights of the output layer and the activation function. If the identity function is used for the activation function and h is made into a vector of 1, it becomes a traditional matrix factorization model. h, as the weights of the output layer, can be regarded as the weight matrix of the fully connected layer, corresponding to the dimension of the latent feature vector, and h should be a k×1 matrix. The setting of the activation function is not restricted, and functions such as sigmoid, tanh, and ReLU can be freely selected.

[0095] The inputs of the prediction model are the latent feature vectors of the user and the item respectively, and the generalized matrix factorization model concatenates the first latent feature vector and the second latent feature vector. However, simple vector concatenation cannot explain any interaction between the latent features of the user and the item, which is insufficient for modeling collaborative filtering. To solve this problem, a multi-layer perceptron model can be used to learn the interaction between the latent features of the user and the item.

[0096] In the embodiments of the present disclosure, the multi-layer perceptron model concatenates the first latent feature vector and the second latent feature vector into a vector, and then obtains the output value through a multi-layer neural network. Its expression is:

[0097]

[0098]

[0099] where [[ID=!16]] respectively refer to the first latent feature vector and the second latent feature vector of the multi-layer perceptron model; is the last layer of the neural collaborative filtering layer of the multi-layer perceptron model, obtained by concatenating the first latent feature vector and the second latent feature vector and passing through a multi-layer neural network; W and b are the connection weights and threshold parameters of the multi-layer perceptron model, and a(·) is the activation function; is the interaction probability predicted by the multi-layer perceptron model. The setting of the activation function is also not restricted, and functions such as sigmoid, tanh, and ReLU can be freely selected.

[0100] In a possible implementation manner, the obtaining the interaction probability between the first user and the first item by inputting the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into the prediction model may include: concatenating the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenating the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenating the first feature matrix and the second feature matrix to obtain a third feature matrix; inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

[0101] Inputting the first latent feature vector and the second latent feature vector into the prediction model can obtain the interaction probability between the first user and the first item. However, as mentioned above, the first latent feature vector and the second latent feature vector are respectively extracted from the user latent feature matrix and the item latent feature matrix, and their dimensions are determined by the latent feature matrix. Obviously, the information carried by the latent feature vector is related to the dimension of the latent feature matrix. To enhance the prediction accuracy of the prediction model, the first feature vector and the second feature vector are input into the prediction model simultaneously to predict the result. The first feature vector and the second feature vector are obtained by extracting features from the first interaction vector and the second interaction vector carrying all interaction information, so they have the advantages of both low dimension and large amount of information at the same time.

[0102] In the embedding layer of the prediction model, the first latent feature vector, the first feature vector, the second latent feature vector, and the second feature vector are respectively cascaded. In this way, the first latent feature vector and the first feature vector representing the first user feature are combined to obtain the first feature matrix, the second latent feature vector and the second feature vector representing the first item feature are combined to obtain the second feature matrix, and inputting the first feature matrix and the second feature matrix into the prediction model can predict the interaction probability between the first user and the first item by using the feature combination matrix.

[0103] In a possible implementation manner, the prediction model may include a first prediction model and a second prediction model. The process of inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, inputting the third feature matrix into the second prediction model to obtain a second result; cascading the first result and the second result to obtain a result matrix, multiplying the result matrix by the first weight and adding the first parameter, and then passing through the first activation function to obtain the interaction probability between the first user and the first item.

[0104] In the embodiments of the present disclosure, the prediction model may include a first prediction model and a second prediction model. Through the interaction between the first prediction model and the second prediction model, the two prediction models can enhance each other, and a prediction model with better prediction performance is obtained. The first prediction model and the second prediction model are introduced below.

[0105] In a possible implementation manner, the first prediction model is a generalized matrix factorization model. The process of inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: taking the Kronecker product of the first feature matrix and the second feature matrix to obtain a first result.

[0106] In the embodiments of the present disclosure, for the first prediction model, the first feature vector obtained by inputting the first interaction vector into the first autoencoder The second interaction vector is input into the second autoencoder to obtain a second feature vector The first feature vector and the second feature vector are cascaded with the corresponding first latent feature vector The second latent feature vector to obtain a first feature matrix and a second feature matrix respectively, which are jointly used as the input of the prediction model. The expression is:

[0107]

[0108]

[0109] where represents that the neural collaborative filtering layer of the first prediction model obtains a first result, represents the interaction probability between the first user and the first item predicted by the first prediction model, and σ(·) is an activation function, is the weight of the first prediction model.

[0110] In Equation (11), the Kronecker product of the first feature matrix and the second feature matrix needs to be calculated, that is, each element in the first feature matrix is multiplied by each element in the second feature matrix respectively to obtain a block matrix. In Equation (12), the activation function is not limited either, and functions such as sigmoid, tanh, and ReLU can be freely selected.

[0111] In the first prediction model, the first latent feature vector and the second latent feature vector need to learn all relevant information. In the neural collaborative filtering algorithm for feature extraction and fusion, since the first feature vector and the second feature vector provided by the first autoencoder and the second autoencoder respectively already contain a lot of important information, the optimization difficulty is reduced.

[0112] In a possible implementation, the second prediction model is a multi-layer perceptron model. The step of inputting the third feature matrix into the second prediction model to obtain a second result includes: inputting the third feature matrix into a multi-layer neural network to obtain a second result, and the neural network includes a second weight, a second parameter, and a second activation function.

[0113] In the embodiments of the present disclosure, for the second prediction model, the first feature vector obtained by inputting the first interaction vector into the first autoencoder The second interaction vector is input into the second autoencoder to obtain a second feature vector With the first eigenvector The second eigenvector are cascaded to obtain a third eigenmatrix, which together serve as the input to the prediction model. Its expression is:

[0114]

[0115]

[0116] where represents the second result obtained by the neural collaborative filtering layer of the second prediction model, represents the interaction probability between the first user and the first item predicted by the second prediction model, and σ(·) is the activation function, is the weight of the second prediction model.

[0117] In the second prediction model, the first latent eigenvector and the second latent eigenvector need to learn all relevant information. In the neural collaborative filtering algorithm for feature extraction and fusion, since the first eigenvector and the second eigenvector provided by the first autoencoder and the second autoencoder respectively already contain a lot of important information, the optimization difficulty is thus reduced.

[0118] In the embodiments of the present disclosure, it can be seen from Formula 11 and Formula 13 that the first prediction model uses a linear function to interact the features of the user and the item, and the second prediction model uses a non - linear function to learn the interaction function from the data. Obviously, the two prediction models can enhance each other. By combining the first prediction model and the second prediction model, a neural matrix factorization (NeuMF) model (prediction model) can be obtained. The first prediction model and the second prediction model are combined in a cascaded manner in the neural collaborative filtering layer to form a prediction model. Its expression is as follows:

[0119]

[0120] where is the interaction probability between the first user and the first item obtained by the prediction model. is the first weight of the prediction model.

[0121] Figure 4 shows a schematic diagram of the prediction model according to the embodiments of the present disclosure. As Figure 4 shown, in the input layer, x u is the first interaction vector, x iis the second interaction vector. The user one-hot code is the first user vector obtained by encoding the first user through one-hot encoding. The item one-hot code is the first item vector obtained by encoding the first item through one-hot encoding. Both the first interaction vector and the second interaction vector can be obtained through the user-item interaction matrix after determining the first user and the first item.

[0122] The embedding layer is used to obtain the features of the input data. The user latent feature matrix U and the item latent feature matrix V are multiplied by the first user vector and the first item vector encoded by one-hot encoding respectively to obtain the first latent feature vector p u and the second latent feature vector p i , the first feature vector p obtained by inputting the first interaction vector into the first autoencoder u_AE , the second feature vector p obtained by inputting the second interaction vector into the second autoencoder i_AE , in the embedding layer, the feature vectors of users and items obtained through autoencoders are added. Compared with the latent feature vectors, they carry a large amount of information; on the side of the first prediction model, the first feature vector and the first latent feature vector are concatenated to obtain the first feature matrix, the second feature vector and the second latent feature vector are concatenated to obtain the second feature matrix, and the first feature matrix and the second feature matrix are input into its neural collaborative filtering layer; on the side of the second prediction model, the first feature vector, the second feature vector, the first latent feature vector and the second latent feature vector are concatenated to obtain the third feature matrix, and the third feature matrix is input into its neural collaborative filtering layer.

[0123] The neural collaborative filtering layer is used to process the features to obtain an intermediate value for prediction. On the side of the first prediction model, the Kronecker product of the first feature matrix and the second feature matrix is calculated, that is, each element in the first feature matrix is multiplied by each element in the second feature matrix respectively to obtain the first result On the side of the second prediction model, the third feature matrix is input into a multi-layer neural network to obtain the second result The first result and the second result are concatenated to obtain a result matrix and input into the output layer.

[0124] The output layer is used to output the prediction result. The result matrix is passed through a neural network, multiplied by the first weight and the result matrix, and after adding the first parameter, the interaction probability between the first user and the first item is obtained through the first activation function

[0125] Next, the training method of the prediction model will be introduced. In the item positioning method, the widths of the embedding layers of all models and the widths of the autoencoders can be freely set, that is, the dimensions of the latent feature vectors and the feature vectors are set. In one example, the embedding layer width of the first prediction model and the second prediction model is set to 8, and the autoencoder width is set to 16, that is, p uand p i has a length of 8, p u_AE and p i_AE has a length of 16.

[0126] The training set consists of positive samples and negative samples, and each positive sample corresponds to n negative samples, where n is an integer greater than 0. The positive samples are all interaction data (u, i) with a label of 1, where u represents the u-th user and i represents the i-th item. For the selected user, n negative samples are sampled from the non-interacted cases according to a certain proportion, that is, (u, item1), (u, item2), ……, (u, item n ), and the labels of these pairs are all 0. So if the number of samples with interactions is m, that is, the number of positive samples is m, then the number of negative samples is nm, and the training set has a total of (n + 1)m samples. In one example, the negative sampling rate of the present invention is set to 4, that is, in each round of training, 4 times the number of samples is randomly sampled from the non-interacted items as negative examples for training.

[0127] The encoder part of the trained first autoencoder is used to obtain the first feature vector p of the user according to formula 3 u_AE , and the encoder part of the trained second autoencoder is used to obtain the second feature vector p of the item according to formula 5 i_AE ; The feature vectors obtained by the first autoencoder and the second autoencoder are combined with the first latent feature vector and the second latent feature vector as the input of the neural collaborative filtering model according to formulas 11 - 15 to obtain the interaction probability, and the model is trained using the pointwise loss between the interaction probability and the label. The parameters of the model when the error value is minimized are found through the gradient descent method, and these parameters are used as the final parameters of the model to obtain the prediction model.

[0128] In a possible implementation manner, an e-commerce dataset is used to verify the item recommendation method, and the evaluation metrics used in the verification process include the Hit Ratio (HR) and the Normalized Discounted Cumulative Gain (NDCG). When calculating the evaluation metrics, the leave-one-out method is adopted. For each user, the item with the latest interaction of the user is reserved as the test item I u ; 100 items are randomly selected from the items that the user has not interacted with for scoring and ranking, and then the position of the test item in this ranking is calculated. Finally, the top K (the top K ranked) items are used as the recommended items. If the test item is in the top K list, the hit rate of the user is 1, otherwise it is 0. The Normalized Discounted Cumulative Gain (NDCG) also considers the position of the test item in the recommended list, and is 1 only when the position of the test item is at the front, and the score becomes lower as it gets further back.

[0129] The expression for Hit Rate (HR) is:

[0130]

[0131] The expression for Normalized Discounted Cumulative Gain (NDCG) is:

[0132]

[0133] where K is usually taken as 10 or 20; ω(r) represents the item ranked r-th among 100 items, and ω(r) is 1 when it is the test item I u and 0 otherwise.

[0134] The e-commerce dataset is made from the order data of an e-commerce merchant in one year, which contains 29,360 users and 2,004 kinds of goods, about 450,000 interaction messages. Each user has purchased at least 5 kinds of goods, and the data sparsity is 99.24%.

[0135] Table 1 shows the recommendation accuracy between the item recommendation method proposed in this disclosure and the classical neural collaborative filtering algorithm. Among them, GMF_AE, MLP_AE, and NeuMF_AE respectively represent the prediction results when based on the first prediction model, the second prediction model, and the combination of the first and second prediction models.

[0136] Table 1 E-commerce data

[0137]

[0138] As can be seen from Table 1, on the e-commerce dataset, based on the same prediction model, the hit rate and normalized discounted cumulative gain of this disclosure are significantly better than those of the classical neural collaborative filtering, proving that the item recommendation method proposed in this disclosure has a better recommendation effect than the classical neural collaborative filtering, indicating its greater advantage in sparse data.

[0139] Figures 5a - 5f Shows a schematic diagram of the performance index curve according to an embodiment of the present disclosure. As Figure 5a shown, the abscissa is the different values of K (0 - 20), the ordinate is the value of the hit rate (HR), the red curve represents the hit rate of the traditional multi-layer perceptron model at different K values, and the blue curve represents the hit rate of the second prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0140] As Figure 5bAs shown, the abscissa represents different values of K (0 - 20), and the ordinate represents the value of the hit rate (HR). The red curve represents the hit rate of the traditional generalized matrix factorization model at different K values, and the blue curve represents the hit rate of the first prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0141] As Figure 5c shown, the abscissa represents different values of K (0 - 20), and the ordinate represents the value of the hit rate (HR). The red curve represents the hit rate of the traditional neural collaborative filtering model at different K values, and the blue curve represents the hit rate of the combination of the first prediction model and the second prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0142] As Figure 5d shown, the abscissa represents different values of K (0 - 20), and the ordinate represents the value of the normalized discounted cumulative gain (NDCG). The red curve represents the normalized discounted cumulative gain of the traditional multi-layer perceptron model at different K values, and the blue curve represents the normalized discounted cumulative gain of the second prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0143] As Figure 5e shown, the abscissa represents different values of K (0 - 20), and the ordinate represents the value of the normalized discounted cumulative gain (NDCG). The red curve represents the normalized discounted cumulative gain of the traditional generalized matrix factorization model at different K values, and the blue curve represents the normalized discounted cumulative gain of the first prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0144] As Figure 5f shown, the abscissa represents different values of K (0 - 20), and the ordinate represents the value of the normalized discounted cumulative gain (NDCG). The red curve represents the normalized discounted cumulative gain of the traditional neural collaborative filtering model at different K values, and the blue curve represents the normalized discounted cumulative gain of the combination of the first prediction model and the second prediction model at different K values. Obviously, the predicted values obtained through the autoencoder are better than those of the classical neural collaborative filtering.

[0145] In an embodiment of the present disclosure, a project recommendation method is proposed. The first feature vector representing the interaction relationship between the first user and each project, the second feature vector representing the interaction relationship between the first project and each user, the first latent feature vector representing the hidden feature of the user, and the second latent feature vector representing the hidden feature of the project are input into a prediction model composed of an autoencoder, a generalized matrix factorization model, and a multi-layer perceptron model to predict the interaction probability between the first user and the first project. The interaction probability is used to determine whether to recommend the first project to the first user. Through the neural collaborative filtering recommendation method of interaction feature extraction and fusion, the performance indicators such as the hit rate and normalized discounted cumulative gain of the neural collaborative filtering recommendation are higher, the accuracy of the project recommendation is improved, and the user experience is enhanced.

[0146] It can be understood that the above-mentioned method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not elaborate. Those skilled in the art can understand that in the above methods of the specific implementation manner, the specific execution order of each step should be determined according to its function and possible internal logic.

[0147] In addition, the present disclosure also provides a project recommendation device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any one of the project recommendation methods provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be elaborated here.

[0148] Figure 6 A schematic structural diagram of a project recommendation device according to an embodiment of the present disclosure is shown. As Figure 6 shown, the device 60 may include:

[0149] An acquisition module 61, configured to acquire a first feature vector, a second feature vector, a first latent feature vector, and a second latent feature vector, where the first feature vector represents the feature of the interaction relationship between the first user and each project, the second feature vector represents the feature of the interaction relationship between the first project and each user, the first latent feature vector represents the hidden feature of the first user, and the second latent feature vector represents the hidden feature of the first project;

[0150] An interaction probability prediction module 62, configured to input the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first project.

[0151] In a possible implementation, the obtaining module is further configured to: input the first interaction vector into a first autoencoder to obtain the first feature vector, and input the second interaction vector into a second autoencoder to obtain the second feature vector, where the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors, the first interaction vector represents the interaction relationship between a first user and each item, and the second interaction vector represents the interaction relationship between a first item and each user.

[0152] In a possible implementation, the apparatus further includes a first training module for the first autoencoder, and the first training module is configured to: obtain a third interaction vector, set the parameters of the first autoencoder, where the third interaction vector represents the interaction relationship between a second user and each item; input the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and use the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector; calculate a first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and the cross-entropy function, and use the first loss to update the parameters of the first autoencoder until the training is completed to obtain the first autoencoder.

[0153] In a possible implementation, the apparatus further includes a second training module for the second autoencoder, and the second training module is configured to: obtain a fourth interaction vector, set the parameters of the second autoencoder, where the fourth interaction vector represents the interaction relationship between a second item and each user; input the fourth interaction vector into the encoder of the second autoencoder to be trained for feature extraction to obtain a fourth feature vector, and use the decoder of the second autoencoder to be trained to decode the fourth feature vector to obtain a second decoded vector; calculate a second loss of the second autoencoder to be trained according to the fourth interaction vector, the second decoded vector, and the cross-entropy function, and use the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder.

[0154] In a possible implementation, obtaining the first interaction vector and the second interaction vector includes: performing binarization processing on the interaction relationship data between each user and each item to construct a user-item interaction matrix, where each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item; using the elements in the row corresponding to the first user in the user-item interaction matrix as the first interaction vector, and using the elements in the column corresponding to the first item in the user-item interaction matrix as the second interaction vector.

[0155] In a possible implementation, the obtaining module is further configured to: perform one-hot encoding on the first user and the first item to obtain corresponding first user vector and first item vector; obtain a user latent feature matrix and an item latent feature matrix; multiply the first user vector by the user latent feature matrix to obtain the first latent feature vector, and multiply the first item vector by the item latent feature matrix to obtain the second latent feature vector.

[0156] In a possible implementation, the interaction probability prediction module is further configured to: concatenate the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenate the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenate the first feature matrix and the second feature matrix to obtain a third feature matrix; input the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

[0157] In a possible implementation, the prediction model includes a first prediction model and a second prediction model. The step of inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, and inputting the third feature matrix into the second prediction model to obtain a second result; concatenating the first result and the second result to obtain a result matrix, multiplying the result matrix by a first weight and adding a first parameter, and then passing the result through a first activation function to obtain the interaction probability between the first user and the first item.

[0158] In a possible implementation, the first prediction model is a generalized matrix factorization model. The step of inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: taking the Kronecker product of the first feature matrix and the second feature matrix to obtain a first result.

[0159] In a possible implementation, the second prediction model is a multi-layer perceptron model. The step of inputting the third feature matrix into the second prediction model to obtain a second result includes: inputting the third feature matrix into a multi-layer neural network to obtain a second result, where the neural network includes a second weight, a second parameter, and a second activation function.

[0160] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0161] An embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned method is implemented. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0162] An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above-mentioned method.

[0163] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in the processor of an electronic device, the processor in the electronic device executes the above-mentioned method.

[0164] The electronic device may be provided as a server or other form of device.

[0165] Figure 7 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server or a terminal device. Referring to Figure 7 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above-mentioned method.

[0166] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as the Microsoft server operating system (Windows Server TM ), the graphical user interface-based operating system launched by Apple Inc. (Mac OS X TM ), the multi-user and multi-process computer operating system (Unix TM ), the free and open-source Unix-like operating system (Linux TM ), the open-source Unix-like operating system (FreeBSD TM ) or the like.

[0167] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions. The above computer program instructions can be executed by a processing component 1922 of the electronic device 1900 to complete the above method. The computer program product can be specifically implemented in the form of hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is specifically embodied as a computer storage medium. In another alternative embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0168] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. Their similarities or resemblances can be referred to each other. For the sake of brevity, they will not be elaborated herein.

[0169] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order that constitutes any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0170] If the technical solution of this application involves personal information, before the product applying the technical solution of this application processes personal information, it has clearly informed the personal information processing rules and obtained the individual's independent consent. If the technical solution of this application involves sensitive personal information, before the product applying the technical solution of this application processes sensitive personal information, it has obtained the individual's separate consent and at the same time meets the requirement of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent identifier is set to inform that the personal information collection range has been entered and personal information will be collected. If an individual voluntarily enters the collection range, it is regarded as consenting to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are informed by obvious identifiers / information, personal authorization is obtained through pop-up information or asking the individual to upload their personal information by themselves, etc.; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

[0171] The various embodiments of the present disclosure have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skill in the art in the technical field to understand the disclosed embodiments.

Claims

1. A project recommendation method, characterized in that, The method includes: Obtaining a first feature vector, a second feature vector, a first latent feature vector, and a second latent feature vector, where the first feature vector represents the features of the interaction relationship between a first user and each item, the second feature vector represents the features of the interaction relationship between a first item and each user, the first latent feature vector represents the hidden features of the first user, and the second latent feature vector represents the hidden features of the first item; Inputting the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item.

2. The method according to claim 1, characterized in that The obtaining of the first feature vector and the second feature vector includes: Inputting a first interaction vector into a first autoencoder to obtain the first feature vector, and inputting a second interaction vector into a second autoencoder to obtain the second feature vector, where the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors, the first interaction vector represents the interaction relationship between a first user and each item, and the second interaction vector represents the interaction relationship between a first item and each user.

3. The method according to claim 2, wherein The method further includes a first training step for the first autoencoder, and the first training step includes: Obtaining a third interaction vector and setting the parameters of the first autoencoder, where the third interaction vector represents the interaction relationship between a second user and each item; Inputting the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and using the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector; Calculating a first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and the cross-entropy function, and using the first loss to update the parameters of the first autoencoder until the training is completed to obtain the first autoencoder.

4. The method according to claim 2, wherein The method further includes a second training step for the second autoencoder, and the second training step includes: Obtaining a fourth interaction vector and setting the parameters of the second autoencoder, where the fourth interaction vector represents the interaction relationship between a second item and each user; Inputting the fourth interaction vector into the encoder of the second autoencoder to be trained for feature extraction to obtain a fourth feature vector, and using the decoder of the second autoencoder to be trained to decode the fourth feature vector to obtain a second decoded vector; Calculating a second loss of the second autoencoder to be trained according to the fourth interaction vector, the second decoded vector, and the cross-entropy function, and using the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder.

5. The method according to claim 2, wherein Obtaining the first interaction vector and the second interaction vector includes: Performing binarization processing on the interaction relationship data between each user and each item to construct a user-item interaction matrix, where each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item. Take the elements of the row corresponding to the first user in the user-item interaction matrix as the first interaction vector, and take the elements of the column corresponding to the first item in the user-item interaction matrix as the second interaction vector.

6. The method according to claim 1, wherein The obtaining of the first latent feature vector and the second latent feature vector includes: Perform one-hot encoding on the first user and the first item to obtain corresponding first user vector and first item vector; Obtain a user latent feature matrix and an item latent feature matrix; Multiply the first user vector by the user latent feature matrix to obtain the first latent feature vector, and multiply the first item vector by the item latent feature matrix to obtain the second latent feature vector.

7. The method according to claim 1, wherein The inputting of the first feature vector, the second feature vector, the first latent feature vector and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item includes: Concatenate the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenate the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenate the first feature matrix and the second feature matrix to obtain a third feature matrix; Input the first feature matrix, the second feature matrix and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

8. The method according to claim 7, wherein The prediction model includes a first prediction model and a second prediction model. The inputting of the first feature matrix, the second feature matrix and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: Input the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, and input the third feature matrix into the second prediction model to obtain a second result; Concatenate the first result and the second result to obtain a result matrix, multiply the result matrix by a first weight and add a first parameter, and then pass through a first activation function to obtain the interaction probability between the first user and the first item.

9. The method according to claim 8, wherein The first prediction model is a generalized matrix factorization model. The inputting of the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: Take the Kronecker product of the first feature matrix and the second feature matrix to obtain a first result.

10. The method according to claim 8, wherein The second prediction model is a multi-layer perceptron model. The inputting of the third feature matrix into the second prediction model to obtain a second result includes: Input the third feature matrix into a multi-layer neural network to obtain a second result. The neural network includes a second weight, a second parameter and a second activation function.

11. A project recommendation device, characterized in that, The device includes: An obtaining module, configured to obtain a first feature vector, a second feature vector, a first latent feature vector and a second latent feature vector. The first feature vector represents the features of the interaction relationship between the first user and each item, the second feature vector represents the features of the interaction relationship between the first item and each user, the first latent feature vector represents the hidden features of the first user, and the second latent feature vector represents the hidden features of the first item; An interaction probability prediction module, configured to input the first feature vector, the second feature vector, the first latent feature vector, and the second latent feature vector into a prediction model to obtain the interaction probability between the first user and the first item.

12. The device according to claim 11, characterized in that, The obtaining module is further configured to: Input the first interaction vector into a first autoencoder to obtain the first feature vector, and input the second interaction vector into a second autoencoder to obtain the second feature vector. Wherein, the first autoencoder and the second autoencoder are used to extract features from high-dimensional sparse vectors to obtain low-dimensional feature vectors. The first interaction vector represents the interaction relationship between the first user and each item, and the second interaction vector represents the interaction relationship between the first item and each user.

13. The device according to claim 12, characterized in that, The apparatus further includes a first training module for the first autoencoder. The first training module is configured to: Obtain a third interaction vector and set the parameters of the first autoencoder. The third interaction vector represents the interaction relationship between the second user and each item. Input the third interaction vector into the encoder of the first autoencoder to be trained for feature extraction to obtain a third feature vector, and use the decoder of the first autoencoder to be trained to decode the third feature vector to obtain a first decoded vector. Calculate a first loss of the first autoencoder to be trained according to the third interaction vector, the first decoded vector, and a cross-entropy function, and use the first loss to update the parameters of the first autoencoder until the training is completed to obtain the first autoencoder.

14. The device according to claim 12, characterized in that, The apparatus further includes a second training module for the second autoencoder. The second training module is configured to: Obtain a fourth interaction vector and set the parameters of the second autoencoder. The fourth interaction vector represents the interaction relationship between the second item and each user. Input the fourth interaction vector into the encoder of the second autoencoder to be trained for feature extraction to obtain a fourth feature vector, and use the decoder of the second autoencoder to be trained to decode the fourth feature vector to obtain a second decoded vector. Calculate a second loss of the second autoencoder to be trained according to the fourth interaction vector, the second decoded vector, and a cross-entropy function, and use the second loss to update the parameters of the second autoencoder until the training is completed to obtain the second autoencoder.

15. The apparatus according to claim 12, wherein Obtaining the first interaction vector and the second interaction vector includes: Perform binarization processing on the interaction relationship data between each user and each item to construct a user-item interaction matrix. Each row in the user-item interaction matrix represents a user, each column represents an item, and each element represents the interaction relationship between the corresponding user and item. Use the elements in the row corresponding to the first user in the user-item interaction matrix as the first interaction vector, and use the elements in the column corresponding to the first item in the user-item interaction matrix as the second interaction vector.

16. The device according to claim 11, characterized in that The obtaining module is further configured to: Perform one-hot encoding on the first user and the first item to obtain corresponding first user vector and first item vector. Obtain a user latent feature matrix and an item latent feature matrix. Multiply the first user vector and the user latent feature matrix to obtain the first latent feature vector, and multiply the first item vector and the item latent feature matrix to obtain the second latent feature vector.

17. The device according to claim 11, characterized in that, The interaction probability prediction module is further configured to: Concatenate the first feature vector and the first latent feature vector to obtain a first feature matrix, concatenate the second feature vector and the second latent feature vector to obtain a second feature matrix, and concatenate the first feature matrix and the second feature matrix to obtain a third feature matrix; Input the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item.

18. The device according to claim 17, wherein The prediction model includes a first prediction model and a second prediction model. The step of inputting the first feature matrix, the second feature matrix, and the third feature matrix into the prediction model to obtain the interaction probability between the first user and the first item includes: Input the first feature matrix and the second feature matrix into the first prediction model to obtain a first result, and input the third feature matrix into the second prediction model to obtain a second result; Concatenate the first result and the second result to obtain a result matrix, multiply the result matrix by a first weight, add a first parameter, and then pass it through a first activation function to obtain the interaction probability between the first user and the first item.

19. The device according to claim 18, characterized in that, The first prediction model is a generalized matrix factorization model. The step of inputting the first feature matrix and the second feature matrix into the first prediction model to obtain a first result includes: Taking the Kronecker product of the first feature matrix and the second feature matrix to obtain a first result.

20. The device according to claim 18, characterized in that, The second prediction model is a multi-layer perceptron model. The step of inputting the third feature matrix into the second prediction model to obtain a second result includes: Input the third feature matrix into a multi-layer neural network to obtain a second result. The neural network includes a second weight, a second parameter, and a second activation function.

21. An electronic device, characterized in that, Comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 10.

22. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the method according to any one of claims 1 to 10 is implemented.