A content recommendation method and system
By using session granularity and graph neural network technology in the content recommendation system, the browsing item diagram of user sessions and calculating similarity, the problems of insufficient personalization and low recommendation accuracy of existing recommendation systems are solved, and more accurate and personalized content recommendations are achieved.
Patent Information
- Application Number
- CN202411429298.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The existing content recommendation system is insufficiently personalized, the recommendation accuracy is low, making it difficult to effectively recommend content suitable for users.
The content is recommended using session granularity. By constructing the historical browsing item map of each session of the user and the current session browsing item map, the similarity between the two is calculated, the access matrix is constructed, and the content is recommended based on the access matrix.
Improve the accuracy and personalization of content recommendations. Through fine-grained session similarity calculation, the recommended content is more in line with the user's current browsing behavior and historical habits.
Smart Images

Figure CN119311945B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of content recommendation, and in particular to a content recommendation method and system. Background Art
[0002] The Internet has brought a lot of convenience to people's lives. People can shop, read, and learn online. However, as information increases, it also brings troubles to people. With so much content, it is difficult to decide which content is suitable for them or which content should be recommended to them. Recommendation systems can recommend content to users based on their characteristics or the characteristics of the content they browse, which improves the user experience to a certain extent. Traditional recommendation systems are mostly based on collaborative filtering, content-based recommendations, and hybrid recommendations. There are still many problems such as insufficient personalization and low recommendation accuracy, which urgently need to be further optimized. Summary of the invention
[0003] In order to solve the above problem, the present invention provides a content recommendation method, which comprises the following steps:
[0004] Construct a historical browsing item graph for each user in each session, obtain the browsing record of the current user in the current session, and construct a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item;
[0005] Calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, select a preset number of historical browsing item graphs with the greatest similarity, and construct an access matrix based on the similarity and the adjacency matrix of the selected historical browsing item graphs;
[0006] When the user clicks on a new browsing item, the browsing item to be recommended is determined from the access matrix based on the browsing item currently being browsed and the new browsing item.
[0007] Preferably, the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item, specifically:
[0008] Obtain the title and / or keywords and / or tags of the browsing item, and perform word embedding to obtain content features of the browsing item;
[0009] Normalize the user's stay time on the browsing item and use the normalized stay time as the stay time feature;
[0010] Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features;
[0011] The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
[0012] Preferably, the similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically:
[0013] The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained through the graph neural network respectively;
[0014] Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector;
[0015] Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit;
[0016] The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity.
[0017] Preferably, the access matrix is constructed according to the similarity and the adjacency matrix of the selected historical browsing item graph, specifically:
[0018] The similarity between the selected historical browsing item graph and the current session browsing graph is used as a weight, and the weighted sum of the adjacency matrices of a preset number of historical browsing item graphs with the greatest similarity is used as an access matrix.
[0019] Preferably, the determining of the recommended browsing items from the access matrix based on the currently browsed browsing items and the new browsing items is specifically:
[0020] The vectors corresponding to the browsing item currently being browsed and the new browsing item in the access matrix are obtained; and a plurality of browsing items to be recommended are selected in descending order of the values of the elements in the two vectors.
[0021] In a second aspect, the present invention provides a content recommendation system, the system comprising the following modules:
[0022] The acquisition module is used to construct a historical browsing item graph for each user in each session, obtain the browsing records of the current user in the current session, and construct a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item;
[0023] An intermediate processing module, used to calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, select a preset number of historical browsing item graphs with the greatest similarity, and construct an access matrix according to the similarity and the adjacency matrix of the selected historical browsing item graphs;
[0024] The content recommendation module is used to determine the browsing item to be recommended from the access matrix based on the browsing item currently being browsed and the new browsing item when the user clicks on a new browsing item.
[0025] Preferably, the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item, specifically:
[0026] Obtain the title and / or keywords and / or tags of the browsing item, and perform word embedding to obtain content features of the browsing item;
[0027] Normalize the user's stay time on the browsed item and use the normalized stay time as the stay time feature;
[0028] Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features;
[0029] The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
[0030] Preferably, the similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically:
[0031] The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained through the graph neural network respectively;
[0032] Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector;
[0033] Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit;
[0034] The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity.
[0035] Preferably, the access matrix is constructed according to the similarity and the adjacency matrix of the selected historical browsing item graph, specifically:
[0036] The similarity between the selected historical browsing item graph and the current session browsing graph is used as a weight, and the weighted sum of the adjacency matrices of a preset number of historical browsing item graphs with the greatest similarity is used as an access matrix.
[0037] Preferably, the determining of the recommended browsing items from the access matrix based on the currently browsed browsing items and the new browsing items is specifically:
[0038] The vectors corresponding to the browsing item currently being browsed and the new browsing item in the access matrix are obtained; and a plurality of browsing items to be recommended are selected in descending order of the values of the elements in the two vectors.
[0039] Finally, the present invention also 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 above is implemented.
[0040] In view of the problem of inaccurate content recommendation in the prior art, the present invention uses session granularity to recommend content, finds sessions similar to the browsing item graph in the current session, calculates similarity based on the degree matrix of the browsing item graph, obtains an access matrix based on the similarity and the degree matrix, and determines the browsing items to be recommended from the access matrix based on the browsing items currently being browsed and new browsing items. The present invention has the following advantages: the session granularity is finer, and the session similarity not only considers the graph-level embedding of the session, but also adds the degree matrix, so that the similarity calculation is more accurate, so that the recommended content is also more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of Embodiment 1;
[0042] Figure 2 It is a schematic diagram of browsing items;
[0043] Figure 3 This is a structural diagram of the second embodiment. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0045] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0046] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0047] Embodiment 1, the present invention provides a content recommendation method, such as Figure 1 As shown, the method comprises the following steps:
[0048] S1, constructing a historical browsing item graph for each user in each session, obtaining the browsing record of the current user in the current session, and constructing a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item;
[0049] In each user session, there will be a series of access contents, such as access to A, C, D, A, etc. The access records of each session, that is, the user's browsing items, build a historical browsing item graph. Among them, a session is a session time period or the time period from when the user opens the APP to when the user closes the APP.
[0050] In another embodiment, a session is the time period from one keyword search to the next keyword search. If it is the last keyword search in a session, the session is the time period from the last search to the end of the session. For example, if the user searches for keyword keyword1 at time point 1 and searches for keyword keyword2 at the next time point 2, the session is the time period from time point 1 to time point 2. If there is no search in the next time until the end of the session, the session is from time point 2 to the end of the session. Of course, only the time period from one keyword search to the next keyword search can be used as the division method of the session.
[0051] The browse item graph is a graph structure (Graph), such as Figure 3 , the nodes of the browsing item graph are browsing items, and the edges are the access relationships of browsing items. For example, after visiting A, C is visited, then there is an edge between A and C in the browsing item graph. Browsing items are different on different websites and apps. For example, on video websites, browsing items are videos, and on shopping websites or apps, browsing items are commodities. The historical browsing item graph refers to all sessions of all users. Specifically, a historical browsing item graph is constructed for each session of each user. When content is recommended to the user to be recommended, the browsing history of the current user's current session is obtained, and the current session browsing item graph is constructed. When the graph neural network is subsequently used to calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, the browsing item features of the browsing item graph, that is, the node features and the adjacency matrix, are required. In order to fully reflect the node features, in one embodiment, the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item. More specifically, the title and / or keywords and / or tags of the browsing item are obtained, and word embedding is performed to obtain the content features of the browsing item;
[0052] Normalize the user's stay time on the browsed item and use the normalized stay time as the stay time feature;
[0053] Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features;
[0054] The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
[0055] For different content recommendation platforms, the specific content of the browsing items is different, such as video websites, e-commerce websites, knowledge payment websites, etc. The title and / or keywords and / or tags of the browsing items are obtained, that is, at least one of the title, keywords, and tags of the browsing items is obtained, and then these contents are embedded to obtain the content features of the browsing items. Of course, the content features of the browsing items can also include exposure, number of comments, number of favorites, etc. The user's stay time on the browsing items and the operation on the browsing items indicate the user's interest in the browsing items. These two parts of content are also used as part of the feature vector of the node. Specifically, the user's stay time on the browsing items is obtained and normalized as the stay time feature. The user's operation behavior is encoded to obtain the operation behavior feature. The operation behavior includes the comment browsing time and specific operations. The specific operation is that the user comments and / or collects and / or shares. If the corresponding operation is not performed, it is directly set to zero. For example, the specific operation includes commenting, collecting and sharing. The user only comments, not collecting and sharing, then the operation encoding result of the feature is 100. The encoding of the comment browsing time is similar to the stay time, which will not be repeated here. After obtaining the content features, dwell time features and operation behavior features, these features are fused, and the feature fusion methods include but are not limited to splicing and fusion through a fully connected layer. It should be noted that the data involved in the present invention, such as user data, are all within the scope permitted by laws and regulations, and are obtained and used only after obtaining the authorization of the relevant users.
[0056] S2, calculating the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, selecting a preset number of historical browsing item graphs with the greatest similarity, and constructing an access matrix according to the similarity and the adjacency matrix of the selected historical browsing item graphs;
[0057] When a user is browsing, he or she will find a historical browsing item graph that is similar to the user's current browsing item graph. In one embodiment, the similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph. Specifically, the similarity between the feature matrix of the current session browsing item graph and each historical browsing item graph is calculated, and the similarity of the adjacency matrix is calculated. The specific similarity is calculated using dynamic time warping, and the sum of the similarity of the feature matrix and the similarity of the adjacency matrix is used as the similarity between the current session browsing item graph and the historical browsing item graph.
[0058] In another possible implementation, the similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically:
[0059] The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained respectively through the graph neural network; that is, the current session browsing item graph and the historical browsing item graph are input into the graph neural network (GCN) to obtain the feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph.
[0060] Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector;
[0061] The adjacency matrix represents the relationship between nodes in the graph. The degree matrix can be obtained through the adjacency matrix. The elements in the degree matrix are the degrees of each node. If a node is connected to five other nodes in the graph, the degree of this node is 5. The larger the degree, the greater the probability of visiting this node. In one embodiment, the degree matrix and the feature vector are used to obtain the graph-level embedding of the current session browsing item graph and the historical browsing item graph. Specifically, the degree matrix is used as the attention or weight of each row in the feature matrix output by the graph neural network of the browsing item graph, and the graph-level embedding (Graph-LevelEmbeddings) is calculated. In the feature matrix, each row is the feature vector of a node. The degree matrix is actually a one-dimensional vector. Each element is the number of other nodes connected to the node. The larger the element in the degree matrix, the greater the attention to this node. The graph-level embedding of the feature matrix is calculated by multiplying the feature matrix and the degree matrix, summing them, and then calculating the average value. More specifically, the feature matrix A is M×N, M represents the number of nodes in the graph, N represents the feature vector of each node, and the degree matrix B is 1×M, then the graph-level embedding is (BA) / M.
[0062] Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit;
[0063] The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity.
[0064] After obtaining the graph-level embedding, the graph-level embedding corresponding to the current session browsing item graph and the graph-level embedding of the historical browsing item graph are input into the neural tensor network; and the feature matrix corresponding to the current session browsing item graph and the feature matrix corresponding to the historical browsing item graph obtained after graph convolution are input into the pairwise node comparison unit. Finally, the output of the neural tensor network and the output of the pairwise node comparison unit are fused and passed through the fully connected layer to obtain the similarity.
[0065] The greater the similarity, the more similar the contents browsed in the two sessions are. The preset number of historical browsing item graphs with the greatest similarity are selected, and then the access matrix is constructed. Specifically, the similarity between the selected historical browsing item graph and the current session browsing graph is used as the weight, and the weighted sum of the adjacency matrices of the preset number of historical browsing item graphs with the greatest similarity is used as the access matrix. For example, five historical browsing item graphs with the greatest similarity are selected, and the adjacency matrices of these five historical browsing item graphs are obtained. Each historical browsing item graph corresponds to a similarity, and the similarity is used as the weight to weight the adjacency matrix, and then the sum of the five weighted adjacency matrices is calculated to obtain a matrix, and the obtained matrix is used as the access matrix. The element a in the access matrix ij Indicates the association between browsing items i and j. If most sessions visit item j after browsing item i or visit item i after browsing item j, then a ij Larger, and vice versa.
[0066] S3, when the user clicks on a new browsing item, a browsing item to be recommended is determined from the access matrix based on the browsing item currently being browsed and the new browsing item.
[0067] When the user clicks on a new browsing item, it is necessary to recommend content on the page. At this time, the browsing item to be recommended is determined from the access matrix based on the browsing item currently being browsed and the new browsing item clicked. In a specific embodiment, vectors corresponding to the browsing item currently being browsed and the new browsing item in the access matrix are obtained; and multiple browsing items to be recommended are selected in descending order of the values of the elements in the two vectors.
[0068] The access matrix is a K×K matrix, where the kth row is the relationship between the kth browsing item and all browsing items, and K is the number of all browsing items. For example, if the current user is browsing item 1 and clicks on the new browsing item 3, the first and third rows are obtained from the access matrix to obtain two 1×K vectors. The elements in these two 1×K vectors are sorted in descending order of element value, and multiple elements are selected from the front to the back. Since each element represents the relationship between the current browsing item or the new browsing item and other browsing items, the browsing items with the greatest correlation with the current browsing item or the new browsing item can be determined based on the position of the selected element in the access matrix.
[0069] In another possible implementation, determining the recommended browsing items from the access matrix based on the currently browsed browsing items and the new browsing items further includes: determining the user's residence time on the currently browsed browsing item page, if the residence time is greater than a threshold, determining the recommended browsing items from the access matrix based on the currently browsed browsing items and the new browsing items, otherwise, determining the recommended browsing items from the access matrix based on the new browsing items. Determining the recommended browsing items from the access matrix based on the new browsing items specifically includes: obtaining a vector corresponding to the new browsing items in the access matrix; and selecting a plurality of recommended browsing items in descending order of the values of the elements in the vector.
[0070] Embodiment 2, the present invention provides a content recommendation system, such as Figure 3 As shown, the system includes the following modules:
[0071] The acquisition module is used to construct a historical browsing item graph for each user in each session, obtain the browsing records of the current user in the current session, and construct a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item;
[0072] An intermediate processing module, used to calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, select a preset number of historical browsing item graphs with the greatest similarity, and construct an access matrix according to the similarity and the adjacency matrix of the selected historical browsing item graphs;
[0073] The content recommendation module is used to determine the browsing item to be recommended from the access matrix based on the browsing item currently being browsed and the new browsing item when the user clicks on a new browsing item.
[0074] In a possible implementation, the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item, specifically:
[0075] Obtain the title and / or keywords and / or tags of the browsing item, and perform word embedding to obtain content features of the browsing item;
[0076] Normalize the user's stay time on the browsing item and use the normalized stay time as the stay time feature;
[0077] Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features;
[0078] The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
[0079] In a possible implementation, the similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically:
[0080] The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained through the graph neural network respectively;
[0081] Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector;
[0082] Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit;
[0083] The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity.
[0084] In a possible implementation, the access matrix is constructed according to the similarity and the adjacency matrix of the selected historical browsing item graph, specifically:
[0085] The similarity between the selected historical browsing item graph and the current session browsing graph is used as a weight, and the weighted sum of the adjacency matrices of a preset number of historical browsing item graphs with the greatest similarity is used as an access matrix.
[0086] In a possible implementation, determining the recommended browsing item from the access matrix based on the currently browsed browsing item and the new browsing item is specifically as follows:
[0087] The vectors corresponding to the browsing item currently being browsed and the new browsing item in the access matrix are obtained; and a plurality of browsing items to be recommended are selected in descending order of the values of the elements in the two vectors.
[0088] 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.
[0089] 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.
[0090] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0091] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0092] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0093] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0094] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A content recommendation method, characterized in that: The method comprises the following steps: Construct a historical browsing item graph for each user in each session, obtain the browsing record of the current user in the current session, and construct a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item; Calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, select a preset number of historical browsing item graphs with the greatest similarity, and construct an access matrix based on the similarity and the adjacency matrix of the selected historical browsing item graphs; When the user clicks on a new browsing item, a browsing item to be recommended is determined from the access matrix based on the browsing item currently being browsed and the new browsing item; The similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically: The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained through the graph neural network respectively; Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector; Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit; The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity; The construction of the access matrix according to the similarity and the selected adjacency matrix of the historical browsing item graph is specifically as follows: The similarity between the selected historical browsing item graph and the current session browsing graph is used as a weight, and the weighted sum of the adjacency matrices of a preset number of historical browsing item graphs with the greatest similarity is used as an access matrix.
2. The method according to claim 1, characterized in that The feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item, specifically: Obtain the title and / or keywords and / or tags of the browsing item, and perform word embedding to obtain content features of the browsing item; Normalize the user's stay time on the browsing item and use the normalized stay time as the stay time feature; Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features; The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
3. The method according to claim 1, characterized in that The determining of the recommended browsing items from the access matrix based on the currently browsed browsing items and the new browsing items is specifically: The vectors corresponding to the browsing item currently being browsed and the new browsing item in the access matrix are obtained; and a plurality of browsing items to be recommended are selected in descending order of the values of the elements in the two vectors.
4. A content recommendation system, characterized in that: The system includes the following modules: The acquisition module is used to construct a historical browsing item graph for each user in each session, obtain the browsing records of the current user in the current session, and construct a browsing item graph for the current session; wherein the feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item; An intermediate processing module, used to calculate the similarity between the current session browsing item graph and the historical browsing item graph based on the degree matrix of the current session browsing item graph and the historical browsing item graph, select a preset number of historical browsing item graphs with the greatest similarity, and construct an access matrix according to the similarity and the adjacency matrix of the selected historical browsing item graphs; A content recommendation module, configured to determine a recommended browsing item from the access matrix based on the browsing item currently being browsed and the new browsing item when a user clicks on a new browsing item; The similarity between the current session browsing item graph and the historical browsing item graph is calculated based on the degree matrix of the current session browsing item graph and the historical browsing item graph, specifically: The feature vector and adjacency matrix of the current session browsing item graph and the historical browsing item graph are obtained through the graph neural network respectively; Obtaining a degree matrix based on the adjacency matrix, and obtaining a graph-level embedding of a current session browsing item graph and a history browsing item graph using the degree matrix and the eigenvector; Inputting the graph-level embedding of the current session browsing item graph and the history browsing item graph into a neural tensor network to obtain a vector output by the neural tensor network, and inputting the feature vectors of the current session browsing item graph and the history browsing item graph respectively obtained by the graph neural network into a paired node comparison unit to obtain a vector output by the paired node comparison unit; The vector output by the neural tensor network and the vector output by the paired node comparison unit are fused and input into the fully connected layer to obtain the similarity; The construction of the access matrix according to the similarity and the selected adjacency matrix of the historical browsing item graph is specifically as follows: The similarity between the selected historical browsing item graph and the current session browsing graph is used as a weight, and the weighted sum of the adjacency matrices of a preset number of historical browsing item graphs with the greatest similarity is used as an access matrix.
5. The system according to claim 4, characterized in that The feature vector of the node in the browsing item graph is generated based on the content of the browsing item, the user's stay time on the browsing item, and the operation on the browsing item, specifically: Obtain the title and / or keywords and / or tags of the browsing item, and perform word embedding to obtain content features of the browsing item; Normalize the user's stay time on the browsed item and use the normalized stay time as the stay time feature; Acquire operation behaviors for browsing items, wherein the operation behaviors include comment browsing time and specific operations, wherein the specific operations are commenting, collecting and / or sharing, and encode the operation behaviors to obtain operation behavior features; The content features, dwell time features, and operation behavior features are integrated into a feature vector of the node.
6. A computer-readable storage medium having a computer program stored thereon, 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 3.
Citation Information
Patent Citations
Personalized session recommendation method and system
CN113569139A
Personalized recommendation system and method based on knowledge graph and collaborative filtering
CN118227884A