Analyzing and labeling method and system for full-length novel and storage medium

By splitting the novel into volumes or chapters, and labeling and analyzing asynchronously based on the chapter outline, the upper limit problem and information loss problem of the existing technology when dealing with novels over one million words is solved, and the longer-term problem is achieved Effective analysis of text and improvement of user experience.

CN119494325APending Publication Date: 2025-02-21HANGZHOU WAVEFORM INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411526618.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing technology has an upper limit when processing novels with more than one million words, and cannot effectively process larger-scale novel texts. It is easy to cause information loss or inconsistency when processing character relationships across chapters or full text, affecting the accuracy of analysis. and the response speed and generation efficiency decrease in longer text processing, affecting the user experience.

Method used

Analytical annotation method for novels is adopted. By splitting the novel text into volumes or chapters, and labeling and analyzing asynchronously based on the chapter outline, the annotation information of roles, relationships and worldviews, as well as the power and The analysis information of the full text outline is finally merged and processed to generate comprehensive analysis marking content.

Benefits of technology

It realizes effective annotation and analysis of tens of millions of characters or even longer texts, ensures full coverage of character information and relationships, avoids the local traps of traditional technology when dealing with complex novels, and can capture relationships and forces throughout the novel. The global information and changes in the process improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494325A_ABST
    Figure CN119494325A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, in particular to an analysis and labeling method and system for a full-length novel and a storage medium, and the method comprises the steps: obtaining an input novel text, and splitting the novel text to obtain sub-rolls or sub-seals; according to each chapter, obtaining a chapter mark and a chapter outline, and selecting and marking roles in the novel text; labeling the feature content of each sub-roll or each sub-seal asynchronously and concurrently based on each section outline to obtain labeling information; asynchronously and concurrently analyzing the feature content of each sub-roll or each sub-seal based on each section outline to obtain analysis information; and combining the annotation information and the analysis information corresponding to each sub-roll or each sub-seal, and carrying out multi-source content processing to generate comprehensive analysis annotation content for the novel text. The method and the device are used for improving an important information analysis and labeling effect of a novel with a relatively long text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to an analysis and annotation method, system and storage medium for novels. Background Art

[0002] Currently, online novels are a relatively popular literary form. They are read by a large number of readers and users. Online novels have the characteristics of large number of words, long length, many characters, and a huge worldview. Currently, many readers or third parties will conduct detailed analysis and annotation of online novels to perform tasks such as character annotation, relationship sorting, and worldview structure in the novels.

[0003] In current technology, KimiChat is a relatively advanced long text processing algorithm. Theoretically, it can support the one-time input of ultra-long texts of millions of words. It combines technologies similar to RAG (retrieval-augmented generation) to retrieve relevant information from the stored knowledge base during the text processing process to process and analyze the input novel text, and finally output the results. The output results usually include chapter summaries, character relationships, and annotations of important events.

[0004] However, in reality, KimiChat has certain problems. Its text processing limit is one million words, but most online novels have a long update time and a low update frequency, so the number of words often exceeds one million. Therefore, KimiChat cannot handle larger-scale novel texts; at the same time, due to the characteristics of RAG technology, when KimiChat processes character relationships across chapters or the entire text, it often leads to the loss or inconsistency of character information, relationship information and other content, affecting the accuracy of the overall analysis; finally, although KimiChat's processing limit is one million words, in actual use it performs well in short text analysis, while its response speed and generation efficiency are significantly reduced in the processing of longer texts, affecting the user experience. Summary of the invention

[0005] In order to improve the analysis and annotation effect of important information of novels with longer text length, the present application provides an analysis and annotation method, system and storage medium for novels.

[0006] In a first aspect, the present application provides an analysis and annotation method for novels, which adopts the following technical solution: A novel analysis and annotation method comprises the following steps: Obtaining an input novel text, splitting the novel text into volumes or chapters, wherein the chapters are represented by a single chapter, and the volumes are represented by the sum of a preset number of chapters; Annotating each of the chapters to obtain chapter marks, inferring each of the chapters to obtain chapter outlines, and selectively annotating characters in the novel text; Based on the chapter outlines, the characteristic contents of each sub-volume or each sub-chapter are asynchronously and parallelly annotated to obtain annotation information, wherein the annotation information includes role annotation information, relationship annotation information, and worldview annotation information; Based on the chapter outlines, the characteristic contents of each sub-volume or each sub-chapter are analyzed asynchronously and in parallel to obtain analysis information, wherein the analysis information includes power analysis information and full text outline analysis information; The annotation information and the analysis information corresponding to each volume or each chapter are merged to obtain a merged set, and multi-source content processing is performed on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content includes complete character information cards, relationship maps, power summaries, and full text outlines.

[0007] In some embodiments, dividing the novel text into volumes or chapters comprises the following steps: Determine the number of words and chapters of the novel text; If the word count is greater than a first preset value, splitting the novel text into a plurality of sub-volumes containing a first number of chapters; If the number of words is not greater than a first preset value and the number of chapters is not greater than a second preset value, dividing the novel text into a plurality of sub-chapter; If the word count is not greater than a first preset value and the number of chapters is greater than a second preset value, splitting the novel text into a plurality of sub-volumes containing a second number of the chapters; Wherein, the first number is greater than the second number.

[0008] In some embodiments, marking each of the chapters to obtain a chapter mark, inferring each of the chapters to obtain a chapter outline, and selectively marking the characters in the novel text include the following steps: Obtaining important paragraphs in each of the chapters according to the prompt word engineering, and integrating several of the important paragraphs based on the preceding and following logic detection to obtain a chapter outline; The character information in each of the chapters is extracted to generate a list of characters appearing in the character list, weakly associated characters are screened and excluded in the list of characters appearing in the character list based on the frequency of the characters' appearances, and main characters and special characters are distinguished in the remaining list of characters appearing in the character list based on the number of chapters in which the characters appear and the uniqueness of the chapters, so as to obtain a corresponding list of main characters and a list of special characters.

[0009] In some embodiments, the characteristic contents of each sub-volume or each sub-chapter are asynchronously and parallelly annotated based on each chapter outline to obtain annotation information, including the following steps: Obtaining the outline of each chapter and the list of characters; Select a single character in the character list, and annotate the relevant plot corresponding to the single character in each chapter outline based on the prompt word project to obtain the character annotation information; Randomly select a character pair from the character list, and annotate the related plot in the chapter outline corresponding to the chapter where the character pair appears simultaneously based on the prompt word project to obtain the relationship annotation information; A preset number of the sub-chapters are selected in sequence, or a preset number of chapters are selected in sequence in the sub-volumes and defined as a reference group, and based on the prompt word project, the cultural content, background content, time and space settings, and special settings in the corresponding chapter outlines in the reference group are annotated to obtain the worldview annotation information.

[0010] In some embodiments, analyzing the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain analysis information includes the following steps: Obtaining the outline of each chapter and the list of characters; Analyzing the appearance forces in the chapter outline based on the prompt word engineering, and generating a sphere of influence for each appearance force, selecting the characters in the appearance character list in order, analyzing the sphere of influence corresponding to the characters in each chapter outline based on the prompt word engineering, and adding the sphere of influence; Based on the prompt word project, each chapter outline is analyzed to screen the plots corresponding to the characters in each chapter to eliminate irrelevant plots, and the development logic and logical relationship in each chapter outline are connected in series to obtain the full text outline analysis information.

[0011] In some embodiments, merging the annotation information and the analysis information corresponding to each volume or each chapter to obtain a merged set includes the following steps: Acquire the role annotation information corresponding to each of the sub-volumes or each of the sub-chapter, and merge a plurality of the role annotation information corresponding to the same role to obtain a role merge set; Acquire the relationship annotation information corresponding to each of the sub-volumes or each of the sub-chapter, and merge several of the relationship annotation information between the same role pair to obtain a relationship merge set; Acquire the power analysis information corresponding to each of the sub-volumes or each of the sub-chapter, and merge several power analysis information of the same power to obtain a power merge set; The full text outline analysis information corresponding to each of the sub-volumes or each of the sub-chapter is obtained and merged to obtain a full text outline merged set.

[0012] In some embodiments, performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text includes the following steps: Deleting the repeated role labeling information in the role merge set and sorting the roles according to a preset sorting rule to obtain the role information card; Deleting the relationship annotation information that appears repeatedly for the same role pair in the relationship merging set, and after deleting, sorting the relationship annotation information according to the chapter position where each relationship annotation information appears when there is more than one relationship annotation information for the same role pair to obtain the relationship map of the full text; Deleting the characters that appear repeatedly in each of the spheres of influence in the power analysis set, marking the characters that appear simultaneously in more than one sphere of influence, and analyzing the power summary in combination with the character annotation information and relationship annotation information corresponding to the characters in the spheres of influence; The duplicate contents of the combined set of full-text outlines are removed, the missing contents are supplemented or replaced, and the content consistency and logic of the combined set of full-text outlines are tested to obtain the full-text outline.

[0013] In some of the embodiments, the following steps are also included: Analyze the changes in the relationship annotation information corresponding to the same pair of characters in each adjacent sub-volume or sub-chapter and / or the changes in the power analysis information corresponding to the same character and / or the changes in the development trend of the full text outline analysis information to obtain turning point information; Based on the specific chapter outline corresponding to the adjacent sub-volume or sub-chapter, turning point marks are added at corresponding positions.

[0014] In a second aspect, the present application provides an analysis and annotation system for novels, which adopts the following technical solution: An analysis and annotation system for novels, characterized by comprising: A text volume segmentation module, used for obtaining an input novel text, and splitting the novel text into volumes or chapters, wherein the chapter is represented as a single chapter, and the volume is represented as the sum of a preset number of chapters; A chapter marking module, used for marking each of the chapters to obtain chapter marks, and performing reasoning on each of the chapters to obtain a chapter outline; A role selection module, used to select and mark the roles in the novel text; A role labeling module is used to label the characteristic content of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain role labeling information; A relationship annotation module is used to asynchronously and in parallel annotate the characteristic contents of each sub-volume or each sub-chapter based on each chapter outline to obtain relationship annotation information; A worldview annotation module is used to asynchronously and in parallel annotate the characteristic contents of each sub-volume or each sub-chapter based on each chapter outline to obtain worldview annotation information; A power summary module is used to analyze the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain power analysis information; A full text outline generation module is used to analyze the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain full text outline analysis information; A role merging module, for merging the role annotation information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a complete role information card; A relationship merging module, used for merging the relationship annotation information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a relationship map; A power merging module, used to merge the power analysis information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a power summary; The full text outline merging module is used to merge the full text outline analysis information corresponding to each volume or each chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis and annotation content for the novel text, wherein the comprehensive analysis and annotation content is the full text outline.

[0015] In a third aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium storing a computer program that can be loaded by a processor and execute the above method The technical solution provided by the embodiments of the present application has the following technical effects: Through modular design, novels are divided into volumes and then merged to ensure the overall coherence and integrity of the text, which can support the annotation of texts of tens of millions of characters or even longer. At the same time, by splitting the content and analyzing and merging it independently and in parallel in multiple steps, comprehensive coverage of character information and relationships is guaranteed, avoiding the problem of traditional RAG falling into local traps when dealing with complex novels and being unable to capture the global information and changes of relationships and forces in the entire novel. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of the steps of the analysis and annotation method for novels provided in an embodiment of the present application.

[0017] Figure 2 It is a schematic diagram of the module connection of the analysis and annotation system for novels provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] To more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. However, it should be understood by those of ordinary skill in the art that the present application can be implemented without these details. In some cases, in order to avoid unnecessary descriptions that make various aspects of the present application obscure, well-known methods, processes, systems, components and / or circuits that have been described at a higher level will not be described in detail. For those of ordinary skill in the art, it is obvious that various changes can be made to the embodiments disclosed in the present application, and without departing from the principles and scope of the present application, the general principles defined in the present application can be applied to other embodiments and application scenarios. Therefore, the present application is not limited to the embodiments shown, but conforms to the broadest scope consistent with the scope claimed for protection of the present application.

[0019] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as there is no conflict between them.

[0020] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used to distinguish the technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0021] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples.

[0022] The embodiment of the present application discloses an analysis and annotation method for novels.

[0023] like Figure 1 As shown, a novel analysis and annotation method includes the following steps: S100, obtaining an input novel text, and splitting the novel text into volumes or chapters.

[0024] Chapter division is represented as a single chapter, and volume division is represented as the sum of a preset number of chapters.

[0025] First, in the initial stage, the received super-long novel text needs to be split. Splitting means splitting the full text into several sub-contents in a way that a single chapter is the smallest unit. According to different situations, you can choose to split into sub-chapter with a single chapter as the splitting unit, or split into sub-volumes with a plurality of preset number of chapters as the splitting unit. In the embodiment of the present application, the sub-volume contains 50-100 chapters, and the number of sub-volumes split out can be the same or different.

[0026] S200, annotate each chapter to obtain chapter marks, infer each chapter to obtain chapter outlines, and select and annotate characters in the novel text.

[0027] Then we move on to the chapter analysis phase, marking the specific important content in each chapter to obtain the chapter number and corresponding chapter outline of each chapter.

[0028] At the same time, the character selection phase is carried out, and the characters appearing in each chapter are marked based on the prompt word project.

[0029] S300: asynchronously and in parallel annotate characteristic contents of each volume or each chapter based on the outlines of each chapter to obtain annotation information.

[0030] The annotation information includes role annotation information, relationship annotation information and world view annotation information.

[0031] Based on the prompt word project, the characteristic parts in each volume or chapter are annotated to obtain role annotation, relationship annotation and world view annotation respectively.

[0032] Character annotation is the annotation of the plot, performance and other related plot contents corresponding to the characters. Relationship annotation is the annotation of the relationship between two different characters. Worldview annotation is the annotation of the overall worldview content of the volume or account.

[0033] At the same time, the annotation work is carried out in parallel, that is, the annotation work of characters, relationships, and world views in each volume or chapter is carried out simultaneously.

[0034] S400: analyzing characteristic contents of each volume or each chapter asynchronously and in parallel based on each chapter outline to obtain analysis information.

[0035] The analysis information includes power analysis information and full text outline analysis information.

[0036] Based on the prompt word project, content analysis and reasoning are carried out on the characteristic parts of each volume or chapter to obtain power analysis and full text outline analysis respectively.

[0037] The power analysis is characterized by judging the power to which each character belongs based on content analysis, and the full text outline analysis is characterized by the summary of the full text content reflected in the contents of each volume or chapter.

[0038] S500, merging the annotation information and analysis information corresponding to each volume or each chapter to obtain a merged set, and performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text.

[0039] After asynchronous parallel annotation and analysis of volumes or chapters, the annotation results and analysis results of each volume or chapter are merged, so as to combine the annotation results and analysis results corresponding to several split contents as a whole to obtain the annotation and analysis results of the full text of the novel. The comprehensive results include complete character information cards, relationship maps, power summaries and full text outlines corresponding to the full text of the novel.

[0040] The above-mentioned prompt word engineering is characterized as a method that can obtain a certain result without adjusting the parameters or weights of the large model. It can guide the system model to generate more accurate and targeted output text that is more in line with the prompt words through the input prompt words that are carefully designed and adjusted in the early stage. Accurate and targeted prompt words are provided by adding explanations, examples, thought chain reasoning, adding prompt templates, adding dialogue history, etc. The system performs reasoning analysis and annotation on the content related to the prompt words in the content of the volume or chapter based on the prompt words.

[0041] Through the above steps, the novel is divided into volumes and then merged through a modular design, which ensures the overall coherence and integrity of the text. This can support the annotation of texts of tens of millions of characters or even longer. At the same time, by splitting the content and analyzing and merging it independently and in parallel in multiple steps, it ensures comprehensive coverage of character information and relationships, avoiding the problem of traditional RAG falling into local traps when dealing with complex novels and failing to capture the global information and changes of relationships and forces in the entire novel.

[0042] In some other embodiments, dividing the novel text into volumes or chapters includes the following steps: S110, determining the number of words and chapters in the novel text.

[0043] For short and medium-length novels, novels, and very long novels, the corresponding splitting methods are different based on the response speed requirements of annotation analysis.

[0044] S120: If the word count is greater than a first preset value, the novel text is divided into a plurality of sub-volumes each containing a first number of chapters.

[0045] When the number of words is large, for example, the first preset value is one million words, when it exceeds one million words, it corresponds to a long or super long novel. At this time, the novel text can be divided into volumes, and the number of chapters in each volume meets the first number requirement. As the number of words increases, if the form of chapter division is used, a large number of chapters will appear, and the processing pressure of marking and analysis during asynchronous parallel processing is relatively large. Therefore, multiple chapters can be integrated into one volume for processing to reduce the number of asynchronous parallel processing tasks.

[0046] S130: If the number of words is not greater than a first preset value and the number of chapters is not greater than a second preset value, the novel text is divided into a plurality of sub-chapter.

[0047] If the number of words and chapters is small, the novel text can be split into several chapters in the form of each chapter. The annotation and analysis results of the chapters will be more accurate and comprehensive than those of the volumes, because each chapter will undergo a complete annotation and analysis process independently. In addition, the smaller number of words and chapters can also ensure that the system pressure of the asynchronous parallel processing process will not be too high.

[0048] S140: If the word count is not greater than a first preset value and the chapter count is greater than a second preset value, the novel text is divided into a plurality of sub-volumes containing a second number of chapters.

[0049] If the number of words in the novel text is relatively small but the number of chapters is large, then in order to further reduce the system pressure caused by too many parallel tasks, you can still choose to split it into volumes, but the number of chapters in the volume in this scenario, that is, the second number, will be less than the first number. For example, the first number is 100 volumes and the second number is 60 volumes. Therefore, the number of words in the scenario is relatively small, so in order to further improve the accuracy of analysis and annotation while reducing the system processing pressure, the number of chapters in the volume can be reduced accordingly, so that the number of volume annotation information and volume analysis information obtained after the overall split is large, which is convenient for the content logic merging in the subsequent merging process.

[0050] In some other embodiments, marking each chapter to obtain a chapter mark, inferring each chapter to obtain a chapter outline, and selectively marking characters in the novel text include the following steps: S210, obtaining important paragraphs in each chapter according to the prompt word project, and integrating several important paragraphs based on the preceding and following logic detection to obtain the chapter outline.

[0051] Based on the prompt word project, important paragraphs are selected in each chapter, such as the beginning, the end, the middle climax paragraph, the paragraphs with multiple characters, etc., to obtain the main plot overview. The content of several main plot overviews is cleaned and the logical order is adjusted, and then the paragraphs are integrated. The integrated result is used as the chapter outline of the chapter.

[0052] S220, extracting character information in each chapter to generate a list of characters, screening and excluding weakly associated characters in the list of characters based on the frequency of character appearances, distinguishing main characters from special characters in the remaining list of characters based on the number of chapters in which the characters appear and the chapter positions, to obtain a corresponding list of main characters and a list of special characters.

[0053] The character information of the characters corresponding to each chapter is integrated to obtain a character list, which contains the names, appearance frequencies, appearance locations, etc. of all the characters.

[0054] At the same time, in order to reduce the number of irrelevant characters or minor characters that will be marked and analyzed in the future, which will cause the system to perform too many useless processing processes, it is necessary to further screen the list of characters.

[0055] First, weakly related characters are screened by the frequency of their appearance. Weakly related characters are those that are irrelevant or have little to do with the entire novel, such as minor roles and irrelevant characters. If a character's appearance frequency is low, it is considered that the character is irrelevant or unimportant to the plot.

[0056] The remaining characters in the list of characters that appear in the novel are the important characters that have a great connection with the novel. At the same time, in order to achieve accuracy and fluency in the annotation of character information and relationship information, it is necessary to further distinguish the important characters into main characters and special characters.

[0057] Specifically, determine the number of chapters and the chapter positions in which each character appears. Generally, the main characters include decent characters and villains. Decent characters generally appear throughout the entire novel or in the early part of the novel, and appear in more chapters. Villain characters generally appear throughout the entire novel or in the late part of the novel and continue to the end of the novel, and appear in more chapters. In this way, the main characters can be extracted by appearing in more chapters at the chapter positions that meet the preset requirements.

[0058] Special characters are generally characterized as those who play a special role in promoting the plot or have a special influence on the characters, such as the hermit masters in the immortal cultivation novels, the informants or witnesses in the mystery novels, the undercover agents in the police and gangster novels, etc. They usually do not appear at the beginning or early position of the novel, but play a role in reversing the plot or pushing it to a climax in the middle or late position of the novel. Then the number of chapters in which such characters appear is generally not large, and the positions in which they appear are concentrated in the middle or late positions of the full text of the novel. Therefore, special characters can be extracted through the corresponding number of chapters and chapter positions.

[0059] After the main characters and special characters are selected through analysis, a specific list of main characters and a list of special characters are generated based on the list of characters appearing in the characters, so as to achieve subsequent accurate labeling and analysis.

[0060] In some other embodiments, the characteristic contents of each volume or each chapter are asynchronously and parallelly annotated based on each chapter outline to obtain the annotation information, including the following steps: S310, obtaining the outline of each chapter and the list of characters appearing in the chapter.

[0061] S320, selecting a single character in the character list, and annotating the relevant plots corresponding to the single character in each chapter outline based on the prompt word project to obtain character annotation information.

[0062] Receive the chapter outlines of each chapter and the overall character list, select individual characters in the character list in order of appearance, and annotate the content related to the character information in the chapter outlines corresponding to the volumes or chapters based on the prompt word project. The annotated plot includes the character's performance, personality, growth trajectory, behavior, etc. in each chapter, and integrate the character annotation information into a character card corresponding to the volume or chapter content.

[0063] Specifically, carefully designed prompts are used to guide the model to understand what the character did and what results the character achieved in each volume or chapter, what impact and contribution their behavior and results had on the overall plot, and what objects they obtained. The above-mentioned analysis and reasoning are then used to label the character's corresponding performance, personality, growth trajectory, and other content.

[0064] S330, selecting a character pair in the character list, and annotating related plots in the chapter outline corresponding to the chapter where the character pair appears simultaneously based on the prompt word project to obtain relationship annotation information.

[0065] Select a pair of characters arbitrarily or in order from the list of characters. Each pair of characters corresponds to two different characters. Based on the prompt word project, the relationship between the two characters is inferred and annotated in the chapter outline corresponding to the volume or chapter, guiding the model to understand what plot relationship, bond, and emotion exist between the two characters. This is achieved through dialogue sentiment analysis, action sentiment analysis, and behavior interest tendency analysis between the two characters. For example, if prompt words such as "kiss", "hold hands", and "confession" appear in the paragraph or sentence where character A and character B appear together, it is judged that AB are lovers or partners. If relevant prompt words such as "fight", "hurt", and "cheating" appear between AB, it is judged that AB is in an antagonistic relationship.

[0066] Among them, the selection of role pairs needs to follow the principle of co-appearance, that is, the two characters must appear together in the volume or chapter to be a valid role pair. If they do not appear at the same time, they will be regarded as invalid role pairs and not entered. The content in which the two characters appear together is represented as related plots.

[0067] S340, sequentially select a preset number of sub-chapters or sequentially select a preset number of chapters in a sub-volume and define them as a reference group, and annotate the cultural content, background content, time and space settings, and special settings in the corresponding chapter outlines in the reference group based on the prompt word engineering to obtain worldview annotation information.

[0068] Select the volume or chapter content corresponding to the first 5 to 10 chapters in the novel text as the reference group, and analyze and annotate the chapter outline in the reference based on the prompt word project to obtain the worldview annotation information. In order to enable readers to understand the corresponding worldview content and worldview type of a novel as soon as possible, a novel often describes the type and development information of the entire novel story in the early stage of the novel. In order to facilitate users to quickly know the corresponding worldview and related settings of the novel, the worldview concept of the entire novel can be quickly inferred and annotated through the content at the beginning of the novel.

[0069] The world view includes the novel’s cultural background (domestic background, foreign background, medieval times), time and space setting (modern, alien, time travel, ancient times), and special settings (fictional history, fighting, magic).

[0070] The prompt word project uses appropriate worldview reasoning examples and carefully designed prompt words to help the system model understand what worldview is, so that the system can well summarize, infer, and annotate the worldview structure of this novel.

[0071] In some other embodiments, analyzing the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain analysis information includes the following steps: S410, obtaining the outline of each chapter and the list of characters appearing in the chapter.

[0072] S420, analyzing the forces appearing in the chapter outline based on the prompt word engineering, and generating a sphere of influence for each force appearing, selecting characters in the list of characters appearing in order, analyzing the sphere of influence corresponding to the character in each chapter outline based on the prompt word engineering, and adding the character.

[0073] Based on the prompt word project, we analyze the forces that appear in the chapter outlines of each volume or chapter, such as "xx clan", "xx camp", "xx team", etc. When the prompt words such as clan, team, and lineup appear in the text, it can be judged as a force. If the names of some forces are more special, the corresponding forces can be judged by combining prompt words such as character name + related verbs such as "join".

[0074] Each faction generates a corresponding sphere of influence, and each sphere of influence contains at least one character. Select the characters in the appearance order in the character list, analyze the sphere of influence corresponding to or associated with the character based on the prompt word engineering, and put the character into the corresponding sphere of influence according to the analysis results to obtain the power analysis information.

[0075] At the same time, the overall strength, advantages, disadvantages, background, special abilities and other information of each force can be analyzed based on the role identification information of the characters included in each force.

[0076] S430, analyzing each chapter outline based on the prompt word project, screening the plots corresponding to the characters in each chapter to eliminate irrelevant plots, and connecting the development logic and logical relationship in each chapter outline to obtain the full text outline analysis information.

[0077] Analyze the chapter outlines corresponding to the volumes or chapters, retain the relevant plots of the characters, delete the plots used for description, explanation, modification, etc., and analyze the chapter outlines corresponding to each chapter according to the development logic of the behaviors and actions corresponding to the plots, as well as the analysis of the writing logic such as flashbacks, supplements, and flashbacks to obtain the full text outline analysis information.

[0078] Specifically, the chapter outline and each character are analyzed through the prompt word project to determine the corresponding relationship between each character and the plot; the flashback plot, fantasy plot and parts unrelated to the main story are sorted out from the order of plot development; the corresponding perspective of the main characters is understood, and the plot development and character development are combined with the perspective.

[0079] In some other embodiments, merging the annotation information and analysis information corresponding to each volume or each chapter to obtain a merged set includes the following steps: S510, obtaining role annotation information corresponding to each volume or each chapter, and merging a plurality of role annotation information corresponding to the same role to obtain a role merge set.

[0080] The character annotation information of the same character in each volume or chapter is merged to generate a character merge set corresponding to the character, which contains all the annotated plot contents related to the character.

[0081] S520, obtaining the relationship annotation information corresponding to each volume or each chapter, and merging several relationship annotation information between the same role pair to obtain a relationship merge set.

[0082] One or more relationship annotation information of the same role are merged to obtain a relationship merge set corresponding to the two roles.

[0083] S530, obtaining the power analysis information corresponding to each volume or each chapter, and merging several power analysis information of the same power to obtain a power merge set.

[0084] The force analysis information corresponding to the same force is merged, and each force merge set contains at least one character of at least one force.

[0085] S540, obtaining the full text outline analysis information corresponding to each volume or each chapter and merging them to obtain a full text outline merged set.

[0086] The full text outline analysis information of the independent analysis of each volume or each chapter is merged to obtain a merged set of full text outlines corresponding to the full text of the novel.

[0087] In some other embodiments, performing multi-source content processing on the merged set to generate comprehensive annotation content for the novel text includes the following steps: S550, deleting repeated role labeling information in the role merging set and sorting the roles in a preset order to obtain role information cards.

[0088] The character annotations that appear repeatedly and represent the same plot content are deleted in the character merging set to obtain the character information cards corresponding to each character. The character information cards contain the development, personality changes, contributions, etc. of the character in the full text of the novel.

[0089] S560, deleting the repeated relationship annotation information of the same role pair in the relationship merging set, and after deleting, sorting the relationship annotation information according to the chapter positions where the relationship annotation information appears when there is more than one relationship annotation information of the same role pair to obtain a relationship map of the full text.

[0090] The relationship annotation information of the same character pairs that appear repeatedly in the relationship merge set is deleted to retain one relationship annotation. For example, if the relationship annotation information of a character pair marked in multiple volumes is all lovers, then only the relationship annotation information of one couple is retained.

[0091] At the same time, as the plot develops, the relationship between a pair of characters will change, such as from lovers to enemies. In this case, when a pair of characters corresponds to different relationship annotation information, all different relationship annotation information will be retained, and the corresponding order will be adjusted based on the volume or chapter position where the different relationship annotation information appears.

[0092] When the relationship annotation information of all character pairs is merged, a relationship map corresponding to the full text of the novel is generated. The connection between two characters is used to represent the relationship between the two characters, and the specific relationship content is displayed through the color of the connection, the style of the connection, the annotation on the connection, etc.

[0093] S570, deleting characters that appear repeatedly in each sphere of influence in the power analysis set, marking characters that appear simultaneously in more than one sphere of influence, and analyzing the power summary based on the corresponding character marking information and relationship marking information of the characters in the spheres of influence.

[0094] The power analysis is focused on deleting characters that appear repeatedly in a single power sphere to keep only one character name. At the same time, determine whether the same character appears in more than one power sphere. If so, mark the character. Changes in power are often accompanied by reversals and important advancements in the storyline, so characters corresponding to such special scenarios are specially marked.

[0095] S580, de-duplicate the duplicate contents of the combined set of full-text outlines, interpolate or replace the missing contents, and detect the content consistency and logic of the combined set of full-text outlines to obtain the full-text outline.

[0096] For the merged set of full-text outlines, duplicate content with the same meaning or the same plot description is removed, and the missing parts between the plot development and the logical connection are interpolated or replaced by combining prompt words and context analysis algorithms; finally, it is determined whether there is a plot conflict or logic conflict in the content of the merged set of full-text outlines after deduplication and interpolation or replacement of missing content. If so, the plot with a high probability of being correct is obtained according to the context of each chapter outline and the abnormal plot or logic is replaced to ensure content consistency and logical correctness. At the same time, when it is determined that the conflicting content is accurate according to the context of each chapter outline, the conflicting content is retained and the logical order is adjusted according to the chapter position where the full-text outline analysis information appears.

[0097] In some other embodiments, the following steps are also included: S600, analyzing the change of relationship annotation information corresponding to the same character pair in each adjacent sub-volume or sub-chapter and / or the change of power analysis information corresponding to the same character and / or the change of development tendency of the full text outline analysis information to obtain turning point information.

[0098] There are often plot twists in novel writing. When there is a plot twist, it often corresponds to an important change in the development of the novel's content. Therefore, in order to improve the annotation and analysis effect of the novel and enable users to quickly and clearly understand the important plot content in the novel, it is also necessary to mark the turning points in the novel.

[0099] When the relationship between a pair of characters changes in adjacent volumes or chapters, it means that a plot twist has occurred between the characters due to some special and important plot changes, and / or when a character's power changes in adjacent volumes or chapters, it also means that a plot change has occurred due to some special plots or foreshadowing, and / or when the content of the full text outline analysis changes in adjacent volumes or chapters, because the full text outline represents the overall plot direction of the volume or chapter, when the development trend of the full text outline analysis content changes or reverses, it is also considered that a major plot twist has occurred.

[0100] Therefore, when the above situation occurs, it is considered that a turning point has occurred somewhere in the novel, corresponding to the writing information.

[0101] S610, adding turning point marks at corresponding positions based on specific chapter outlines corresponding to adjacent volumes or chapters.

[0102] When there is turning point information, the position of the turning point is analyzed based on the chapter outline of each chapter, and a turning point mark is added to the chapter outline corresponding to the chapter where the turning point occurs.

[0103] like Figure 2 As shown, the embodiment of the present application also discloses an analysis and annotation system for novels, including: A text volume segmentation module is used to obtain an input novel text, and to split the novel text into volumes or chapters, wherein a chapter is represented as a single chapter, and a volume is represented as the sum of a preset number of chapters; A chapter annotation module is used to annotate each chapter to obtain chapter marks and to infer each chapter to obtain chapter outlines; The role selection module is used to select and annotate the roles in the novel text; A role labeling module is used to label the characteristic contents of each volume or each chapter asynchronously and in parallel based on the outline of each chapter to obtain role labeling information; A relationship annotation module is used to asynchronously and parallelly annotate the characteristic contents of each volume or each chapter based on the outline of each chapter to obtain relationship annotation information; A worldview annotation module is used to asynchronously and parallelly annotate the characteristic contents of each volume or each chapter based on the outline of each chapter to obtain worldview annotation information; A power summary module is used to analyze the characteristic contents of each volume or chapter asynchronously and in parallel based on the outline of each chapter to obtain power analysis information; A full text outline generation module is used to analyze the characteristic contents of each volume or each chapter asynchronously and in parallel based on the outlines of each chapter to obtain full text outline analysis information; A role merging module is used to merge the role annotation information corresponding to each volume or each chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, and the comprehensive analysis annotation content is a complete role information card; A relationship merging module is used to merge the relationship annotation information corresponding to each volume or each chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, and the comprehensive analysis annotation content is a relationship map; A power merging module is used to merge the power analysis information corresponding to each volume or chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, and the comprehensive analysis annotation content is a power summary; The full-text outline merging module is used to merge the full-text outline analysis information corresponding to each volume or chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis and annotation content for the novel text, and the comprehensive analysis and annotation content is the full-text outline.

[0104] In an embodiment of the present application, a computer-readable storage medium is also disclosed, on which is stored a computer program that can be loaded by a processor and execute the above method.

[0105] The implementation principle is: Through modular design, novels are divided into volumes and then merged to ensure the overall coherence and integrity of the text, which can support the annotation of texts of tens of millions of characters or even longer. At the same time, by splitting the content and analyzing and merging it independently and in parallel in multiple steps, comprehensive coverage of character information and relationships is guaranteed, avoiding the problem of traditional RAG falling into local traps when dealing with complex novels and being unable to capture the global information and changes of relationships and forces in the entire novel.

[0106] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise clearly stated in this document, the execution of these steps is not strictly limited in order and can be performed in other orders.

[0107] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A novel analysis and annotation method, characterized in that: The following steps are involved: Obtaining an input novel text, splitting the novel text into volumes or chapters, wherein the chapters are represented by a single chapter, and the volumes are represented by the sum of a preset number of chapters; Annotating each of the chapters to obtain chapter marks, inferring each of the chapters to obtain chapter outlines, and selectively annotating characters in the novel text; Based on the chapter outlines, the characteristic contents of each sub-volume or each sub-chapter are asynchronously and parallelly annotated to obtain annotation information, wherein the annotation information includes role annotation information, relationship annotation information, and worldview annotation information; Based on the chapter outlines, the characteristic contents of each sub-volume or each sub-chapter are analyzed asynchronously and in parallel to obtain analysis information, wherein the analysis information includes power analysis information and full text outline analysis information; The annotation information and the analysis information corresponding to each volume or each chapter are merged to obtain a merged set, and multi-source content processing is performed on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content includes complete character information cards, relationship maps, power summaries, and full text outlines.

2. The analysis and annotation method for novels according to claim 1, characterized in that: Dividing the novel text into volumes or chapters includes the following steps: Determine the number of words and chapters of the novel text; If the word count is greater than a first preset value, splitting the novel text into a plurality of sub-volumes containing a first number of chapters; If the number of words is not greater than a first preset value and the number of chapters is not greater than a second preset value, dividing the novel text into a plurality of sub-chapter; If the word count is not greater than a first preset value and the number of chapters is greater than a second preset value, splitting the novel text into a plurality of sub-volumes containing a second number of the chapters; Wherein, the first number is greater than the second number.

3. The analysis and annotation method for novels according to claim 1, characterized in that: Marking each of the chapters to obtain chapter marks, reasoning each of the chapters to obtain chapter outlines, and selecting and marking characters in the novel text, including the following steps: Obtaining important paragraphs in each of the chapters according to the prompt word engineering, and integrating several of the important paragraphs based on the preceding and following logic detection to obtain a chapter outline; The character information in each of the chapters is extracted to generate a list of characters appearing in the character list, weakly associated characters are screened and excluded in the list of characters appearing in the character list based on the frequency of the characters' appearances, and main characters and special characters are distinguished in the remaining list of characters appearing in the character list based on the number of chapters in which the characters appear and the uniqueness of the chapters, so as to obtain a corresponding list of main characters and a list of special characters.

4. The analysis and annotation method for novels according to claim 1, characterized in that: Based on the chapter outlines, the characteristic contents of each sub-volume or each sub-chapter are asynchronously and parallelly marked to obtain marking information, including the following steps: Obtaining the outline of each chapter and the list of characters; Select a single character in the character list, and annotate the relevant plot corresponding to the single character in each chapter outline based on the prompt word project to obtain the character annotation information; Randomly select a character pair from the character list, and annotate the related plot in the chapter outline corresponding to the chapter where the character pair appears simultaneously based on the prompt word project to obtain the relationship annotation information; A preset number of the sub-chapters are selected in sequence, or a preset number of chapters are selected in sequence in the sub-volumes and defined as a reference group, and based on the prompt word project, the cultural content, background content, time and space settings, and special settings in the corresponding chapter outlines in the reference group are annotated to obtain the worldview annotation information.

5. The analysis and annotation method for novels according to claim 4, characterized in that: The characteristic contents of each sub-volume or each sub-chapter are analyzed asynchronously and in parallel based on each chapter outline to obtain analysis information, including the following steps: Obtaining the outline of each chapter and the list of characters; Analyzing the appearance forces in the chapter outline based on the prompt word engineering, and generating a sphere of influence for each appearance force, selecting the characters in the appearance character list in order, analyzing the sphere of influence corresponding to the characters in each chapter outline based on the prompt word engineering, and adding the sphere of influence; Based on the prompt word project, each chapter outline is analyzed to screen the plots corresponding to the characters in each chapter to eliminate irrelevant plots, and the development logic and logical relationship in each chapter outline are connected in series to obtain the full text outline analysis information.

6. The analysis and annotation method for novels according to claim 5, characterized in that: Merging the annotation information and the analysis information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set includes the following steps: Acquire the role annotation information corresponding to each of the sub-volumes or each of the sub-chapter, and merge a plurality of the role annotation information corresponding to the same role to obtain a role merge set; Acquire the relationship annotation information corresponding to each of the sub-volumes or each of the sub-chapter, and merge several of the relationship annotation information between the same role pair to obtain a relationship merge set; Acquire the power analysis information corresponding to each of the sub-volumes or each of the sub-chapter, and merge several power analysis information of the same power to obtain a power merge set; The full text outline analysis information corresponding to each of the sub-volumes or each of the sub-chapter is obtained and merged to obtain a full text outline merged set.

7. The analysis and annotation method for novels according to claim 6, characterized in that: Performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text includes the following steps: Deleting the repeated role labeling information in the role merge set and sorting the roles according to a preset sorting rule to obtain the role information card; Deleting the relationship annotation information that appears repeatedly for the same role pair in the relationship merging set, and after deleting, sorting the relationship annotation information according to the chapter position where each relationship annotation information appears when there is more than one relationship annotation information for the same role pair to obtain the relationship map of the full text; Deleting the characters that appear repeatedly in each of the spheres of influence in the power analysis set, marking the characters that appear simultaneously in more than one sphere of influence, and analyzing the power summary in combination with the character annotation information and relationship annotation information corresponding to the characters in the spheres of influence; The duplicate contents of the combined set of full-text outlines are removed, the missing contents are supplemented or replaced, and the content consistency and logic of the combined set of full-text outlines are tested to obtain the full-text outline.

8. The analysis and annotation method for novels according to claim 5, characterized in that: The following steps are also included: Analyze the changes in the relationship annotation information corresponding to the same pair of characters in each adjacent sub-volume or sub-chapter and / or the changes in the power analysis information corresponding to the same character and / or the changes in the development trend of the full text outline analysis information to obtain turning point information; Based on the specific chapter outline corresponding to the adjacent sub-volume or sub-chapter, turning point marks are added at corresponding positions.

9. An analysis and annotation system for novels, characterized in that: include: A text volume segmentation module, used for obtaining an input novel text, and splitting the novel text into volumes or chapters, wherein the chapter is represented as a single chapter, and the volume is represented as the sum of a preset number of chapters; A chapter marking module, used for marking each of the chapters to obtain chapter marks, and performing reasoning on each of the chapters to obtain a chapter outline; A role selection module, used to select and mark the roles in the novel text; A role labeling module is used to label the characteristic content of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain role labeling information; A relationship annotation module is used to asynchronously and in parallel annotate the characteristic contents of each sub-volume or each sub-chapter based on each chapter outline to obtain relationship annotation information; A worldview annotation module is used to asynchronously and in parallel annotate the characteristic contents of each sub-volume or each sub-chapter based on each chapter outline to obtain worldview annotation information; A power summary module is used to analyze the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain power analysis information; A full text outline generation module is used to analyze the characteristic contents of each sub-volume or each sub-chapter asynchronously and in parallel based on each chapter outline to obtain full text outline analysis information; A role merging module, for merging the role annotation information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a complete role information card; A relationship merging module, used for merging the relationship annotation information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and performing multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a relationship map; A power merging module, used to merge the power analysis information corresponding to each of the sub-volumes or each of the sub-chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis annotation content for the novel text, wherein the comprehensive analysis annotation content is a power summary; The full text outline merging module is used to merge the full text outline analysis information corresponding to each volume or each chapter to obtain a merged set, and perform multi-source content processing on the merged set to generate comprehensive analysis and annotation content for the novel text, wherein the comprehensive analysis and annotation content is the full text outline.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 8.