Recommendation language generation method and device, electronic equipment and storage medium
The multi-dimensional feature information generation of recommendation words is solved by the problem of insufficient introduction to the e-book content, improving the efficiency of users in selecting books of interest, and improving the reading experience.
Patent Information
- Application Number
- CN202410967445.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-08
AI Technical Summary
The content introduction of e-books is too short to fully reflect the characteristics of e-books, which leads to users who may choose books that they are not interested in when choosing e-books, reducing reading efficiency.
The multi-dimensional feature information of e-books is obtained through the recommendation word generation model, high-quality recommendation words are generated, and the e-books that are of interest to users are filtered and matched, improving selection efficiency.
It improves the efficiency of users in selecting books of interest in e-book reading applications and enhances the reading experience.
Smart Images

Figure CN118916477A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for generating a recommendation. Background Art
[0002] Currently, users can read e-books in e-book reading applications. In the e-book reading applications, an e-book selection page is displayed, and the e-book selection page displays content introductions of multiple e-books, which is convenient for users to select e-books of interest to read.
[0003] In actual applications, it is found that since the content summary of the e-book is too brief and cannot fully reflect the characteristics of the e-book, when users choose e-books based on the content summary of the e-book, they may choose e-books they are not interested in and give up reading, which reduces the efficiency of users' e-book reading.
[0004] Therefore, how to improve the efficiency of users reading e-books has become one of the problems that need to be solved urgently. Summary of the invention
[0005] The embodiments of the present disclosure provide a recommendation word generation method, device, electronic device and storage medium, which can efficiently and quickly generate e-book recommendation words through a recommendation word generation model, and determine high-quality recommendation words that match the e-books for users among the generated recommendation words, thereby facilitating users to select e-books of interest for reading based on the e-book recommendation words, thereby improving the efficiency of users in reading e-books.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating a recommendation, comprising:
[0007] Acquire multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations for the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model;
[0008] Determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information;
[0009] According to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each of the second book recommendations.
[0010] In a second aspect, an embodiment of the present disclosure provides a recommendation generating device, including:
[0011] A recommendation word generation unit, configured to obtain multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendation words of the first electronic book according to the multi-dimensional book feature information through a recommendation word generation model;
[0012] a recommendation word screening unit, configured to determine text quality information of the first book recommendation words, and screen at least one second book recommendation word from each of the first book recommendation words according to the text quality information;
[0013] The recommendation matching unit is used to determine a target book recommendation matching the first electronic book from each of the second book recommendations according to the multi-dimensional book feature information.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the steps of the method described in the first aspect when executed by a processor.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In one or more embodiments of the present disclosure, first, the multi-dimensional book feature information of the first electronic book is obtained, and a plurality of first book recommendations of the first electronic book are generated according to the multi-dimensional book feature information through a recommendation generation model, and then, the text quality information of the first book recommendations is determined, and at least one second book recommendation is obtained from each first book recommendation according to the text quality information, and finally, according to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each second book recommendation. It can be seen that, through this embodiment, the recommendation generation model can be used to efficiently and quickly generate recommendations for electronic books, and high-quality recommendations matching the electronic books can be determined for users in the generated recommendations, so as to facilitate users to select electronic books of interest for reading according to the recommendations of the electronic books, thereby improving the efficiency of users in reading electronic books. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0019] Figure 1 A flowchart of a method for generating a recommendation provided by an embodiment of the present disclosure;
[0020] Figure 2 A schematic diagram of the principle of a recommendation word generation model provided in an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of the training process of a recommendation generation model provided in an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of training a recommendation generation model provided in an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the principle of a quality determination model provided by an embodiment of the present disclosure;
[0024] Figure 6 A schematic diagram of a training process of a quality determination model provided in an embodiment of the present disclosure;
[0025] Figure 7 A schematic diagram of training a quality determination model provided in one embodiment of the present disclosure;
[0026] Figure 8 A schematic diagram of a training process of a first matching degree determination model provided in an embodiment of the present disclosure;
[0027] Fig. 9 A schematic diagram of a training process of a second matching degree determination model provided in an embodiment of the present disclosure;
[0028] Fig.10 A schematic diagram of the structure of a recommendation generating device provided by an embodiment of the present disclosure;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present disclosure.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] The disclosed embodiment provides a method for generating recommendation words, which can generate recommendation words for e-books efficiently and quickly through a recommendation word generation model, and determine high-quality recommendation words that match the e-books for users in the generated recommendation words, thereby facilitating users to select e-books of interest for reading according to the e-book recommendation words, thereby improving the efficiency of users in reading e-books. The method can be applied to and executed by a server, which can be in the form of a single server or a server cluster.
[0036] Figure 1 A flowchart of a method for generating a recommendation provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0037] Step S102, obtaining multi-dimensional book feature information of a first electronic book, and generating a plurality of first book recommendations of the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model;
[0038] Step S104, determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information;
[0039] Step S106: determining a target book recommendation that matches the first electronic book from among the second book recommendations based on the multi-dimensional book feature information.
[0040] In this embodiment, first, the multi-dimensional book feature information of the first electronic book is obtained, and a plurality of first book recommendations of the first electronic book are generated according to the multi-dimensional book feature information through the recommendation generation model, and then the text quality information of the first book recommendation is determined, and at least one second book recommendation is obtained from each first book recommendation according to the text quality information, and finally, according to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each second book recommendation. It can be seen that through this embodiment, the recommendation generation model can be used to efficiently and quickly generate the recommendation of the electronic book, and the high-quality recommendation matching the electronic book is determined for the user in the generated recommendation, so as to facilitate the user to select the electronic book of interest for reading according to the recommendation of the electronic book, and improve the efficiency of the user in reading the electronic book.
[0041] In the above step S102, multi-dimensional book feature information of the first electronic book is obtained. The first electronic book can be any electronic book for which recommendation words need to be generated, and this embodiment does not limit it. The multi-dimensional book feature information of the first electronic book includes at least feature information of the content dimension of the first electronic book and feature information of the status dimension of the first electronic book. Among them, the feature information of the content dimension of the first electronic book may include the book title and book introduction of the first electronic book, and the book title and book introduction of the first electronic book may be written and determined by the author of the first electronic book. The feature information of the status dimension of the first electronic book may include at least one of the book serialization completion status information of the first electronic book, the book list information of the first electronic book, the book plot related information of the first electronic book, the book topic information related to the first electronic book, and the related information of the derivative multimedia data of the first electronic book.
[0042] The serialization completion status information of the first electronic book is used to indicate whether the first electronic book is in a serialization state or a completion state. The book list information of the first electronic book is used to indicate the book list where the first electronic book is located. For example, the book list information of the first electronic book is used to indicate that the first electronic book is located in the fantasy book recommendation list, or the book list information of the first electronic book is used to indicate that it is located in the high-quality short story list. The book plot related information of the first electronic book includes at least one of the user's comment message on the plot in the first electronic book, the author's writing conception of the first electronic book on the plot in the first electronic book, the highlight plot in the first electronic book determined according to the user's comment, and the highlight plot in the first electronic book determined according to the author's writing conception. The book topic information related to the first electronic book is used to indicate which book topics the first electronic book has been cited under. For example, the book topic information related to the first electronic book is used to indicate that the first electronic book has been recommended under the topic of short romance, or the book topic information related to the first electronic book is used to indicate that the first electronic book has been talked about by users under the topic of modern suspense. The derivative multimedia data of the first e-book includes a short play, comic or short video created based on the plot of the first e-book. The related information of the derivative multimedia data of the first e-book includes user consumption data of the derivative multimedia data of the first e-book and at least one of the highlight plots determined according to the user consumption data, and the user consumption data includes at least one of user comment information, like information and forwarding information.
[0043] The feature information of the state dimension of the first e-book may also include at least one of the number of words in the first e-book, classification, user's completion rate of reading, and the most recent reading data of the first e-book. The user's completion rate of reading refers to the ratio of the number of users who have read all the contents of the first e-book to the number of users who have read the first e-book, and the most recent reading data of the first e-book includes but is not limited to at least one of the most recent reading times of the first e-book and the reading population.
[0044] In the above step S102, a plurality of first book recommendations for the first electronic book are generated according to the multi-dimensional book feature information by using the recommendation generation model. In one embodiment, the plurality of first book recommendations for the first electronic book are generated according to the multi-dimensional book feature information by using the recommendation generation model, including:
[0045] The recommendation generation model generates recommendation words multiple times based on multi-dimensional book feature information, and each time generates multiple target recommendation word text blocks and target text results of the target recommendation word text blocks of the first electronic book;
[0046] Through the recommendation generation model, each target text result is obtained for each generation, and each target text result is combined to obtain a first book recommendation for the first electronic book; each first book recommendation of the first electronic book is different from each other.
[0047] In this embodiment, a recommendation generation model is pre-trained, and the multi-dimensional book feature information is processed multiple times through the recommendation generation model, and multiple recommendation generation is performed based on the multi-dimensional book feature information, and multiple target recommendation text blocks and target text results of the target recommendation text blocks of the first electronic book are obtained each time. In this embodiment, the number of first book recommendation words is preset, for example, 5, and the recommendation generation model can be used to perform 5 recommendation generation based on the multi-dimensional book feature information, and multiple target recommendation text blocks and target text results of the target recommendation text blocks of the first electronic book are obtained each time.
[0048] Among them, the number of target recommendation language text blocks generated each time can be the same or different, depending on the generation process of the recommendation language generation model. In one generation process, the lengths of each target text result of each target recommendation language text block generated can be the same or different, depending on the generation process of the recommendation language generation model.
[0049] In this embodiment, the target recommendation text block can be understood as a field, and the target text result can be understood as a field value, that is, one target recommendation text block corresponds to one target text result, and the target text result is a specific text result of the target recommendation text block. A first book recommendation of the first electronic book is obtained by combining the target text results of the target recommendation text blocks.
[0050] For example, the first book recommendation is: This is a book about history, simple and easy to understand. The first book recommendation includes 10 target recommendation text blocks, namely target recommendation text blocks 1-10, the target text result of target recommendation text block 1 is "this book", the target text result of target recommendation text block 2 is "is", the target text result of target recommendation text block 3 is "about", the target text result of target recommendation text block 4 is "history", the target text result of target recommendation text block 5 is "of", the target text result of target recommendation text block 6 is "book", the target text result of target recommendation text block 7 is "," the target text result of target recommendation text block 8 is "simple", the target text result of target recommendation text block 9 is "easy to understand", and the target text result of target recommendation text block 10 is "."
[0051] Based on this, in this embodiment, through the recommendation generation model, for the target text results of each target recommendation text block obtained in each generation, the target text results of each target recommendation text block obtained in this generation are combined to obtain a first book recommendation for the first electronic book generated in this generation. In this embodiment, multiple recommendation generation is performed based on multi-dimensional book feature information to obtain multiple first book recommendations for the first electronic book, and the text content of each first book recommendation of the first electronic book is different from each other. For example, the first electronic book has two first book recommendations, namely "This is a book about history, simple and easy to understand" and "This history book is simple and easy to understand, welcome to read".
[0052] According to the above description, it can be understood that, for each first book recommendation of the first electronic book, the number of target recommendation text blocks corresponding to each first book recommendation can be the same or different, depending on the generation process of the recommendation generation model, and, in a first book recommendation, the length of the target text result of each target recommendation text block corresponding to the first book recommendation can be the same or different, depending on the generation process of the recommendation generation model.
[0053] It can be seen that through this embodiment, multiple recommendation words can be generated based on multi-dimensional book feature information through the recommendation word generation model, and multiple target recommendation word text blocks and target text results of the target recommendation word text blocks for the first electronic book are obtained each time. The target text results obtained each time are combined to obtain the first book recommendations of the first electronic book, and the first book recommendations of the first electronic book are different from each other. By generating target recommendation word text blocks and target text results of the target recommendation word text blocks and combining the target text results, multiple first book recommendations for the first electronic book can be quickly obtained.
[0054] In one embodiment, when the recommendation generation model generates recommendation words multiple times based on multi-dimensional book feature information, each generation process is basically the same. Based on this, the recommendation generation model generates recommendation words once based on the multi-dimensional book feature information to obtain multiple target recommendation word text blocks of the first electronic book and target text results of the target recommendation word text block, including:
[0055] The multi-dimensional book feature information is used as input data of the recommendation generation model, and the recommendation generation model determines a target recommendation text block and a target text result of the target recommendation text block of the first electronic book according to the input data; the target text result is located in the output data of the recommendation generation model;
[0056] The input data of the recommendation generation model and the output data of the recommendation generation model are concatenated to obtain new input data of the recommendation generation model, and the step of returning the target text result of outputting a target recommendation text block through the recommendation generation model is executed in a loop to obtain multiple target recommendation text blocks and target text results of the target recommendation text blocks of the first e-book generated this time.
[0057] Figure 2 A schematic diagram of the principle of a recommendation generation model provided in an embodiment of the present disclosure. Figure 2 Take the example of a recommendation generation model generating a recommendation based on multi-dimensional book feature information to obtain a first book recommendation. Figure 2 As shown, in this embodiment, in the process of generating a first book recommendation, first, multi-dimensional book feature information is used as input data of the recommendation generation model. The input data is processed by the recommendation generation model to obtain a target recommendation text block of the first electronic book and a target text result of the target recommendation text block. The output data of the recommendation generation model at least includes the target text result.
[0058] Next, the input data of the recommendation generation model and the output data of the recommendation generation model are spliced to obtain new input data of the recommendation generation model. At this time, the new input data includes multi-dimensional book feature information and a target text result generated above, and the step of processing the input data through the recommendation generation model and outputting a target text result of a target recommendation text block is executed in a loop to obtain the target text result of the next target recommendation text block. This loop is executed until the target text result obtained is a predetermined end text, indicating that the generation of the target text result is completed, thereby obtaining multiple target recommendation text blocks of the first electronic book generated this time and the target text result of each target recommendation text block. Among them, each target text result generated this time may include the above-mentioned end text, or may not include the above-mentioned end text.
[0059] The following takes the multi-dimensional book feature information including the book name and book introduction as an example to explain the above process in detail. In this example, the book name and book introduction are first concatenated to obtain a concatenated text, which is then input into the recommendation generation model as input data. The recommendation generation model uses text prediction to predict a target recommendation text block and a target text result "this is" of the target recommendation text block based on the input data.
[0060] Next, the book name, book introduction and target text result "this is" are concatenated to obtain new input data which is input into the recommendation generation model. The recommendation generation model uses text prediction to predict the next target recommendation text block and the target text result "a book" of the target recommendation text block based on the input data.
[0061] Next, the book name, book introduction, target text result "this is" and target text result "a book" are concatenated to obtain new input data which is input into the recommendation generation model. The recommendation generation model uses text prediction to predict the next target recommendation text block and the target text result "history book" of the target recommendation text block based on the input data.
[0062] The above process is repeated until the predicted target text result is the predetermined end text EOS, and each target recommendation text block predicted before the predetermined end text and the corresponding target text result are used as the multiple target recommendation text blocks of the first electronic book and the target text results of each target recommendation text block obtained by the current recommendation generation. It can be understood that, through the recommendation generation model, the target text results obtained in this generation are combined in the generation order to obtain the first book recommendation of the first electronic book generated this time.
[0063] It can be seen that through this embodiment, when generating any first book recommendation for the first electronic book, the model output data can be spliced back to the input data, and multiple target recommendation text blocks of the first electronic book and the target text results of each target recommendation text block can be predicted through text prediction, thereby efficiently and accurately generating the first book recommendation for the first electronic book and improving the accuracy of the generated first book recommendation.
[0064] It can be understood that the process of the recommendation generation model predicting a target recommendation text block and a target text result of the target recommendation text block according to the input data each time is basically the same. Therefore, taking the example of the recommendation generation model generating a first book recommendation at any time and predicting a target recommendation text block and a target text result of the target recommendation text block at any time according to the input data, in one embodiment, the recommendation generation model determines a target recommendation text block and a target text result of the target recommendation text block of the first electronic book according to the input data, including:
[0065] Determine, by a recommendation language generation model, a target recommendation language text block of the first electronic book and a plurality of optional text results of the target recommendation language text block according to input data;
[0066] Through the recommendation generation model, the target text result of the target recommendation text block is selected from each optional text result according to the selection rule corresponding to the first book recommendation generated this time; the selection rule corresponding to each generation of the first book recommendation is different.
[0067] In this embodiment, Figure 2 As shown, a target recommendation language text block of the first e-book and multiple optional text results of the target recommendation language text block can be determined through a recommendation language generation model according to input data, such as the book name and book introduction of the first e-book. For example, this is a process of generating the tenth target recommendation language text block, so the tenth target recommendation language text block is determined, and multiple optional text results of the tenth target recommendation language text block are determined, which are "this is", "this is", and "this is".
[0068] Next, through the recommendation generation model, the target text result of the target recommendation text block is selected from each optional text result according to the selection rule corresponding to the first book recommendation generated this time. For example, the target text result of the tenth target recommendation text block is selected as "this is".
[0069] In this embodiment, each time a first book recommendation is generated, a selection rule corresponds to it, and the selection rule corresponding to each generation of the first book recommendation is different. In the process of generating a first book recommendation, a target text result is selected for each target recommendation text block from a plurality of optional text results of each target recommendation text block according to the corresponding selection rule. Since the selection rule corresponding to each generation of the first book recommendation is different, the target text results of the target recommendation text blocks generated in the same order each time can be made different as much as possible, for example, the target text results of the tenth target recommendation text block generated each time are different, so that the first book recommendations generated each time are different.
[0070] In one example, when generating the first book recommendation for the first time, for each target recommendation text block, multiple optional text results are sorted in descending order according to the credibility of each optional text result, and the selection rule is set to select the optional text result with the highest credibility as the target text result of the target recommendation text block with a probability of 100%. When generating the first book recommendation for the second time, for each target recommendation text block, multiple optional text results are sorted in descending order according to the credibility of each optional text result, and the selection rule is set to select the optional text result with the highest credibility as the target text result of the target recommendation text block with a probability of 80%, and select the optional text result with the second highest credibility as the target text result of the target recommendation text block with a probability of 20%. Thus, the first book recommendation generated each time is different through different selection rules each time.
[0071] It can be seen that through this embodiment, a target recommendation text block and multiple optional text results of the target recommendation text block of the first electronic book can be determined according to the input data through the recommendation generation model, and the target text result of the target recommendation text block can be selected from each optional text result according to the corresponding selection rule when the first book recommendation is generated this time through the recommendation generation model, and the corresponding selection rules when the first book recommendation is generated each time are set to be different, so that the first book recommendations generated each time are different, thereby improving the diversity of the first book recommendations generated each time.
[0072] In one embodiment, taking the example of the recommendation generation model generating a first book recommendation at any time and generating any target recommendation text block in the first book recommendation, the recommendation generation model determines a target recommendation text block of the first electronic book and multiple optional text results of the target recommendation text block according to input data, including:
[0073] Determining a target recommendation text block and a target text vector of the target recommendation text block of the first electronic book according to the input data by using the recommendation text generation model;
[0074] Through the recommendation generation model, multiple optional text results of the target recommendation text block are determined in the text library according to the target text vector.
[0075] In this embodiment, Figure 2As shown, a target recommendation text block and a target text vector of the target recommendation text block of the first e-book can be determined by a recommendation generation model according to input data, such as the book title and book introduction of the first e-book. For example, this is the process of generating the first target recommendation text block, so the first target recommendation text block is determined, and the target text vector of the first target recommendation text block is determined to be [1,0,0]. In this embodiment, a target recommendation text block has a corresponding target text vector.
[0076] Next, the recommendation generation model is used to determine multiple optional text results of the target recommendation text block in the text library according to the target text vector. The text library may include multiple text results, each of which has its own text vector. In one example, according to the target text vector [1,0,0], three text results whose text vectors are closest to the target text vector may be determined in the text library as optional text results, and the optional text results include "here", "this", and "this".
[0077] It can be seen that through this embodiment, a target recommended language text block and a target text vector of the target recommended language text block of the first electronic book can be determined according to input data through the recommendation language generation model. Then, according to the target text vector, multiple optional text results of the target recommended language text block can be determined in the text library through the recommendation language generation model. By first determining the target text vector and then determining the optional text results, the accuracy of determining the optional text results is improved.
[0078] In one embodiment, taking the example of the recommendation generation model generating a first book recommendation at any time and generating a target text vector of any target recommendation text block in the first book recommendation, the recommendation generation model determines a target recommendation text block of the first electronic book and the target text vector of the target recommendation text block according to input data, including:
[0079] Determine, by a first generation network in a recommendation generation model, a target recommendation text block of a first electronic book according to input data, and determine a first text vector of the target recommendation text block in a first scene;
[0080] Determining, by a second generation network in the recommendation language generation model, a second text vector of the same target recommendation language text block in a second scene according to the input data; the first scene is different from the second scene;
[0081] The first text vector and the second text vector are added together through a vector merging network in the recommendation generation model, and a target text vector of the target recommendation text block is determined according to the vector obtained by the addition.
[0082] In this embodiment, Figure 2 As shown, the recommendation language generation model includes a first generation network, a second generation network and a vector merging network. First, the first generation network processes the input data, such as the book name and book introduction of the first electronic book, to determine a target recommendation language text block of the first electronic book, and determine the first text vector of the target recommendation language text block in the first scene. The first generation network is used to determine the text vector of the target recommendation language text block in the first scene. The first scene can be a preset general scene, such as a natural science scene, a humanities scene, etc. Therefore, a target recommendation language text block of the first electronic book can be determined by the first generation network, and the first text vector of the target recommendation language text block in the first scene can be determined. For example, the tenth target recommendation language text block of the first electronic book is determined by the first generation network, and the first text vector of the tenth target recommendation language text block in the first scene is determined to be [1,0,-1].
[0083] Next, the second generation network is used to process the input data, such as the book title and book introduction of the first electronic book, to determine the same target recommendation text block of the first electronic book, and to determine the second text vector of the target recommendation text block in the second scene. The second generation network is used to determine the text vector of the target recommendation text block in the second scene. The second scene can be an electronic book recommendation generation scene, and the second scene is different from the first scene. Therefore, the second generation network can be used to determine the same target recommendation text block of the first electronic book, and determine the second text vector of the target recommendation text block in the second scene. For example, the tenth target recommendation text block of the first electronic book is determined by the second generation network, and the second text vector of the tenth target recommendation text block in the second scene is determined to be [2,1,3].
[0084] It is worth noting that the first generation network is used to determine the text vector of the target recommendation text block in the first scene, and the first scene can be a preset general scene. The second generation network is used to determine the text vector of the target recommendation text block in the second scene, and the second scene can be an e-book recommendation generation scene, and the second scene is different from the first scene. In this embodiment, the first and second text vectors of the target recommendation text block are generated by the first generation network and the second generation network respectively, so that the target text vector of the target recommendation text block is generated taking into account the influence of different scenes, thereby improving the accuracy of generating the target text vector. In addition, in the training process of the recommendation generation model, a pre-trained first generation network can be selected, and the trained recommendation generation model can be obtained by training the parameters of the second generation network.
[0085] Finally, the first text vector and the second text vector are added together through a vector merging network, and a target text vector of the target recommended language text block is determined based on the summed vector. For example, the summed vector is determined as the target text vector of the target recommended language text block.
[0086] It can be seen that through this embodiment, the recommendation language generation model can be used to generate the first text vector and the second text vector of the target recommendation language text block respectively in consideration of the influence of different scenarios, the first text vector and the second text vector are added, and the target text vector of the target recommendation language text block is determined based on the vector obtained by the addition, thereby improving the accuracy of generating the target text vector.
[0087] Combine the following Figure 2 The process of generating a plurality of first book recommendations for a first electronic book according to multi-dimensional book feature information through a recommendation generation model is fully described.
[0088] First, the book title and book introduction of the first electronic book are obtained as multi-dimensional book feature information, and the first recommendation word generation is performed based on the multi-dimensional book feature information through a recommendation word generation model to obtain multiple target recommendation word text blocks of the first electronic book and the target text result of each target recommendation word text block. The target text results generated this time are combined through the recommendation word generation model to obtain the first first book recommendation word of the first electronic book.
[0089] Next, the recommendation generation model generates a second recommendation based on the multi-dimensional book feature information, obtains multiple target recommendation text blocks of the first electronic book and target text results of each target recommendation text block, and combines the target text results generated this time through the recommendation generation model to obtain the second first book recommendation for the first electronic book. By analogy, a preset number of first book recommendations for the first electronic book are obtained, wherein the first book recommendations of the first electronic book are different from each other.
[0090] When generating the first book recommendation at any time, the book title and book introduction of the first e-book are input into the recommendation generation model, and the first generation network in the recommendation generation model is used to determine the first target recommendation text block of the first e-book according to the input data, and the first text vector of the first target recommendation text block in the first scene is determined, and the second generation network in the recommendation generation model is used to determine the second text vector of the first target recommendation text block in the second scene according to the input data. The first scene is different from the second scene. The first text vector and the second text vector are added together by the vector merging network in the recommendation generation model, and the target text vector of the first target recommendation text block is determined according to the vector obtained by the addition.
[0091] Next, through the recommendation generation model, according to the target text vector of the first target recommendation text block, multiple optional text results of the first target recommendation text block are determined in the text library, and the target text result of the first target recommendation text block is selected from each optional text result according to the selection rule corresponding to the first book recommendation generated for the first time.
[0092] Next, the target text result of the first target recommendation language text block is used as the output data of the recommendation language generation model, the input data of the recommendation language generation model and the output data of the recommendation language generation model are spliced to obtain new input data of the recommendation language generation model, and the above process is repeated to obtain the second target recommendation language text block of the first e-book and the target text result of the second target recommendation language text block.
[0093] Next, the target text result of the second target recommendation language text block is used as the output data of the recommendation language generation model, the previous input data of the recommendation language generation model and the output data of the recommendation language generation model are concatenated to obtain new input data of the recommendation language generation model, and the above process is repeated to obtain the third target recommendation language text block of the first e-book and the target text result of the third target recommendation language text block.
[0094] The above process is repeated until a target text result is obtained that is a predetermined end text. The target text results before the predetermined end text are concatenated in the order of generation to obtain the first book recommendation of the first electronic book generated this time.
[0095] In the above process, each time the first book recommendation is generated, the selection rule for selecting the target text result is different, so that for the same target recommendation text block, different target text results are selected from the same optional text results as much as possible each time, so that the first book recommendations of the first electronic book are different from each other. The same target recommendation text block refers to the target recommendation text block with the same generation order, such as the Nth target recommendation text block generated each time. N is a positive integer.
[0096] The following describes the training process of the recommendation generation model.
[0097] Figure 3 A schematic diagram of the training process of the recommendation generation model provided in one embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the process includes:
[0098] Step S302, obtaining first training sample data; the first training sample data includes multi-dimensional sample book feature information of a first sample electronic book and a first sample book recommendation of the first sample electronic book;
[0099] Step S304, generating recommendation words based on multi-dimensional sample book feature information through a first neural network to obtain approximate sample book recommendation words of the first sample electronic book, wherein the approximate sample book recommendation words include a plurality of sample recommendation word text blocks and approximate text results of the sample recommendation word text blocks;
[0100] Step S306: training a first neural network according to the approximate text result and the first sample book recommendation, and the trained first neural network is a recommendation generation model.
[0101] In this embodiment, first, the first training sample data is obtained, and the first training sample data includes multi-dimensional sample book feature information of the first sample electronic book and the first sample book recommendation of the first sample electronic book. Among them, the first sample electronic book can be any electronic book, which is not limited here. The multi-dimensional sample book feature information of the first sample electronic book at least includes feature information of the content dimension of the first sample electronic book and feature information of the status dimension of the first sample electronic book. Among them, the feature information of the content dimension of the first sample electronic book may include the book name and book introduction of the first sample electronic book, and the book name and book introduction of the first sample electronic book may be written and determined by the author of the first sample electronic book. The feature information of the status dimension of the first sample electronic book may include at least one of the book serialization completion status information of the first sample electronic book, the book list information of the first sample electronic book, the book plot related information of the first sample electronic book, the book topic information related to the first sample electronic book, and the related information of the derivative multimedia data of the first sample electronic book. The specific content of the multi-dimensional sample book feature information of the first sample electronic book can refer to the specific introduction of the multi-dimensional book feature information of the first electronic book, which will not be repeated here. The first sample book recommendation of the first sample electronic book may be a book recommendation of the first sample electronic book that is manually written and determined in advance.
[0102] Next, the first neural network is obtained. It can be understood that the structure of the first neural network is the same as the structure of the recommendation generation model. Also, through the first neural network, recommendation words are generated based on multi-dimensional sample book feature information to obtain approximate sample book recommendations for the first sample e-book, and each approximate sample book recommendation includes multiple sample recommendation text blocks and approximate text results of each sample recommendation text block. It can be understood that the approximate sample book recommendation is the recommendation of the first sample e-book learned by the first neural network. It should be noted that during a model training, for a first sample e-book, the first neural network only needs to generate an approximate sample book recommendation, and an approximate sample book recommendation includes multiple sample recommendation text blocks and approximate text results of each sample recommendation text block. If the model is still not perfect after one model training, the first neural network generates an approximate sample book recommendation for a first sample e-book for model training.
[0103] Finally, the first neural network is trained according to the approximate text result and the first sample book recommendation, and the trained first neural network is used as a recommendation generation model.
[0104] It can be seen that through this embodiment, the recommendation statement generation model can be efficiently and quickly trained by utilizing the multi-dimensional sample book feature information of the first sample electronic book and the first sample book recommendation statement of the first sample electronic book.
[0105] As mentioned above, the model may need to be trained multiple times. During one model training, for a first sample electronic book, the first neural network only needs to generate an approximate sample book recommendation. An approximate sample book recommendation includes multiple sample recommendation text blocks and approximate text results of each sample recommendation text block. In one embodiment, taking the first neural network generating a recommendation for any first sample electronic book once to obtain an approximate sample book recommendation as an example, the first neural network generates a recommendation based on multi-dimensional sample book feature information to obtain an approximate sample book recommendation for the first sample electronic book, including:
[0106] The multi-dimensional sample book feature information is used as input data of the first neural network, and a sample recommended language text block of the first sample electronic book and an approximate text result of the sample recommended language text block are determined by the first neural network according to the input data; the approximate text result is located in the output data of the first neural network;
[0107] The input data of the first neural network and the output data of the first neural network are concatenated to obtain new input data of the first neural network, and the step of outputting an approximate text result of a sample recommended language text block through the first neural network is returned and executed in a loop to obtain a plurality of sample recommended language text blocks of the first sample e-book and approximate text results of the sample recommended language text blocks;
[0108] The approximate text results are combined through the first neural network to obtain an approximate sample book recommendation for the first sample e-book.
[0109] Figure 4 A training diagram of a recommendation generation model provided in an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the first neural network is trained, and the trained first neural network is a recommendation language generation model. During the training process, the first neural network generates a recommendation language for any first sample electronic book, and when an approximate sample book recommendation language is obtained, firstly, the book name and book introduction of the first sample book, such as the first sample electronic book, are used as input data of the first neural network, and the input data is processed by the first neural network to obtain a sample recommendation language text block of the first sample electronic book and an approximate text result of the sample recommendation language text block, and the output data of the first neural network at least includes the approximate text result.
[0110] Next, the input data of the first neural network and the output data of the first neural network are concatenated to obtain new input data of the first neural network. At this time, the new input data includes multi-dimensional sample book feature information and an approximate text result generated above, and the step of processing the input data through the first neural network and outputting an approximate text result of a sample recommendation text block is executed in a loop to obtain an approximate text result of the next sample recommendation text block. This loop is executed until the obtained approximate text result is a predetermined end text, indicating that the generation of the approximate text result is completed, thereby obtaining multiple sample recommendation text blocks of the first electronic book generated this time and the approximate text result of each sample recommendation text block. Among them, each approximate text result generated this time may include the above-mentioned end text, or may not include the above-mentioned end text.
[0111] Finally, through the first neural network, the approximate text results obtained this time are combined in the order of generation to obtain the approximate sample book recommendation for the first sample e-book generated this time.
[0112] The following is an example of multi-dimensional sample book feature information including the book title and book introduction of the first sample e-book to explain the above process in detail. In this example, the book title and book introduction of the first sample e-book are first concatenated to obtain a concatenated text, which is input into the first neural network as input data of the first neural network. The first neural network uses a text prediction method to predict a sample recommendation text block and an approximate text result "this" of the sample recommendation text block based on the input data.
[0113] Next, the book name, book introduction and approximate text result "this" are concatenated to obtain new input data which is input into the first neural network. The first neural network uses text prediction to predict the next sample recommendation text block and the approximate text result "a book" of the sample recommendation text block based on the input data.
[0114] Next, the book name, book introduction, approximate text result "this" and approximate text result "a book" are concatenated to obtain new input data which is input into the first neural network. The first neural network uses text prediction to predict the next sample recommended text block and the approximate text result "history book" of the sample recommended text block based on the input data.
[0115] The above process is repeated until the predicted approximate text result is the predetermined end text EOS, and each sample recommendation text block predicted before the predetermined end text and the corresponding approximate text result are used as the multiple sample recommendation text blocks of the first sample electronic book and the approximate text results of each sample recommendation text block obtained by the current recommendation generation. Then, through the first neural network, the approximate text results obtained in this generation are combined in the generation order to obtain the approximate sample book recommendation of the first sample electronic book generated this time.
[0116] It can be seen that through this embodiment, when generating any approximate sample book recommendation for the first sample e-book, the model output data can be spliced back to the input data, and multiple sample recommendation text blocks of the first sample e-book and the approximate text results of each sample recommendation text block can be predicted through text prediction, thereby efficiently and accurately generating the approximate sample book recommendation for the first sample e-book, and improving the accuracy of the generated approximate sample book recommendation.
[0117] Referring to the process of generating the first book recommendation by the recommendation generation model, in one embodiment, taking the generation of any sample recommendation text block and the approximate text result of the sample recommendation text block as an example, a sample recommendation text block and the approximate text result of the sample recommendation text block of the first sample electronic book are determined by the first neural network according to the input data, including:
[0118] Determining, by a first neural network, a sample recommended language text block of the first sample electronic book and a target sample text vector of the sample recommended language text block according to the input data;
[0119] Through the first neural network, a text result that is closest to the target sample text vector is selected in the text library as an approximate text result of the sample recommendation text block.
[0120] The method of determining a sample recommended language text block of the first sample electronic book and a target sample text vector of the sample recommended language text block according to the input data through the first neural network includes:
[0121] Determine, by a first generating network in the first neural network, a sample recommended language text block of the first sample electronic book according to the input data, and determine a first sample text vector of the sample recommended language text block in the first scene;
[0122] Determine, by a second generating network in the first neural network, a second sample text vector of the same sample recommended language text block in a second scene according to the input data; the first scene is different from the second scene; the first scene and the second scene can refer to the previous explanation;
[0123] The first sample text vector and the second sample text vector are added together through the vector merging network in the first neural network, and the vector obtained by the addition is used as the target sample text vector of the sample recommendation text block.
[0124] The above process can refer to the recommendation generation process, which will not be repeated here. The difference between here and generating the first book recommendation is that during a model training, for a first sample e-book, the first neural network only needs to generate one approximate sample book recommendation, and does not need to generate multiple approximate sample book recommendations. Therefore, there is no need to set selection rules and select different approximate text results each time. After generating the target sample text vector, it is only necessary to select the text result closest to the target sample text vector in the text library as the approximate text result.
[0125] In one embodiment, after obtaining the approximate sample book recommendation of each first sample electronic book, training the first neural network according to the approximate text results in the approximate sample book recommendation and the first sample book recommendation includes:
[0126] For the approximate text result of the first sample electronic book, determining a sample text result corresponding to the approximate text result in the first sample book recommendation;
[0127] The first neural network is trained according to the loss value between the approximate text result and the sample text result.
[0128] In this embodiment, Figure 4 As shown, after obtaining the approximate sample book recommendation of each first sample electronic book, the first sample book recommendation of the first sample electronic book is obtained, and for each approximate text result of the first sample electronic book, the sample text result corresponding to the approximate text result is determined in the first sample book recommendation. For example, the first sample book recommendation is segmented, and the sample text result corresponding to each approximate text result is determined according to the arrangement position of each word obtained by the segmentation in the first sample book recommendation and the generation order of each approximate text result. In one example, the approximate text result is the text "this is" generated for the first time according to the input data when generating the approximate sample book recommendation, then in the first sample book recommendation, the first segmentation is determined as the corresponding sample text result, and the approximate text result is the text "a book" generated for the second time according to the input data when generating the approximate sample book recommendation, then in the first sample book recommendation, the second segmentation is determined as the corresponding sample text result.
[0129] Next, the first neural network is trained according to the loss value between each approximate text result and each corresponding sample text result, until, for each first sample e-book, the loss value between each approximate text result and each corresponding sample text result is less than a preset loss value, the training is determined to be completed, and the trained first neural network is used as a recommendation generation model, or, until the loss value of the approximate sample book recommendation for each first sample e-book is less than a preset loss value, the training is determined to be completed, and the trained first neural network is used as a recommendation generation model.
[0130] The loss value between each approximate text result and each corresponding sample text result may be a cross entropy loss value. For an approximate sample book recommendation, the average of the cross entropy loss values of each approximate text result is the loss value of the approximate sample book recommendation.
[0131] In a special case, for an approximate sample book recommendation and a corresponding first sample book recommendation, if the number of approximate text results is different from the number of sample text results, the missing text part is padded with spaces according to the longest number before calculating the loss value.
[0132] In a specific example, Figure 4The first neural network shown in the figure, wherein the first generation network is a general knowledge module for generating a first sample text vector in a first scene, and the second generation network is a low-rank matrix for generating a second sample text vector in a second scene. When training the first neural network, the parameters of the first generation network are pre-trained and do not need to be adjusted. In addition, the Lora technology in SFT (Supervised Fine-Tuning) is used to train and update the model parameters of the low-rank matrix. Figure 4 The parameters of the vector merging network in can also be updated during model training. In one example, the bloom-3b model in the large language model can be used as the first neural network mentioned above.
[0133] It can be seen that through this embodiment, the sample text result can be determined in the first sample book recommendation, and the first neural network can be trained according to the loss value between the approximate text result and the sample text result to improve the accuracy of the model training and obtain a high-quality recommendation generation model.
[0134] It is worth noting that, in this embodiment, the output data of the recommendation generation model includes the first book recommendation and each target text result, and the output data of the first neural network includes the approximate sample book recommendation and the approximate text result. Figure 2 In order to facilitate expression, the output data of the simplified schematic diagram recommendation generation model includes the first book recommendation, and the target text results are omitted. Figure 4 In the simplified schematic diagram, for ease of expression, the output data of the first neural network includes approximate sample book recommendations, and the individual approximate text results are omitted.
[0135] After generating a plurality of first book recommendations of the first electronic book by the recommendation generation model, in the above step S104, the text quality information of each first book recommendation is determined, and at least one second book recommendation is obtained by screening out each first book recommendation according to the text quality information. In one embodiment, the text quality information includes a target text quality score, and after determining the target text quality score of each first book recommendation, first book recommendations whose target text quality scores are greater than a score threshold are screened out from each first book recommendation as second book recommendations, thereby obtaining at least one second book recommendation, or a preset number of first book recommendations whose target text quality scores are ranked from high to low are screened out from each first book recommendation as second book recommendations, thereby obtaining at least one second book recommendation.
[0136] In one embodiment, after obtaining the text quality information of the first book recommendation, the recommendation generation model may also be optimized according to the text quality information of the first book recommendation, so that the recommendation generation model outputs book recommendations with higher text quality.
[0137] In one embodiment, determining text quality information of the first book recommendation includes:
[0138] Scoring the text quality of the first book recommendation through the quality determination model to obtain a target text quality score of the first book recommendation;
[0139] The target text quality score is used as the text quality information of the first book recommendation.
[0140] In this embodiment, a quality determination model is pre-trained, and a first book recommendation can be input into the quality determination model each time. The quality determination model scores the text quality of the input first book recommendation to obtain a target text quality score for the first book recommendation, thereby obtaining a target text quality score for each first book recommendation. The target text quality score is the text quality information of the first book recommendation. Among them, the text quality is determined by common text quality factors such as the fluency of the text, the rationality of word usage, the occurrence of typos, and the degree of information richness. When the text quality of the first book recommendation is high, its target text quality score is also high, indicating that the text of the first book recommendation is relatively fluent, the word usage is reasonable, there are fewer typos, and the amount of information is rich.
[0141] It can be seen that through this embodiment, the text quality information of each first book recommendation can be determined efficiently and accurately through the quality determination model.
[0142] In one embodiment, taking any first book recommendation as an example, the text quality of the first book recommendation is scored by a quality determination model to obtain a target text quality score of the first book recommendation, including:
[0143] Scoring the text quality of the first book recommendation in the third scenario through the first determination network in the quality determination model to obtain a first text quality sub-score of the first book recommendation;
[0144] The text quality of the first book recommendation in the fourth scene is scored by the second determination network in the quality determination model to obtain a second text quality sub-score of the first book recommendation; the third scene is different from the fourth scene;
[0145] The first text quality sub-score and the second text quality sub-score are added together through a score merging network in the quality determination model, and a target text quality score of the first book recommendation is determined based on the added score.
[0146] Figure 5 A schematic diagram of the principle of a quality determination model provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the quality determination model includes a first determination network, a second determination network and a score merging network. First, the text quality of the first book recommendation in the third scene is scored by the first determination network to obtain a first text quality sub-score of the first book recommendation, and the first text quality sub-score is used to represent the text quality of the first book recommendation in the third scene. The third scene can be a preset general scene, such as a natural science scene, a humanities scene, etc.
[0147] Next, the second determination network is used to score the text quality of the first book recommendation in the fourth scenario to obtain a second text quality sub-score of the first book recommendation, and the second text quality sub-score is used to represent the text quality of the first book recommendation in the fourth scenario. The fourth scenario can be a scenario for generating an e-book recommendation, and the fourth scenario is different from the third scenario.
[0148] It is worth noting that the third scenario can be a preset general scenario, the fourth scenario can be an e-book recommendation generation scenario, and the third scenario is different from the fourth scenario. In this embodiment, the first and second text quality sub-scores are generated by the first determination network and the second determination network respectively, so as to generate the target text quality score of the first book recommendation taking into account the influence of different scenarios, thereby improving the accuracy of the recommendation scoring.
[0149] Finally, the first text quality sub-score and the second text quality sub-score are added together through the score merging network, and the summed score is determined as the target text quality score of the first book recommendation.
[0150] In one example, the structure of the quality determination model is the same as that of the recommendation generation model, and the first determination network is similar to the first generation network, which is a general knowledge module used to generate the first text quality sub-score in the third scenario. The second determination network and the second generation network are both low-rank matrices used to generate the second text quality sub-score in the fourth scenario. When training the quality determination model, the parameters of the first determination network are pre-trained and do not need to be adjusted, and the model parameters of the low-rank matrix are trained and updated using the Lora technology in the SFT supervised fine-tuning. The parameters of the score merging network can also be updated during model training. In one example, the bloom-3b model in the large language model can be used as the above-mentioned quality determination model.
[0151] It can be seen that through this embodiment, the quality determination model can be used to generate the first text quality sub-score and the second text quality sub-score of the first book recommendation respectively by taking into account the influence of different scenarios, the first text quality sub-score and the second text quality sub-score are added, and the target text quality score of the first book recommendation is determined according to the added score, thereby improving the accuracy of determining text quality.
[0152] based on Figure 5 The principle of the quality determination model shown is that in one embodiment, the quality determination model is trained by the following method. Figure 6 A schematic diagram of the training process of the quality determination model provided in one embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the process includes:
[0153] Step S602, obtaining second training sample data; the second training sample data includes a second sample book recommendation of a second sample electronic book and a sample text quality score of the second sample book recommendation;
[0154] Step S604, scoring the second sample book recommendation through the second neural network to obtain an approximate text quality score of the second sample book recommendation;
[0155] Step S606: training a second neural network according to the approximate text quality score of the second sample book recommendation and the sample text quality score of the second sample book recommendation. The trained second neural network is a quality determination model.
[0156] In this embodiment, first, second training sample data is obtained, and the second training sample data includes a second sample book recommendation of a second sample electronic book and a sample text quality score of the second sample book recommendation. The second sample electronic book and the first sample electronic book may be the same or different electronic books. The second sample book recommendation of the second sample electronic book may be an accurate recommendation written manually, and the sample text quality score of the second sample book recommendation may also be an accurate text quality score determined manually.
[0157] Next, obtain the second neural network. It can be understood that the structure of the second neural network is the same as that of the quality determination model. The second sample book recommendation is scored by the second neural network to obtain an approximate text quality score of the second sample book recommendation. It can be understood that the approximate text quality score is the text quality score of the second sample book recommendation learned by the second neural network. It should be noted that during one model training, the second neural network only needs to generate one approximate text quality score for one second sample book recommendation. If the model is still not perfect after one model training, the second neural network will generate an approximate text quality score for one second sample book recommendation for model training.
[0158] Finally, according to the approximate text quality score of the second sample book recommendation and the sample text quality score of the second sample book recommendation, the second neural network is trained, and the trained second neural network is used as the quality determination model. In one example, the loss value between the approximate text quality score of each second sample book recommendation and the sample text quality score of the second sample book recommendation can be calculated. When the loss value corresponding to each second sample book recommendation is less than the preset loss value, the training is determined to be completed, and the trained second neural network is used as the quality determination model.
[0159] It can be seen that through this embodiment, the sample text quality score of the second sample book recommendation and the second sample book recommendation can be obtained, the second sample book recommendation can be scored, and the approximate text quality score of the second sample book recommendation can be obtained. According to the approximate text quality score of the second sample book recommendation and the sample text quality score of the second sample book recommendation, the quality determination model is trained to improve the accuracy of model training.
[0160] Taking any second sample book recommendation as an example, in one embodiment, the second sample book recommendation is scored by the second neural network to obtain an approximate text quality score of the second sample book recommendation, including:
[0161] Scoring the text quality of the second sample book recommendation in the third scene through the first determination network in the second neural network to obtain a first sample text quality sub-score of the second sample book recommendation;
[0162] Scoring the text quality of the second sample book recommendation in the fourth scenario through the second determination network in the second neural network to obtain a second sample text quality sub-score of the second sample book recommendation; the third scenario is different from the fourth scenario;
[0163] The first sample text quality sub-score and the second sample text quality sub-score are added together through the score merging network in the second neural network structure, and the approximate text quality score of the second sample book recommendation is determined according to the added score.
[0164] Figure 7 A training diagram of a quality determination model provided in an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the second neural network includes a first determination network, a second determination network and a score merging network. First, the text quality of the second sample book recommendation in the third scene is scored by the first determination network to obtain a first sample text quality sub-score of the second sample book recommendation, and the first sample text quality sub-score is used to represent the text quality of the second sample book recommendation in the third scene. The third scene can be a preset general scene, such as a natural science scene, a humanities scene, etc.
[0165] Next, the second determination network is used to score the text quality of the second sample book recommendation in the fourth scenario to obtain a second sample text quality sub-score of the second sample book recommendation, and the second sample text quality sub-score is used to represent the text quality of the second sample book recommendation in the fourth scenario. The fourth scenario can be an e-book recommendation generation scenario, and the fourth scenario is different from the third scenario.
[0166] The explanation of the third and fourth scenarios can refer to the above description and will not be repeated here.
[0167] Finally, the first sample text quality sub-score and the second sample text quality sub-score are added together through the score merging network, and the summed score is determined as the approximate text quality score of the second sample book recommendation.
[0168] It can be seen that through this embodiment, the quality determination model can be used to generate the first sample text quality sub-score and the second sample text quality sub-score of the second sample book recommendation respectively by taking into account the influence of different scenarios, and the first sample text quality sub-score and the second sample text quality sub-score are added, and the approximate text quality score of the second sample book recommendation is determined according to the added score, thereby improving the accuracy of determining the approximate text quality score.
[0169] After one or more second book recommendations with high text quality are obtained through the above process, in one embodiment, considering the different matching degrees between the first electronic book and each second book recommendation, in the above step S106, a target book recommendation matching the first electronic book is determined from each second book recommendation based on the multi-dimensional book feature information of the first electronic book. In one embodiment, determining a target book recommendation matching the first electronic book from each second book recommendation based on the multi-dimensional book feature information of the first electronic book includes at least one of the following methods:
[0170] (1) extracting the book serial completion status information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book serial completion status information in each second book recommendation;
[0171] (2) extracting the book list information of the first electronic book from the multi-dimensional book feature information, and determining the target book recommendation that matches the book list information in each second book recommendation;
[0172] (3) extracting the plot-related information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the plot-related information in each second book recommendation;
[0173] (4) extracting book topic information related to the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book topic information in each second book recommendation;
[0174] (5) Extracting relevant information of the derivative multimedia data of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the relevant information of the derivative multimedia data in each second book recommendation.
[0175] In the above method (1), when the multi-dimensional book feature information includes the book serial completion status information of the first e-book, the book serial completion status information of the first e-book is extracted from the multi-dimensional book feature information, and a target book recommendation matching the book serial completion status information is determined in each second book recommendation. For example, it is determined that the first e-book is in a serial state according to the book serial completion status information, and a recommendation that can reflect that the first e-book is in a serial state is determined as a target book recommendation in each second book recommendation by matching semantic information, so that the user can understand that the first e-book is in a serial state through the target book recommendation, so that users who like to read serial books can quickly locate the e-books of interest.
[0176] In the above method (2), when the multi-dimensional book feature information includes the book list information of the first electronic book, the book list information of the first electronic book is extracted from the multi-dimensional book feature information, and the target book recommendation matching the book list information is determined in each second book recommendation. For example, the book list information of the first electronic book is used to indicate that the first electronic book is in the fantasy book recommendation list. By matching semantic information, the recommendation that can reflect that the first electronic book is in the fantasy book recommendation list is determined as the target book recommendation in each second book recommendation, so that the user can understand that the first electronic book is in the fantasy book recommendation list through the target book recommendation, so that users who like to read fantasy books can quickly locate the electronic books of interest.
[0177] In the above method (3), when the multi-dimensional book feature information includes the book plot related information of the first e-book, the book plot related information of the first e-book is extracted from the multi-dimensional book feature information, and the target book recommendation matching the book plot related information is determined in each second book recommendation. For example, the martial arts plot in the first e-book is determined as the highlight plot that the user likes based on the book plot related information of the first e-book, and the recommendation related to the highlight plot is determined as the target book recommendation in each second book recommendation by matching semantic information, so that the highlight plot of the first e-book is displayed through the target book recommendation, thereby improving the book recommendation effect of the target book recommendation.
[0178] In the above method (4), when the multi-dimensional book feature information includes book topic information related to the first e-book, the book topic information related to the first e-book is extracted from the multi-dimensional book feature information, and a target book recommendation matching the book topic information is determined in each second book recommendation. For example, the book topic information related to the first e-book is used to indicate that the first e-book has been recommended under the topic of short romance stories. By matching semantic information, a recommendation indicating that the first e-book is a short romance book that is highly recommended is determined in each second book recommendation as a target book recommendation, thereby displaying the characteristics of the first e-book through the target book recommendation, and improving the book recommendation effect of the target book recommendation.
[0179] In the above method (5), when the multi-dimensional book feature information includes the relevant information of the derivative multimedia data of the first electronic book, the relevant information of the derivative multimedia data of the first electronic book is extracted from the multi-dimensional book feature information, and the target book recommendation matching the relevant information of the derivative multimedia data is determined in each second book recommendation. For example, the martial arts plot in the first electronic book is determined as the hot highlight plot in each derivative multimedia data according to the relevant information of the derivative multimedia data of the first electronic book, and the recommendation related to the highlight plot is determined as the target book recommendation in each second book recommendation by matching the semantic information, so that the highlight plot of the first electronic book is expressed by the target book recommendation, and the book recommendation effect of the target book recommendation is improved.
[0180] It can be seen that through this embodiment, according to the multi-dimensional book feature information of the first electronic book, one or more methods can be used to determine the target book recommendation matching the first electronic book in each second book recommendation, thereby improving the user's electronic book reading experience.
[0181] In one embodiment, according to the multi-dimensional book feature information, determining the target book recommendation matching the first electronic book from each second book recommendation includes:
[0182] Determine the target matching degree information between each second book recommendation and the first electronic book according to the multi-dimensional book feature information through the first matching degree determination model;
[0183] According to the target matching degree information between each second book recommendation and the first electronic book, a target book recommendation matching the first electronic book is determined among each second book recommendation.
[0184] In this embodiment, for each second book recommendation, the second book recommendation and the multi-dimensional book feature information of the first e-book are input into the first matching degree determination model, and the second book recommendation and the multi-dimensional book feature information are processed by the first matching degree determination model, and the target matching degree information between the second book recommendation and the first e-book is output, and the target matching degree information can be represented by a matching score, and the matching score can be a value between 0 and 100, and the higher the value, the more the second book recommendation matches the first e-book. The target matching degree information between each second book recommendation and the first e-book can be determined by the first matching degree determination model. In one example, the first matching degree determination model can be FFM (Field-aware Factorization Machines).
[0185] Next, according to the target matching degree information between each second book recommendation and the first electronic book, a target book recommendation matching the first electronic book is determined from each second book recommendation, and the target book recommendation may be the second book recommendation with the highest matching degree indicated by the target matching degree information. For example, the target book recommendation is the second book recommendation with the highest matching score.
[0186] In this embodiment, the target book recommendation can also be pushed to the user together with the cover and content introduction of the first electronic book, thereby increasing the possibility of the user reading the first electronic book.
[0187] It can be seen that through this embodiment, the target matching degree information between each second book recommendation and the first e-book can be determined according to the multi-dimensional book feature information of the first e-book through the first matching degree determination model, and the target book recommendation matching the first e-book can be determined in each second book recommendation according to the target matching degree information between each second book recommendation and the first e-book, thereby improving the matching degree between the book recommendation and the e-book and improving the user's reading efficiency.
[0188] Figure 8 A schematic diagram of a training process of a first matching degree determination model provided in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the process includes:
[0189] Step S802, obtaining third training sample data; the third training sample data includes multi-dimensional sample book feature information of the third sample electronic book, a third sample book recommendation of the third sample electronic book, and sample matching degree information between the third sample electronic book and the third sample book recommendation;
[0190] Step S804, determining approximate matching degree information between the third sample electronic book and the third sample book recommendation word through a third neural network according to the multi-dimensional sample book feature information of the third sample electronic book;
[0191] Step S806: training a third neural network according to the sample matching degree information and the approximate matching degree information, and the trained third neural network is a first matching degree determination model.
[0192] In this embodiment, first, the third training sample data is obtained, and the third training sample data includes multi-dimensional sample book feature information of the third sample e-book, the third sample book recommendation of the third sample e-book, and the sample matching degree information between the third sample e-book and the third sample book recommendation. The content of the multi-dimensional sample book feature information of the third sample e-book can refer to the introduction of the multi-dimensional sample book feature information of the first sample e-book, which will not be repeated here. The third sample book recommendation of the third sample e-book can be an accurate book recommendation written manually, and the sample matching degree information between the third sample e-book and the third sample book recommendation can also be an accurate sample matching degree information determined manually. The sample matching degree information can be a numerical value between 0-100. In this embodiment, a third sample e-book can have one or more third sample book recommendations.
[0193] Next, a third neural network is obtained, which may be an FFM network, and the multi-dimensional sample book feature information of the third sample e-book and the third sample book recommendation of the third sample e-book are input into the FFM network, and the approximate matching degree information between the third sample e-book and the third sample book recommendation is output through the FFM network. It can be understood that the approximate matching degree information is the matching degree information between the third sample e-book and the third sample book recommendation learned by the FFM network.
[0194] Finally, the third neural network is trained according to the sample matching degree information and the approximate matching degree information. When the loss values between the sample matching degree information of each third sample e-book and the approximate matching degree information of the third sample e-book are less than the loss value threshold, the model training is determined to be completed, and the trained third neural network is the first matching degree determination model.
[0195] It can be seen that through this embodiment, the third training sample data can be used to accurately train the first matching degree determination model, thereby achieving efficient and rapid training of the first matching degree determination model.
[0196] In another embodiment, considering that different users may prefer different recommendation words for the same e-book, in the above step S106, according to the multi-dimensional book feature information, determining the target book recommendation words matching the first e-book from each second book recommendation word includes:
[0197] Obtain the e-book consumption data of the user authorized by the user;
[0198] According to the multi-dimensional book feature information and the e-book consumption data, a target book recommendation is determined in each second book recommendation; the target book recommendation matches both the first e-book and the user.
[0199] In this embodiment, the e-book consumption data of the user authorized by the user can also be obtained, and the e-book consumption data can include the e-book reading record of the user, etc. The e-book consumption data of the user can be obtained after obtaining the user's authorization.
[0200] Next, according to the multi-dimensional book feature information and the e-book consumption data, a target book recommendation is determined from each second book recommendation, and the target book recommendation matches both the first e-book and the user.
[0201] In one example, the above-mentioned methods (1)-(5) can be adopted to determine the recommendation words that match the multi-dimensional book feature information in each second book recommendation word as the initial book recommendation word, and determine the recommendation words that match the e-book consumption data in the initial book recommendation words as the target book recommendation word.
[0202] For example, through the above-mentioned methods (1)-(5), the initial book recommendations that match the multi-dimensional book feature information are determined in each second book recommendation, including recommendations 1, 2, and 3. The e-book consumption data shows that the user tends to read rebirth novels, then the recommendations 1, 2, and 3 are selected as the target book recommendations that can represent the association between the first e-book and the rebirth novel.
[0203] It can be seen that through this embodiment, it is also possible to combine the e-book consumption data of users who have been authorized by the users, and determine the target book recommendations that match both the first e-book and the user in each second book recommendation based on the multi-dimensional book feature information and e-book consumption data, so as to provide personalized target book recommendations for different users and realize personalized distribution of book recommendations.
[0204] In one embodiment, determining a target book recommendation in each second book recommendation according to multi-dimensional book feature information and electronic book consumption data includes:
[0205] Determine the target matching degree information between each second book recommendation and the user and the first e-book through the second matching degree determination model according to the e-book consumption data authorized by the user and the multi-dimensional book feature information;
[0206] According to the target matching degree information between each second book recommendation word and the user and the first electronic book, a target book recommendation word matching both the user and the first electronic book is determined from among the second book recommendations.
[0207] In this embodiment, for each second book recommendation, the second book recommendation, the e-book consumption data authorized by the user, and the multi-dimensional book feature information are input into the second matching degree determination model. The second book recommendation, the e-book consumption data authorized by the user, and the multi-dimensional book feature information are processed by the second matching degree determination model, and the target matching degree information between the second book recommendation and the user and the first e-book is output. The target matching degree information can be the possible click value of the user on the first e-book based on the second book recommendation. The possible click value can be a value between 0 and 1. The higher the value, the more likely the user is to click and browse the first e-book based on the second book recommendation. The target matching degree information between each second book recommendation and the user and the first e-book can be determined by the second matching degree determination model. In an example, the second matching degree determination model can be FFM (Field-aware Factorization Machines).
[0208] Next, according to the target matching degree information between each second book recommendation and the user and the first e-book, a target book recommendation that matches both the user and the first e-book is determined from among the second book recommendations. The target book recommendation may be the second book recommendation with the highest matching degree indicated by the target matching degree information. For example, the target book recommendation is the second book recommendation with the highest possible click value.
[0209] In this embodiment, the target book recommendation can also be pushed to the user together with the cover and content introduction of the first electronic book, thereby increasing the possibility of the user reading the first electronic book.
[0210] It can be seen that through this embodiment, the target matching degree information between each second book recommendation and the user and the first e-book can be determined through the second matching degree determination model according to the e-book consumption data authorized by the user and the multi-dimensional book feature information. According to the target matching degree information between each second book recommendation and the user and the first e-book, a target book recommendation that matches both the user and the first e-book is determined from each second book recommendation, thereby increasing the possibility that the user reads the first e-book based on the target book recommendation.
[0211] Fig. 9 A schematic diagram of the training process of the second matching degree determination model provided in an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the process includes:
[0212] Step S902, obtaining fourth training sample data; the fourth training sample data includes e-book consumption data of a sample user authorized by the sample user, multi-dimensional book feature information of a fourth sample e-book, a fourth sample book recommendation of the fourth sample e-book, and sample matching degree information between the fourth sample book recommendation and the sample user and the fourth sample e-book;
[0213] Step S904, determining, through a fourth neural network, information on the approximate matching degree between the fourth sample book recommendation and the sample user and the fourth sample e-book based on the e-book consumption data of the sample user authorized by the sample user and the multi-dimensional book feature information of the fourth sample e-book;
[0214] Step S906: training a fourth neural network according to the sample matching degree information and the approximate matching degree information, and the trained fourth neural network is a second matching degree determination model.
[0215] In this embodiment, first, the fourth training sample data is obtained, and the fourth training sample data includes the e-book consumption data of the sample user authorized by the sample user, the multi-dimensional book feature information of the fourth sample e-book, the fourth sample book recommendation of the fourth sample e-book, and the sample matching degree information between the sample user and the fourth sample book recommendation. Among them, the sample user may be a predetermined user, and the e-book consumption data of the sample user is not limited to e-book reading records, etc. The e-book consumption data of the sample user can be obtained after obtaining the authorization of the sample user. The fourth sample e-book can be the same as or different from the first, second, and third sample e-books. The content of the multi-dimensional sample book feature information of the fourth sample e-book can refer to the introduction of the multi-dimensional sample book feature information of the first sample e-book, which will not be repeated here. In this embodiment, a fourth sample e-book can have one or more fourth sample book recommendations. The fourth sample book recommendation of the fourth sample e-book can be an accurate book recommendation written manually. The sample matching degree information between the fourth sample book recommendation and the sample user and the fourth sample e-book can be an accurate value determined manually, and the sample user may click on the fourth sample e-book based on the fourth sample book recommendation. The sample matching degree information may be a numerical value of 0 or 1, which is used to indicate whether the sample user has clicked on the fourth sample e-book based on the fourth sample book recommendation or has not clicked on the fourth sample e-book.
[0216] Next, a fourth neural network is obtained, which may be an FFM network, and the e-book consumption data of the sample user authorized by the sample user, the multi-dimensional book feature information of the fourth sample e-book, and the fourth sample book recommendation of the fourth sample e-book are input into the FFM network, and the approximate matching degree information between the fourth sample book recommendation and the sample user and the fourth sample e-book is output through the FFM network. It can be understood that the approximate matching degree information is the matching degree information between the fourth sample book recommendation learned by the FFM network and the sample user and the fourth sample e-book.
[0217] Finally, the fourth neural network is trained based on the sample matching degree information and the approximate matching degree information. When the loss value between the sample matching degree information of each fourth sample e-book and the approximate matching degree information of the fourth sample e-book is less than the loss value threshold, the model training is determined to be completed, and the trained fourth neural network is the second matching degree determination model.
[0218] It can be seen that through this embodiment, the fourth training sample data can be used to accurately train the second matching degree determination model, thereby achieving efficient and rapid training of the second matching degree determination model.
[0219] In summary, through the above-mentioned embodiments, the multi-dimensional book feature information of the first electronic book is obtained, and a plurality of first book recommendations of the first electronic book are generated according to the multi-dimensional book feature information through the recommendation generation model, and then the text quality information of the first book recommendation is determined, and at least one second book recommendation is obtained from each first book recommendation according to the text quality information, and finally, according to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each second book recommendation. The recommendation generation model can efficiently and quickly generate the recommendation of the electronic book, and determine the high-quality recommendation matching the electronic book for the user in the generated recommendation, so as to facilitate the user to select the electronic book of interest for reading according to the recommendation of the electronic book, and improve the efficiency of the user in reading the electronic book.
[0220] Fig.10 A schematic diagram of the structure of a recommendation generating device provided by an embodiment of the present disclosure is shown in FIG. Fig.10 As shown, the device comprises:
[0221] The recommendation generating unit 1001 is used to obtain multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations of the first electronic book according to the multi-dimensional book feature information through a recommendation generating model;
[0222] A recommendation word screening unit 1002 is used to determine text quality information of the first book recommendation words, and screen at least one second book recommendation word from each of the first book recommendation words according to the text quality information;
[0223] The recommendation matching unit 1003 is configured to determine, from each of the second book recommendations, a target book recommendation that matches the first electronic book according to the multi-dimensional book feature information.
[0224] Optionally, the recommendation generating unit 1001 is specifically configured to:
[0225] The recommendation generation model generates recommendation words multiple times based on the multi-dimensional book feature information, and each time generates multiple target recommendation word text blocks of the first electronic book and target text results of the target recommendation word text blocks;
[0226] The target text results are obtained for each generation through the recommendation generation model, and the target text results are combined to obtain a first book recommendation for the first electronic book; the first book recommendations of the first electronic book are different from each other.
[0227] Optionally, the recommendation generating unit 1001 is further configured to:
[0228] The multi-dimensional book feature information is used as input data of the recommendation generation model, and the recommendation generation model determines a target recommendation text block of the first electronic book and a target text result of the target recommendation text block according to the input data; the target text result is located in the output data of the recommendation generation model;
[0229] The input data of the recommendation word generation model and the output data of the recommendation word generation model are concatenated to obtain new input data of the recommendation word generation model, and the step of outputting the target text result of a target recommendation word text block through the recommendation word generation model is returned and executed in a loop to obtain multiple target recommendation word text blocks and target text results of the target recommendation word text blocks of the first e-book generated this time.
[0230] Optionally, the recommendation generating unit 1001 is further configured to:
[0231] Determining, by the recommendation language generation model, a target recommendation language text block of the first electronic book and a plurality of optional text results of the target recommendation language text block according to the input data;
[0232] The target text result of the target recommendation text block is selected from each of the optional text results according to the selection rule corresponding to the first book recommendation generated this time through the recommendation generation model; the selection rule corresponding to the first book recommendation generated each time is different.
[0233] Optionally, the recommendation generating unit 1001 is further configured to:
[0234] Determining a target recommended language text block of the first electronic book and a target text vector of the target recommended language text block according to the input data by means of the recommended language generation model;
[0235] By using the recommendation generation model, a plurality of optional text results of the target recommendation text block are determined in a text library according to the target text vector.
[0236] Optionally, the recommendation generating unit 1001 is further configured to:
[0237] Determine, by means of a first generation network in the recommendation generation model, a target recommendation text block of the first electronic book according to the input data, and determine a first text vector of the target recommendation text block in a first scene;
[0238] determining, by a second generation network in the recommendation language generation model, a second text vector of the same target recommendation language text block in a second scene according to the input data; the first scene is different from the second scene;
[0239] The first text vector and the second text vector are added together through a vector merging network in the recommendation word generation model, and a target text vector of the target recommendation word text block is determined according to the vector obtained by the addition.
[0240] Optionally, the method further includes a first training unit, configured to:
[0241] Acquire first training sample data; the first training sample data includes multi-dimensional sample book feature information of a first sample electronic book and a first sample book recommendation of the first sample electronic book;
[0242] Generate recommendation words based on the multi-dimensional sample book feature information through a first neural network to obtain approximate sample book recommendation words of the first sample electronic book; the approximate sample book recommendation words include a plurality of sample recommendation word text blocks and approximate text results of the sample recommendation word text blocks;
[0243] The first neural network is trained according to the approximate text result and the first sample book recommendation, and the trained first neural network is used as the recommendation generation model.
[0244] Optionally, the first training unit is specifically used for:
[0245] The multi-dimensional sample book feature information is used as input data of a first neural network, and a sample recommended language text block of the first sample electronic book and an approximate text result of the sample recommended language text block are determined by the first neural network according to the input data; the approximate text result is located in the output data of the first neural network;
[0246] splicing the input data of the first neural network and the output data of the first neural network to obtain new input data of the first neural network, and returning to the step of outputting the approximate text result of one sample recommended language text block through the first neural network and executing the step repeatedly to obtain a plurality of the sample recommended language text blocks of the first sample electronic book and the approximate text results of the sample recommended language text blocks;
[0247] The approximate text results are combined through the first neural network to obtain an approximate sample book recommendation for the first sample electronic book.
[0248] Optionally, the first training unit is specifically used for:
[0249] For the approximate text result of the first sample electronic book, determining a sample text result corresponding to the approximate text result in the first sample book recommendation;
[0250] The first neural network is trained according to a loss value between the approximate text result and the sample text result.
[0251] Optionally, the recommendation word screening unit 1002 is specifically configured to:
[0252] Scoring the text quality of the first book recommendation using a quality determination model to obtain a target text quality score of the first book recommendation;
[0253] The target text quality score is used as text quality information of the first book recommendation.
[0254] Optionally, the recommendation word screening unit 1002 is further specifically configured to:
[0255] Scoring the text quality of the first book recommendation in the third scenario through the first determination network in the quality determination model to obtain a first text quality sub-score of the first book recommendation;
[0256] Scoring the text quality of the first book recommendation in a fourth scenario through a second determination network in the quality determination model to obtain a second text quality sub-score of the first book recommendation; the third scenario is different from the fourth scenario;
[0257] The first text quality sub-score and the second text quality sub-score are added together through the score merging network in the quality determination model, and the target text quality score of the first book recommendation is determined according to the added score.
[0258] Optionally, the method further includes a second training unit, configured to:
[0259] Acquire second training sample data; the second training sample data includes a second sample book recommendation of a second sample electronic book and a sample text quality score of the second sample book recommendation;
[0260] Scoring the second sample book recommendation using a second neural network to obtain an approximate text quality score of the second sample book recommendation;
[0261] The second neural network is trained according to the approximate text quality score of the second sample book recommendation and the sample text quality score of the second sample book recommendation, and the trained second neural network serves as the quality determination model.
[0262] Optionally, the second training unit is specifically used for:
[0263] Scoring the text quality of the second sample book recommendation in the third scenario through the first determination network in the second neural network to obtain a first sample text quality sub-score of the second sample book recommendation;
[0264] Scoring the text quality of the second sample book recommendation in a fourth scenario by a second determination network in the second neural network to obtain a second sample text quality sub-score of the second sample book recommendation; the third scenario is different from the fourth scenario;
[0265] The first sample text quality sub-score and the second sample text quality sub-score are added together through the score merging network in the second neural network structure, and an approximate text quality score of the second sample book recommendation is determined based on the added score.
[0266] Optionally, the recommendation matching unit 1003 is specifically configured to perform at least one of the following methods:
[0267] Extracting the book serial completion status information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book serial completion status information in each of the second book recommendations;
[0268] Extracting the book list information of the first electronic book from the multi-dimensional book feature information, and determining the target book recommendation words matching the book list information in each of the second book recommendation words;
[0269] Extracting the book plot related information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book plot related information in each of the second book recommendations;
[0270] Extracting book topic information related to the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation word matching the book topic information in each of the second book recommendations;
[0271] Relevant information of the derivative multimedia data of the first electronic book is extracted from the multi-dimensional book feature information, and a target book recommendation matching the relevant information of the derivative multimedia data is determined in each of the second book recommendations.
[0272] Optionally, the recommendation matching unit 1003 is specifically configured to:
[0273] Acquire the e-book consumption data of the user authorized by the user;
[0274] According to the multi-dimensional book feature information and the electronic book consumption data, a target book recommendation is determined from each of the second book recommendations; the target book recommendation matches both the first electronic book and the user.
[0275] The recommendation word generating device in the embodiment of the present disclosure can implement each process of the above-mentioned recommendation word generating method embodiment and achieve the same effect and function, which will not be repeated here.
[0276] An embodiment of the present disclosure further provides an electronic device, Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Fig.11 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 1101 and memory 1102, and one or more applications or data may be stored in the memory 1102. Among them, the memory 1102 may be a short-term storage or a persistent storage. The application stored in the memory 1102 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 1101 may be configured to communicate with the memory 1102 and execute a series of computer executable instructions in the memory 1102 on the electronic device. The electronic device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input or output interfaces 1105, one or more keyboards 1106, etc.
[0277] In a specific embodiment, the electronic device includes a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor implements the following process:
[0278] Acquire multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations for the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model;
[0279] Determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information;
[0280] According to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each of the second book recommendations.
[0281] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned recommendation word generation method embodiment and achieve the same effect and function, which will not be repeated here.
[0282] Another embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:
[0283] Acquire multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations for the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model;
[0284] Determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information;
[0285] According to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each of the second book recommendations.
[0286] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned recommendation word generation method embodiment and achieve the same effect and function, which will not be repeated here.
[0287] Another embodiment of the present disclosure further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following process is implemented:
[0288] Acquire multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations for the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model;
[0289] Determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information;
[0290] According to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each of the second book recommendations.
[0291] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned recommendation generating method embodiment and achieve the same effect and function, which will not be repeated here.
[0292] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0293] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0294] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0295] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0296] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0297] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0298] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0299] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0300] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0301] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0302] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0303] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0304] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A method for generating a recommendation, characterized in that: include: Acquire multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendations for the first electronic book according to the multi-dimensional book feature information by using a recommendation generation model; Determining text quality information of the first book recommendations, and selecting at least one second book recommendation from each of the first book recommendations according to the text quality information; According to the multi-dimensional book feature information, a target book recommendation matching the first electronic book is determined from each of the second book recommendations.
2. The method according to claim 1, characterized in that The generating a plurality of first book recommendations for the first electronic book using a recommendation generation model according to the multi-dimensional book feature information includes: The recommendation generation model generates recommendation words multiple times based on the multi-dimensional book feature information, and each time generates multiple target recommendation word text blocks of the first electronic book and target text results of the target recommendation word text blocks; The target text results are obtained for each generation through the recommendation generation model, and the target text results are combined to obtain a first book recommendation for the first electronic book; the first book recommendations of the first electronic book are different from each other.
3. The method according to claim 2, characterized in that The recommendation generation model generates a recommendation based on the multi-dimensional book feature information to obtain a plurality of target recommendation text blocks of the first electronic book and a target text result of the target recommendation text block, including: The multi-dimensional book feature information is used as input data of the recommendation generation model, and the recommendation generation model determines a target recommendation text block of the first electronic book and a target text result of the target recommendation text block according to the input data; the target text result is located in the output data of the recommendation generation model; The input data of the recommendation word generation model and the output data of the recommendation word generation model are concatenated to obtain new input data of the recommendation word generation model, and the step of outputting the target text result of a target recommendation word text block through the recommendation word generation model is returned and executed in a loop to obtain multiple target recommendation word text blocks and target text results of the target recommendation word text blocks of the first e-book generated this time.
4. The method according to claim 3, characterized in that The step of determining a target recommendation language text block of the first electronic book and a target text result of the target recommendation language text block according to the input data by using the recommendation language generation model includes: Determining, by the recommendation language generation model, a target recommendation language text block of the first electronic book and a plurality of optional text results of the target recommendation language text block according to the input data; The target text result of the target recommendation text block is selected from each of the optional text results according to the selection rule corresponding to the first book recommendation generated this time through the recommendation generation model; the selection rule corresponding to the first book recommendation generated each time is different.
5. The method according to claim 4, characterized in that The step of determining a target recommendation text block of the first electronic book and a plurality of optional text results of the target recommendation text block according to the input data by using the recommendation text generation model includes: Determining a target recommended language text block of the first electronic book and a target text vector of the target recommended language text block according to the input data by means of the recommended language generation model; By using the recommendation generation model, a plurality of optional text results of the target recommendation text block are determined in a text library according to the target text vector.
6. The method according to claim 5, characterized in that The step of determining a target recommendation language text block of the first electronic book and a target text vector of the target recommendation language text block according to the input data by using the recommendation language generation model includes: Determine, by means of a first generation network in the recommendation generation model, a target recommendation text block of the first electronic book according to the input data, and determine a first text vector of the target recommendation text block in a first scene; determining, by a second generation network in the recommendation language generation model, a second text vector of the same target recommendation language text block in a second scene according to the input data; the first scene is different from the second scene; The first text vector and the second text vector are added together through a vector merging network in the recommendation word generation model, and a target text vector of the target recommendation word text block is determined according to the vector obtained by the addition.
7. The method according to claim 1, characterized in that Also includes: Acquire first training sample data; the first training sample data includes multi-dimensional sample book feature information of a first sample electronic book and a first sample book recommendation of the first sample electronic book; Generate recommendation words based on the multi-dimensional sample book feature information through a first neural network to obtain approximate sample book recommendation words of the first sample electronic book; the approximate sample book recommendation words include a plurality of sample recommendation word text blocks and approximate text results of the sample recommendation word text blocks; The first neural network is trained according to the approximate text result and the first sample book recommendation, and the trained first neural network is used as the recommendation generation model.
8. The method according to claim 7, characterized in that The generating of recommendation words based on the multi-dimensional sample book feature information by the first neural network to obtain an approximate sample book recommendation word of the first sample electronic book includes: The multi-dimensional sample book feature information is used as input data of a first neural network, and a sample recommended language text block of the first sample electronic book and an approximate text result of the sample recommended language text block are determined by the first neural network according to the input data; the approximate text result is located in the output data of the first neural network; splicing the input data of the first neural network and the output data of the first neural network to obtain new input data of the first neural network, and returning to the step of outputting the approximate text result of one sample recommended language text block through the first neural network and executing the step repeatedly to obtain a plurality of the sample recommended language text blocks of the first sample electronic book and the approximate text results of the sample recommended language text blocks; The approximate text results are combined through the first neural network to obtain an approximate sample book recommendation for the first sample electronic book.
9. The method according to claim 7, characterized in that: The step of training the first neural network according to the approximate text result and the first sample book recommendation includes: For the approximate text result of the first sample electronic book, determining a sample text result corresponding to the approximate text result in the first sample book recommendation; The first neural network is trained according to a loss value between the approximate text result and the sample text result.
10. The method according to claim 1, characterized in that The determining of the text quality information of the first book recommendation includes: Scoring the text quality of the first book recommendation using a quality determination model to obtain a target text quality score of the first book recommendation; The target text quality score is used as text quality information of the first book recommendation.
11. The method according to claim 10, characterized in that Scoring the text quality of the first book recommendation using the quality determination model to obtain a target text quality score of the first book recommendation includes: Scoring the text quality of the first book recommendation in the third scenario through the first determination network in the quality determination model to obtain a first text quality sub-score of the first book recommendation; Scoring the text quality of the first book recommendation in a fourth scenario through a second determination network in the quality determination model to obtain a second text quality sub-score of the first book recommendation; the third scenario is different from the fourth scenario; The first text quality sub-score and the second text quality sub-score are added together through the score merging network in the quality determination model, and the target text quality score of the first book recommendation is determined according to the added score.
12. The method according to claim 10, characterized in that Also includes: Acquire second training sample data; the second training sample data includes a second sample book recommendation of a second sample electronic book and a sample text quality score of the second sample book recommendation; Scoring the second sample book recommendation using a second neural network to obtain an approximate text quality score of the second sample book recommendation; The second neural network is trained according to the approximate text quality score of the second sample book recommendation and the sample text quality score of the second sample book recommendation, and the trained second neural network serves as the quality determination model.
13. The method according to claim 12, characterized in that Scoring the second sample book recommendation by the second neural network to obtain an approximate text quality score of the second sample book recommendation includes: Scoring the text quality of the second sample book recommendation in the third scenario through the first determination network in the second neural network to obtain a first sample text quality sub-score of the second sample book recommendation; Scoring the text quality of the second sample book recommendation in a fourth scenario by a second determination network in the second neural network to obtain a second sample text quality sub-score of the second sample book recommendation; the third scenario is different from the fourth scenario; The first sample text quality sub-score and the second sample text quality sub-score are added together through the score merging network in the second neural network structure, and an approximate text quality score of the second sample book recommendation is determined based on the added score.
14. The method according to claim 1, characterized in that The determining, based on the multi-dimensional book feature information, a target book recommendation matching the first electronic book in each of the second book recommendations includes at least one of the following methods: Extracting the book serial completion status information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book serial completion status information in each of the second book recommendations; Extracting the book list information of the first electronic book from the multi-dimensional book feature information, and determining the target book recommendation words matching the book list information in each of the second book recommendation words; Extracting the book plot related information of the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation that matches the book plot related information in each of the second book recommendations; Extracting book topic information related to the first electronic book from the multi-dimensional book feature information, and determining a target book recommendation word matching the book topic information in each of the second book recommendations; Relevant information of the derivative multimedia data of the first electronic book is extracted from the multi-dimensional book feature information, and a target book recommendation matching the relevant information of the derivative multimedia data is determined in each of the second book recommendations.
15. The method according to claim 1, characterized in that The step of determining, according to the multi-dimensional book feature information, a target book recommendation that matches the first electronic book in each of the second book recommendations includes: Acquire the e-book consumption data of the user authorized by the user; According to the multi-dimensional book feature information and the electronic book consumption data, a target book recommendation is determined from each of the second book recommendations; the target book recommendation matches both the first electronic book and the user.
16. A recommendation generating device, characterized in that: include: A recommendation word generation unit, configured to obtain multi-dimensional book feature information of a first electronic book, and generate a plurality of first book recommendation words of the first electronic book according to the multi-dimensional book feature information through a recommendation word generation model; a recommendation word screening unit, configured to determine text quality information of the first book recommendation words, and screen at least one second book recommendation word from each of the first book recommendation words according to the text quality information; The recommendation matching unit is used to determine a target book recommendation matching the first electronic book from each of the second book recommendations according to the multi-dimensional book feature information.
17. An electronic device, characterized in that: include: processor; as well as, A memory configured to store computer executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in any one of claims 1 to 15.
19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.
Citation Information
Patent Citations
Text generation method and device, electronic equipment and readable storage medium
CN111639492A
Recommendation information generation method and device
CN114817719A
Information recommendation model training method and device, storage medium and electronic equipment
CN117194986A
Method of parking for electronic device using UWB communication and apparatus thereof
KR1020240008186A
Method for detecting speech-text alignment error of ASR training data
KR102654803B1
Cited By
Book recommendation method and system based on vertical large model
CN119722253A
