Content Recommendation Method, Apparatus, Device, and Storage Medium
By extracting the associated feature of the text content browsed by the target user, determining the reference user, and recommending the text content based on the browsing content of the reference user, the problem of poor recommendation effect in the prior art is solved, and more accurate text content recommendation is achieved.
Patent Information
- Application Number
- CN202011184668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2040-10-29
AI Technical Summary
When recommending text content in the prior art, it is difficult to accurately reflect the interest of the target user, resulting in poor recommendation results.
By obtaining at least two target text content browsed by the target user, the associated feature extraction is performed, and the associated feature information is generated, which is used to determine the reference user associated with the target user, and recommend the text content for the target user based on the browsing content of the reference user.
It improves the accuracy of the recommendation text content, can more comprehensively reflect the interests and hobbies of the target users, and improves the accuracy of recommendations.
Smart Images

Figure CN114428846B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of artificial intelligence - natural language processing, and particularly relates to a content recommendation method, apparatus, device, and storage medium. Background Art
[0002] With the development of Internet technology, various network-based content interaction behaviors such as online reading text content (such as books, official account articles), online listening to music, watching online videos, and online shopping have gradually become a part of people's daily lives. Various network content providing platforms such as text content platforms, video playing platforms, music playing platforms, and online shopping platforms all have a recommendation function; for example, when a new book is put on the shelf in a text content platform, the book will be recommended to users. If users browse or click on the book, the exposure rate of the book can be increased, thereby realizing the promotion of text content. It can be seen that how to accurately recommend text content to users is a key strategy for realizing the promotion of text content. Summary of the Invention
[0003] Embodiments of the present invention provide a content recommendation method, apparatus, device, and storage medium, which can improve the accuracy of pushing texts.
[0004] On the one hand, embodiments of the present invention provide a content recommendation method, which includes:
[0005] Obtain at least two target text contents browsed by a target user;
[0006] Extract associated features from the above at least two target text contents to obtain associated feature information of the above at least two target text contents;
[0007] Determine a user associated with the target user according to the associated feature information of the above at least two target text contents as a reference user;
[0008] Obtain reference text contents browsed by the reference user, and recommend text contents for the target user according to the reference text contents.
[0009] Among them, the extracting associated features from the above at least two target text contents to obtain associated feature information of the above at least two target text contents includes:
[0010] Obtain a target feature extraction model;
[0011] Use the target feature extraction model to extract associated features from the above at least two target text contents to obtain context associated feature information of each target text content in the above at least two target text contents;
[0012] Generate the associated feature information of at least two of the above target text contents according to the context - associated feature information of each of the above target text contents.
[0013] Among them, the above - mentioned target feature extraction model includes a first feature extraction layer and a second feature extraction layer; each of the at least two target text contents has a serial number, and the serial number of the target text content is determined according to the time when the target user browses the target text content. The at least two target text contents include the i - th target text content, where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents.
[0014] Using the above - mentioned target feature extraction model to perform associated feature extraction on the at least two target text contents, and obtaining the context - associated feature information of each of the at least two target text contents, including:
[0015] Using the above - mentioned first feature extraction layer to obtain the associated feature information between the target text contents whose serial numbers are before the i - th target text content among the at least two target text contents, as the above - mentioned context - associated feature information of the i - th target text content.
[0016] Using the above - mentioned second feature extraction layer to obtain the associated feature information between the target text contents whose serial numbers are after the i - th target text content, as the below - context - associated feature information of the i - th target text content.
[0017] Taking the above - mentioned context - associated feature information of the i - th target text content and the below - context - associated feature information as the context - associated feature information of the i - th target text content.
[0018] Among them, the above - mentioned generating the associated feature information of the at least two target text contents according to the context - associated feature information of each of the above target text contents includes:
[0019] Performing a fusion process on the context - associated feature information of each of the at least two target text contents to obtain target context - associated feature information.
[0020] Taking the above - mentioned target context - associated feature information as the associated feature information of the at least two reference text contents.
[0021] Among them, the above - mentioned determining the user associated with the target user according to the associated feature information of the at least two target text contents as a reference user includes:
[0022] Obtaining at least two reference text contents browsed by candidate users in the candidate user set.
[0023] Obtain the associated feature information of at least two reference text contents browsed by the candidate users in the above candidate user set;
[0024] Obtain the matching degree between the associated feature information of at least two reference text contents browsed by the candidate users in the above candidate user set and the associated feature information of the above at least two target text contents;
[0025] Take the candidate user with the highest matching degree in the above candidate user set as the above reference user.
[0026] Among them, the above acquisition of the target feature extraction model includes:
[0027] Obtain a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context association feature information of each sample text content in the above at least two sample text contents;
[0028] Use the above candidate feature extraction model to perform associated feature extraction on the above at least two sample text contents to obtain the predicted context association feature information of each sample text content in the above at least two sample text contents;
[0029] Adjust the above candidate feature extraction model according to the above labeled context association feature information and the above predicted context association feature information;
[0030] Take the adjusted candidate feature extraction model as the above target feature extraction model.
[0031] Among them, the above at least two sample text contents include target sample text contents;
[0032] The above use of the above candidate feature extraction model to perform associated feature extraction on the above at least two sample text contents to obtain the predicted context association feature information of each sample text content in the above at least two sample text contents includes:
[0033] Obtain the browsing attribute information of the remaining sample text contents; the above remaining sample text contents are the text contents other than the above target sample text content in the above at least two sample text contents;
[0034] Generate the sampling weight of the above remaining sample text contents according to the above browsing attribute information;
[0035] Use the above candidate feature extraction model to perform associated feature extraction on the remaining sample text contents with the sampling weight greater than the weight threshold to obtain the predicted context association feature information of the above target sample text content.
[0036] On the one hand, an embodiment of the present application provides a content recommendation device, including:
[0037] An acquisition module, configured to acquire at least two target text contents browsed by a target user;
[0038] An extraction module, configured to perform associated feature extraction on the at least two target text contents to obtain associated feature information of the at least two target text contents;
[0039] A determination module, configured to determine a user associated with the target user according to the associated feature information of the at least two target text contents as a reference user;
[0040] A recommendation module, configured to acquire reference text contents browsed by the reference user, and recommend text contents for the target user according to the reference text contents.
[0041] Wherein, the extraction module includes:
[0042] A first acquisition unit, configured to acquire a target feature extraction model;
[0043] An extraction unit, configured to perform associated feature extraction on the at least two target text contents by using the target feature extraction model to obtain context associated feature information of each target text content in the at least two target text contents;
[0044] A generation unit, configured to generate the associated feature information of the at least two target text contents according to the context associated feature information of each target text content.
[0045] Wherein, the target feature extraction model includes a first feature extraction layer and a second feature extraction layer; each of the at least two target text contents has a serial number, the serial number of the target text content is determined according to the time when the target user browses the target text content, the at least two target text contents include an i-th target text content, i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents;
[0046] The extraction unit is specifically configured to:
[0047] Use the first feature extraction layer to acquire the associated feature information between the target text contents whose serial numbers are before the i-th target text content in the at least two target text contents as the above-mentioned upper-context associated feature information of the i-th target text content;
[0048] Use the second feature extraction layer to acquire the associated feature information between the target text contents whose serial numbers are after the i-th target text content as the above-mentioned lower-context associated feature information of the i-th target text content;
[0049] Use the above-mentioned upstream associated feature information and downstream associated feature information of the i-th target text content as the context associated feature information of the i-th target text content.
[0050] Among them, the above-mentioned generation unit is specifically used for:
[0051] Perform fusion processing on the context associated feature information of each target text content among the at least two target text contents to obtain target context associated feature information;
[0052] Use the above-mentioned target context associated feature information as the associated feature information of the at least two reference text contents.
[0053] Among them, the above-mentioned determination module includes:
[0054] The second acquisition unit is used to acquire at least two reference text contents browsed by the candidate users in the candidate user set;
[0055] The third acquisition unit is used to acquire the associated feature information of at least two reference text contents browsed by the candidate users in the candidate user set;
[0056] The fourth acquisition unit is used to acquire the matching degree between the associated feature information of at least two reference text contents browsed by the candidate users in the candidate user set and the associated feature information of the at least two target text contents;
[0057] The determination unit is used to use the candidate user with the highest matching degree in the candidate user set as the above-mentioned reference user.
[0058] Among them, the above-mentioned first acquisition unit is specifically used for:
[0059] Acquire a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context associated feature information of each sample text content among the at least two sample text contents;
[0060] Use the above-mentioned candidate feature extraction model to perform associated feature extraction on the at least two sample text contents to obtain the predicted context associated feature information of each sample text content among the at least two sample text contents;
[0061] Adjust the above-mentioned candidate feature extraction model according to the above-mentioned labeled context associated feature information and the above-mentioned predicted context associated feature information;
[0062] Use the adjusted candidate feature extraction model as the above-mentioned target feature extraction model.
[0063] Among them, the at least two sample text contents include target sample text contents;
[0064] The above-mentioned first acquisition unit is further specifically configured to:
[0065] Obtain the browsing attribute information of the remaining sample text content; the remaining sample text content is the text content other than the target sample text content in the at least two sample text contents;
[0066] Generate the sampling weight of the remaining sample text content according to the above browsing attribute information;
[0067] Use the above-mentioned candidate feature extraction model to perform associated feature extraction on the remaining sample text content with a sampling weight greater than the weight threshold to obtain the predicted context associated feature information of the target sample text content.
[0068] An embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;
[0069] The above-mentioned processor is connected to the memory and the network interface. Among them, the network interface is used to provide data communication functions, the above-mentioned memory is used to store computer programs, and the above-mentioned processor is used to call the above-mentioned computer programs to execute the method in the embodiment of the present application.
[0070] An embodiment of the present application provides a computer-readable storage medium. The above-mentioned computer-readable storage medium stores a computer program. The above-mentioned computer program includes program instructions. When the above-mentioned program instructions are executed by a processor, they are used to execute the method in the embodiment of the present application.
[0071] In the embodiments of the present application, by obtaining at least two target text contents browsed by a target user, extracting associated features from the at least two target text contents, the associated feature information of the at least two target text contents is obtained; the associated feature information can be used to reflect the association relationship between the at least two target text contents, that is, the associated feature information can be used to reflect the feature information of the text contents that the target user is interested in. Further, according to the associated feature information of the at least two target text contents, a user associated with the target user is determined as a reference user, that is, the reference user can refer to a user who has the same or similar interests in text contents as the target user. Therefore, the reference text contents browsed by the reference user can be obtained, and text contents can be recommended to the target user according to the reference text contents. It can be seen that in the present application, by analyzing the association relationship between a large number of text contents browsed by the target user, the feature information of the text contents that can reflect the interest degree of the target user is obtained; instead of independently analyzing the text contents browsed by the target user, the obtained feature information is too single and cannot well reflect the interest degree of the target user. That is to say, the above-mentioned associated feature information can more comprehensively and accurately reflect the feature information of the text contents that can reflect the interest degree of the target user. Furthermore, according to the feature information of the text contents that can reflect the interest degree of the target user, text contents are recommended to the target user, and the accuracy of the recommended text contents can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0073] Figure 1 It is a schematic flowchart of a content recommendation method provided by an embodiment of the present application;
[0074] Figure 2 It is a schematic diagram of a method for determining a user associated with a target user provided by an embodiment of the present application;
[0075] Figure 3 It is a schematic diagram showing the text content push volume of Scheme A and Scheme B at different times provided by an embodiment of the present application;
[0076] Figure 4 It is a schematic diagram showing the text content click volume of Scheme A and Scheme B at different times provided by an embodiment of the present application;
[0077] Figure 5 It is a schematic flowchart of another content recommendation method provided by an embodiment of the present application;
[0078] Figure 6 It is a schematic diagram of a candidate feature extraction model provided by an embodiment of the present application;
[0079] Figure 7 It is a schematic structural diagram of a content recommendation device provided by an embodiment of the present invention;
[0080] Figure 8 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention. Detailed implementation manners
[0081] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0082] Artificial Intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, a theory, method, technology, and application system that perceives the environment, acquires knowledge, and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.
[0083] Artificial intelligence technology is an interdisciplinary subject, involving a wide range of fields, including both hardware-level technologies and software-level technologies. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0084] Among them, Natural Language Processing (NLP) is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between humans and computers in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, that is, the language people use daily, so it has a close connection with the research of linguistics. Natural language processing technologies usually include technologies such as text processing, semantic understanding, machine translation, robot question answering, and knowledge graphs.
[0085] In this application, natural language processing technology is used to extract associated features from at least two target text contents, and the associated feature information of the at least two target text contents is obtained. That is, natural language processing technology is used to extract associated features from at least two target text contents, and the context associated feature information of each target text content in the at least two target text contents is obtained. According to the context associated feature information of each target text content, the associated feature information of the at least two target text contents is generated, that is, the feature information of the text content of the target user's interest degree is generated. Then, according to the feature information of the text content of the target user's interest degree, text content is recommended to the target user, and the accuracy of the recommended text content can be improved.
[0086] Please refer to Figure 1 , which is a schematic flowchart of a content recommendation method provided by an embodiment of this application. The embodiment of this application can be executed by an electronic device. The content recommendation method includes the following steps S101 to S104.
[0087] S101, obtain at least two target text contents browsed by the target user.
[0088] In the embodiment of this application, the electronic device in this solution will record the browsing attribute information of each user for each text content. The browsing attribute information includes the text identifier of the text content, the timestamp of browsing the text content, and the number of browsing times. Among them, after obtaining at least two target text contents browsed by the target user in history, the text contents can be sorted according to the browsing attribute information of each text content. For example, with the help of big data (spark), the target text contents can be sorted according to the browsing timestamp of each target text content to obtain at least two target text contents browsed by the target user, or the target text contents can be sorted according to the number of browsing times of each target text content, etc. The above text contents can be books, novels, short articles, etc.
[0089] S102, perform associated feature extraction on at least two target text contents to obtain the associated feature information of the at least two target text contents.
[0090] After obtaining at least two target text contents browsed by the target user, associated feature extraction can be performed on the at least two target text contents browsed by the target user to obtain the associated feature information of the at least two target text contents browsed by the user. The associated feature information refers to the associated feature information corresponding to at least two target text contents browsed by the target user, which is used to characterize the feature information of the text content liked by the target user, that is, it can be used to reflect the feature information of the text content that the target user is interested in.
[0091] Optionally, a target feature extraction model can be obtained, and the target feature extraction model is used to perform associated feature extraction on at least two target text contents to obtain the context associated feature information of each target text content in the at least two target text contents; according to the context associated feature information of each target text content, the associated feature information of the at least two target text contents is generated.
[0092] A target feature extraction model for performing associated feature extraction on each of at least two target text contents can be obtained. The target feature extraction model is used to perform associated feature extraction on at least two target text contents to obtain the context associated feature information of each target text content in the at least two target text contents. Then, according to the context associated feature information of each target text content in the at least two target text contents, the associated feature information of at least two target text contents browsed by the target user is generated. The above-mentioned context associated feature information of each target text content refers to the feature information of the corresponding target text content combined with the feature information of the target text content browsed by the target user before and the feature information of the target text content browsed by the target user after, which can better represent the feature information of the target text content. By analyzing the association relationship between a large number of text contents browsed by the target user, the feature information of the text content reflecting the interest degree of the target user is obtained; rather than independently analyzing the text content browsed by the target user, the obtained feature information is too single and cannot well reflect the interest degree of the target user. For example, a certain target text content browsed by the target user includes information about sports and information about star entertainment. In the prior art, when performing feature extraction on this target text content, only one aspect of feature information (such as feature information about sports or feature information about star entertainment) may be extracted. In this solution, according to the associated feature information between the target text contents before and after this certain target text content, if a large proportion of the associated feature information about star entertainment appears in the target text contents before and after, the context associated feature information obtained for this certain target text content may be the associated feature information about star entertainment, and it will combine the target text content and the associated relationship between the target text content after, which can better reflect the interest degree of the target user. Then, combining the context associated feature information of each target text content in at least two target text contents browsed by the target user, the associated feature information of at least two text contents browsed by the target user is generated, that is, the associated feature information of the target user, which is used to indicate the interest hobbies of the target user. For example, if the target user browses 10 target text contents, the context associated feature information of each of the 10 target texts can be obtained, and according to the context associated feature information of each of the 10 target text contents, the associated feature information of the target user is generated.
[0093] Optionally, when using the target feature extraction model to extract the associated features of at least two target text contents to obtain the context associated feature information of each target text content in the at least two target text contents, the first feature extraction layer can be used to obtain the associated feature information between the target text contents whose sequence numbers are before the i-th target text content in the at least two target text contents, as the above-context associated feature information of the i-th target text content. The second feature extraction layer is used to obtain the associated feature information between the target text contents whose sequence numbers are after the i-th target text content, as the below-context associated feature information of the i-th target text content. The above-context associated feature information and the below-context associated feature information of the i-th target text content are used as the context associated feature information of the i-th target text content.
[0094] Among them, the above-mentioned target feature extraction model includes a first feature extraction layer and a second feature extraction layer. Each of the at least two target text contents browsed by the target user has a sequence number, and the sequence number of the target text content is determined according to the time when the target user browses the target text content. The at least two target text contents include the i-th target text content, where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents. The first feature extraction layer can be used to obtain the associated feature information between the target text contents whose sequence numbers are before the i-th target text content in the at least two target text contents, as the above-context associated feature information of the i-th target text content. The second feature extraction layer is used to obtain the associated feature information between the target text contents whose sequence numbers are after the i-th target text content, as the below-context associated feature information of the i-th target text content. Then, according to the above-context associated feature information and the below-context associated feature information of the i-th target text content, the context associated feature information of the i-th target text content is generated.
[0095] Among them, when the above-mentioned i is equal to 1, there is no target text content whose sequence number is before the i-th target text content. Therefore, the above-context associated feature information of the i-th target text content does not exist. Then, the below-context associated feature information of the i-th target text content is obtained and used as the context associated feature information of the i-th target text content. When the above-mentioned i is equal to N, there is no target text content whose sequence number is after the i-th target text content. Therefore, the below-context associated feature information of the i-th target text content does not exist. Then, the above-context associated feature information of the i-th target text content is obtained and used as the context associated feature information of the i-th target text content.
[0096] Optionally, the context association feature information of each of at least two target text contents is fused to obtain target context association feature information; the target context association feature information is used as the association feature information of at least two reference text contents.
[0097] The context association feature information of each target text content is obtained by using a target feature extraction model. The context association feature information of each target text content is a context vector, and the dimensions of the context vectors of each target text content are the same and can be operated on. After the context association feature information of each of at least two target text contents is obtained by using the target feature extraction model, the context association feature information of each target text content can be fused to obtain target context association feature information. For example, the context association feature information of at least two target text contents can be averaged to obtain target context association feature information.
[0098] For example, the target user browses 10 target text contents, denoted as t1, t2, t3, t4, t5, t6, t7, t8, t9, and t10. The first feature extraction layer and the second feature extraction layer in the target feature acquisition model can be used to extract features from these 10 target text contents, and obtain the context-related feature information corresponding to each target text content among the 10 target text contents. For example, when extracting features from the target text content t5 to obtain the context-related feature information of the target text content t5, the target text contents with serial numbers before the target text content t5 are obtained, that is, t1, t2, t3, and t4. The target text contents t1, t2, t3, and t4 are input into the first feature extraction layer in the target feature extraction model to obtain the association relationship among the target text contents t1, t2, t3, and t4, so as to predict the target text content t5 (that is, predict the following text based on the preceding text), and obtain the context-related feature information of the preceding text of the target text content t5. And the target text contents with serial numbers after the target text content t5 are obtained, that is, t6, t7, t8, t9, and t10. The target text contents t6, t7, t8, t9, and t10 are input into the second feature extraction layer in the target feature extraction model to obtain the association relationship among the target text contents t6, t7, t8, t9, and t10, so as to predict the target text content t5 (predict the preceding text based on the following text), and obtain the context-related feature information of the following text of the target text content t5. The context-related feature information of the preceding text of the target text content t5 and the context-related feature information of the following text of the target text content t5 are fused to obtain the context-related feature information T5 of the target text content t5. By analogy, the context-related feature information corresponding to each of the 10 target text contents is obtained, denoted as T1, T2, T3, T4, T5, T6, T7, T8, T9, and T10. The following formula (1) can be used to calculate the context-related feature information corresponding to the 10 target text contents to obtain the target context-related feature information.
[0099]
[0100] Among them, N in formula (1) refers to the number of target text contents browsed by the target user, and Ti refers to the context-related feature information of the i-th target text content. An average operation is performed on the context-related feature information corresponding to each target text content among the 10 target text contents to obtain the target context-related feature information corresponding to the target user, that is, the association feature information of at least two target text contents.
[0101] S103. Determine the user associated with the target user based on the association feature information of at least two target text contents as the reference user.
[0102] After obtaining the correlation feature information of at least two target text contents browsed by the target user, the user associated with the target user can be determined according to the correlation feature information of the at least two target text contents as a reference user. The user associated with the target user refers to a user whose correlation feature information is similar to the correlation feature information of the at least two target text contents browsed by the target user.
[0103] As Figure 2 shown, it is a schematic diagram of a method for determining a user associated with a target user provided by an embodiment of the present application. As Figure 2 shown, the method for determining a user associated with a target user includes steps S21 - S24.
[0104] S21, obtain at least two reference text contents browsed by the candidate users in the candidate user set.
[0105] S22, obtain the correlation feature information of at least two reference text contents browsed by the candidate users in the candidate user set.
[0106] Among them, at least two candidate users in the candidate user set can be obtained, and at least two reference texts browsed by each candidate user among the at least two candidate users can be obtained. Correlation feature extraction is performed on the at least two reference texts browsed by each candidate user to obtain the correlation feature information of the at least two reference texts browsed by each candidate user. Alternatively, a candidate user library can be established in advance, which includes at least two candidate users and the correlation feature information of at least two reference text contents browsed by each candidate user among the at least two candidate users.
[0107] S23, obtain the matching degree between the correlation feature information of at least two reference text contents browsed by the candidate users in the candidate user set and the correlation feature information of at least two target text contents.
[0108] S24, use the candidate user with the highest corresponding matching degree in the candidate user set as the reference user.
[0109] Obtain the matching degree between the associated feature information of at least two reference text contents browsed by the candidate users in the candidate user set and the associated feature information of at least two target text contents, and use the candidate user with the highest matching degree in the candidate user set as the reference user. That is, after obtaining the associated feature information of at least two target text contents browsed by the target user, determine the candidate user with the highest matching degree between the associated feature information and the associated feature information of at least two target text contents browsed by the target user from the candidate user set as the reference user. Alternatively, after obtaining the associated feature information corresponding to the target user, determine the candidate user with the highest matching degree between the associated feature information and the associated feature information corresponding to the target user from the candidate user library as the reference user. Among them, the reference user can be determined from the candidate user set according to a similarity algorithm, and the similarity algorithm can be a cosine similarity algorithm, an Euclidean distance algorithm, a Manhattan distance algorithm, etc.
[0110] S104. Obtain the reference text content browsed by the reference user, and recommend text content for the target user according to the reference text content.
[0111] After determining the reference user associated with the target user, the reference text content browsed by the reference user can be obtained, and text content can be recommended for the target user according to the reference text content browsed by the reference user. For example, recommend the reference text content with a higher browsing frequency in the reference text content browsed by the reference user to the target user. In this solution, when directly recommending text for the target user according to the associated feature information of the target user, there may be too many matching recommended texts, and some recommendations may be outdated or too old, and when recommending for the target user by machine, it may be mechanical and the recommendation criteria are too single, resulting in the recommended texts finally obtained not being liked by the target user. However, obtaining a reference user with the same or similar interests and hobbies as the target user and recommending text for the target user according to at least one reference text browsed by the reference user can improve the accuracy of the recommended text content.
[0112] The related technology recommends text content for a target user based on the user collaborative filtering (User-CF) recommendation algorithm. The user collaborative filtering (User-CF) recommendation algorithm refers to constructing a users-items (user-item, that is, a matrix of the target text content browsed by the user) by combining the browsing history of the target text content of the target user. Then, the similar users of the target user are calculated based on the items vector of each user, and the text content corresponding to the similar users of the target user is used to recommend text content for the target user. The user collaborative filtering (User-CF) recommendation algorithm. This solution needs to maintain a huge user-item matrix, and the weight matrix is very sparse, with a huge amount of calculation, prone to errors, and low accuracy. The solution based on user collaborative filtering (User-CF) needs to maintain a two-dimensional matrix from users to target text content. When the number of users reaches the million level, the amount of calculation is huge. In addition, there is also a recommendation algorithm based on Word2vec (a model used to generate word vectors) in the related technology. The recommendation algorithm based on Word2vec can construct a sequence input similar to text based on the target text content browsed by the target user, and then train the vector of the target text content with Word2vec. Each vector of the target text content obtained by this method is unique. Finally, a user vector (user weight) is calculated by weighting the reading book sequence of the user, and similar users of each user are retrieved by combining the nearest neighbor retrieval method. The vector of the target text content obtained by the solution based on Word2vec is fixed and cannot combine different target text content vectors (i.e., context-related feature information) for each target text content in different contexts, making the finally calculated target text content vector inaccurate. In this solution, the context-related feature information of each target text content is based on the above-context related feature information of each target text content (obtained from the related feature information between the target text contents before the target text content according to the serial number) and the below-context related feature information (obtained from the related feature information between the target text contents after the target text content according to the serial number). Considering the related feature information between each target text content and the upper and lower target text contents can make the related feature information of at least two target text contents better represent the interests and hobbies of the target user, thereby improving the accuracy of recommending text content for the target user.
[0113] For example Figure 3 shown is a schematic diagram provided by an embodiment of the present application for showing the text content push volume of Scheme A and Scheme B at different times, as Figure 3As shown in the figure, the dashed line in the figure refers to Solution A, and the solid line refers to Solution B. Solution A refers to the recommendation algorithm solution based on Word2vec, and Solution B refers to the solution of this application. If between 12:00 and 00:00 on a certain day, the push volume of the text content of Solution A is set equal to the push volume of the text content of Solution B, that is, the number of text contents pushed to users based on Solution A is equal to the number of text contents pushed to users based on Solution B, so as to make the exposure of the text content of Solution A the same as that of the text content of Solution B. As Figure 4 shown, it is a schematic diagram showing the click-through rate of the text content of Solution A and Solution B at different times provided by an embodiment of this application. As Figure 4 shown, through practical research, it shows that between 12:00 and 00:00, when recommending text content to target users based on Solution A, the click-through rate of the recommended text is 0.59%; when recommending text content to target users based on Solution B, the click-through rate of the recommended text content is 0.65%. Solution B refers to this solution. Therefore, by recommending text content to target users through this solution, the click-through rate of users is improved, that is, the accuracy of the recommended text is improved.
[0114] In an embodiment of this application, by obtaining at least two target text contents browsed by a target user, extracting associated features of the at least two target text contents, and obtaining associated feature information of the at least two target text contents; the associated feature information can be used to reflect the association relationship between the at least two target text contents, that is, the associated feature information can be used to reflect the feature information of the text content that the target user is interested in. Further, a user associated with the target user is determined according to the associated feature information of the at least two target text contents as a reference user, that is, the reference user can be a user who has the same or similar interest in the text content as the target user. Therefore, the reference text content browsed by the reference user can be obtained, and text content can be recommended to the target user according to the reference text content. It can be seen that in this application, by analyzing the association relationship between a large number of text contents browsed by the target user, the feature information of the text content used to reflect the interest degree of the target user is obtained; rather than independently analyzing the text content browsed by the target user, the obtained feature information is too single and cannot well reflect the interest degree of the target user. That is to say, the above-mentioned associated feature information can more comprehensively and accurately reflect the feature information of the text content that the target user is interested in. Furthermore, according to the feature information of the text content that the target user is interested in, text content is recommended to the target user, which can improve the accuracy of the recommended text content.
[0115] As Figure 5 shown, it is a schematic flowchart of another content recommendation method provided by an embodiment of this application. As Figure 5 shown, this another content recommendation method includes steps S201 to S207.
[0116] S201, obtain at least two target text contents browsed by the target user.
[0117] Obtain at least two target text contents browsed by the target user in history. The target text content may refer to books, novels, short articles, and so on.
[0118] S202, obtain a candidate feature extraction model, at least two sample text contents browsed by the sample user, and the labeled context association feature information of each sample text content in the at least two sample text contents.
[0119] S203, use the candidate feature extraction model to perform association feature extraction on the at least two sample text contents, and obtain the predicted context association feature information of each sample text content in the at least two sample text contents.
[0120] Obtain a candidate feature extraction model, which is used to extract features from at least two sample text contents browsed by a sample user to obtain the associated feature information of the at least two sample text contents. The candidate feature extraction model includes a first feature extraction layer and a second feature extraction layer. Also, obtain at least two sample text contents browsed by the sample user, as well as the labeled context associated feature information of each sample text content in the at least two sample text contents. Sort the at least two sample text contents browsed by the sample user to obtain the serial number of each sample text content in the at least two sample text contents, and then use the candidate feature extraction model to extract features from the sorted at least two sample text contents. The candidate feature extraction model extracts features from each of the at least two sample text contents, and the at least two sample text contents include a target sample text content. When the candidate feature extraction model extracts features from the target sample text content, obtain the sample text content whose serial number is before the target sample text content as the above text sample content. Input the above text sample content into the first feature extraction layer in the candidate feature extraction model to obtain the above text feature vector of the target sample text content, that is, the above text associated feature information of the target sample text content. The first feature extraction layer of the target candidate feature extraction model refers to a neural network layer for predicting the following text based on the above text. Then, obtain the sample text content whose serial number is after the target sample text content as the following text sample content, and input the following text sample content into the second feature extraction layer in the candidate feature extraction model to obtain the following text feature vector of the target sample text content, that is, the following text associated feature information of the target sample text content. The second feature extraction layer of the target candidate feature extraction model refers to a neural network layer for predicting the above text based on the following text. Since both the above text associated feature information and the following text associated feature information of the target sample text content are feature vectors, the above text associated feature information and the following text associated feature information of the target sample text content can be summed to obtain the predicted context associated feature information of the target sample text content. By analogy, extract features from each sample text content to obtain the predicted context associated feature information of each sample text content in the at least two sample text contents browsed by the sample user.
[0121] Optionally, when using the candidate feature extraction model to perform associated feature extraction on at least two sample text contents to obtain the predicted context-associated feature information of each sample text content in the at least two sample text contents, the browsing attribute information of the remaining sample text contents can be obtained. The remaining sample text contents are the text contents other than the target sample text content in the at least two sample text contents. The sampling weights of the remaining sample text contents are generated according to the browsing attribute information, and the candidate feature extraction model is used to perform associated feature extraction on the remaining sample text contents with sampling weights greater than the weight threshold to obtain the predicted context-associated feature information of the target sample text content.
[0122] When using the candidate model to perform associated feature extraction on the target sample text content to obtain the predicted context-associated feature information of the target sample text content, the browsing attribute information of the remaining sample text contents other than the target sample text content can be obtained. Based on this, according to the browsing attribute information of each sample text content in the remaining sample text contents, the number of times each sample text content in the remaining sample text contents is browsed can be obtained. The more times a sample text content is browsed, the higher the popularity of the sample text content and the more users like it. According to the number of times each sample text content in the remaining sample text contents is browsed, the sampling weights of each sample text content in the remaining sample text contents are generated. When performing associated feature extraction on the target sample text content to obtain the context-associated feature information, the greater the sampling weight of a sample text content, the greater the probability that the sample text content is sampled. The candidate feature extraction model is used to perform associated feature extraction on the remaining sample text contents with sampling weights greater than the weight threshold to obtain the predicted context-associated feature information of the target sample text content.
[0123] Among them, when generating the sampling weights of each sample text content in the remaining sample text contents according to the number of times each sample text content in the remaining sample text contents is browsed, the following formula (2) can be used for calculation.
[0124]
[0125] P(W i ) in formula (2) refers to the sampling weight of the i-th sample text content, and f(W i ) refers to the number of times the i-th sample text content is browsed, that is, the popularity of the i-th sample text content, refers to the sum of the number of times all sample text contents are browsed.
[0126] S204. Adjust the candidate feature extraction model according to the labeled context-associated feature information and the predicted context-associated feature information, and use the adjusted candidate feature extraction model as the target feature extraction model.
[0127] After obtaining the predicted context - associated feature information of each sample text content using the candidate feature extraction model, the candidate feature extraction model is adjusted according to the predicted context - associated feature information of each sample text content and the corresponding annotated context - associated feature information of the sample text content. The adjusted candidate feature extraction model is used as the target feature extraction model.
[0128] Optionally, the loss value of the candidate feature extraction model can be determined according to the predicted context - associated feature information of the sample text content and the corresponding annotated context - associated feature information. If the loss value of the candidate feature extraction model does not meet the convergence condition, the candidate feature extraction model is adjusted according to the loss value of the candidate feature extraction model to obtain the target feature extraction model. If the loss value of the candidate feature extraction model meets the convergence condition, the candidate feature extraction model is used as the target feature extraction model.
[0129] Optionally, the candidate feature extraction model can be an ELMO model. The ELMO model is a new type of deep contextualized word representation that can model complex features of words (such as syntax and semantics) and the changes of words in the language context. As Figure 6 shown, it is a schematic diagram of a candidate feature extraction model provided by an embodiment of the present application. As Figure 6 shown, the ELMO model is also a Bidirectional LSTM (Bidirectional Recurrent Neural Network) structure. The ELMO model includes a forward recurrent neural network and a backward recurrent neural network. The forward recurrent neural network in the ELMO model is the first feature extraction layer, and the backward recurrent neural network is the second feature extraction layer. For example, after obtaining the sample text content t1, t2...t N browsed by the sample user, each of the sample text content t1, t2…t N is respectively corresponding word embeddings E1, E2…En are input into the candidate feature extraction model, where E1 refers to the word embedding of the sample text content t1, E2 refers to the word embedding of t2, and En refers to the word embedding of t N . The word embedding is a representation method that converts the words of the natural language representation corresponding to the sample text content into a vector or matrix form that can be understood by a computer. The word embedding of each sample text content refers to the word embedding of the previous sample text content and the word embedding of the subsequent sample text content corresponding to the sample text content. When obtaining the predicted context - associated feature information of a certain target sample text content t i , the sample text content t1, t2…t i before the target sample text content t i is obtained, and the sample text content t1, t2…t iThe corresponding word embeddings are input into the forward recurrent neural network in the ELMO model to obtain the context-related vector of the content of the target sample text, that is, the context-related feature information of the content of the target sample text. Then, obtain the sample text content t i after the target sample text content in terms of sequence number i+1 、t i+2 …t N . The corresponding word embeddings of the sample text content t i+1 、t i+2 …t N are input into the backward recurrent neural network in the ELMO model to obtain the context-related vector of the content of the target sample text, that is, the context-related feature information of the content of the target sample text i . Finally, the context-related feature information of the content of the target sample text i and the context-related feature information of the context below are summed to obtain the predicted context-related feature information Ti of the content of the target sample text i . And so on, the predicted context-related feature information T2, T3... Tn corresponding to the sample text contents t2, t3... t N are obtained respectively.
[0130] After obtaining the predicted context-related information of each sample text content, the loss value of the candidate feature extraction model can be determined according to the predicted context-related feature information of the sample text content and the corresponding labeled context-related feature information. If the loss value of the candidate feature extraction model does not meet the convergence condition, the candidate feature extraction model is adjusted according to the loss value of the candidate feature extraction model to obtain the target feature extraction model. If the loss value of the candidate feature extraction model meets the convergence condition, the candidate feature extraction model is used as the target feature extraction model.
[0131] Among them, the loss value of the candidate feature extraction model is shown in the following formula (3).
[0132]
[0133] Among them, logp(t k |t1, t2....., t k-1 ) in formula (3) refers to the loss value of the context-related feature information of the k-th sample text content output by the forward recurrent neural network, and logp(t k |t k+1 , t k+2 ....., t N ) refers to the loss value of the context-related feature information of the k-th sample text content output by the backward recurrent neural network.
[0134] S205. Extract associated features from at least two target text contents using the target feature extraction model to obtain the associated feature information of the at least two target text contents.
[0135] S206. Determine the user associated with the target user based on the associated feature information of the at least two target text contents as the reference user.
[0136] S207. Obtain the reference text content browsed by the reference user and recommend text content for the target user according to the reference text content.
[0137] In the embodiments of the present application, the specific content of S205 - S207 can refer to Figure 1 the content described in the embodiments. This embodiment will not be repeated here.
[0138] In the embodiments of the present application, by obtaining at least two target text contents browsed by the target user, extracting associated features from the at least two target text contents to obtain the associated feature information of the at least two target text contents. Among them, the candidate feature extraction model can be trained to obtain the target feature extraction model, and the target feature extraction model is used to extract associated features from the at least two target text contents to obtain the associated feature information of the at least two target text contents. This associated feature information can be used to reflect the association relationship between the at least two target text contents, that is, this associated feature information can be used to reflect the feature information of the text content that the target user is interested in. Further, determine the user associated with the target user based on the associated feature information of the at least two target text contents as the reference user, that is, the reference user can refer to the user who has the same or similar interest in the text content as the target user. Therefore, the reference text content browsed by the reference user can be obtained, and text content can be recommended for the target user according to the reference text content. It can be seen that in the present application, by analyzing the association relationship between a large number of text contents browsed by the target user, the feature information of the text content used to reflect the interest degree of the target user is obtained; rather than independently analyzing the text content browsed by the target user, the obtained feature information is too single and cannot well reflect the interest degree of the target user. That is to say, the above - mentioned associated feature information can more comprehensively and accurately reflect the feature information of the text content that the target user is interested in. Furthermore, according to the feature information of the text content that the target user is interested in, recommending text content to the target user can improve the accuracy of the recommended text content.
[0139] Please refer to Figure 7 , which is a schematic structural diagram of a content recommendation device provided by the embodiments of the present application. The content recommendation device provided by the embodiments of the present application can be in an electronic device. In this embodiment, the content recommendation device includes the following:
[0140] An acquisition module 11 for acquiring at least two target text contents browsed by a target user;
[0141] An extraction module 12 for extracting associated features from at least two target text contents to obtain associated feature information of the at least two target text contents.
[0142] Among them, the extraction module 12 includes:
[0143] A first acquisition unit for acquiring a target feature extraction model;
[0144] An extraction unit for performing associated feature extraction on the at least two target text contents by using the above target feature extraction model to obtain context associated feature information of each target text content in the at least two target text contents;
[0145] A generation unit for generating the associated feature information of the at least two target text contents according to the context associated feature information of each target text content.
[0146] Among them, the above target feature extraction model includes a first feature extraction layer and a second feature extraction layer; each target text content in the at least two target text contents has a serial number, and the serial number of the target text content is determined according to the time when the target user browses the target text content. The at least two target text contents include the i-th target text content, where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents;
[0147] The above extraction unit is specifically used for:
[0148] Using the above first feature extraction layer to obtain the associated feature information between the target text contents before the i-th target text content in the at least two target text contents as the above context associated feature information of the i-th target text content;
[0149] Using the above second feature extraction layer to obtain the associated feature information between the target text contents after the i-th target text content as the below context associated feature information of the i-th target text content;
[0150] Taking the above context associated feature information of the i-th target text content and the below context associated feature information as the context associated feature information of the i-th target text content.
[0151] Among them, the above generation unit is specifically used for:
[0152] Fuse the context - related feature information of each of the above - mentioned at least two target text contents to obtain target context - related feature information;
[0153] Use the above - mentioned target context - related feature information as the related feature information of the above - mentioned at least two reference text contents.
[0154] Among them, the above - mentioned first acquisition unit is specifically used for:
[0155] Obtain a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context - related feature information of each of the above - mentioned at least two sample text contents;
[0156] Use the above - mentioned candidate feature extraction model to perform related feature extraction on the above - mentioned at least two sample text contents, and obtain the predicted context - related feature information of each of the above - mentioned at least two sample text contents;
[0157] Adjust the above - mentioned candidate feature extraction model according to the above - mentioned labeled context - related feature information and the above - mentioned predicted context - related feature information;
[0158] Use the adjusted candidate feature extraction model as the above - mentioned target feature extraction model.
[0159] Among them, the above - mentioned at least two sample text contents include target sample text contents;
[0160] The above - mentioned first acquisition unit is also specifically used for:
[0161] Obtain the browsing attribute information of the remaining sample text contents; the remaining sample text contents are the text contents other than the above - mentioned target sample text contents in the above - mentioned at least two sample text contents;
[0162] Generate the sampling weights of the above - mentioned remaining sample text contents according to the above - mentioned browsing attribute information;
[0163] Use the above - mentioned candidate feature extraction model to perform related feature extraction on the remaining sample text contents whose sampling weights are greater than the weight threshold, and obtain the predicted context - related feature information of the above - mentioned target sample text contents.
[0164] The determination module 13 is used to determine the user associated with the target user according to the related feature information of at least two target text contents as the reference user.
[0165] Among them, the above - mentioned determination module 13 includes:
[0166] The second acquisition unit is used to obtain at least two reference text contents browsed by the candidate users in the candidate user set;
[0167] A third acquisition unit, configured to acquire the correlation feature information of at least two reference text contents browsed by the candidate users in the candidate user set;
[0168] A fourth acquisition unit, configured to acquire the matching degree between the correlation feature information of at least two reference text contents browsed by the candidate users in the candidate user set and the correlation feature information of the at least two target text contents;
[0169] A determination unit, configured to use the candidate user with the highest matching degree in the candidate user set as the reference user.
[0170] A recommendation module 14, configured to acquire the reference text contents browsed by the reference user, and recommend text contents for the target user according to the reference text contents.
[0171] In the embodiment of the present application, by acquiring at least two target text contents browsed by the target user, performing correlation feature extraction on the at least two target text contents, and obtaining the correlation feature information of the at least two target text contents; among them, the candidate feature extraction model can be trained to obtain the target feature extraction model, and the target feature extraction model is used to perform correlation feature extraction on the at least two target text contents, and the correlation feature information of the at least two target text contents is obtained. The correlation feature information can be used to reflect the correlation relationship between the at least two target text contents, that is, the correlation feature information can be used to reflect the feature information of the text contents that the target user is interested in. Further, according to the correlation feature information of the at least two target text contents, a user associated with the target user is determined as the reference user, that is, the reference user can be a user who has the same or similar interest in the text contents as the target user. Therefore, the reference text contents browsed by the reference user can be acquired, and text contents can be recommended for the target user according to the reference text contents. It can be seen that in the present application, by analyzing the correlation relationship between a large number of text contents browsed by the target user, the feature information of the text contents that can be used to reflect the interest degree of the target user is obtained; instead of independently analyzing the text contents browsed by the target user, the obtained feature information is too single and cannot well reflect the interest degree of the target user. That is to say, the above-mentioned correlation feature information can more comprehensively and accurately reflect the feature information of the text contents that the target user is interested in. Furthermore, according to the feature information of the text contents that the target user is interested in, text contents are recommended to the target user, and the accuracy of the recommended text contents can be improved.
[0172] Please refer to Figure 8 FIG., which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 8As shown in the figure, the above computer device 1000 may include: a processor 1001, a network interface 1004, and a memory 1005. In addition, the above computer device 1000 may further include: a user interface 1003 and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1005 may further be at least one storage device located far from the aforementioned processor 1001. As Figure 8 shown, the memory 1005, as a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0173] In Figure 8 the computer device 1000 shown in the figure, the network interface 1004 can provide network communication functions; while the user interface 1003 is mainly used to provide an input interface for users; and the processor 1001 can be used to call the device control application program stored in the memory 1005 to implement:
[0174] Obtain at least two target text contents browsed by the target user;
[0175] Extract the associated features of the above at least two target text contents to obtain the associated feature information of the above at least two target text contents;
[0176] Determine the user associated with the above target user according to the associated feature information of the above at least two target text contents as the reference user;
[0177] Obtain the reference text content browsed by the above reference user, and recommend text content for the above target user according to the above reference text content.
[0178] Among them, the extraction of the associated features of the above at least two target text contents to obtain the associated feature information of the above at least two target text contents includes:
[0179] Obtain a target feature extraction model;
[0180] Use the above target feature extraction model to extract the associated features of the above at least two target text contents to obtain the context associated feature information of each target text content in the above at least two target text contents;
[0181] Generate the associated feature information of at least two of the above target text contents according to the context - associated feature information of each of the above target text contents.
[0182] Among them, the above - mentioned target feature extraction model includes a first feature extraction layer and a second feature extraction layer; each of the at least two target text contents has a serial number, and the serial number of the target text content is determined according to the time when the target user browses the target text content. The at least two target text contents include the i - th target text content, where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents.
[0183] The above - mentioned use of the above - mentioned target feature extraction model to extract the context - associated feature information of each of the at least two target text contents includes:
[0184] Use the above - mentioned first feature extraction layer to obtain the associated feature information between the target text contents whose serial numbers are before the i - th target text content among the at least two target text contents as the above - mentioned context - associated feature information of the i - th target text content before the text.
[0185] Use the above - mentioned second feature extraction layer to obtain the associated feature information between the target text contents whose serial numbers are after the i - th target text content as the above - mentioned context - associated feature information of the i - th target text content after the text.
[0186] Take the above - mentioned context - associated feature information of the i - th target text content before the text and the context - associated feature information of the i - th target text content after the text as the context - associated feature information of the i - th target text content.
[0187] Among them, the above - mentioned generation of the associated feature information of the at least two target text contents according to the context - associated feature information of each of the above target text contents includes:
[0188] Perform a fusion process on the context - associated feature information of each of the at least two target text contents to obtain target context - associated feature information.
[0189] Take the above - mentioned target context - associated feature information as the associated feature information of the at least two reference text contents.
[0190] Among them, the above - mentioned determination of the user associated with the target user according to the associated feature information of the at least two target text contents as a reference user includes:
[0191] Obtain at least two reference text contents browsed by the candidate users in the candidate user set.
[0192] Obtain the associated feature information of at least two reference text contents browsed by the candidate users in the above candidate user set;
[0193] Obtain the matching degree between the associated feature information of at least two reference text contents browsed by the candidate users in the above candidate user set and the associated feature information of the above at least two target text contents;
[0194] Take the candidate user corresponding to the highest matching degree in the above candidate user set as the above reference user.
[0195] Among them, the above obtaining the target feature extraction model includes:
[0196] Obtain a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context associated feature information of each sample text content in the above at least two sample text contents;
[0197] Use the above candidate feature extraction model to perform associated feature extraction on the above at least two sample text contents to obtain the predicted context associated feature information of each sample text content in the above at least two sample text contents;
[0198] Adjust the above candidate feature extraction model according to the above labeled context associated feature information and the above predicted context associated feature information;
[0199] Take the adjusted candidate feature extraction model as the above target feature extraction model.
[0200] Among them, the above at least two sample text contents include target sample text contents;
[0201] The above using the above candidate feature extraction model to perform associated feature extraction on the above at least two sample text contents to obtain the predicted context associated feature information of each sample text content in the above at least two sample text contents includes:
[0202] Obtain the browsing attribute information of the remaining sample text contents; the above remaining sample text contents are the text contents other than the above target sample text contents in the above at least two sample text contents;
[0203] Generate the sampling weights of the above remaining sample text contents according to the above browsing attribute information;
[0204] Use the above candidate feature extraction model to perform associated feature extraction on the remaining sample text contents with sampling weights greater than the weight threshold to obtain the predicted context associated feature information of the above target sample text contents.
[0205] In the embodiments of the present application, by obtaining at least two target text contents browsed by a target user, performing associated feature extraction on the at least two target text contents, and obtaining associated feature information of the at least two target text contents; among them, a candidate feature extraction model can be trained to obtain a target feature extraction model, and the target feature extraction model is used to perform associated feature extraction on the at least two target text contents to obtain associated feature information of the at least two target text contents. The associated feature information can be used to reflect the association relationship between the at least two target text contents, that is, the associated feature information can be used to reflect the feature information of the text contents that the target user is interested in. Further, a user associated with the target user is determined according to the associated feature information of the at least two target text contents as a reference user, that is, the reference user can refer to a user who has the same or similar interest in text contents as the target user. Therefore, the reference text contents browsed by the reference user can be obtained, and text contents can be recommended to the target user according to the reference text contents. It can be seen that in the present application, by analyzing the association relationship between a large number of text contents browsed by the target user, the feature information of the text contents reflecting the interest degree of the target user is obtained; instead of independently analyzing the text contents browsed by the target user, the obtained feature information is too single to well reflect the interest degree of the target user. That is to say, the above-mentioned associated feature information can more comprehensively and accurately reflect the feature information of the text contents that the target user is interested in. Furthermore, according to the feature information of the text contents that the target user is interested in, text contents are recommended to the target user, and the accuracy of the recommended text contents can be improved.
[0206] According to one aspect of the present application, there is provided a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device can execute the Figure 1 or Figure 5 description of the content recommendation method in the corresponding embodiments described above, which will not be elaborated here. In addition, the description of the beneficial effects of using the same method will not be elaborated either.
[0207] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The above program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the above storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0208] The above-disclosed are only the preferred embodiments of the present invention. Certainly, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.
Claims
1. A content recommendation method, characterized in that, Including: Obtaining at least two target text contents browsed by a target user; Obtaining a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context association feature information of each sample text content in the at least two sample text contents; the at least two sample text contents include a target sample text content; Obtaining the browsing attribute information of the remaining sample text contents; the remaining sample text contents are the text contents other than the target sample text content in the at least two sample text contents; Generating a sampling weight for the remaining sample text contents according to the browsing attribute information; Performing association feature extraction on the remaining sample text contents with a sampling weight greater than a weight threshold by using the candidate feature extraction model to obtain the predicted context association feature information of the target sample text content; adjusting the candidate feature extraction model according to the labeled context association feature information and the predicted context association feature information; Taking the adjusted candidate feature extraction model as a target feature extraction model; Performing association feature extraction on the at least two target text contents by using the target feature extraction model to obtain the association feature information of the at least two target text contents; Determining a user associated with the target user according to the association feature information of the at least two target text contents as a reference user; Obtaining the reference text content browsed by the reference user and recommending text content for the target user according to the reference text content.
2. The method according to claim 1, characterized in that, The performing association feature extraction on the at least two target text contents by using the target feature extraction model to obtain the association feature information of the at least two target text contents includes: Performing association feature extraction on the at least two target text contents by using the target feature extraction model to obtain the context association feature information of each target text content in the at least two target text contents; Generating the association feature information of the at least two target text contents according to the context association feature information of each target text content.
3. The method according to claim 2, characterized in that, The target feature extraction model includes a first feature extraction layer and a second feature extraction layer; each target text content in the at least two target text contents has a serial number, and the serial number of the target text content is determined according to the time when the target user browses the target text content. The at least two target text contents include the i-th target text content, where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the number of target text contents in the at least two target text contents; The performing association feature extraction on the at least two target text contents by using the target feature extraction model to obtain the context association feature information of each target text content in the at least two target text contents includes: Using the first feature extraction layer to obtain the association feature information between the target text contents before the i-th target text content in the at least two target text contents as the above-context association feature information of the i-th target text content; Use the second feature extraction layer to obtain the associated feature information between the target text contents whose serial numbers are after the i-th target text content, as the downstream associated feature information of the i-th target text content; Use the upstream associated feature information and the downstream associated feature information of the i-th target text content as the context associated feature information of the i-th target text content.
4. The method according to claim 2, characterized in that, The generating the associated feature information of the at least two target text contents according to the context associated feature information of each target text content includes: Perform a fusion process on the context associated feature information of each target text content in the at least two target text contents to obtain target context associated feature information; Use the target context associated feature information as the associated feature information of the at least two reference text contents.
5. The method according to claim 1, characterized in that, The determining the user associated with the target user according to the associated feature information of the at least two target text contents as the reference user includes: Obtain at least two reference text contents browsed by a candidate user in the candidate user set; Obtain the associated feature information of at least two reference text contents browsed by a candidate user in the candidate user set; Obtain the matching degree between the associated feature information of at least two reference text contents browsed by a candidate user in the candidate user set and the associated feature information of the at least two target text contents; Use the candidate user with the highest matching degree in the candidate user set as the reference user.
6. A content recommendation device, characterized in that, Include: The extraction module includes a first acquisition unit; The first acquisition unit is used to obtain a candidate feature extraction model, at least two sample text contents browsed by a sample user, and the labeled context associated feature information of each sample text content in the at least two sample text contents; the at least two sample text contents include target sample text contents; obtain the browsing attribute information of the remaining sample text contents; the remaining sample text contents are the text contents other than the target sample text contents in the at least two sample text contents; generate the sampling weight of the remaining sample text contents according to the browsing attribute information; use the candidate feature extraction model to perform associated feature extraction on the remaining sample text contents whose sampling weights are greater than the weight threshold to obtain the predicted context associated feature information of the target sample text contents; adjust the candidate feature extraction model according to the labeled context associated feature information and the predicted context associated feature information; use the adjusted candidate feature extraction model as the target feature extraction model; The acquisition module is used to obtain at least two target text contents browsed by the target user; The extraction module is used to perform associated feature extraction on the at least two target text contents through the target feature extraction model to obtain the associated feature information of the at least two target text contents; The determination module is used to determine the user associated with the target user according to the associated feature information of the at least two target text contents as the reference user; A recommendation module, configured to obtain the reference text content browsed by the reference user, and recommend text content for the target user according to the reference text content.
7. A computer device, characterized in that,It includes: A processor, a memory, and a network interface; The processor is connected to the memory and the network interface. Among them, the network interface is used to provide data communication functions, the memory is used to store program codes, and the processor is used to call the program codes to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by the processor, the steps of the method according to any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Data processing method and device, computer equipment and storage medium
CN111400513A