Book paragraph comment generation method and device, electronic equipment and storage medium

By obtaining book paragraph content and prompt information, and combining large models and book information, efficient and accurate paragraph comments are generated, which solves the problems of low generation efficiency and accuracy in the existing technology and improves user participation.

CN118673883APending Publication Date: 2024-09-20BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410078310.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-18
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

It is difficult for existing technologies to effectively generate and improve the efficiency and accuracy of generating book paragraph reviews, especially in the case of books with multiple structural types and low user participation.

Method used

By obtaining the paragraph content and prompt information of the target book to be reviewed, a large model is used to generate reviews, and the review generation process is optimized to improve accuracy and efficiency by combining the book information and adjacent paragraph content.

Benefits of technology

It improves the efficiency and accuracy of generating book paragraph comments, enhances users' perception of paragraph comments, and promotes more user participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673883A
    Figure CN118673883A
Patent Text Reader

Abstract

The invention discloses a book paragraph comment generation method and device, electronic equipment and a storage medium, and relates to the technical field of computers, in particular to the field of artificial intelligence such as deep learning and natural language processing. According to the specific implementation scheme, first paragraph content and first prompt information of a paragraph to be commented in a target book are obtained; wherein the first prompt information is used for prompting the first large model to execute the comment generation task; and processing the first paragraph content based on the first prompt information by adopting the first large model to generate a first comment of the to-be-commented paragraph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, in particular to artificial intelligence fields such as deep learning and natural language processing, and specifically to a method, device, electronic device and storage medium for generating book paragraph reviews. Background Art

[0002] With the rapid development of the Internet, users can read books on terminal devices such as mobile phones. Users can also comment on paragraphs of books. Displaying paragraph comments can enhance users' awareness of the paragraph comment function and encourage more users to participate in paragraph comments. Summary of the invention

[0003] This application provides a method, device, electronic device and storage medium for generating book paragraph reviews. The specific scheme is as follows:

[0004] According to one aspect of the present application, a method for generating a book paragraph review is provided, comprising:

[0005] Obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book; wherein the first prompt information is used to prompt the first large model to perform the review generation task;

[0006] The first large model is used to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on.

[0007] According to another aspect of the present application, a device for generating a book paragraph review is provided, comprising:

[0008] A first acquisition module is used to acquire the first paragraph content and first prompt information of the paragraph to be reviewed in the target book; wherein the first prompt information is used to prompt the first large model to perform the review generation task;

[0009] A generation module is used to use the first large model to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on.

[0010] According to another aspect of the present application, there is provided an electronic device, including:

[0011] at least one processor; and

[0012] a memory communicatively connected to the at least one processor; wherein,

[0013] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the method described in the above embodiment.

[0014] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method according to the above embodiment.

[0015] According to another aspect of the present application, a computer program product is provided, including a computer program, wherein the computer program implements the steps of the method described in the above embodiment when executed by a processor.

[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0018] Figure 1 A schematic diagram of a flow chart of a method for generating a book paragraph review provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a flow chart of a method for generating a book paragraph review provided in another embodiment of the present application;

[0020] Figure 3 A schematic diagram of a flow chart of a method for generating a book paragraph review provided in another embodiment of the present application;

[0021] Figure 4 A schematic diagram of a flow chart of a method for generating a book paragraph review provided in another embodiment of the present application;

[0022] Figure 5 A schematic diagram of a flow chart of a method for generating a book paragraph review provided in another embodiment of the present application;

[0023] Figure 6 A schematic diagram of a process for generating a book paragraph review provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of a structure of a device for generating book paragraph reviews provided in an embodiment of the present application

[0025] Figure 8 It is a block diagram of an electronic device used to implement the method for generating book paragraph reviews according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0027] The following describes a method, device, electronic device, and storage medium for generating a book paragraph review according to an embodiment of the present application with reference to the accompanying drawings.

[0028] Figure 1 A flowchart of a method for generating book paragraph reviews provided in one embodiment of the present application.

[0029] The method for generating a book paragraph review according to the embodiment of the present application may be executed by a device for generating a book paragraph review according to the embodiment of the present application. The device may be configured in an electronic device to realize the function of generating a paragraph review.

[0030] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0031] like Figure 1 As shown, the method for generating the book paragraph review includes:

[0032] Step 101, obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book.

[0033] The target book may be any book, a popular book, or a less popular book, etc., without limitation. In addition, the target book may be one or more books, without limitation.

[0034] In the present application, the paragraph to be reviewed in the target book may be any paragraph in the target book, or a paragraph that meets the condition requirements, or a paragraph in a designated chapter, etc., and no limitation is made to this.

[0035] As an implementation method, the paragraph to be commented on in the target book may be determined, and the first paragraph content of the paragraph to be commented on may be obtained from the target book.

[0036] As another implementation, a target file may be obtained, wherein the target file stores a multi-level identifier of at least one paragraph of the target book and the content of at least one paragraph, and the content of the first paragraph of the paragraph to be commented on may be obtained from the target file. Here, the target file may be obtained by pre-screening paragraphs in multiple candidate books.

[0037] Therefore, directly obtaining the paragraphs to be commented on from the target file can improve the efficiency of obtaining the paragraphs to be commented on, and further improve the efficiency of generating paragraph comments.

[0038] Optionally, the book identification of the candidate book can be obtained, and the book content of the candidate book can be obtained based on the book identification of the candidate book, and the preset paragraph screening rules can be used to screen out paragraphs that meet the paragraph screening rules from the book content as target paragraphs, and the multi-level identification of the target paragraph can be determined based on the paragraph identification of the target paragraph and the book identification of the book to which the target paragraph belongs, and then the multi-level identification of the target paragraph and the paragraph content of the target paragraph are saved to the target file.

[0039] The paragraph identifier may be a paragraph number, for example, a paragraph number of 1 represents the first paragraph, a paragraph number of 2 represents the second paragraph, etc., or other identifiers.

[0040] The paragraph screening rules may include one or more of the following:

[0041] The number of words in the paragraph content is greater than the first threshold;

[0042] The paragraph has no user comments;

[0043] The word count of the user comments of the paragraph is less than a second threshold;

[0044] The paragraph number is greater than the third threshold.

[0045] For example, a paragraph whose content has a word count greater than a first threshold may be determined as a target paragraph, or a paragraph without user comments may be determined as a target paragraph, or a paragraph whose user comments have a word count less than a second threshold may be determined as a target paragraph, or paragraphs other than the first paragraph may be determined as target paragraphs.

[0046] Here, the first threshold, the second threshold, and the third threshold can be determined according to actual needs and are not limited thereto.

[0047] It can be understood that the screened target paragraph is the paragraph to be commented on, and the book to which the target paragraph belongs is the target book.

[0048] It should be noted that the above paragraph screening rules are only examples and can be set according to actual needs without limitation.

[0049] Therefore, paragraph screening rules can be used to screen paragraphs in candidate books, and paragraphs that need to be commented on can be stored in a target file. The paragraph content of the paragraph to be commented on can be directly obtained from the target file later, which can improve the efficiency of generating paragraph comments.

[0050] Optionally, the book ID of the book to which the target paragraph belongs and the paragraph ID of the target paragraph may be concatenated to obtain a multi-level ID of the target paragraph. The multi-level ID includes a book ID, a paragraph ID, etc. For example, the multi-level ID of the target paragraph may be "book ID-paragraph ID" or other forms, which are not limited thereto.

[0051] In practical applications, in order to improve the readability of books, some books are divided into multiple chapters, each of which contains multiple paragraphs. Based on this, when obtaining the book content of a candidate book according to the book identifier of the candidate book, the chapter identifiers of all chapters in the candidate book can be obtained according to the book identifier of the candidate book, and then the book content can be obtained according to the chapter identifiers of all chapters. In this way, the book content can be accurately obtained for books of different structural types.

[0052] The chapter identifier may be a chapter number, for example, a chapter number of 1 represents Chapter 1, a chapter number of 2 represents Chapter 2, and so on.

[0053] Furthermore, when determining the multi-level identification of the target paragraph, the chapter identification of the chapter to which the target paragraph belongs can be determined according to the paragraphs contained in each chapter, and then the multi-level identification of the target paragraph can be determined according to the paragraph identification of the target paragraph, the chapter identification of the chapter to which the target paragraph belongs, and the book identification of the book to which the target paragraph belongs. Among them, the multi-level identification of the target paragraph includes the book identification, the chapter identification and the paragraph identification. In this way, the multi-level identification of the target paragraph can be accurately determined for books of different structural types.

[0054] Exemplarily, the candidate books are the top 500 popular novels in a certain application. For each novel, all chapter identifiers can be obtained based on the book identifier, and then the novel text can be obtained based on the chapter identifier. Paragraphs that meet the requirements (for example, the number of words is greater than 200) are extracted from the novel text, and then formatted (for example, including book ID, chapter ID, paragraph ID, paragraph text) and output to the target file.

[0055] In the present application, the first prompt information can be used to prompt the first large model to perform a comment generation task. The first prompt information can be pre-set, or can be obtained based on a prompt template.

[0056] For example, the first prompt information may be "Generate comments based on the following paragraph content". For another example, in the prompt template "Generate N comments based on the paragraph content", N is replaced with 5 to obtain the first prompt information "Generate 5 comments based on the next paragraph content".

[0057] Step 102: Using the first large model, based on the first prompt information, the content of the first paragraph is processed to generate a first comment on the paragraph to be commented on.

[0058] In the present application, the first paragraph content and the first prompt information can be spliced, and the spliced ​​text can be input into the first large model. The first large model processes the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on.

[0059] The number of the first comments may be one or more, and there is no limitation on this.

[0060] In the present application, for a certain paragraph to be commented on, multiple comments can be generated based on a first prompt information, or multiple first prompt information can be obtained and comments can be generated based on the multiple first prompt information respectively. One or more comments can be generated based on one first prompt information. The number of comments generated by different first prompt information can be the same or different, and there is no limitation on this.

[0061] In the embodiment of the present application, by obtaining the first paragraph content and the first prompt information of the paragraph to be commented on in the target book, the first large model is used to process the first paragraph content based on the first prompt information to generate the first comment on the paragraph to be commented on. Thus, based on the prompt information that prompts the first large model to perform the comment generation task, the first large model is used to process the paragraph content to generate the paragraph comment, thereby improving the generation efficiency of the paragraph comment.

[0062] Figure 2 A flowchart of a method for generating book paragraph reviews provided in another embodiment of the present application.

[0063] like Figure 2 As shown, the method for generating the book paragraph review includes:

[0064] Step 201, obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book.

[0065] In the present application, step 201 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0066] Step 202: Obtain book information of the target book.

[0067] In the present application, the book identification of the target book can be obtained, and the book information of the target book can be obtained by using the book identification of the target book.

[0068] Alternatively, the multi-level identification of the paragraph to be commented on may be obtained from the target file, and the book information of the target book may be obtained based on the book identification in the multi-level identification.

[0069] The book information of the target book may include but is not limited to the introduction of the target book, author information, classification, tags, etc.

[0070] Step 203: Using the first large model, based on the first prompt information, the first paragraph content and the book information are processed to generate a first comment on the paragraph to be commented on.

[0071] In the present application, the content of the first paragraph, the book information of the target book and the first prompt information can be spliced ​​together, and the spliced ​​text can be input into the first large model. The first large model processes the content of the first paragraph and the target book based on the first prompt information to generate the first comment on the paragraph to be commented on.

[0072] In the embodiment of the present application, book information can also be obtained, and the first large model is used to process the first paragraph content and book information based on the first prompt information to generate the first comment of the paragraph to be commented on. Therefore, when the first large model is used to generate the paragraph comment, the book information is also considered, thereby improving the accuracy of the paragraph comment.

[0073] Figure 3 A flowchart of a method for generating book paragraph reviews provided in another embodiment of the present application.

[0074] like Figure 3 As shown, the method for generating the book paragraph review includes:

[0075] Step 301, obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book.

[0076] In the present application, step 301 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0077] Step 302, obtaining a multi-level identification of the paragraph to be commented on.

[0078] The multi-level identification of the paragraph to be reviewed may include a book identification of the target book, a chapter identification of the chapter to which the paragraph to be reviewed belongs, a paragraph identification of the paragraph to be reviewed, and the like.

[0079] In the present application, a multi-level identification of the paragraph to be commented on can be obtained based on the obtained book identification of the target book, the chapter identification of the chapter to which the paragraph to be commented on belongs, and the paragraph identification of the paragraph to be commented on.

[0080] Alternatively, the multi-level identification of the paragraph to be commented on can be obtained from the target document.

[0081] Step 303: Determine paragraph identifiers of adjacent paragraphs of the paragraph to be commented on according to the paragraph identifier of the paragraph to be commented on in the multi-level identifiers.

[0082] The adjacent paragraphs of the paragraph to be commented on may be one or more paragraphs that are located before the paragraph to be commented on and are closest to the paragraph to be commented on.

[0083] In the present application, the paragraph identifiers of the adjacent paragraphs of the paragraph to be commented on may be determined according to the paragraph identifier of the paragraph to be commented on in the multi-level identifiers of the paragraph to be commented on.

[0084] For example, if the paragraph to be commented on is marked as 2, it means that the paragraph to be commented on is the 3rd paragraph, and the 2nd paragraph can be determined as the adjacent paragraph of the paragraph to be commented on, and the paragraph mark of the adjacent paragraph is 3. For another example, if the paragraph to be commented on is the 4th paragraph, the 2nd paragraph and the 3rd paragraph can be determined as the adjacent paragraphs of the paragraph to be commented on, and the paragraph marks of the adjacent paragraphs are 2 and 3.

[0085] Step 304: acquiring the second paragraph content of the adjacent paragraph according to the paragraph identifier and the multi-level identifier of the adjacent paragraph.

[0086] In the present application, the target book can be found according to the book identifier in the multi-level identifier, the chapter to which the paragraph to be commented on and its adjacent paragraphs belong can be found according to the chapter identifier in the multi-level identifier, and then the second paragraph content of the adjacent paragraph can be obtained from the chapter according to the paragraph identifier of the adjacent paragraph.

[0087] Step 305: Using the first large model, the first paragraph content and the second paragraph content are processed based on the first prompt information to generate a first comment.

[0088] In the present application, the content of the first paragraph, the content of the second paragraph and the first prompt information can be spliced ​​together, and the spliced ​​text can be input into the first large model. The first large model processes the content of the first paragraph and the content of the second paragraph based on the first prompt information to generate the first comment on the paragraph to be commented on.

[0089] In the embodiment of the present application, the second paragraph content of the adjacent paragraph of the paragraph to be commented on can also be obtained, and the first paragraph content and the second paragraph content are processed based on the first prompt information using the first large model to generate the first comment of the paragraph to be commented on. Therefore, when the paragraph comment is generated using the first large model, the paragraph content of the adjacent paragraph is also considered, thereby improving the accuracy of the paragraph comment.

[0090] Furthermore, the book information of the target book can be obtained, the first paragraph content, the second paragraph content, the book information of the target book and the first prompt information are spliced, and the spliced ​​text is input into the first large model, and the first large model processes the first paragraph content, the second paragraph content and the book information based on the first prompt information to generate the first comment of the paragraph to be commented. Therefore, when the first large model is used to generate paragraph comments, the paragraph content and book information of adjacent paragraphs are also considered, which can further improve the accuracy of paragraph comments.

[0091] In practical applications, some books are divided into multiple chapters, and each chapter may include one or more paragraphs. Based on this, in one embodiment of the present application, a multi-level identification of the paragraph to be commented on can be obtained, and according to the chapter identification of the chapter to which the paragraph to be commented on belongs in the multi-level identification, the chapter identification of the adjacent chapter of the chapter to which the paragraph to be commented on belongs is determined, and according to the book identification of the target book in the multi-level identification, the target book is found, and according to the chapter identification of the adjacent chapter, the chapter identification of the adjacent chapter is obtained from the target book, and the first large model is used to process the first paragraph content and the chapter content of the adjacent chapter based on the first prompt information to generate the first comment.

[0092] The adjacent chapters may be one or more chapters that are located before the chapter to which the paragraph to be commented on belongs and are closest to the chapter to which the paragraph to be commented on belongs.

[0093] For example, the chapter identifier of the chapter to which the paragraph to be commented on belongs is 2, which means that the chapter to which the paragraph to be commented on belongs is Chapter 3. Chapter 2 can be determined as the adjacent chapter, so the chapter identifier of the adjacent chapter is 3.

[0094] Optionally, the content of the first paragraph, the content of the adjacent chapter and the first prompt information may be spliced ​​together, and the spliced ​​text may be input into the first large model, which processes the content of the first paragraph and the content of the adjacent chapter based on the first prompt information to generate a first comment on the paragraph to be commented on.

[0095] In the embodiment of the present application, the chapter contents of the adjacent chapters of the chapter to which the paragraph to be commented belongs can also be obtained, and the first large model is used to process the first paragraph content and the chapter contents of the adjacent chapters based on the first prompt information to generate the first comment of the paragraph to be commented. Thus, when the first large model is used to generate the paragraph comment, the chapter contents of the adjacent chapters are also considered, thereby improving the accuracy of the paragraph comment.

[0096] Furthermore, the book information of the target book can be obtained, the first paragraph content, the chapter content of the adjacent chapter, the book information of the target book and the first prompt information are spliced, and the spliced ​​text is input into the first large model, and the first large model processes the first paragraph content, the chapter content of the adjacent chapter and the book information based on the first prompt information to generate the first comment of the paragraph to be commented. Therefore, when the first large model is used to generate paragraph comments, the paragraph content and book information of the adjacent paragraphs are also considered, which can further improve the accuracy of the paragraph comments.

[0097] Furthermore, the target book information, the paragraph content of the paragraph before the paragraph to be commented on in the chapter to which the paragraph to be commented belongs, and the chapter content of the adjacent chapter to which the paragraph to be commented belongs can be obtained, and the first large model is used to process the first paragraph content, the paragraph content before the paragraph to be commented on in the chapter to which the paragraph to be commented belongs, the chapter content of the adjacent chapter, and the book information based on the first prompt information to generate the first comment on the paragraph to be commented on. Therefore, when the first large model is used to generate the paragraph comment, the paragraph content of the paragraph before the paragraph to be commented on in the chapter to which the paragraph to be commented belongs, the chapter content of the adjacent chapter, and the book information are also considered, which can further improve the accuracy of the paragraph comment.

[0098] Figure 4 A flowchart of a method for generating book paragraph reviews provided in another embodiment of the present application.

[0099] like Figure 4 As shown, the method for generating the book paragraph review includes:

[0100] Step 401, obtaining the content of the first paragraph of the paragraph to be reviewed in the target book.

[0101] In the present application, step 401 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0102] Step 402, obtaining condition information that needs to be satisfied for the comment to be generated for the paragraph to be commented on.

[0103] The condition information may be preset, or acquired based on an input operation or a selection operation, or generated based on input or selection information.

[0104] The condition information may include one or more of the following:

[0105] The number of comments to be generated;

[0106] The word count requirement for the comments to be generated;

[0107] Content requirements for comments to be generated.

[0108] Step 403: Obtain first prompt information according to the condition information.

[0109] In the present application, the first prompt information may be acquired based on the condition information, wherein the first prompt information may include the condition information.

[0110] For example, the conditional information is that the number of comments to be generated is 10, and the word count requirement for the comments to be generated is no less than 10 words and no more than 30 words, then the first prompt information can be "Based on the following paragraph content, generate 10 comments with a word count of no less than 10 words and no more than 30 words."

[0111] In actual applications, users may comment on paragraphs from multiple perspectives, such as commenting on roles, or commenting on the author's writing, etc. Based on this, the comment perspective of the comment to be generated can be obtained, and based on the comment perspective, the content requirements for the comment to be generated in the condition information can be obtained.

[0112] The comment angles may include character comments, writing comments, etc. The comment angles may be preset, or may be acquired based on an input operation or a selection operation. In addition, the comment angles may be one or more, and are not limited thereto.

[0113] Thus, the content requirements for the comments to be generated are obtained based on the comment angle, and then the first prompt information is obtained based on the content requirements for the comments to be generated, so that comments related to the comment angle can be generated, enriching the paragraph comments.

[0114] Optionally, the comment angle includes a role comment, and the first paragraph content can be identified to determine the book role associated with the first paragraph content, and the content requirements for the review to be generated are obtained according to the book role. Thus, the first prompt information can be obtained based on the content requirements for the review to be generated.

[0115] The book character associated with the content of the first paragraph may be a character mentioned in the paragraph to be reviewed, or a character associated with the mentioned character, etc.

[0116] Exemplarily, based on the book characters, the content requirement for commenting on the book characters can be obtained. For example, the content requirement can include commenting on the book characters associated with the first paragraph content.

[0117] For example, if the paragraph to be commented on mentions character A, then the content requirement for commenting on character A may be obtained, and the first prompt information obtained based on the content requirement may be "generate a comment on character A based on the following content".

[0118] Thus, based on the book role, the content requirements for generating comments are obtained, and then based on the content requirements for generating comments, the first prompt information is obtained, so that based on the first prompt information, comments on the book role can be generated, enriching the paragraph comments.

[0119] Optionally, the commentary angle includes writing comments, which can identify the content of the first paragraph to determine whether the content of the first paragraph is a description of a certain book character. If the content of the first paragraph is a description of a certain book character, then based on the book character, content requirements for commenting on the author's description of the book character can be obtained, and then first prompt information can be obtained based on the content requirements, so that based on the first prompt information, the author's comment on the description of the book character can be generated, thereby enriching the paragraph commentary.

[0120] For example, if the paragraph to be commented on describes character B, then a content requirement for commenting on the description of character B can be obtained, and the first prompt information obtained based on the content requirement can be "generate the author's comment on the description of character B based on the following paragraph content."

[0121] If the content of the first paragraph is a description of a certain book character, the content requirements for commenting on the description in the commented paragraph can be obtained, and then the first prompt information can be obtained based on the content requirements. Therefore, based on the first prompt information, a comment on the description in the commented paragraph can be generated, thereby enriching the paragraph comment.

[0122] Step 404: Use the first large model to process the content of the first paragraph based on the first prompt information to generate a first comment on the paragraph to be commented on.

[0123] In the present application, step 404 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0124] In an embodiment of the present application, condition information that needs to be met for the comments to be generated in the paragraph to be commented on can be obtained, and first prompt information can be obtained based on the condition information. Then, based on the first prompt information, the paragraph comment can be generated using the first large model, so that the first large model can generate paragraph comments that meet the condition information, thereby meeting personalized needs for paragraph comments.

[0125] Figure 5 A flowchart of a method for generating book paragraph reviews provided in another embodiment of the present application.

[0126] like Figure 5 As shown, the method for generating the book paragraph review includes:

[0127] Step 501, obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book.

[0128] Step 502: Using the first large model, based on the first prompt information, the content of the first paragraph is processed to generate a first comment on the paragraph to be commented on.

[0129] In the present application, steps 501 to 502 may be implemented in any of the embodiments of the present application, and therefore will not be described in detail herein.

[0130] Step 503: Obtain second prompt information.

[0131] The second prompt information may be used to prompt the second largest model to perform review rationality verification, that is, to prompt the second largest model to perform the task of verifying whether the review is reasonable.

[0132] Exemplarily, whether a paragraph comment is reasonable may refer to whether the paragraph comment is relevant to the paragraph content. If the paragraph comment is relevant to the paragraph content, the paragraph comment may be considered reasonable. If the paragraph comment is irrelevant to the paragraph content, the paragraph comment may be considered reasonable.

[0133] In the present application, the second prompt information may be preset, or may be obtained based on a preset prompt template.

[0134] For example, the second prompt information may be “Is the “xx” comment given by the user regarding the following paragraph content reasonable?”, where “xx” represents a paragraph comment.

[0135] Step 504, based on the content of the first paragraph, the first comment and the second prompt information, the rationality of the first comment is verified using the second large model.

[0136] In the present application, the first paragraph content, the first comment and the second prompt information can be spliced ​​together, and the spliced ​​text can be input into the second largest model. The second largest model can perform a rationality check on the first comment to obtain a check result.

[0137] In the embodiment of the present application, the second largest model can be used to perform rationality verification on paragraph comments, thereby improving the efficiency of rationality verification while ensuring the rationality of the paragraphs.

[0138] Furthermore, the second prompt information may also be used to instruct the second largest model to perform a rewriting task on the comments that fail the rationality check.

[0139] For example, the second prompt information may be “Is the “xx” comment given by the user regarding the following paragraph content reasonable? If not, rewrite the “xx” comment.”

[0140] Therefore, if the paragraph comment fails the rationality check, the second prompt information can be used to instruct the second largest model to rewrite the paragraph comment to obtain the rewritten paragraph comment, thereby improving the rationality of the paragraph comment.

[0141] For the rewritten comments, the second largest model can continue to be used for rationality verification.

[0142] Optionally, one or more of the book information, the second paragraph content of the adjacent paragraph of the paragraph to be commented on, the chapter content of the adjacent chapter to which the paragraph to be commented on belongs, etc. can also be obtained. If the paragraph comment fails the rationality check, the second largest model can be used to process the book information, the second paragraph content of the adjacent paragraph of the paragraph to be commented on, the chapter content of the adjacent chapter to which the paragraph to be commented on belongs, etc., the first paragraph content and the first comment based on the second prompt information, so as to rewrite the first comment and obtain the rewritten comment, which can further improve the rationality of the rewritten comment.

[0143] In one embodiment of the present application, if the first comment passes the rationality check, sensitive word detection and / or prohibited content detection may be performed on the first comment. If the first comment does not contain sensitive words and / or prohibited content, the first comment may be determined as the final comment of the paragraph to be commented on.

[0144] When performing sensitive word detection, the first comment may be matched with multiple preset sensitive words. If the first comment matches any sensitive word, it may be considered that the first comment contains a sensitive word. If the first frequency does not match any sensitive word, it may be determined that the first comment does not contain a sensitive word.

[0145] Optionally, a pre-trained sensitive word detection model may be used to perform sensitive word detection on the first comment, and whether the first comment contains a sensitive word may be determined based on the detection result of the sensitive word detection model.

[0146] When performing prohibited content detection, the first comment may be matched with a plurality of preset keywords related to prohibited content. If the first comment matches any keyword, it may be considered that the first comment contains prohibited content. If the first frequency does not match any keyword, it may be determined that the first comment does not contain prohibited content.

[0147] Optionally, a pre-trained prohibited content detection model may be used to perform prohibited content detection on the first comment, and whether the first comment contains prohibited content may be determined based on the detection result of the prohibited content detection model.

[0148] Therefore, for paragraph comments that have passed the rationality check, sensitive word detection and / or prohibited content detection can continue to be performed, thereby improving the quality of the paragraph comments.

[0149] Furthermore, multi-level identification of the paragraph to be commented on can be obtained, and the multi-level identification and the final comment of the paragraph to be commented on can be associated and stored, so that when the user reads the book later, the paragraph comment can be obtained and displayed based on the associated storage, thereby improving the accuracy of the paragraph comment display.

[0150] It should be noted that the first comment can be checked for rationality in the above order, and sensitive word detection and / or prohibited content detection can be performed on the first comment that passes the rationality check. Alternatively, the first comment can be checked for sensitive words and / or prohibited content, and then a rationality check can be performed on the first comment that does not contain sensitive words and / or prohibited content. Alternatively, the two can be performed simultaneously, and this application does not limit this.

[0151] In addition, the first comment may be subjected to a rationality check and sensitive word detection and / or prohibited content detection, or the first comment may be subjected to a rationality check or sensitive word detection and / or prohibited content detection, and this application does not limit this.

[0152] In order to facilitate the understanding of the solution of this application, the following Figure 6 To explain, Figure 6 A schematic diagram of a process for generating a book paragraph review provided in an embodiment of the present application.

[0153] like Figure 6 As shown in the figure, the generation process of book paragraph reviews can include the following four processes:

[0154] (1) Paragraph screening: Filter the paragraphs that meet the requirements from the popular TOP500 books. For example, you can get the book ID from the TOP500 book ID file, then get all the chapter IDs based on the book ID, then get the book text from the search log table based on the chapter ID, and then determine whether the paragraph in the book meets the conditions. If it meets the conditions, format it (including book ID, chapter ID, paragraph ID, paragraph content) and output it to the file. The paragraph content can be obtained from the paragraph text file.

[0155] (2) Comment generation: The file produced in the previous step can be read line by line to obtain the paragraph content, and a high-quality prompt1 can be constructed (for example: based on the following novel content, generate xxx comments with no less than xxx words and no more than xxx words). Then, the API of the first model is called to generate reasonable paragraph comments using the capabilities of the first model. Then, a new prompt2 is constructed (for example: whether the user's xx comment on xx content is reasonable). The API of the second model is called to verify the rationality of the comment using the capabilities of the second model. If the paragraph comment is reasonable, it can be formatted and output to a comment file. By continuously optimizing the prompt, the availability of the comments produced in the end can be guaranteed to reach more than 99%.

[0156] (3) Review of comments: Since the comments are displayed to the public, no sensitive information should be included. Therefore, the paragraph comments generated by the first model can be reviewed and risk control can be performed to filter out comments that pose security risks.

[0157] (4) Comment storage: The approved paragraph comments are persisted by calling the database API based on the book ID, chapter ID, etc.

[0158] In order to implement the above embodiment, the embodiment of the present application also proposes a device for generating book paragraph reviews. Figure 7 A schematic diagram of the structure of a device for generating book paragraph reviews provided in one embodiment of the present application.

[0159] like Figure 7 As shown, the book paragraph review generating device 700 includes:

[0160] The first acquisition module 710 is used to acquire the first paragraph content and the first prompt information of the paragraph to be reviewed in the target book; wherein the first prompt information is used to prompt the first large model to perform the review generation task;

[0161] The generating module 720 is used to process the first paragraph content based on the first prompt information by using the first large model to generate a first comment on the paragraph to be commented on.

[0162] Optionally, the generating module 720 is used to:

[0163] Obtaining book information of the target book;

[0164] The first large model is used to process the first paragraph content and the book information based on the first prompt information to generate the first comment.

[0165] Optionally, the generating module 720 is used to:

[0166] Obtaining a multi-level identification of the paragraph to be commented on;

[0167] Determine the paragraph identifiers of adjacent paragraphs of the paragraph to be commented on according to the paragraph identifier of the paragraph to be commented on in the multi-level identifiers;

[0168] Acquire the second paragraph content of the adjacent paragraph according to the paragraph identifier of the adjacent paragraph and the multi-level identifier;

[0169] The first large model is used to process the first paragraph content and the second paragraph content based on the first prompt information to generate the first comment.

[0170] Optionally, the generating module 720 is used to:

[0171] Obtaining a multi-level identification of the paragraph to be commented on;

[0172] Determine the chapter identifier of the adjacent chapter to which the paragraph to be commented belongs according to the chapter identifier of the chapter to which the paragraph to be commented belongs in the multi-level identifier;

[0173] According to the chapter identifier of the adjacent chapter, obtaining the chapter content of the adjacent chapter;

[0174] The first large model is used to process the first paragraph content and the chapter content of the adjacent chapter based on the first prompt information to generate the first comment.

[0175] Optionally, the first acquisition module 710 is used to:

[0176] Obtaining condition information that needs to be met for the comment to be generated for the paragraph to be commented on;

[0177] The first prompt information is acquired according to the condition information.

[0178] Optionally, the first acquisition module 710 is used to:

[0179] Obtain the comment angle of the comment to be generated;

[0180] According to the comment angle, the content requirements for the comment to be generated in the condition information are obtained.

[0181] Optionally, the comment angle includes a role comment, and the first acquisition module 710 is used to:

[0182] Identifying the first paragraph content to determine the book character associated with the first paragraph content;

[0183] The content requirement is acquired according to the book character; wherein the content requirement includes commenting on the book character.

[0184] Optionally, the device may further include:

[0185] A second acquisition module is used to acquire second prompt information; wherein the second prompt information is used to prompt the second largest model to perform a review rationality verification task;

[0186] A verification module is used to verify the rationality of the first comment based on the first paragraph content, the first comment and the second prompt information using the second large model.

[0187] Optionally, the second prompt information is further used to prompt the second model to perform a rewriting task on comments that fail the rationality check.

[0188] Optionally, the device may further include:

[0189] A detection module, configured to perform sensitive word detection and / or prohibited content detection on the first comment if the first comment passes the rationality check;

[0190] A determination module is used to determine the first comment as the final comment of the paragraph to be commented on if the first comment does not contain sensitive words and / or prohibited content.

[0191] Optionally, the device may further include:

[0192] A third acquisition module is used to acquire the multi-level identification of the paragraph to be commented on;

[0193] The storage module is used to associate and store the multi-level identification and the final comment.

[0194] Optionally, the first acquisition module 710 is used to:

[0195] Acquire a target file; wherein the target file stores a multi-level identifier of at least one paragraph in the target book and the paragraph content of the at least one paragraph;

[0196] The first paragraph content is obtained from the target file.

[0197] Optionally, the first acquisition module 710 is used to:

[0198] Get the book ID of the candidate book;

[0199] According to the book identifier, obtaining the book content of the candidate book;

[0200] Filtering target paragraphs from the book content using preset paragraph screening rules;

[0201] Determine a multi-level identification of the target paragraph according to the paragraph identification of the target paragraph and the book identification of the book to which the target paragraph belongs;

[0202] The multi-level identification of the target paragraph and the paragraph content of the target paragraph are saved in the target file.

[0203] Optionally, the first acquisition module 710 is used to:

[0204] According to the book identifier, obtaining chapter identifiers of all chapters in the candidate book;

[0205] The book content is obtained according to the chapter identifiers of all the chapters.

[0206] Optionally, the first acquisition module 710 is used to:

[0207] Determine the chapter identifier of the chapter to which the target paragraph belongs;

[0208] The multi-level identification of the target paragraph is determined according to the paragraph identification of the target paragraph, the chapter identification of the chapter to which the target paragraph belongs, and the book identification of the book to which the target paragraph belongs.

[0209] It should be noted that the explanation of the aforementioned embodiment of the method for generating book paragraph reviews is also applicable to the device for generating book paragraph reviews of this embodiment, so it will not be repeated here.

[0210] In the embodiment of the present application, by obtaining the first paragraph content and the first prompt information of the paragraph to be commented on in the target book, the first large model is used to process the first paragraph content based on the first prompt information to generate the first comment on the paragraph to be commented on. Thus, based on the prompt information that prompts the first large model to perform the comment generation task, the first large model is used to process the paragraph content to generate the paragraph comment, thereby improving the generation efficiency of the paragraph comment.

[0211] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

[0212] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0213] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 802 or a computer program loaded from a storage unit 808 to a RAM (Random Access Memory) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An I / O (Input / Output) interface 805 is also connected to the bus 804.

[0214] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0215] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, CPU (Central Processing Unit), GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the method for generating a book paragraph review. For example, in some embodiments, the method for generating a book paragraph review may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for generating a book paragraph review described above may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the method for generating a book paragraph review in any other appropriate manner (for example, by means of firmware).

[0216] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0217] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0218] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0219] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0220] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0221] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0222] According to an embodiment of the present application, the present application also provides a computer program product, which, when an instruction processor in the computer program product is executed, executes the method for generating book paragraph reviews proposed in the above embodiment of the present application.

[0223] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0224] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for generating a book paragraph review, comprising: Obtaining the first paragraph content and first prompt information of the paragraph to be reviewed in the target book; wherein the first prompt information is used to prompt the first large model to perform the review generation task; The first large model is used to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on.

2. The method of claim 1, wherein: The step of using the first large model to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on includes: Acquire book information of the target book; The first large model is used to process the first paragraph content and the book information based on the first prompt information to generate the first comment.

3. The method of claim 1, wherein: The step of using the first large model to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on includes: Obtaining a multi-level identification of the paragraph to be commented on; Determine the paragraph identifiers of adjacent paragraphs of the paragraph to be commented on according to the paragraph identifier of the paragraph to be commented on in the multi-level identifiers; Acquire the second paragraph content of the adjacent paragraph according to the paragraph identifier of the adjacent paragraph and the multi-level identifier; The first large model is used to process the first paragraph content and the second paragraph content based on the first prompt information to generate the first comment.

4. The method of claim 1, wherein: The step of using the first large model to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on includes: Obtaining a multi-level identification of the paragraph to be commented on; Determine the chapter identifier of the adjacent chapter to which the paragraph to be commented belongs according to the chapter identifier of the chapter to which the paragraph to be commented belongs in the multi-level identifier; According to the chapter identifier of the adjacent chapter, obtaining the chapter content of the adjacent chapter; The first large model is used to process the first paragraph content and the chapter content of the adjacent chapter based on the first prompt information to generate the first comment.

5. The method of claim 1, wherein: Acquiring the first prompt information includes: Obtaining condition information that needs to be met for the comment to be generated for the paragraph to be commented on; The first prompt information is acquired according to the condition information.

6. The method of claim 5, wherein: The obtaining of condition information that needs to be satisfied for the comment to be generated for the paragraph to be commented on includes: Obtain the comment angle of the comment to be generated; According to the comment angle, the content requirements for the comment to be generated in the condition information are obtained.

7. The method of claim 6, wherein: The comment angle includes role comment, and obtaining the content requirements of the comment to be generated in the condition information according to the comment type includes: Identifying the first paragraph content to determine the book character associated with the first paragraph content; The content requirement is acquired according to the book character; wherein the content requirement includes commenting on the book character.

8. The method of claim 1, further comprising: Obtaining second prompt information; wherein the second prompt information is used to prompt the second largest model to perform a review rationality verification task; The rationality of the first comment is verified using the second large model based on the first paragraph content, the first comment and the second prompt information.

9. The method of claim 8, wherein: The second prompt information is also used to prompt the second model to perform a rewriting task on the comments that fail the rationality check.

10. The method of claim 8, further comprising: If the first comment passes the rationality check, performing sensitive word detection and / or prohibited content detection on the first comment; In the case that the first comment does not contain sensitive words and / or prohibited content, the first comment is determined as the final comment of the paragraph to be commented on.

11. The method of claim 10, further comprising: Obtaining a multi-level identification of the paragraph to be commented on; The multi-level identification and the final comment are stored in association.

12. The method of claim 1, wherein: The step of obtaining the content of the first paragraph of the paragraph to be reviewed in the target book includes: Acquire a target file; wherein the target file stores a multi-level identifier of at least one paragraph in the target book and the paragraph content of the at least one paragraph; The first paragraph content is obtained from the target file.

13. The method of claim 12, wherein: The obtaining of the target file comprises: Get the book ID of the candidate book; According to the book identifier, obtaining the book content of the candidate book; Filtering target paragraphs from the book content using preset paragraph screening rules; Determine a multi-level identification of the target paragraph according to the paragraph identification of the target paragraph and the book identification of the book to which the target paragraph belongs; The multi-level identification of the target paragraph and the paragraph content of the target paragraph are saved in the target file.

14. The method of claim 13, wherein: The acquiring the book content of the candidate book according to the book identifier includes: According to the book identifier, obtaining chapter identifiers of all chapters in the candidate book; The book content is obtained according to the chapter identifiers of all the chapters.

15. The method of claim 14, wherein: The step of determining the multi-level identification of the target paragraph according to the paragraph identification of the target paragraph and the book identification of the book to which the target paragraph belongs includes: Determine the chapter identifier of the chapter to which the target paragraph belongs; The multi-level identification of the target paragraph is determined according to the paragraph identification of the target paragraph, the chapter identification of the chapter to which the target paragraph belongs, and the book identification of the book to which the target paragraph belongs.

16. A device for generating a book paragraph review, comprising: A first acquisition module is used to acquire the first paragraph content and first prompt information of the paragraph to be reviewed in the target book; wherein the first prompt information is used to prompt the first large model to perform the review generation task; A generation module is used to use the first large model to process the first paragraph content based on the first prompt information to generate a first comment on the paragraph to be commented on.

17. The device of claim 16, wherein: The generating module is used for: Acquire book information of the target book; The first large model is used to process the first paragraph content and the book information based on the first prompt information to generate the first comment.

18. The device of claim 16, wherein: The generating module is used for: Obtaining a multi-level identification of the paragraph to be commented on; Determine the paragraph identifiers of adjacent paragraphs of the paragraph to be commented on according to the paragraph identifier of the paragraph to be commented on in the multi-level identifiers; Acquire the second paragraph content of the adjacent paragraph according to the paragraph identifier of the adjacent paragraph and the multi-level identifier; The first large model is used to process the first paragraph content and the second paragraph content based on the first prompt information to generate the first comment.

19. The device of claim 16, wherein: The generating module is used for: Obtaining a multi-level identification of the paragraph to be commented on; Determine the chapter identifier of the adjacent chapter to which the paragraph to be commented belongs according to the chapter identifier of the chapter to which the paragraph to be commented belongs in the multi-level identifier; According to the chapter identifier of the adjacent chapter, obtaining the chapter content of the adjacent chapter; The first large model is used to process the first paragraph content and the chapter content of the adjacent chapter based on the first prompt information to generate the first comment.

20. The device of claim 16, wherein: The first acquisition module is used to: Obtaining condition information that needs to be met for the comment to be generated for the paragraph to be commented on; The first prompt information is acquired according to the condition information.

21. The device of claim 20, wherein: The first acquisition module is used to: Obtain the comment angle of the comment to be generated; According to the comment angle, the content requirements for the comment to be generated in the condition information are obtained.

22. The device of claim 21, wherein: The comment angle includes role comments, and the first acquisition module is used to: Identifying the first paragraph content to determine the book character associated with the first paragraph content; The content requirement is acquired according to the book character; wherein the content requirement includes commenting on the book character.

23. The apparatus of claim 16, further comprising: A second acquisition module is used to acquire second prompt information; wherein the second prompt information is used to prompt the second largest model to perform a review rationality verification task; A verification module is used to verify the rationality of the first comment based on the first paragraph content, the first comment and the second prompt information using the second large model.

24. The device of claim 23, wherein: The second prompt information is also used to prompt the second model to perform a rewriting task on the comments that fail the rationality check.

25. The apparatus of claim 23, further comprising: A detection module, configured to perform sensitive word detection and / or prohibited content detection on the first comment if the first comment passes the rationality check; A determination module is used to determine the first comment as the final comment of the paragraph to be commented on if the first comment does not contain sensitive words and / or prohibited content.

26. The apparatus of claim 25, further comprising: A third acquisition module is used to acquire the multi-level identification of the paragraph to be commented on; The storage module is used to associate and store the multi-level identification and the final comment.

27. The apparatus of claim 16, wherein: The first acquisition module is used to: Acquire a target file; wherein the target file stores a multi-level identifier of at least one paragraph in the target book and the paragraph content of the at least one paragraph; The first paragraph content is obtained from the target file.

28. The apparatus of claim 27, wherein: The first acquisition module is used to: Get the book ID of the candidate book; According to the book identifier, obtaining the book content of the candidate book; Filtering target paragraphs from the book content using preset paragraph screening rules; Determine a multi-level identification of the target paragraph according to the paragraph identification of the target paragraph and the book identification of the book to which the target paragraph belongs; The multi-level identification of the target paragraph and the paragraph content of the target paragraph are saved in the target file.

29. The apparatus of claim 28, wherein: The first acquisition module is used to: According to the book identifier, obtaining chapter identifiers of all chapters in the candidate book; The book content is obtained according to the chapter identifiers of all the chapters.

30. The apparatus of claim 29, wherein: The first acquisition module is used to: Determine the chapter identifier of the chapter to which the target paragraph belongs; The multi-level identification of the target paragraph is determined according to the paragraph identification of the target paragraph, the chapter identification of the chapter to which the target paragraph belongs, and the book identification of the book to which the target paragraph belongs.

31. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 15.

32. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-15.

33. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.