Knowledge payment platform content recommendation method and system

Through the combination of graph neural network and prediction model, a comprehensive feature matrix of items is generated, which solves the cold start and recommendation inaccurate problems of knowledge payment platforms, and improves the accuracy of content recommendation and user stickiness.

CN119205263APending Publication Date: 2024-12-27HENAN DOLPHIN KNOW CULTURE MEDIA CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411329966.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Knowledge payment platforms face the problems of cold start and inaccurate recommendation content. The existing methods are too single based on user portraits or content portraits, resulting in limited recommendation effects.

Method used

By constructing a graph neural network, a comprehensive feature matrix for each entry is generated, and a graph neural network and prediction model are combined to calculate the similarity between entries and recommend the next entry, which solves the cold start problem and improves the accuracy of recommendation.

Benefits of technology

It realizes the extraction of features from multiple sessions, improves the accuracy of content recommendations, avoids cold start problems, and enhances user stickiness and platform retention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205263A_ABST
    Figure CN119205263A_ABST
Patent Text Reader

Abstract

The invention relates to a knowledge payment platform content recommendation method and system, and the method specifically comprises the steps: constructing an item graph of each session based on items browsed by a target user including a user of to-be-recommended content in a preset time of a knowledge payment platform, inputting each entry graph into a graph neural network to obtain feature vectors of entries in each entry graph, and obtaining a comprehensive feature matrix of the entries according to all the feature vectors of the same entries output by the graph neural network; obtaining an entry graph of a current session of a user of to-be-recommended content, taking the comprehensive feature matrix of entries as features of nodes in the entry graph, obtaining an output feature matrix through the prediction model, and obtaining a feature matrix of a next entry of the current session based on the feature matrix output by the prediction model; and determining an item to be recommended by utilizing the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of content recommendation, and in particular to a content recommendation method and system for a knowledge payment platform. Background Art

[0002] Knowledge payment platforms are usually produced or answered by professionals, and the accuracy and reliability of the information are highly guaranteed. Compared with free Internet resources, knowledge payment platforms can provide more professional knowledge and save users' time, reducing the time wasted on searching and screening. In addition, they can effectively reduce wrong information. Users can learn more confidently on these platforms, greatly reducing the risk of misleading information.

[0003] The content provided by knowledge payment platforms is diverse, and different users have different needs. Through the content recommendation function, the platform can intelligently push high-relevance high-quality content based on the user's learning history, interests and hobbies, and current learning progress. It can also expand new content based on user interests, increase user stickiness, and thus improve the user retention rate and usage rate of the platform. The current content recommendation methods are either based on user portraits or content portraits. The methods are too single and also face the problem of cold start, which will affect the effect of content recommendation. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a content recommendation method for a knowledge payment platform, the method comprising the following steps:

[0005] Construct an item graph for each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain the feature vector of the item in each item graph, and obtain the comprehensive feature matrix of the item based on all the feature vectors of the same item output by the graph neural network;

[0006] Obtain the item graph of the current session of the user whose content is to be recommended, use the comprehensive feature matrix of the item as the feature of the node in the item graph, obtain the output feature matrix after passing through the prediction model, and obtain the feature matrix of the next item in the current session based on the feature matrix output by the prediction model;

[0007] The item to be recommended is determined by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

[0008] Preferably, the comprehensive feature matrix of the item is obtained according to all feature vectors of the same item output by the graph neural network, specifically:

[0009] Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors;

[0010] If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value;

[0011] If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

[0012] Preferably, the feature matrix of the next item of the current session is obtained based on the feature matrix output by the prediction model, specifically:

[0013] Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry;

[0014] Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item;

[0015] The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

[0016] Preferably, the item to be recommended is determined by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item, specifically:

[0017] The cosine similarity between the feature matrix of the next entry and the comprehensive feature matrix of all entries is calculated, and the first N entries with high similarity are taken as the entries to be recommended, where N is a positive integer.

[0018] Preferably, the entry graph is a graph consisting of nodes and edges, wherein node features are entry features, edges are access relationships of entries in a session, and the entry features include at least the title, summary, and content information of the content in the knowledge payment platform.

[0019] On the other hand, the present invention provides a content recommendation system for a knowledge payment platform, the system comprising the following modules:

[0020] A feature extraction module is used to construct an item graph of each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain a feature vector of the item in each item graph, and obtain a comprehensive feature matrix of the item based on all feature vectors of the same item output by the graph neural network;

[0021] A prediction module is used to obtain an item graph of the current session of the user whose content is to be recommended, and use the comprehensive feature matrix of the item as the feature of the node in the item graph, and obtain the output feature matrix after passing the prediction model, and obtain the feature matrix of the next item in the current session based on the feature matrix output by the prediction model;

[0022] The recommendation module is used to determine the item to be recommended by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

[0023] Preferably, the comprehensive feature matrix of the item is obtained according to all feature vectors of the same item output by the graph neural network, specifically:

[0024] Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors;

[0025] If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value;

[0026] If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

[0027] Preferably, the feature matrix of the next item of the current session is obtained based on the feature matrix output by the prediction model, specifically:

[0028] Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry;

[0029] Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item;

[0030] The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

[0031] Preferably, the item to be recommended is determined by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item, specifically:

[0032] The cosine similarity between the feature matrix of the next entry and the comprehensive feature matrix of all entries is calculated, and the first N entries with high similarity are taken as the entries to be recommended, where N is a positive integer.

[0033] Preferably, the entry graph is a graph consisting of nodes and edges, wherein node features are entry features, edges are access relationships of entries in a session, and the entry features include at least the title, summary, and content information of the content in the knowledge payment platform.

[0034] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0035] In response to the problems of cold start and inaccurate recommended content encountered in knowledge payment platforms, the present invention obtains the feature vector of each item from multiple sessions, and combines the feature vectors of the same item into a comprehensive feature matrix of the item, thereby extracting features from multiple sessions. Each row of the comprehensive feature matrix contains information about the item in a session, thereby obtaining item features from multiple sessions at the same time, and using the comprehensive feature matrix as the feature of each item in the current session. The next item is predicted through a prediction model, which not only avoids the cold start problem, but also improves the accuracy of prediction because it contains information about items in multiple sessions of different users. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a flow chart of Embodiment 1;

[0037] Figure 2 is a schematic diagram of an entry graph;

[0038] Figure 3 A schematic diagram of the current session entry graph;

[0039] Figure 4 This is a structural diagram of the second embodiment. DETAILED DESCRIPTION

[0040] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] Embodiment 1, the present invention provides a method for recommending content on a knowledge payment platform, such as Figure 1 As shown, the method comprises the following steps:

[0043] Step 1: construct an item graph for each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain the feature vector of the item in each item graph, and obtain the comprehensive feature matrix of the item based on all the feature vectors of the same item output by the graph neural network;

[0044] Session recommendation is to recommend the next item based on the item currently browsed by the user. The item is a question and answer project or a resource on the knowledge payment platform browsed by the user. A session is a sequence of items browsed by the user within a time window. The time window includes but is not limited to the time from opening the knowledge payment platform to closing the knowledge payment platform, or the time when the operation is stopped at a certain moment in the middle is greater than a certain time, then the time before and after this moment in the middle is a session.

[0045] An entry graph (also called a session graph) is constructed based on the entries of the user's session. The entry graph is a graph structure in which nodes are entries and edges are transfer relationships between entries. Figure 2 An entry graph is shown. In another simple session, the entry contents browsed by the user are Item1, Item5, and Item2 in sequence, and Item1->Item5->Item2 constitutes the entry graph of this session. The items browsed by the target users, including the users of the content to be recommended, within the preset time of the knowledge payment platform are obtained to construct the entry graph of each session. In one embodiment, the target user is determined based on the user portrait. Specifically, the portrait of the user of the content to be recommended is determined, and other user portraits are obtained to find users who are similar to the portrait of the user of the content to be recommended. The found users are used as target users, and the users of the content to be recommended are also used as target users. The preset time is within a period of time, such as within a week or a month from the current time. The characteristics of the entry include at least the title, summary, and content information of the content in the knowledge payment platform.

[0046] In order to prevent the target user from being too similar to the user portrait of the content to be recommended, resulting in the recommended content being limited to the browsing items of other users with similar user portraits to the content to be recommended, in another embodiment, the target user includes three categories, that is, according to the similarity of the portraits of other users and the user of the content to be recommended, the other users are clustered into three categories, the first category is the user with the most similar portrait to the user of the content to be recommended, the third category is the user with no similar portrait to the user of the content to be recommended, and the other users are classified into the second category. This can be achieved by setting two similarity thresholds, the similarity between the portraits of the first category of users and the user of the content to be recommended is greater than the first threshold, the pixel points of the portraits of the third category of users and the user of the content to be recommended are less than the second threshold, the remaining users are the second category of users, and the user of the content to be recommended is taken as the first category of users, and a number of users are obtained from each category of users according to a preset ratio, such as 8:1:1. In one embodiment, users are divided into three categories according to the portraits of non-users of the content to be recommended. This embodiment does not refer to the user portraits of the content to be recommended, which can avoid the problem of being unable to profile the user of the content to be recommended in the cold start.

[0047] In one embodiment, the completeness of the user portrait of the content to be recommended is determined. If it is lower than a certain value, the users are divided into three categories according to the portraits of users who are not users of the content to be recommended. Otherwise, other users are clustered into three categories according to the similarity between the portraits of other users and the users of the content to be recommended. The first category is users who are most similar to the portrait of the user of the content to be recommended, the third category is users who are not similar to the portrait of the user of the content to be recommended, and other users are classified into the second category.

[0048] After obtaining the item graph of the target user, the item graph is input into the graph neural network to obtain the feature vector of each item in the item graph. For example, an item graph includes Item1, Item5, and Item2. After passing through the graph neural network, the feature vectors of these three items are obtained. Each item graph will have multiple entries, and different item graphs may have the same entries. Then the same item has different feature vectors in different item graphs. All feature vectors of the same item constitute the comprehensive feature matrix of this item. For example, Item1 is included in session 1 and Item1 is also included in session 9. In this way, two feature vectors of Item1 can be obtained. These two feature vectors constitute the comprehensive feature matrix of Item1. Figure 3 It shows that each Item has 5 feature vectors.

[0049] In order to make the comprehensive feature matrices of the items the same size, the items in the current session of the user whose content is to be recommended are obtained, and the comprehensive feature matrices of all items in the current session are obtained and converted to the same size, and the conversion method includes but is not limited to truncation, filling with 0, etc. In another embodiment, the comprehensive feature matrix of the item is obtained according to all feature vectors of the same item output by the graph neural network, specifically:

[0050] Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors;

[0051] If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value;

[0052] If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

[0053] For example, if Item1 appears in 10 sessions of the target user, Item1 will have 10 feature vectors. If the preset value is 8, it is necessary to determine 8 feature vectors from the 10 feature vectors, and these 8 feature vectors constitute the comprehensive feature matrix of Item1. The specific method of determining 8 feature vectors from 10 feature vectors is as follows: if a paid purchase occurs in the session where Item1 is located, the feature vector of Item1 in this session is used as the target feature vector. Furthermore, if 9 of the 10 sessions containing Item1 have been paid, the 8 sessions closest to the current session are selected from these 9 sessions, and each feature vector of Item1 in these 8 sessions is used as a row of the comprehensive feature matrix. If 8 of them have been paid, each feature vector of Item1 in these 8 sessions is directly used as a row of the comprehensive feature matrix. If 6 sessions have been paid, it is necessary to determine two feature vectors from the sessions where no payment has occurred for Item1, and the determination method of these two feature vectors is also determined based on the time from Item1 to the current session.

[0054] The number of rows of the comprehensive feature matrix of the entry is the preset value, and the number of columns of the comprehensive feature matrix is ​​the same as the number of elements in the feature vector of the entry. In the above example, the preset value is 8.

[0055] If the number of all eigenvectors of an entry is less than 8, for example, 3, then these 3 eigenvectors and 5 vectors of all zeros are concatenated row by row into a comprehensive feature matrix.

[0056] Each feature vector contains the information of the entry itself and the adjacent entries in a session. The comprehensive feature matrix includes the feature vector of at least one entry. That is, the comprehensive feature matrix contains the information of an entry in multiple sessions, such as Figure 3 shown.

[0057] Step 2, obtaining the item graph of the current session of the user to be recommended content, taking the comprehensive feature matrix of the item as the feature of the node in the item graph, obtaining the output feature matrix after passing through the prediction model, and obtaining the feature matrix of the next item in the current session based on the feature matrix output by the prediction model;

[0058] When recommending content to a user to whom content is to be recommended, obtain the item graph of the current session of the user to whom content is to be recommended. For example, the order of browsing items in the current session of the user to whom content is to be recommended is Item3, Item5, and Item1, where Item1 is the item that the user to whom content is to be recommended is browsing. These three items constitute the item graph of the current session, obtain the comprehensive feature matrix of each item, use the comprehensive feature matrix of the item as the feature of the node in the current session, and obtain the output feature matrix after passing through the prediction model. In one embodiment, the preset model includes at least a graph neural network (GNN) and a temporal convolutional neural network (TCN), the graph neural network is used to extract the features of each item in the current session, and the temporal convolutional neural network is used to predict the next item. In one embodiment, the feature matrix of the next item in the current session is obtained based on the feature matrix output by the prediction model, specifically, the feature matrix output by the prediction model is used as the feature matrix of the next item in the current session. The recommended content should be most relevant to the current session, especially the last item in the current session. In another embodiment, the feature matrix of the next item in the current session is obtained based on the feature matrix output by the prediction model, specifically:

[0059] Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry;

[0060] Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item;

[0061] The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

[0062] For example, the last entry of the current session is Item1. Get the session to which each row of feature vectors in the comprehensive feature matrix of Item1 belongs. Assuming that the comprehensive feature matrix has two rows, belonging to sessions 103 and 256 respectively, a sub-item graph is obtained from the item graphs of sessions 103 and 256. The sub-item graph only includes Item1 and the next item of Item1.

[0063] Since the receptive field of the node increases by 1 each time it passes through the graph neural network, there is only one connection in the sub-item graph, that is, the last item and the next item connected to the last item. The two sub-item graphs obtained are input into a layer of graph neural network to obtain two sub-feature vectors of Item1, and then the two sub-feature vectors are spliced ​​into the feature matrix of Item1 by row, and then the feature matrix of Item1 obtained by splicing and the feature matrix output by the prediction model are fused and passed through the prediction head to obtain the feature matrix of the next item. Among them, the fusion method includes but is not limited to average pooling, convolution, flattening and splicing, and the prediction head preferably uses a fully connected network.

[0064] Step 3: Determine the item to be recommended by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

[0065] After obtaining the feature matrix of the next entry, it is compared with the comprehensive feature matrix of all entries, for example, the similarity is calculated using cosine similarity, and the first N entries with the highest similarity are taken as the entries to be recommended. For example, if 5 entries are to be recommended, then N=5.

[0066] Embodiment 2, the present invention provides a content recommendation system for a knowledge payment platform, such as Figure 4 As shown, the system includes the following modules:

[0067] A feature extraction module is used to construct an item graph of each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain a feature vector of the item in each item graph, and obtain a comprehensive feature matrix of the item based on all feature vectors of the same item output by the graph neural network;

[0068] A prediction module is used to obtain an item graph of the current session of the user whose content is to be recommended, and use the comprehensive feature matrix of the item as the feature of the node in the item graph, and obtain the output feature matrix after passing the prediction model, and obtain the feature matrix of the next item in the current session based on the feature matrix output by the prediction model;

[0069] The recommendation module is used to determine the item to be recommended by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

[0070] Preferably, the comprehensive feature matrix of the item is obtained according to all feature vectors of the same item output by the graph neural network, specifically:

[0071] Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors;

[0072] If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value;

[0073] If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

[0074] Preferably, the feature matrix of the next item of the current session is obtained based on the feature matrix output by the prediction model, specifically:

[0075] Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry;

[0076] Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item;

[0077] The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

[0078] Preferably, the item to be recommended is determined by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item, specifically:

[0079] The cosine similarity between the feature matrix of the next entry and the comprehensive feature matrix of all entries is calculated, and the first N entries with high similarity are taken as the entries to be recommended, where N is a positive integer.

[0080] Preferably, the entry graph is a graph consisting of nodes and edges, wherein node features are entry features, edges are access relationships of entries in a session, and the entry features include at least the title, summary, and content information of the content in the knowledge payment platform.

[0081] Embodiment 3, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.

[0082] Embodiment 4: The present invention further provides a computer device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in Embodiment 1 is implemented.

[0083] Through the description of the above implementation methods, technicians in this field can clearly understand that each implementation method can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it, and other embodiments may also be used. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A content recommendation method for a knowledge payment platform, characterized in that: The method comprises the following steps: Construct an item graph for each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain the feature vector of the item in each item graph, and obtain the comprehensive feature matrix of the item based on all the feature vectors of the same item output by the graph neural network; Obtain the item graph of the current session of the user whose content is to be recommended, use the comprehensive feature matrix of the item as the feature of the node in the item graph, obtain the output feature matrix after passing through the prediction model, and obtain the feature matrix of the next item in the current session based on the feature matrix output by the prediction model; The item to be recommended is determined by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

2. The method according to claim 1, characterized in that The comprehensive feature matrix of the entry is obtained according to all feature vectors of the same entry output by the graph neural network, specifically: Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors; If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value; If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

3. The method according to claim 1, characterized in that The feature matrix of the next item in the current session is obtained based on the feature matrix output by the prediction model, specifically: Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry; Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item; The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

4. The method according to claim 1, characterized in that The method of determining the recommended item by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item is as follows: The cosine similarity between the feature matrix of the next entry and the comprehensive feature matrix of all entries is calculated, and the first N entries with high similarity are taken as the entries to be recommended, where N is a positive integer.

5. The method according to any one of claims 1 to 4, characterized in that: The entry graph is a graph consisting of nodes and edges, wherein the node features are entry features, and the edges are access relationships between entries in a session. The entry features at least include the title, summary, and content information of the content in the knowledge payment platform.

6. A content recommendation system for a knowledge payment platform, characterized in that: The system includes the following modules: A feature extraction module is used to construct an item graph of each session based on the items browsed by the target users including the users of the content to be recommended within a preset time on the knowledge payment platform, input each item graph into the graph neural network to obtain a feature vector of the item in each item graph, and obtain a comprehensive feature matrix of the item based on all feature vectors of the same item output by the graph neural network; A prediction module is used to obtain an item graph of the current session of the user whose content is to be recommended, and use the comprehensive feature matrix of the item as the feature of the node in the item graph, and obtain the output feature matrix after passing the prediction model, and obtain the feature matrix of the next item in the current session based on the feature matrix output by the prediction model; The recommendation module is used to determine the item to be recommended by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item.

7. The system according to claim 6, characterized in that The comprehensive feature matrix of the entry is obtained according to all feature vectors of the same entry output by the graph neural network, specifically: Get all feature vectors of the same entry output by the graph neural network and get the number of all feature vectors; If the number is not less than the preset value, a session containing the item and incurring payment is determined, and the feature vector of the item in the determined session is used as the target feature vector; if the number of target feature vectors is greater than the preset value, the preset number of sessions closest to the current session where the session containing the target feature vector is located is determined, and the feature vector of the item in the preset number of sessions is used as a row of the comprehensive feature matrix of the item; if the number of target feature vectors is equal to the preset value, the comprehensive feature matrix of the item is composed of all target feature vectors; if the number of target feature vectors is less than the preset value, at least one session closest to the current session and containing the item is determined from all sessions, and the comprehensive feature matrix of the item is composed of all target feature vectors and the feature vectors of the items in the at least one session, so that the number of rows of the comprehensive feature matrix of the item is the preset value; If the number is less than a preset value, all the feature vectors of the entry and a plurality of vectors that are all zeros are used to form a comprehensive feature matrix of the entry, so that the number of rows of the comprehensive feature matrix of the entry is the preset value.

8. The system according to claim 6, characterized in that The feature matrix of the next item in the current session is obtained based on the feature matrix output by the prediction model, specifically: Obtaining a comprehensive feature matrix of the last entry of the current session, and obtaining the session to which each row of feature vectors in the comprehensive feature matrix belongs and an entry graph of the session to which it belongs, extracting a sub-entry graph of the last entry from the entry graph of the session to which it belongs, wherein the sub-entry graph only includes the last entry and an entry after the last entry, wherein there is at least one entry after the last entry; Passing the sub-item graph through a layer of graph neural network to obtain the sub-feature vectors of the last item in all the sessions to which it belongs, and all the sub-feature vectors constitute the feature matrix of the last item; The feature matrix of the last entry obtained and the feature matrix output by the prediction model are fused and passed through a prediction head to obtain the feature matrix of the next entry.

9. The system according to claim 6, characterized in that The method of determining the recommended item by using the similarity between the comprehensive feature matrix of all items and the feature matrix of the next item is as follows: The cosine similarity between the feature matrix of the next entry and the comprehensive feature matrix of all entries is calculated, and the first N entries with high similarity are taken as the entries to be recommended, where N is a positive integer.

10. A computer storage device, wherein a computer program is stored on the storage device, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 5.