Book recommendation method and device, equipment, medium and product

By using the target model to process user and book attribute information, predicting the user's first reading indicator of books, solving the problem of inaccurate book recommendations in the prior art, and improving the accuracy of recommendations and the user's reading experience.

CN119513415APending Publication Date: 2025-02-25DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411579554.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to accurately recommend books that are of interest to users, resulting in poor reading experience.

Method used

By obtaining the attribute information of the target user and the attribute information of the candidate books, using the trained target model to process this information, predict the user's first reading indicator of the book, and then recommend the book.

Benefits of technology

It improves the accuracy of book recommendations, makes the recommended books more in line with users' reading interests, and thus improves the user's reading experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513415A_ABST
    Figure CN119513415A_ABST
Patent Text Reader

Abstract

The invention discloses a book recommendation method and device, equipment, a medium and a product. The book recommendation method comprises the steps of firstly obtaining attribute information of a target user and attribute information of at least one candidate book; determining a prediction result of each candidate book under a first reading index by using a trained target model, the attribute information of the target user and the attribute information of each candidate book, so that the prediction results can accurately represent the interest degree of the target user in each candidate book; and then, according to the prediction results, the target book is determined from the candidate books for recommendation, so that the book recommended to the target user is more accurate, the book recommendation effect is improved, and the reading experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a book recommendation method, device, equipment, medium, and product. Background Art

[0002] With the popularity of electronic books, users can read electronic books with the help of some reading software.

[0003] In addition, in order to better improve the reading experience, reading software has the following service requirements: recommending books of interest to users, which makes how to recommend books a technical problem that needs to be solved urgently. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a book recommendation method, device, equipment, medium, and product, which are conducive to improving the book recommendation effect and thus conducive to improving the user's reading experience.

[0005] In order to achieve the above objectives, the technical solutions provided by this application are as follows:

[0006] The present application provides a book recommendation method, the method comprising: obtaining attribute information of a target user and attribute information of at least one candidate book; for any of the candidate books, using a target model to process the attribute information of the candidate book and the attribute information of the target user to obtain a prediction result of the candidate book under a first reading indicator, the prediction result being used to describe the predicted state of the target user under the first reading indicator of the candidate book, the target model being trained based on training data and label information corresponding to the training data, the training data being determined based on attribute information of sample books and attribute information of readers of the sample books, the label information being used to describe the actual state of the reader under the first reading indicator of the sample book, the label information being determined based on the length of time the reader spends reading the sample book within a target time period and the total length of time the reader spends reading the sample book within the target time period; and determining a target book from the at least one candidate book for recommendation based on the prediction result of each of the candidate books under the first reading indicator.

[0007] In a possible implementation manner, the tag information is determined based on a ratio between the reading time of the sample book and the total reading time.

[0008] In one possible implementation, the process of determining the label information includes: if the total reading time is lower than a first time threshold, determining the label information based on the ratio between the time of reading the sample books and the first time threshold; if the total reading time is not lower than the first time threshold, determining the label information based on the ratio between the time of reading the sample books and the total reading time.

[0009] In a possible implementation, the process of determining the label information also includes: obtaining the total number of chapters of the sample book and the number of chapters of the sample book read by the reader within the target time period; comparing the ratio of the time for reading the sample book to the total reading time and the ratio of the number of chapters of the sample book to the total number of chapters to obtain a maximum ratio; determining the label information based on the ratio of the time for reading the sample book to the total reading time includes: determining the label information based on the maximum ratio.

[0010] In one possible implementation, if the total reading time is not less than a first time threshold, and the time for reading the sample books is higher than a second time threshold, the label information is a maximum ratio, which is obtained by comparing the ratio between the time for reading the sample books and the total reading time, and the ratio between the number of chapters of the reading sample books and the total number of chapters; if the total reading time is not less than the first time threshold, and the time for reading the sample books is not higher than the second time threshold, the label information is the ratio between the time for reading the sample books and the total reading time.

[0011] In one possible implementation, the training data includes attribute information of the sample books, attribute information of the readers, and the number of chapters of the sample books read by the readers within the target time period; the target model is a student model; the training process of the target model includes: using a teacher model to process the attribute information of the sample books, the attribute information of the readers, and the number of chapters of the sample books read to obtain output data of the teacher model, and using the student model to process the attribute information of the sample books and the attribute information of the readers to obtain output data of the student model, the network structure of the teacher model is the same as the network structure of the student model; updating the student model based on the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information.

[0012] In one possible implementation, updating the student model based on the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information, includes: updating the student model and the teacher model based on the gap between the output data of the student model and the output data of the teacher model, the gap between the output data of the student model and the label information, and the gap between the output data of the teacher model and the label information.

[0013] In a possible implementation manner, the method further includes: for any of the candidate books, determining a prediction result of the candidate book under at least one second reading indicator based on the attribute information of the candidate book and the attribute information of the target user, each of the second reading indicators is different from the first reading indicator; for any of the candidate books, according to the weighted weight corresponding to the first reading indicator and the weighted weight corresponding to each of the second reading indicators, fusing the prediction result of the candidate book under the first reading indicator with the prediction result of the candidate book under each of the second reading indicators to obtain a recommendation probability of the candidate book, the weighted weight corresponding to the first reading indicator being higher than the weighted weight corresponding to each of the second reading indicators; determining a target book for recommendation from the at least one candidate book based on the prediction result of each of the candidate books under the first reading indicator includes: determining a target book for recommendation from the at least one candidate book based on the recommendation probability of each of the candidate books.

[0014] The present application provides a book recommendation device, comprising: an information acquisition unit, used to acquire attribute information of a target user and attribute information of at least one candidate book; a model processing unit, used to process the attribute information of the candidate book and the attribute information of the target user using a target model for any of the candidate books, and obtain a prediction result of the candidate book under a first reading indicator, wherein the prediction result is used to describe the predicted state of the target user under the first reading indicator of the candidate book, wherein the target model is trained based on training data and label information corresponding to the training data, wherein the training data is determined based on attribute information of sample books and attribute information of readers of the sample books, wherein the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, and wherein the label information is determined based on the duration of the reader reading the sample book within a target time period and the total reading duration of the reader within the target time period; and a book recommendation unit, used to determine a target book from the at least one candidate book for recommendation based on the prediction results of each of the candidate books under the first reading indicator.

[0015] The present application provides an electronic device, comprising: a processor and a memory; the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes the book recommendation method provided by the present application.

[0016] The present application provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes the book recommendation method provided by the present application.

[0017] The present application provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the book recommendation method provided by the present application.

[0018] Compared with the related art, this application has at least the following advantages:

[0019] In the technical solution provided by the present application, the attribute information of the target user and the attribute information of at least one candidate book are first obtained; then, the predicted results of each candidate book under the first reading indicator are determined by using the trained target model, the attribute information of the target user, and the attribute information of each candidate book, so that these predicted results can more accurately represent the interest level of the target user in each candidate book; then, based on these predicted results, the target book is determined from these candidate books for recommendation, so that the books recommended to the target user are more accurate, which is conducive to improving the book recommendation effect, and further conducive to improving the user's reading experience.

[0020] Among them, the training process of the target model includes: first determining the training data based on the attribute information of the sample book and the attribute information of the reader of the sample book, and determining the label information corresponding to the training data based on the time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period, so that the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, so that the label information can more accurately represent the reader's interest in the sample book; then training the target model based on the training data and the label information, so that the trained target model can better predict the first reading indicator, so that the prediction result under the first reading indicator can more accurately represent the user's interest in a certain book, and then make the books recommended based on the prediction result more accurate, which is conducive to improving the book recommendation effect, thereby helping to improve the user's reading experience.

[0021] In addition, because the label information is determined based on the length of time the reader spends reading the sample books within the target time period and the total reading time of the reader within the target time period, the first reading indicator described by the label information not only takes into account the reader's reading of the sample books, but also takes into account the reader's overall reading situation, so that the first reading indicator can more accurately represent the reader's interest in the sample books, and thus the book recommendation scheme implemented with the help of the first reading indicator has a better book recommendation effect. This can effectively overcome the defect caused by the fact that the indicators involved in some schemes cannot accurately represent the user's interest in a book, thereby helping to improve the book recommendation effect and thus helping to improve the user's reading experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A flowchart of a model training method provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of a linear correlation provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a distillation scheme provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of a distillation method provided in an embodiment of the present application;

[0027] Figure 5 A flowchart of a book recommendation method provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of the structure of a book recommendation device provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] According to research, in some book recommendation schemes, book recommendations can be made based on some or all of the indicators, including the number of active days in seven days, the reading time in seven days, the number of chapters read in seven days, and the seven-day retention. The number of active days in seven days refers to the number of days a user reads a book again within seven days after reading it for the first time. The reading time in seven days refers to the time a user reads a book within seven days after reading it for the first time. The number of chapters read in seven days refers to the number of chapters read within seven days after reading it for the first time. The seven-day retention refers to whether a user reads a book on the seventh day after reading it for the first time.

[0031] After research, it was also found that the recommended solution shown in the previous paragraph has the defects shown in ①-⑤ below.

[0032] ① Due to the different free time of different groups, different groups show different distribution patterns in the indicator of seven-day active days. Example 1, for group 1, because group 1 only has free time to read books on weekends, the maximum value presented by group 1 in the indicator of seven-day active days is 2 or 3. Although the value is small, it can fully express its high interest in the current book. Example 2, for group 2, because group 2 has free time to read books every day, the maximum value presented by group 2 in the indicator of seven-day active days is 7. At this time, 2 or 3 can only represent a relatively weak interest. It can be seen that different groups show different numerical fluctuation ranges in the indicator of seven-day active days, so that the same value represents different levels of interest in different groups, so that this difference interferes with the model learning process of the indicator of seven-day active days, and then leads to inaccurate books recommended based on the output data of the model.

[0033] ② Because the total reading time of different groups within 7 days is different, different groups show different distribution patterns in the indicator of seven-day reading time. Example 1, for group 3, when the total reading time of group 3 within 7 days is N hours, N is a positive number, if the N hours are all used to read the same book, it can be said that they are very interested in the book. Example 2, for group 4, when the total reading time of group 4 within 7 days is M hours, M is much greater than N, and M is a positive number, if they use N hours to read a book, then the N hours may only be used for trial reading of the book, which can indicate that their interest in the book is relatively low. It can be seen that different groups show different numerical fluctuation ranges in the indicator of seven-day reading time, so that the same value represents different levels of interest in different groups, so that this difference interferes with the model learning process of the indicator of seven-day reading time, and then leads to inaccurate books recommended based on the output data of the model.

[0034] ③ Because the total reading time of different groups within 7 days is different, different groups show different distribution patterns in the indicator of the number of chapters read in seven days. Example 1, for group 3, when the total reading time of group 3 within 7 days is N hours, N is a positive number, if the N hours are used to read different chapters of the same book, it can be said that they are very interested in the book. Example 2, for group 4, when the total reading time of group 4 within 7 days is M hours, M is much greater than N, and M is a positive number, if they use N hours to read some chapters of a book, these chapters may only be used for trial reading of the book, which can indicate that their interest in the book is relatively low. It can be seen that different groups show different numerical fluctuation ranges in the indicator of the number of chapters read in seven days, so that the same value represents different levels of interest in different groups, so that this difference interferes with the model learning process of the indicator of the number of chapters read in seven days, and then leads to inaccurate books recommended based on the output data of the model.

[0035] ④ Because the total number of chapters of different books is different, different books show different distribution patterns in the indicator of the number of chapters read in seven days. Example 1, for book 1, if book 1 has only a few chapters, when the user has read dozens of chapters of book 1, it means that the user is very interested in this book. Example 2, for book 2, if book 2 has many chapters, when the user has read dozens of chapters of book 2, he may have just tried to read book 2, which can indicate that his interest in the book is relatively low. It can be seen that different books show different numerical fluctuation ranges in the indicator of the number of chapters read in seven days, so that the same value represents different levels of interest in different books, so that this difference interferes with the model learning process of the indicator of the number of chapters read in seven days, and then leads to inaccurate books recommended based on the output data of the model.

[0036] ⑤ As for the seven-day retention indicator, since this indicator only focuses on whether the user has read the current book on the 7th day, and does not care whether the user has read the current book at other times, this indicator cannot accurately describe the user's interest in the current book, making the books recommended based on this indicator inaccurate.

[0037] Based on the above research, in order to better improve the book recommendation effect, the present application provides a new indicator and related content of the indicator, which includes: first, determining training data based on the attribute information of the sample book and the attribute information of the reader of the sample book, and determining the label information corresponding to the training data based on the time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period, so that the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, so that the label information can more accurately represent the reader's interest in the sample book; then, based on the training data and the label information, training the target model, so that the trained target model can better predict the first reading indicator, so that the prediction result under the first reading indicator can more accurately represent the user's interest in a certain book, and then make the books recommended based on the prediction result more accurate, which is conducive to improving the book recommendation effect, thereby improving the user's reading experience.

[0038] In addition, because the label information is determined based on the length of time the reader spends reading the sample books within the target time period and the total reading time of the reader within the target time period, the first reading indicator described by the label information not only takes into account the reader's reading of the sample books, but also takes into account the reader's overall reading situation, so that the first reading indicator can more accurately represent the reader's interest in the sample books, and thus the book recommendation scheme implemented with the help of the first reading indicator has a better book recommendation effect. This can effectively overcome the defect caused by the fact that some indicators involved in some schemes (such as seven-day active days, seven-day reading time, seven-day reading chapters, and seven-day retention, etc.) cannot accurately represent the user's interest in a book, which is conducive to improving the book recommendation effect and thus improving the user's reading experience.

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0041] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0042] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0043] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0044] In order to better understand the technical solution provided by the present application, the model training method provided by the present application is first described in conjunction with some drawings, and then the book recommendation method is described in conjunction with the relevant content of the model training method.

[0045] like Figure 1 As shown, the model training method provided in the embodiment of the present application includes the following S101-S102. Figure 1 A flowchart of a model training method provided in an embodiment of the present application.

[0046] S101: Acquire training data and label information corresponding to the training data, wherein the training data is determined based on attribute information of a sample book and attribute information of a reader of the sample book, and the label information is used to describe the actual state of the reader under a first reading indicator of the sample book, and the label information is determined based on the length of time the reader spends reading the sample book within a target time period and the total length of time the reader spends reading the sample book within the target time period.

[0047] The sample books refer to the books needed for reference during training, such as books that a user has read.

[0048] The attribute information of the sample book is used to describe the characteristics of the sample book, such as the book name, total number of chapters, book type, book introduction, book evaluation, etc. It should be noted that the present application does not limit the implementation method of the attribute information.

[0049] The readers of the sample book refer to the users who have read the sample book.

[0050] The attribute information of the reader of the sample book is used to describe the characteristics of the reader, such as user identification, which group the user belongs to, the user's reading preferences, etc. It should be noted that the present application does not limit the implementation method of the attribute information.

[0051] The target time period refers to a pre-set time period that is used as a reference when determining the indicator, such as 7 days; and the starting time point of the target time period is the time when the reader first reads the sample book. It can be seen that in a possible implementation, the target time period can be implemented using the time period {the time when the reader first reads the sample book, the time when the reader first reads the sample book + 7 days}, so that the target time period can represent the time period within 7 days after the reader first reads the sample book.

[0052] For readers of sample books, the time the reader spends reading sample books within the target time period refers to how much time the reader spends reading the sample books within the target time period; the total reading time of the reader within the target time period refers to how much time the reader spends reading books within the target time period. It can be seen that when the reader reads K books within the target time period, and the K books include the sample book, and K is a positive integer, the total reading time = the time the reader spends reading the first book within the target time period + the time the reader spends reading the second book within the target time period + ... + the time the reader spends reading the Kth book within the target time period.

[0053] Training data refers to data that needs to be processed with the help of a model during training; and the training data is determined based on the attribute information of the sample book and the attribute information of the reader of the sample book, so that the training data can at least include part or all of the attribute information of the sample book and part or all of the attribute information of the reader.

[0054] The label information corresponding to the training data is used to describe the actual state of the reader of the sample book under the first reading indicator of the sample book, so that the label information can be used as a true value to guide the model training process. The first reading indicator refers to the indicator described by the label information, so that the first reading indicator can represent the relative state between the user's reading situation for a book in a certain period of time and the user's overall reading situation in the period of time, so that the first reading indicator can more accurately represent the user's interest in the book.

[0055] In addition, the label information corresponding to the training data at least satisfies the following constraints: the label information is determined based on the length of time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period, so that the first reading indicator described by the label information not only refers to the reader's reading of the sample book, but also refers to the reader's overall reading situation, so that the first reading indicator can more accurately represent the reader's interest in the sample book, and thus the book recommendation scheme implemented with the help of the first reading indicator has a better book recommendation effect, which can effectively overcome the defect caused by the fact that the indicators involved in some schemes cannot accurately represent the user's interest in a book, thereby helping to improve the book recommendation effect and thus help to improve the user's reading experience.

[0056] Research has found that due to differences in the distribution patterns of reading status, such as reading time, among different groups, in order to overcome the interference caused by such differences, the distribution patterns of all groups can be mapped into the same data space through normalization.

[0057] Based on the above research, the present application provides a possible implementation method of the label information corresponding to the above training data. In this method, the label information can be determined based on the ratio between the time the above reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period, so that the label information can map the distribution patterns of different groups into the same data space in a normalized manner, so that the first reading indicator described by the label information can represent the relative state between the reading time of a user for a book within a certain time period and the total reading time of the user within the time period, thereby enabling the first reading indicator to more accurately represent the user's interest in the book.

[0058] It can be seen that, under a possible implementation mode, the label information corresponding to the above training data = the time the above reader spends reading the sample book within the target time period ÷ the total reading time of the reader within the target time period, so that the first reading indicator described by the label information can overcome the interference caused by the inconsistency of the total reading time of different groups of people, thereby helping to improve the generalization effect.

[0059] Research has found that for some groups with short reading time, the tag information determined by the formula in the previous paragraph may be inaccurate. For example, for any user in this group, if the user only reads a book for ten minutes and is not very interested, and directly exits the reading software and does not enter the reading software again for a week, the tag information determined by the formula in the previous paragraph is 1, so that the tag information is used to indicate that the user is very interested, which makes the tag information unreasonable.

[0060] Based on the above research, in order to better improve the accuracy, the present application also provides a method for determining the label information corresponding to the above training data, which may specifically include the following steps 11 and 12.

[0061] Step 11: If the total reading time of the above text reader in the target time period is lower than the first time threshold, the above text label information is determined according to the ratio between the reading time of the sample book by the reader in the target time period and the first time threshold.

[0062] Among them, the first duration threshold is used to divide active users and inactive users; and the division principle is: if the total reading time of a user in the target time period is lower than the first duration threshold, it can be determined that the user seldom reads books, and thus it can be determined that the user is an inactive user; however, if the total reading time of the user in the target time period is higher than or equal to the first duration threshold, it can be determined that the user frequently reads books, and thus it can be determined that the user is an active user.

[0063] In addition, the implementation method of the first duration threshold in the present application, for example, after research, it was found that the first duration threshold can be implemented using 3 hours, which is conducive to improving the recommendation effect.

[0064] In addition, the present application does not limit the implementation method of the above step 11. For example, it can be specifically: if the total reading time of the above reader in the target time period is lower than the first time threshold, then the ratio between the time the reader spends reading the sample book in the target time period and the first time threshold is calculated as the above label information to weaken the label information corresponding to the inactive user under the sample book, thereby effectively reducing the interference of the training data used to describe the inactive user and its label information on the model training, which is beneficial to improving the model training effect.

[0065] Step 12: If the total reading time of the above text reader in the target time period is not less than the first time threshold, the above text label information is determined according to the ratio between the time the reader spends reading the sample book in the target time period and the total reading time.

[0066] It should be noted that the present application does not limit the implementation method of the above step 12. For example, it can be specifically as follows: if the total reading time of the above reader in the target time period is higher than or equal to the first time threshold, then the ratio of the time the reader spends reading the sample book in the target time period to the total reading time is calculated as the above label information.

[0067] Based on the relevant contents of steps 11 to 12 above, it can be known that for sample books, the label information corresponding to the reader under the sample book can be determined based on the length of time the reader of the sample book reads the sample book within the target time period and the total reading time of the reader within the target time period, so that the label information can represent the reader's interest in the sample book as accurately as possible.

[0068] Research has found that for groups with a large amount of reading, the label information determined by the formula in the previous paragraph may not be accurate. For example, for any user in this group, if the user's total reading time in a week is 60 hours, and he has read 3 new books, each of which takes 20 hours, then according to the formula in the previous paragraph, the label information corresponding to these three books is 0.33. However, because the user has completely read these three books, this means that the user has expressed a strong interest in these three books, making the interest level described by the label information 0.33 unreasonable.

[0069] Based on the above research, in order to better improve the accuracy, the present application also provides a method for determining the label information corresponding to the above training data, which may specifically include at least the following steps 21 to 23.

[0070] Step 21: Obtain the total number of chapters of the sample book and the number of chapters read by the reader of the sample book within the target time period, wherein the total number of chapters is used to describe how many chapters there are in the sample book.

[0071] Step 22: If the total reading time of the above reader in the target time period is not less than the first time threshold, then compare the ratio between the time the reader spends reading the sample book in the target time period and the total reading time, and the ratio between the number of chapters of the sample book read by the reader in the target time period and the total number of chapters of the sample book to obtain the maximum ratio.

[0072] It should be noted that the present application does not limit the implementation method of the above step 22. For example, it can be specifically as follows: if the total reading time of the above reader in the target time period is not less than the first time threshold, then first calculate the ratio between the time the reader spends reading the sample book in the target time period and the total reading time as the first ratio, and calculate the ratio between the number of chapters of the sample book read by the reader in the target time period and the total number of chapters of the sample book as the second ratio; then compare the first ratio and the second ratio to obtain the maximum ratio, so that the maximum ratio can represent the larger value of the first ratio and the second ratio.

[0073] Step 23: Determine the above label information based on the above maximum ratio.

[0074] It should be noted that the present application does not limit the implementation method of the above step 23. For example, it may specifically be: determining the above maximum ratio as the above label information.

[0075] Based on the relevant contents of steps 21 to 23 above, it can be known that for a sample book, the label information corresponding to the reader under the sample book can be determined based on the time the reader of the sample book reads the sample book within the target time period, the total reading time of the reader within the target time period, the number of chapters of the sample book read by the reader of the sample book within the target time period, and the total number of chapters of the sample book, so that the label information can represent the reader's interest in the sample book as accurately as possible.

[0076] Through research, it is found that for the determination process shown in steps 21 to 23 above, there are differences in the distribution patterns presented in the determination process on books with different content volumes. Specifically, for short books with less content volume, the fewer chapters the short book has, the easier it is to obtain larger label information. In this way, the model obtained under the guidance of the label information encourages short books and suppresses long books with more content volume, making this recommendation unreasonable.

[0077] Based on the above research, in order to better improve the recommendation effect, the present application also provides a method for determining the label information corresponding to the above training data, which may specifically include at least the following steps 31 and 32.

[0078] Step 31: If the total reading time of the above reader in the target time period is not less than the first time threshold, and the time the reader spends reading the sample book in the target time period is not more than the second time threshold, then calculate the ratio between the time the reader spends reading the sample book in the target time period and the total reading time as the label information.

[0079] Among them, the second time threshold is used to divide long books and short books, and the division principle is: for any book, if the time the user spends reading the book within the target time period is longer than the second time threshold, it can be determined that the content of the book is relatively large and cannot be finished in a short time, so it can be determined that the book is a long book, and then it can be determined that the label information determined for the book by referring to the number of chapters is more accurate; however, if the time the user spends reading the book within the target time period is less than or equal to the second time threshold, it can be determined that the content of the book is relatively small and can be finished in a short time, so it can be determined that the book is a short book, and then it can be determined that the label information determined for the book by referring to the number of chapters may be inaccurate, so it is only necessary to refer to the reading time to determine the label information corresponding to the book.

[0080] In addition, the present application does not limit the implementation of the second duration threshold above. For example, after research, it is found that the second duration threshold can be implemented as 5 hours, which is conducive to improving the accuracy of recommendation. It can be seen that in a possible implementation, the second duration threshold is greater than the first duration threshold above.

[0081] Step 32: If the total reading time of the above reader in the target time period is not less than the first time threshold, and the time the reader spends reading the sample book in the target time period is greater than the second time threshold, first compare the ratio of the time the reader spends reading the sample book in the target time period to the total reading time, and the ratio of the number of chapters of the sample book read by the reader in the target time period to the total number of chapters of the sample book to obtain the maximum ratio; then use the maximum ratio as the above label information.

[0082] Based on the relevant contents of steps 31 to 32 above, it can be known that for a sample book, the label information corresponding to the reader under the sample book can be determined based on the time the reader of the sample book reads the sample book within the target time period, the total reading time of the reader within the target time period, the number of chapters of the sample book read by the reader of the sample book within the target time period, the total number of chapters of the sample book, and the following formula (1), so that the label information can represent the reader's interest in the sample book as accurately as possible.

[0083]

[0084] In the formula, Label i Indicates the label information above; T i T represents the time that readers of the sample books spend reading the sample books within the target time period; all Indicates the total reading time of the reader in the target time period; C i Indicates the number of chapters of the sample book read by the reader within the target time period; C all represents the total number of chapters of the sample book; max(·) represents the maximum value; i represents the identifier of the training data determined based on the attribute information of the sample book and the attribute information of the reader.

[0085] It can be seen that the model guided by the label information described in the above formula (1) has the following two advantages.

[0086] Advantage 1: Avoid short books where most chapters can be read within 5 hours. These books are encouraged and recommended because the ratio of the number of chapters read to the total number of chapters is too large.

[0087] The second advantage is that short books with less content are not completely suppressed, but are encouraged to be recommended to users who are more suitable for them. Specifically: because the short book can still obtain relatively large label information when the total reading time is relatively short, the short book is suitable for recommendation to users with a relatively short total reading time, that is, users with a relatively small reading volume; because the short book can usually only obtain smaller label information when the total reading time is relatively long, the short book is usually not recommended to users with a lot of reading time, that is, users with a relatively large reading volume. This is conducive to better meeting the different reading needs of different users, thereby helping to improve the reading experience.

[0088] Based on the relevant content of S101 above, it can be known that for the current round of training, the training data is first determined based on the attribute information of the sample book and the attribute information of the reader of the sample book, and the label information corresponding to the training data is determined based on the time the reader spends reading the sample book within the target time period, the total reading time of the reader within the target time period, the number of chapters of the sample book read by the reader of the sample book within the target time period, and the total number of chapters of the sample book, so that the label information can more accurately represent the reader's interest in the sample book, thereby enabling the label information to better guide the model training process.

[0089] S102: Training a target model based on training data and label information corresponding to the training data, where the target model is used to predict a first reading indicator.

[0090] The target model refers to a machine learning model that needs to be trained, and the target model is used to predict the first reading indicator. It should be noted that the present application does not limit the implementation method of the target model.

[0091] In addition, the present application does not limit the implementation method of S102 above. For example, it can be implemented using any existing or future model training method.

[0092] The study found that the more chapters a user reads for a book, the larger the tag information corresponding to the user under the book is, showing an obvious linear correlation, such as Figure 2 The relationship shown in FIG. 1 makes the feature of the number of chapters read helpful to improve the accuracy of model prediction. However, when the model is used to perform online recommendation tasks, the number of chapters read cannot be obtained at the triggering moment of the task.

[0093] The study also found that in order to better improve the recommendation effect, the number of chapters read can be used as a privileged feature for distillation to obtain the target model. The privileged feature refers to a feature with high discrimination that can only be obtained offline but cannot be obtained in time through online services.

[0094] Based on the above two studies, in order to better improve the model performance, the present application also provides a possible implementation of the above S102. In this method, when the above training data includes attribute information of sample books, attribute information of readers of the sample books, and the number of chapters of the sample books read by the readers in the target time period, if the target model is a student model, such as Figure 3 or Figure 4 If the student model is shown, then S102 may specifically include the following steps 41 to 43.

[0095] Step 41: Use the teacher model to process the attribute information of the sample book, the attribute information of the reader of the sample book, and the number of chapters of the sample book read by the reader within the target time period to obtain the output data of the teacher model. The network structure of the teacher model is the same as that of the student model.

[0096] Among them, the teacher model refers to the model used to provide guidance information to the student model during the distillation process, such as Figure 3 or Figure 4 The teacher model shown.

[0097] In addition, the present application does not limit the implementation method of the teacher model in the above step 41. For ease of understanding, two situations are combined for explanation below.

[0098] Case 1: In some scenarios, such as first training the teacher model and then training the student model under the guidance of the trained teacher model, the teacher model in step 41 above refers to a pre-trained model with good performance, so that the teacher model can be directly used to guide the training process of the student model later.

[0099] It should be noted that the present application does not limit the training process of the teacher model involved in the above paragraph. For example, when the training data includes attribute information of sample books, attribute information of readers of the sample books, and the number of chapters of the sample books read by the reader within the target time period, the training process of the teacher model can be specifically as follows: first obtain the training data and the label information corresponding to the training data; then use the teacher model to process the training data to obtain the output data of the teacher model, so that the output data is used to describe the predicted state of the reader under the first reading indicator of the sample book; then, based on the difference between the output data and the label information, update the teacher model, and return to continue executing the step of "obtaining the training data and the label information corresponding to the training data" and its subsequent steps until the pre-set first condition is met, and the iterative training process for the teacher model is terminated.

[0100] It should also be noted that the present application does not limit the implementation method of the first condition. For example, it may specifically include: the model loss of the teacher model is lower than a preset first loss threshold. For another example, the first condition may include: the rate of change of the model loss of the teacher model is lower than a preset first rate of change threshold. For another example, the first condition may include: the number of updates of the teacher model reaches a preset first number threshold. Among them, the model loss of the teacher model (such as Figure 4 The loss 3) shown is used to represent the performance of the teacher model; and the model loss is determined based on the difference between the output data of the teacher model and the label information. In addition, this application does not limit the calculation method of the model loss.

[0101] Case 2: In some scenarios, such as training the teacher model and the student model at the same time, the teacher model in step 41 above refers to the teacher model that needs to be trained.

[0102] In addition, this application does not limit the network structure of the above teacher model. For example, it can be implemented using the network results of any existing or future teacher model. Figure 4 It can be seen that in one possible implementation, the above teacher model may include a bias network (biasnn), a deep cross network (dfmnn), a full feature network (all_emb nn), a concatenation (concat) layer, a multilayer perceptron (Multilayer Perceptron, MLP) device, and a regression (logit) layer.

[0103] It should be noted that for the above-mentioned bias network, the bias network is used to obtain two parts, vector and bias, from one feature. Among them, the length of the vector is not fixed, such as the dimension of the vector can range from 8 dimensions to more than one hundred dimensions, and the vector is used to learn some comprehensive information. The bias length is unified to 1, and the bias is used to learn some information with high frequency of change. For the above-mentioned deep cross network, the deep cross network is used to cross-process some features, such as by performing a dot product of the vector part in the feature extraction result of the user identification and the vector part in the feature extraction result of the book identification to obtain the crossed features. For the above-mentioned full feature network, the full feature network is used to splice the vector parts of all features.

[0104] Based on the relevant content of step 41 above, it can be known that when the above training data includes attribute information of a sample book, attribute information of a reader of the sample book, and the number of chapters of the sample book read by the reader within the target time period, after obtaining the training data, the teacher model is used to process the training data to obtain output data of the teacher model, so that the output data is used to describe the predicted state of the reader under the first reading indicator of the sample book, thereby enabling the output data to represent the indicator value predicted by the teacher model for the first reading indicator.

[0105] Step 42: Using the student model, the attribute information of the sample book and the attribute information of the reader of the sample book are processed to obtain output data of the student model.

[0106] It should be noted that the network structure of the student model is the same as the network structure of the teacher model above, but the input data of the student model is different from the input data of the teacher model, such as the input data of the student model is part of the input data of the teacher model.

[0107] Based on the relevant content of step 42 above, it can be known that when the above training data includes the attribute information of the sample book, the attribute information of the reader of the sample book, and the number of chapters of the sample book read by the reader within the target time period, after obtaining the training data, the student model is used to process part of the information in the training data to obtain the output data of the student model, so that the output data is used to describe the predicted state of the reader under the first reading indicator of the sample book, so that the output data can represent the indicator value predicted by the student model for the first reading indicator. Among them, because the information carried by the input data of the student model is less than the information carried by the input data of the teacher model, the accuracy of the degree of interest represented by the output data of the student model is lower than the accuracy of the degree of interest represented by the output data of the teacher model, so that the output data of the teacher model can be used as a guiding information to guide the training process for the student model.

[0108] Step 43: Update the student model based on the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information.

[0109] It should be noted that the present application does not limit the implementation method of the above step 43. For ease of understanding, two situations are combined for explanation below.

[0110] Case 1: In some scenarios, such as training the teacher model first and then training the student model under the guidance of the trained teacher model, the above step 43 can be specifically as follows: first determine the model loss of the student model (e.g., Figure 4 The sum of loss 1 and loss 2 shown in the figure) is calculated so that the model loss can represent the performance of the student model; then the student model is updated based on the model loss, and the above step 41 and subsequent steps are returned to be executed until the predetermined second condition is met, thereby terminating the iterative training process for the student model.

[0111] It should be noted that the present application does not limit the implementation method of the second condition. For example, it may specifically include: the model loss of the student model is lower than a preset second loss threshold. For another example, the second condition may include: the rate of change of the model loss of the student model is lower than a preset second change rate threshold. For another example, the second condition may include: the number of updates of the student model reaches a preset second number threshold. Among them, the model loss of the student model is used to represent the performance of the student model; and the model loss is determined based on the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information. In addition, the present application does not limit the calculation method of the model loss.

[0112] Case 2. In some scenarios, such as when training the teacher model and the student model at the same time, step 43 above can specifically be: based on the gap between the output data of the student model and the output data of the teacher model, the gap between the output data of the student model and the label information, and the gap between the output data of the teacher model and the label information, update the student model and the teacher model, and return to continue executing step 41 above and its subsequent steps until the pre-set third condition is met, thereby terminating the iterative training process for the student model and the teacher model.

[0113] It should be noted that the present application is not limited to the implementation method of the simultaneous training of the two models shown in the previous paragraph. For example, it can be implemented by any existing or future method that can simultaneously train the student model and the teacher model.

[0114] It should also be noted that the present application does not limit the implementation method of the third condition above. For example, it may specifically include: meeting the first condition above and / or meeting the second condition above. For another example, the third condition above may include: the model loss sum is lower than a preset third loss threshold. For another example, the third condition may include: the rate of change of the model loss sum is lower than a preset third rate of change threshold. For another example, the third condition may include: the number of updates of the two models, the student model and the teacher model, reaches a preset third number threshold. Among them, the model loss sum (such as Figure 4 The sum of loss 1, loss 2, and loss 3 shown is used to represent the performance of the student model and the performance of the teacher model; and the model loss sum is determined based on the gap between the output data of the student model and the output data of the teacher model, the gap between the output data of the student model and the label information, and the gap between the output data of the teacher model and the label information. In addition, this application does not limit the calculation method of the model loss sum.

[0115] Based on the relevant contents of steps 41 to 43 above, it can be known that when the training data above includes the attribute information of the sample book, the attribute information of the reader of the sample book, and the number of chapters of the sample book read by the reader within the target time period, the number of chapters of the sample book read by the reader within the target time period can be regarded as the dominant feature, and the other contents in the training data except the dominant feature can be regarded as regular features (Regular Features), so that the teacher model can subsequently perform prediction processing of the first reading index based on the dominant features and the regular features to obtain the output data of the teacher model, and the student model can perform prediction processing of the first reading index based on the regular features to obtain the output data of the student model. Among them, because the number of features referenced by the teacher model when making predictions is greater than the number of features referenced by the student model when making predictions, the output data of the teacher model is more accurate than the output data of the student model, so that the output data of the teacher model can be used as a guiding information to affect the training process of the student model, so that the finally trained student model has better performance.

[0116] Based on the relevant contents of S101 to S102 above, it can be known that for the model training method provided in the present application, the training data is first determined based on the attribute information of the sample book and the attribute information of the reader of the sample book, and the label information corresponding to the training data is determined based on the time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period, so that the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, so that the label information can more accurately represent the reader's interest in the sample book; and then the target model is trained based on the training data and the label information, so that the trained target model can better predict the first reading indicator, so that the prediction result under the first reading indicator can more accurately represent the user's interest in a certain book, and then the books recommended based on the prediction result are more accurate, which is conducive to improving the book recommendation effect, thereby improving the user's reading experience.

[0117] In addition, because the label information is determined based on the length of time the reader spends reading the sample books within the target time period and the total reading time of the reader within the target time period, the first reading indicator described by the label information not only takes into account the reader's reading of the sample books, but also takes into account the reader's overall reading situation, so that the first reading indicator can more accurately represent the reader's interest in the sample books, and thus the book recommendation scheme implemented with the help of the first reading indicator has a better book recommendation effect. This can effectively overcome the defect caused by the fact that the indicators involved in some schemes cannot accurately represent the user's interest in a book, thereby helping to improve the book recommendation effect and thus helping to improve the user's reading experience.

[0118] In addition, the present application does not limit the application scenario of the above target model. For example, the target model can be used to provide online services to better recommend books of interest to users.

[0119] Based on this, the present application also provides a book recommendation method, such as Figure 5 As shown, the book recommendation method includes the following steps S501-S503. Figure 5 A flowchart of a book recommendation method provided in an embodiment of the present application.

[0120] S501: Acquire attribute information of a target user and attribute information of at least one candidate book.

[0121] The target user's attribute information is used to describe the characteristics of the user who triggered the book recommendation request, such as the user ID, the group to which the user belongs, the user's reading preferences, etc. It should be noted that the present application does not limit the implementation method of the attribute information.

[0122] The attribute information of the jth candidate book is used to describe the characteristics of the jth candidate book, such as the book name, the total number of chapters, the book type, the book introduction, the book evaluation, etc., j is a positive integer, j≤J, J is a positive integer, and J represents the number of candidate books.

[0123] S502: For any candidate book, the target model is used to process the attribute information of the candidate book and the attribute information of the target user to obtain a prediction result of the candidate book under the first reading indicator, and the prediction result is used to describe the predicted state of the target user under the first reading indicator of the candidate book. The target model is trained based on training data and label information corresponding to the training data. The training data is determined based on the attribute information of the sample book and the attribute information of the reader of the sample book. The label information is used to describe the actual state of the reader under the first reading indicator of the sample book. The label information is determined based on the length of time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period.

[0124] Among them, the target model is obtained by using any implementation of the model training method provided in this application, and for the sake of brevity, it will not be repeated here.

[0125] In the present application, for the jth candidate book, the attribute information of the jth candidate book and the attribute information of the target user are processed using the trained target model to obtain a prediction result of the jth candidate book under the first reading indicator, so that the prediction result is used to describe the predicted state of the target user under the first reading indicator of the jth candidate book, so that the prediction result can more accurately represent the target user's interest level in the jth candidate book, where j is a positive integer, j≤J.

[0126] S503: According to the prediction results of each candidate book under the first reading indicator, a target book is determined from at least one candidate book for recommendation.

[0127] It should be noted that the present application is not limited to the implementation method of S503 above. For ease of understanding, the following description is given in combination with two scenarios.

[0128] Scenario 1, when book recommendations are made based only on the first reading indicator, the above S503 may specifically be: first compare the prediction results of each candidate book under the first reading indicator to obtain the maximum value; then use the candidate book with the maximum value as the target book, so that the prediction result of the target book under the first reading indicator is not less than the prediction results of each candidate book in the above at least one candidate book under the first reading indicator, so that the target book can be directly recommended to the target user later.

[0129] Scenario 2: When book recommendations are made based on multiple indicators, the above S503 may include the following steps 51 to 53.

[0130] Step 51: for any candidate book, based on the attribute information of the candidate book and the attribute information of the target user, determine the prediction result of the candidate book under at least one second reading indicator, and each second reading indicator is different from the first reading indicator.

[0131] Among them, at least one second reading indicator refers to one or more indicators other than the first reading indicator mentioned above, such as part or all of the seven-day active days, seven-day reading time, seven-day reading chapters, and seven-day retention, so that the at least one second reading indicator can be used to represent the defective indicators involved in some book recommendation schemes, so as to subsequently improve these schemes by adding the first reading indicator to these schemes.

[0132] It can be seen that, in a possible implementation, the above at least one second reading indicator may include part or all of the seven-day active days, seven-day reading time, seven-day reading chapter number, and seven-day retention. Among them, because the accuracy of the interest level represented by each indicator in the at least one second reading indicator is lower than the accuracy of the interest level represented by the first reading indicator, the first reading indicator is used to make a certain degree of correction for these second reading indicators, which is conducive to improving the accuracy of recommendation.

[0133] In addition, the present application does not limit the implementation method of the above step 51. For example, it can be specifically: for the jth candidate book, the attribute information of the jth candidate book and the attribute information of the target user are processed using the machine learning model constructed for the gth second reading indicator to obtain the prediction result of the jth candidate book under the gth second reading indicator, so that the prediction result is used to describe the predicted state of the target user under the gth second reading indicator of the jth candidate book, so that the prediction result can express the degree of interest represented by the gth second reading indicator, g is a positive integer, g≤G, G is a positive integer, G represents the number of indicators in the at least one second reading indicator above, j is a positive integer, j≤J.

[0134] In addition, the present application does not limit the implementation method of the above step 51, and it is only necessary to ensure that the execution time of the step 51 is earlier than the execution time of the following step 52.

[0135] Step 52: For any candidate book, according to the weighted weight corresponding to the first reading indicator and the weighted weights corresponding to each of the second reading indicators, the prediction result of the candidate book under the first reading indicator is integrated with the prediction result of the candidate book under each of the second reading indicators to obtain the recommendation probability of the candidate book, and the weighted weight corresponding to the first reading indicator is higher than the weighted weights corresponding to each of the second reading indicators.

[0136] It should be noted that the present application does not limit the implementation method of the above-mentioned fusion. For example, it can be implemented by weighted summation.

[0137] For another example, in order to better improve the recommendation effect, the above fusion can be implemented using a power operation to ensure that the prediction result of a book under a certain indicator is used as the base of the power operation, and the weighted weight corresponding to the indicator is used as the exponent of the power operation.

[0138] It can be seen that in the present application, for the jth candidate book, since the accuracy of the interest level represented by the prediction result of the jth candidate book under the first reading indicator is higher than the accuracy of the interest level represented by the prediction result of the jth candidate book under each second reading indicator, in order to better improve the recommendation effect, the recommendation probability of the jth candidate book can be calculated by using the following formula (2) on the premise of ensuring that the weighted weight corresponding to the first reading indicator is higher than the weighted weight corresponding to each second reading indicator, so that the recommendation probability can more accurately represent the target user's interest level in the jth candidate book, where j is a positive integer, j≤J.

[0139]

[0140] Where P j represents the recommendation probability of the jth candidate book; p 0 represents the prediction result of the jth candidate book under the first reading index; w 0 represents the weighted weight corresponding to the first reading indicator; p g represents the prediction result of the j-th candidate book under the g-th second reading index, g is a positive integer, g≤G; w g Represents the weighted weight corresponding to the g-th second reading indicator.

[0141] Step 53: According to the recommendation probability of each candidate book, determine a target book from at least one candidate book for recommendation.

[0142] It should be noted that the present application does not limit the implementation method of the above step 53. For example, it can be specifically as follows: first compare the recommendation probabilities of the candidate books to obtain the maximum probability value; then use the candidate book with the maximum probability value as the target book, so that the recommendation probability of the target book is not less than the recommendation probability of each candidate book in the above at least one candidate book, so that the target book can be directly recommended to the target user later.

[0143] Based on the relevant contents of steps 51 to 53 above, it can be known that in some scenarios, the prediction result of a book under the first reading indicator can be used as a supplementary data and added to some book recommendation schemes, so that the supplementary data can be corrected for the existing indicators in these schemes to improve the recommendation accuracy of these schemes.

[0144] Based on the relevant contents of S501 to S503 above, it can be known that for the book recommendation method provided in the embodiment of the present application, the attribute information of the target user and the attribute information of at least one candidate book are first obtained; then, the predicted results of each candidate book under the first reading indicator are determined by using the trained target model, the attribute information of the target user, and the attribute information of each candidate book, so that these predicted results can more accurately represent the target user's interest in each candidate book; then, based on these predicted results, the target book is determined from these candidate books for recommendation, so that the books recommended to the target user are more accurate, which is beneficial to improving the book recommendation effect, and then to improving the user's reading experience.

[0145] In addition, the present application does not limit the execution subject of the book recommendation method provided in the embodiment of the present application. For example, the book recommendation method provided in the embodiment of the present application can be applied to a terminal device or a server. For another example, the book recommendation method provided in the embodiment of the present application can also be implemented with the help of the data interaction process between the terminal device and the server. Among them, the terminal device can be a smart phone, a computer, a personal digital assistant (PDA), a tablet computer, etc. The server can be a stand-alone server, a cluster server, or a cloud server.

[0146] Based on the book recommendation method provided in the embodiment of the present application, the embodiment of the present application also provides a book recommendation device. Figure 6 Explain and illustrate. Figure 6 This is a schematic diagram of the structure of a book recommendation device provided in an embodiment of the present application. It should be noted that for the technical details of the book recommendation device provided in an embodiment of the present application, please refer to the relevant contents of the above book recommendation method and model training method.

[0147] like Figure 6 As shown, the book recommendation device 600 provided in the embodiment of the present application includes:

[0148] An information acquisition unit 601 is used to acquire attribute information of a target user and attribute information of at least one candidate book;

[0149] The model processing unit 602 is used to process the attribute information of any of the candidate books and the attribute information of the target user using the target model to obtain a prediction result of the candidate book under the first reading indicator, wherein the prediction result is used to describe the predicted state of the target user under the first reading indicator of the candidate book, wherein the target model is trained based on training data and label information corresponding to the training data, wherein the training data is determined based on the attribute information of the sample book and the attribute information of the reader of the sample book, wherein the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, and wherein the label information is determined based on the time the reader spends reading the sample book within the target time period and the total reading time of the reader within the target time period;

[0150] The book recommendation unit 603 is used to determine a target book from the at least one candidate book for recommendation according to the prediction result of each candidate book under the first reading indicator.

[0151] In a possible implementation manner, the tag information is determined based on a ratio between the reading time of the sample book and the total reading time.

[0152] In one possible implementation, the process of determining the label information includes: if the total reading time is lower than a first time threshold, determining the label information based on the ratio between the time of reading the sample books and the first time threshold; if the total reading time is not lower than the first time threshold, determining the label information based on the ratio between the time of reading the sample books and the total reading time.

[0153] In a possible implementation, the process of determining the label information includes: obtaining the total number of chapters of the sample book and the number of chapters of the sample book read by the reader within the target time period; comparing the ratio between the time spent reading the sample book and the total reading time, and the ratio between the number of chapters of the sample book and the total number of chapters to obtain a maximum ratio; and determining the label information based on the maximum ratio.

[0154] In one possible implementation, if the total reading time is not less than a first time threshold, and the time for reading the sample books is higher than a second time threshold, the label information is a maximum ratio, which is obtained by comparing the ratio between the time for reading the sample books and the total reading time, and the ratio between the number of chapters of the reading sample books and the total number of chapters; if the total reading time is not less than the first time threshold, and the time for reading the sample books is not higher than the second time threshold, the label information is the ratio between the time for reading the sample books and the total reading time.

[0155] In a possible implementation manner, the training data includes attribute information of the sample book, attribute information of the reader, and the number of chapters of the sample book read by the reader within the target time period; the target model is a student model;

[0156] The training process of the target model includes: using the teacher model to process the attribute information of the sample books, the attribute information of the readers and the number of chapters of the reading sample books to obtain the output data of the teacher model, and using the student model to process the attribute information of the sample books and the attribute information of the readers to obtain the output data of the student model, and the network structure of the teacher model is the same as the network structure of the student model; updating the student model based on the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information.

[0157] In one possible implementation, the training process of the target model specifically includes: updating the student model and the teacher model based on the gap between the output data of the student model and the output data of the teacher model, the gap between the output data of the student model and the label information, and the gap between the output data of the teacher model and the label information.

[0158] In a possible implementation manner, the book recommendation device 600 further includes:

[0159] an index prediction unit, configured to determine, for any of the candidate books, a prediction result of the candidate book under at least one second reading index according to the attribute information of the candidate book and the attribute information of the target user, wherein each of the second reading indexes is different from the first reading index;

[0160] a probability determination unit, configured to, for any of the candidate books, fuse the prediction result of the candidate book under the first reading indicator with the prediction results of the candidate book under the second reading indicators according to the weighted weight corresponding to the first reading indicator and the weighted weights corresponding to the second reading indicators, so as to obtain a recommendation probability of the candidate book, wherein the weighted weight corresponding to the first reading indicator is higher than the weighted weights corresponding to the second reading indicators;

[0161] The book recommendation unit 603 is specifically configured to determine a target book for recommendation from the at least one candidate book according to the recommendation probability of each candidate book.

[0162] Based on the relevant content of the above-mentioned book recommendation device 600, it can be known that the working principle of the book recommendation device 600 provided by the present application includes: first obtaining the attribute information of the target user and the attribute information of at least one candidate book; then using the trained target model, the attribute information of the target user, and the attribute information of each candidate book, determining the prediction result of each candidate book under the first reading indicator, so that these prediction results can more accurately represent the target user's interest in each candidate book; then, based on these prediction results, determining the target book from these candidate books for recommendation, so that the books recommended to the target user are more accurate, which is conducive to improving the book recommendation effect, and then is conducive to improving the user's reading experience.

[0163] In addition, an embodiment of the present application also provides an electronic device, which includes a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation of the book recommendation method provided in the embodiment of the present application.

[0164] See also Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0165] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0166] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0167] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0168] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept, and the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0169] The embodiment of the present application also provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes any implementation of the book recommendation method provided in the embodiment of the present application.

[0170] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0171] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0172] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0173] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can execute the method.

[0174] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0175] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0176] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit / module does not, in some cases, constitute a limitation on the unit itself.

[0177] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0178] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0179] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0180] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

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

[0182] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0183] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A book recommendation method, characterized in that: The method comprises: Acquire attribute information of a target user and attribute information of at least one candidate book; For any of the candidate books, the target model is used to process the attribute information of the candidate book and the attribute information of the target user to obtain a prediction result of the candidate book under the first reading indicator, wherein the prediction result is used to describe the predicted state of the target user under the first reading indicator of the candidate book, wherein the target model is trained based on training data and label information corresponding to the training data, wherein the training data is determined based on the attribute information of sample books and the attribute information of the reader of the sample books, wherein the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, and wherein the label information is determined based on the time duration for which the reader reads the sample book within the target time period and the total reading time duration of the reader within the target time period; According to the prediction results of each of the candidate books under the first reading indicator, a target book is determined from the at least one candidate book for recommendation.

2. The method according to claim 1, characterized in that The tag information is determined according to the ratio between the reading time of the sample book and the total reading time.

3. The method according to claim 1, characterized in that: The process of determining the label information includes: If the total reading time is lower than a first time threshold, determining the label information according to a ratio between the time of reading the sample book and the first time threshold; If the total reading time is not less than the first time threshold, the tag information is determined according to the ratio between the time of reading the sample book and the total reading time.

4. The method according to claim 3, characterized in that The process of determining the label information further includes: Obtaining the total number of chapters of the sample book and the number of chapters of the sample book read by the reader within the target time period; Compare the ratio between the reading time of the sample book and the total reading time, and the ratio between the number of chapters of the sample book and the total number of chapters, to obtain a maximum ratio; The determining of the tag information according to the ratio between the reading time of the sample book and the total reading time includes: The label information is determined according to the maximum ratio.

5. The method according to claim 3, characterized in that: If the total reading time is not less than a first time threshold, and the time of the sample book is greater than a second time threshold, the tag information is a maximum ratio, which is obtained by comparing the ratio between the time of the sample book and the total reading time, and the ratio between the number of chapters of the sample book and the total number of chapters; If the total reading time is not less than the first time threshold, and the time for reading the sample book is not greater than the second time threshold, the tag information is the ratio of the time for reading the sample book to the total reading time.

6. The method according to claim 1, characterized in that The training data includes attribute information of the sample book, attribute information of the reader, and the number of chapters of the sample book read by the reader within the target time period; The target model is a student model; The training process of the target model includes: Using the teacher model to process the attribute information of the sample books, the attribute information of the readers, and the number of chapters of the sample books, to obtain output data of the teacher model; and using the student model to process the attribute information of the sample books and the attribute information of the readers, to obtain output data of the student model, wherein the network structure of the teacher model is the same as the network structure of the student model; The student model is updated according to the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information.

7. The method according to claim 6, characterized in that The updating of the student model according to the gap between the output data of the student model and the output data of the teacher model, and the gap between the output data of the student model and the label information, comprises: The student model and the teacher model are updated according to the gap between the output data of the student model and the output data of the teacher model, the gap between the output data of the student model and the label information, and the gap between the output data of the teacher model and the label information.

8. The method according to claim 1, characterized in that The method further comprises: For any of the candidate books, determining a prediction result of the candidate book under at least one second reading indicator according to the attribute information of the candidate book and the attribute information of the target user, wherein each of the second reading indicators is different from the first reading indicator; For any of the candidate books, according to the weighted weight corresponding to the first reading indicator and the weighted weights corresponding to the second reading indicators, the prediction result of the candidate book under the first reading indicator is merged with the prediction results of the candidate book under the second reading indicators to obtain the recommendation probability of the candidate book, the weighted weight corresponding to the first reading indicator being higher than the weighted weights corresponding to the second reading indicators; The step of determining a target book from the at least one candidate book for recommendation based on the prediction result of each candidate book under the first reading indicator includes: According to the recommendation probability of each of the candidate books, a target book is determined from the at least one candidate book for recommendation.

9. A book recommendation device, characterized in that: include: An information acquisition unit, used to acquire attribute information of a target user and attribute information of at least one candidate book; A model processing unit, for processing the attribute information of any of the candidate books and the attribute information of the target user using a target model to obtain a prediction result of the candidate book under a first reading indicator, wherein the prediction result is used to describe the predicted state of the target user under the first reading indicator of the candidate book, wherein the target model is trained based on training data and label information corresponding to the training data, wherein the training data is determined based on the attribute information of sample books and the attribute information of readers of the sample books, wherein the label information is used to describe the actual state of the reader under the first reading indicator of the sample book, and wherein the label information is determined based on the time the reader spends reading the sample book within a target time period and the total reading time of the reader within the target time period; The book recommendation unit is used to determine a target book from the at least one candidate book for recommendation based on the prediction result of each candidate book under the first reading indicator.

10. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the method according to any one of claims 1 to 8.

11. A computer readable medium, characterized in that The computer-readable medium stores instructions or computer programs, and when the instructions or computer programs are executed on a device, the device executes the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that It comprises a computer program carried on a non-transitory computer-readable medium, the computer program comprising a program code for executing the method according to any one of claims 1 to 8.