Program generation method, interaction method and related device
By identifying and utilizing the original headings and hierarchical relationships in the text information to generate structured text information, the problem of difficulty in understanding outline generation models is solved, achieving more accurate and efficient text outline generation and improving the reading experience.
Patent Information
- Application Number
- CN202410572834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2025-11-14
AI Technical Summary
Existing outline generation models directly input the original text information, leading to difficulties in understanding, low generation efficiency, and a lack of accuracy.
By identifying multiple original headings and their hierarchical relationships in the text information to be processed, the structural text information, including text chapters and their inclusion relationships, is determined and input into the outline generation model to generate the target text outline.
It improves the accuracy and efficiency of outline generation, helps readers quickly understand the structure of text information, and enhances the reading experience.
Smart Images

Figure CN120950679A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to outline generation methods, interaction methods, and related apparatus. Background Technology
[0002] Reading is one of the main ways people acquire information in their daily lives, including reading books, browsing web pages, and reading articles. Among these methods, the outline of a text is a key piece of supplementary information that aids in reading. An outline allows readers to quickly understand the content structure of the text, enabling them to focus their reading on content that interests them.
[0003] In related technologies, in order to improve the efficiency of outline generation, outline generation is mainly achieved through outline generation models. By inputting text information into the outline generation model, an outline of that text information can be automatically generated.
[0004] However, in related technologies, the original text information is directly input into the model when generating outlines, which makes it difficult for the model to understand the content structure of the text information, resulting in low outline generation efficiency and lack of accuracy. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides an outline generation method that can generate text outlines more accurately and efficiently.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] In a first aspect, embodiments of this application disclose an outline generation method, the method comprising:
[0008] Identify multiple original titles included in the text information to be processed, and determine the first hierarchical relationship between the multiple original titles;
[0009] Based on the plurality of original titles and the first hierarchical relationship, structural text information corresponding to the text information to be processed is determined. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles.
[0010] The outline generation model generates a target text outline based on the structured text information. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify the second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
[0011] Secondly, embodiments of this application disclose an interaction method, the method comprising:
[0012] A text outline interface is displayed, which is used to display the text outline corresponding to the target text information. The text outline includes multiple content representation information, which is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information, and the hierarchical relationship is used to represent the inclusion relationship between the multiple information contents.
[0013] Based on the trigger operation of the first content representation information, a first text interface is displayed. The first text interface is used to display the text information corresponding to the information content represented by the first content representation information. The first content representation information is any one of the plurality of content representation information.
[0014] In one possible implementation, the second text interface is further used to display second content representation information, which represents target information content, wherein the target information content is the information content corresponding to the text information that is displayed in the second text interface.
[0015] Thirdly, embodiments of this application disclose an outline generation apparatus, the apparatus comprising an identification unit, a first determination unit, and a first generation unit:
[0016] The identification unit is used to identify multiple original titles included in the text information to be processed, and to determine a first hierarchical relationship between the multiple original titles;
[0017] The first determining unit is configured to determine the structural text information corresponding to the text information to be processed based on the plurality of original titles and the first hierarchical relationship. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles.
[0018] The first generation unit is used to generate a target text outline based on the structured text information using an outline generation model. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify a second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
[0019] In one possible implementation, the identification unit is specifically used for:
[0020] Identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles;
[0021] The first hierarchical relationship is determined based on the distribution of the multiple original titles in the text information to be processed and the title hierarchy corresponding to the multiple original titles.
[0022] In one possible implementation, the device further includes a second determining unit:
[0023] The second determining unit is used to determine multiple heading formats, wherein the multiple heading formats have corresponding heading levels;
[0024] The identification unit is specifically used for:
[0025] Based on the fact that the target information in the text information to be processed meets the target title format, the target information is determined as the target original title, and the title level corresponding to the target title format is determined as the title level corresponding to the target original title. The target information is any text information in the text information to be processed, and the target title format is any one of the multiple title formats.
[0026] In one possible implementation, the text information to be processed has corresponding tag information, the tag information being used to identify multiple original titles in the text information to be processed, and to identify the title levels corresponding to the multiple original titles respectively, the identification unit being specifically used for:
[0027] Based on the tag information, identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles.
[0028] In one possible implementation, the identification unit is specifically used for:
[0029] The original title information is determined based on the text information to be processed using a title recognition model. The original title information includes multiple original titles and hierarchical relationship information corresponding to each of the multiple original titles. The hierarchical relationship information corresponding to each of the multiple original titles is used to constitute the first hierarchical relationship.
[0030] In one possible implementation, the device further includes a first acquisition unit, a second generation unit, and a first adjustment unit:
[0031] The first acquisition unit is used to acquire first sample text information, the first sample text information having corresponding sample original title information, the sample original title information including multiple sample original titles in the first sample text information, and sample hierarchical relationship information corresponding to the multiple sample original titles respectively;
[0032] The second generation unit is used to generate undetermined original title information based on the first sample text information using an initial title recognition model;
[0033] The first adjustment unit is used to adjust the model parameters corresponding to the initial title recognition model according to the difference between the original title information to be determined and the original title information of the sample, so as to obtain the title recognition model.
[0034] In one possible implementation, the first generating unit is specifically used for:
[0035] The number of texts based on the structural text information does not exceed the baseline number of texts corresponding to the outline generation model. The target text outline is generated based on the structural text information through the outline generation model.
[0036] The device further includes a third determining unit, a third generating unit, a replacement unit, and a fourth generating unit:
[0037] The third determining unit is used to determine the final-level text chapter in the structural text information based on the fact that the number of texts in the structural text information exceeds the baseline number of texts. The final-level text chapter is a text chapter that does not contain any text chapters among the plurality of text chapters.
[0038] The third generation unit is used to generate a sub-text outline based on the final-level text chapter using the outline generation model. The sub-text outline is used to represent the information content corresponding to the final-level text chapter.
[0039] The replacement unit is used to replace the final-level text chapter in the structured text information with the sub-text outline;
[0040] The fourth generation unit is used to generate the target text outline based on the replaced structural text information, using the outline generation model, based on the premise that the number of texts in the replaced structural text information does not exceed the baseline text number.
[0041] In one possible implementation, the device further includes a second acquisition unit, a fourth determination unit, a fifth generation unit, and a second adjustment unit:
[0042] The second acquisition unit is used to acquire second sample text information. The second sample text information has a corresponding sample text outline. The sample text outline includes multiple sample content representation information. The multiple sample content representation information is used to represent multiple sample information contents included in the second sample text information. The sample text outline is used to identify the sample hierarchy relationship between the multiple sample content representation information. The sample hierarchy relationship is used to represent the inclusion relationship between the multiple sample information contents.
[0043] The fourth determining unit is used to determine the sample structure text information corresponding to the second sample text information. The sample structure text information includes multiple sample text sections in the second sample text information. The sample structure text information is used to identify the multiple sample text sections and to identify the inclusion relationship between the multiple sample text sections.
[0044] The fifth generation unit is used to generate a text outline to be determined based on the sample structure text information through the initial outline generation model.
[0045] The second adjustment unit is used to adjust the model parameters corresponding to the initial outline generation model according to the difference between the text outline to be determined and the sample text outline, so as to obtain the outline generation model.
[0046] In one possible implementation, the first generating unit is specifically used for:
[0047] Multiple candidate text outlines are generated based on the structured text information using the outline generation model.
[0048] Determine the accuracy corresponding to each of the plurality of candidate text outlines. The target accuracy corresponding to the target candidate text outline is the accuracy of the content representation information in the target candidate text outline in representing the information content included in the text information to be processed. The target candidate text outline is any one of the plurality of candidate text outlines.
[0049] Based on the target accuracy being the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, the target candidate text outline is determined as the target text outline.
[0050] In one possible implementation, the first generating unit is specifically used for:
[0051] Based on the hierarchical relationship between multiple content representation information identified by the target candidate text outline, multiple final-level content representation information corresponding to the target candidate text outline is determined. The multiple final-level content representation information are the content representation information that does not have lower-level content representation information among the multiple content representation information included in the target candidate text outline.
[0052] Determine the matching degree corresponding to each of the plurality of final-level content representation information, wherein the target matching degree corresponding to the target final-level content representation information is the matching degree between the target final-level content representation information and the represented information content, and the target final-level content representation information is any one of the plurality of final-level content representation information;
[0053] The target accuracy is determined by summing the matching degrees corresponding to the multiple end-level content representation information.
[0054] In one possible implementation, the first generating unit is specifically used for:
[0055] Determine the first text segment in the structured text information that has the highest matching degree with the target's final-level content representation information;
[0056] Identify a second text segment in the structured text information whose text interval with the first text segment is less than a preset interval;
[0057] The matching degree between the target final-level content representation information and the target text fragment is determined as the target matching degree. The target text fragment is composed of the first text fragment and the second text fragment. The target text fragment is used to simulate the information content represented by the target final-level content representation information in the structured text information.
[0058] In one possible implementation, the first generating unit is specifically used for:
[0059] Based on the fact that the target accuracy is the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, and the target candidate text outline meets the preset conditions, the target candidate text outline is determined as the target text outline;
[0060] The preset conditions include any one or more combinations of the following:
[0061] The model prediction parameters corresponding to the target candidate text outline are greater than the preset parameters. The preset parameters are the parameters predicted by the outline generation model based on the structural text information, which are used to characterize the probability that the target candidate text outline is the accurate text outline corresponding to the text information to be processed.
[0062] The number of content representation information in the target candidate text outline is greater than the preset number;
[0063] The number of texts corresponding to the first N levels of content representation information in the target candidate text outline does not exceed the preset number of texts. The first level of content representation information is content representation information that does not have higher-level content representation information, and the N-level content representation information is content representation information that does not have higher-level content representation information except for the first N-1 levels of content representation information.
[0064] Fourthly, embodiments of this application disclose an interactive device, the device comprising a first display unit and a second display unit:
[0065] The first display unit is used to display a text outline interface, which is used to display a text outline corresponding to the target text information. The text outline includes multiple content representation information, which is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information, and the hierarchical relationship is used to represent the inclusion relationship between the multiple information contents.
[0066] The second display unit is used to display a first text interface based on a trigger operation on the first content representation information. The first text interface is used to display text information corresponding to the information content represented by the first content representation information, where the first content representation information is any one of the plurality of content representation information.
[0067] In one possible implementation, the device further includes a third display unit:
[0068] The third display unit is used to display a second text interface, which is used to display the target text information. The second text interface includes a first outline control.
[0069] The first display unit is specifically used for:
[0070] Based on the triggered operation of the first outline control, the text outline interface is displayed.
[0071] In one possible implementation, the second text interface is further used to display second content representation information, which represents target information content, wherein the target information content is the information content corresponding to the text information that is displayed in the second text interface.
[0072] In one possible implementation, the device further includes a fourth display unit and a fifth display unit:
[0073] The fourth display unit is used to display the initial interface, which includes a text display control and a second outline control.
[0074] The fifth display unit is used to display a second text interface based on a trigger operation on the text display control, and the second text interface is used to display the target text information;
[0075] The first display unit is specifically used for:
[0076] Based on the triggered operation of the second outline control, the text outline interface is displayed.
[0077] Fifthly, embodiments of this application disclose a computer device, the computer device including a processor and a memory:
[0078] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0079] The processor is configured to execute the outline generation method described in any one of the first aspects, or to execute the interaction method described in any one of the second aspects, according to instructions in the computer program.
[0080] In a sixth aspect, embodiments of this application disclose a computer-readable storage medium for storing a computer program, the computer program being used to execute the outline generation method described in any one of the first aspects, or to execute the interaction method described in any one of the second aspects;
[0081] In a seventh aspect, embodiments of this application disclose a computer program product including a computer program, which, when run on a computer device, causes the computer device to execute the outline generation method described in any one of the first aspects, or to execute the interaction method described in any one of the second aspects.
[0082] As can be seen from the above technical solution, when generating the text outline corresponding to the text information to be processed through the outline generation model, this application does not directly input the text information to be processed into the outline generation model, but first analyzes the chapter structure in the text information to be processed. By identifying multiple original titles included in the text information to be processed and determining the first-level relationship between multiple original titles, the structural text information corresponding to the text information to be processed can be determined. This structural text information includes multiple text chapters in the text information to be processed, and can also be used to identify multiple text chapters and the inclusion relationship between multiple text chapters. Multiple text chapters are used to constitute the text information to be processed, and multiple text chapters correspond one-to-one with multiple original titles. The target text chapter corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. That is, under normal circumstances, the text information in the same text chapter corresponds to similar information content. Therefore, by identifying multiple text chapters, the model can know which text information corresponds to similar text content, and can have a clearer understanding of the distribution of information content in the text information to be processed. In this model, the text section corresponding to the upper-level original title contains the text section corresponding to the lower-level original title. This structural text information allows the model to understand the relationships between multiple pieces of information within the text to be processed. Furthermore, when generating a text outline by inputting structural text information into the outline generation model, the model gains a clearer understanding of the information content structure within the text to be processed, thus generating a more accurate target text outline. This target text outline includes multiple content representation information and a second-level relationship that identifies the relationships between these multiple content representation information. The multiple content representation information represents multiple pieces of information within the text to be processed, and the second-level relationship represents the inclusion relationship between these multiple pieces of information. In summary, this application, on the one hand, can more clearly represent the text information with similar content and the relationship between multiple text chapters by performing chapter structuring on the text information to be processed, thereby improving the accuracy of the outline generation model in generating text outlines and thus providing readers with a better reading experience through text outlines; on the other hand, chapter structuring can be automated through original title recognition and hierarchical relationship determination, without the need for manual preprocessing, ensuring the efficiency of text outline generation. Attached Figure Description
[0083] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0084] Figure 1 A schematic diagram illustrating a method for generating an outline in a practical application scenario, as provided in this application embodiment;
[0085] Figure 2 A flowchart illustrating an outline generation method provided in this application embodiment;
[0086] Figure 3 This is a schematic diagram of text information to be processed provided in an embodiment of this application;
[0087] Figure 4 A schematic diagram illustrating a text information format provided in an embodiment of this application;
[0088] Figure 5 This is a schematic diagram illustrating a text information processing method provided in an embodiment of this application.
[0089] Figure 6 This is a schematic diagram of a tree structure processing method provided in an embodiment of this application;
[0090] Figure 7 A flowchart illustrating an interaction method provided in an embodiment of this application;
[0091] Figure 8 A schematic diagram illustrating an interaction method provided in an embodiment of this application;
[0092] Figure 9 A schematic diagram illustrating an interaction method provided in an embodiment of this application;
[0093] Figure 10 A schematic diagram illustrating an interaction method provided in an embodiment of this application;
[0094] Figure 11 A schematic diagram illustrating an interaction method provided in an embodiment of this application;
[0095] Figure 12 A flowchart illustrating an outline generation method in a practical application scenario provided by an embodiment of this application;
[0096] Figure 13 A structural block diagram of an outline generation device provided in an embodiment of this application;
[0097] Figure 14 A structural block diagram of an interactive device provided in an embodiment of this application;
[0098] Figure 15 A structural diagram of a terminal provided in an embodiment of this application;
[0099] Figure 16 This is a structural diagram of a server provided in an embodiment of this application. Detailed Implementation
[0100] The embodiments of this application will now be described with reference to the accompanying drawings.
[0101] A text outline is a concise and clear representation of the information content within a text. For example, an article's summary can be considered a type of text outline. Through a text outline, readers can quickly understand the structure of the text, thus helping them read efficiently and locate the specific information they need.
[0102] In related technologies, text outlines are typically created manually based on textual information. Automated text analysis functions also exist, which can train outline generation models for automated outline extraction. By inputting textual information into the model, a corresponding text outline can be automatically generated. However, because these technologies directly input the original text information into the model, the model struggles to accurately understand the information content structure within the text. Consequently, the extracted text outlines fail to accurately represent the information content and identify the relationships between multiple pieces of information within the text. This results in outlines that are less helpful for readers to quickly understand the content and offer little improvement to the reading experience.
[0103] To address the aforementioned technical issues, this application provides an outline generation method. For text information requiring outline generation, the method first identifies multiple original titles within the text information and determines the first-level relationships between them. By identifying the text information corresponding to each original title in the text information, multiple text sections within the text information can be determined. The first-level relationships further clarify the inclusion relationships between these sections, thereby identifying the structural text information corresponding to the text information. This structural text information includes multiple text sections and identifies the inclusion relationships between them. Since text information within the same section typically corresponds to similar content, inputting this structural text information into the outline generation model allows the model to fully understand the information content structure of the text information, thus improving the accuracy and coherence of the target text outline's representation of the information content.
[0104] Understandably, this method can be applied to computer devices capable of generating outlines, such as terminal devices or servers. This method can be executed independently by a terminal device or server, or it can be applied to network scenarios where the terminal device and server communicate, executing in cooperation. The terminal device can be a mobile phone, tablet, laptop, desktop computer, etc. The terminal device can also include various virtual reality devices, such as augmented reality (AR) devices like AR glasses and AR screens, and virtual reality (VR) devices like VR headsets. The server can be understood as an application server or a web server. In actual deployment, the server can be a standalone server, a cluster server, or a cloud server, etc.
[0105] To facilitate understanding of the technical solution provided in this application, the outline generation method provided in this application will be introduced next in conjunction with a practical application scenario.
[0106] See Figure 1 , Figure 1 This is a schematic diagram of an outline generation method in a practical application scenario provided by an embodiment of this application. In this practical application scenario, the computer device is a server 101 with outline generation function.
[0107] Server 101 can first obtain the text information to be processed, which can be any text information. Typically, text information is composed of text sections, and the information content corresponding to the text information within the same text section is usually quite similar. Therefore, server 101 can identify the distribution of information content in the text information to be processed by recognizing text sections, and can also identify the relationships between multiple pieces of information in the text information to be processed by recognizing the relationships between text sections.
[0108] Since text chapters typically correspond one-to-one with headings, server 101 can first identify multiple original headings in the text information to be processed, as well as the first-level relationship between these original headings. Original headings refer to headings that already exist in the text information to be processed, and the first-level relationship identifies whether there is a hierarchical relationship between multiple original headings. For example, in... Figure 2In the text, the original headings can include seven original headings, from Original Heading 1 to Original Heading 7. These are further hierarchically divided into first-level, second-level, and third-level original headings. Original Heading 1 is a first-level original heading, and Original Heading 2 and Original Heading 3 are its subordinate original headings, and so on. Typically, the text section corresponding to a higher-level original heading contains the text section corresponding to a lower-level original heading. Therefore, on the one hand, based on the text information corresponding to multiple original headings in the text information to be processed, server 101 can determine multiple text sections in the text information to be processed. On the other hand, based on the first-level relationships between multiple original headings, the inclusion relationships between multiple text sections can be determined, thereby determining the structural text information corresponding to the text information to be processed.
[0109] like Figure 1 As shown, the structured text information includes seven text sections, from section 1 to section 7. These seven sections constitute the text information to be processed. The structured text information allows us to first determine which text sections correspond to which pieces of text information, and thus identify which pieces of text information correspond to similar content. Furthermore, the structured text information can identify the inclusion relationships between multiple text sections; for example, section 1 contains sections 2 and 3, and section 2 contains sections 4 and 5, etc. Therefore, this structured text information can accurately represent the distribution of information content in the text information to be processed.
[0110] Server 101 can input the structured text information into the outline generation model instead of the text information to be processed. This allows the outline generation model to more accurately analyze the distribution of information content in the text information to be processed based on the structured text information. Consequently, it can more accurately generate content representation information to represent multiple pieces of information and more accurately determine the inclusion relationships between these pieces of information, resulting in a highly accurate target text outline. This target text outline includes multiple content representation information and identifies the second-level relationships between these multiple content representation information. These second-level relationships represent the inclusion relationships between multiple pieces of information. For example, the target text outline can use the numbers of the content representation information to identify the second-level relationships. Content representation information 1 represents information content 1, and its corresponding number in the target text outline is 1. Content representation information 2 and content representation information 3 represent information content 2 and information content 3, respectively, and their corresponding numbers are 1.1 and 1.2, indicating that information content 1 contains information content 2 and information content 3.
[0111] Therefore, this application can pre-process the text information to be processed into chapters and structure to obtain structured text information. This structured text information is then used to replace the text information to be processed and input into the outline generation model to generate a text outline. This allows the text outline model to have a more accurate analysis of the distribution of information content in the text information to be processed, and the analysis of each piece of information content can be more comprehensive. As a result, the outline generation model can output a more accurate text outline, which helps to improve the information reading experience for the reader.
[0112] Next, the outline generation method provided in this application will be described in detail with reference to the accompanying drawings.
[0113] See Figure 2 , Figure 2 A flowchart of an outline generation method provided in this application embodiment, wherein the computer device can be any type of computer device with outline generation function, and the method includes:
[0114] S201: Identify multiple original headings included in the text information to be processed, and determine the first-level relationship between the multiple original headings.
[0115] The text information to be processed can be any type of text, such as books, articles, news articles, etc. It's understandable that text information typically consists of multiple chapters; for example, a book might be divided into Chapter 1, Chapter 2, etc. Text information within the same chapter usually corresponds to similar content, just as the same chapter in a novel often describes similar plot points. Therefore, the inclusion relationship between text chapters can, to some extent, represent the inclusion relationship between multiple pieces of information. For example, when a large text chapter includes multiple smaller text chapters, the information content corresponding to the smaller text chapters is usually a portion of the information content corresponding to the larger text chapter.
[0116] Therefore, by identifying text sections and determining the inclusion relationships between multiple text sections, the distribution of information content within the text can be accurately analyzed. Since the purpose of a text outline is to accurately and systematically represent the information content of text, the ability to accurately analyze the distribution of information content is a key factor in generating an accurate text outline. Based on this, when generating an outline for text information, computer equipment can first determine the information used to accurately represent the distribution of information content in the text, allowing the outline generation model to generate an accurate text outline based on this information. However, in related technologies, directly inputting the original text information into the model results in the model being unable to accurately analyze the distribution of information content within the text, thus failing to generate an accurate text outline.
[0117] Understandably, in text information, text chapters typically have corresponding titles. For example, each chapter in a book has the title "Chapter x". Therefore, by observing the positional distribution of titles within the text information, text chapters can be identified. For instance, text information between two titles usually corresponds to a text chapter. Furthermore, titles typically have corresponding heading levels. Heading levels indicate whether the corresponding chapter contains other chapters. For example, when a text chapter is not contained within other text chapters, its corresponding title is usually the highest-level title. Figure 1 The original heading 1; the heading corresponding to this heading is a second-level heading, which indicates that the corresponding text section is contained within other text sections. For example, in Figure 1 In this context, by examining the hierarchical relationship between original title 2 and original title 1, it can be determined that the text section corresponding to original title 2 is contained within the text section corresponding to original title 1. Based on this, to accurately identify text sections in the text information to be processed and to determine the inclusion relationship between text sections, the computer device can first identify multiple original titles in the text information to be processed and determine the first-level relationship between these original titles. The first-level relationship is used to identify whether any two original titles are hierarchical; the text section corresponding to a higher-level original title typically contains the text section corresponding to its lower-level original title. Here, an original title refers to a title inherent in the text information to be processed.
[0118] The methods for title recognition and hierarchical relationship determination can be varied, which will be described in detail below and will not be elaborated here.
[0119] S202: Based on multiple original headings and the first-level relationship, determine the structural text information corresponding to the text information to be processed.
[0120] By analyzing the distribution of the original headings within the text to be processed and their first-level relationships, computer equipment can identify multiple text sections within the text and the inclusion relationships between these sections. For example... Figure 3 As shown, original headings 1 to 3 were identified in the text information to be processed. Original headings 1 and 3 were determined to be first-level headings, and original heading 2 was determined to be a second-level heading. Since original heading 2 is located between original headings 1 and 3, it can be determined that original heading 1 corresponds to chapter 1, original heading 2 corresponds to chapter 2 contained in chapter 1, original heading 2 is a subordinate original heading of original heading 1, and original heading 3 corresponds to an independent chapter 3.
[0121] Therefore, the computer device can determine the structural text information that represents the text chapter structure in the text information to be processed based on multiple original titles and first-level relationships. The structural text information includes multiple text chapters in the text information to be processed. The structural text information is used to identify multiple text chapters and the inclusion relationship between multiple text chapters. Multiple text chapters are used to constitute the text information to be processed. That is, the computer device converts the text information to be processed as a whole into the structural text information without omitting any information content in the text information to be processed.
[0122] Multiple text sections correspond one-to-one with multiple original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text information corresponding to the original title can be determined based on the distribution of the original title in the text information to be processed, for example, in... Figure 3 In this context, by analyzing the distribution of the three original headings, we can determine the text information corresponding to each of the three original headings, thus forming the text sections corresponding to each of the three original headings. The text section corresponding to the parent original heading includes the text section corresponding to the child original heading in the first-level relationship. The target original heading can be any one of multiple original headings. For example, in... Figure 3 In this context, Original Heading 1 is the parent title of Original Heading 2. This hierarchical relationship can be determined by the heading levels corresponding to each original heading and the distribution of the original headings, which will be explained in detail below.
[0123] S203: Generate a target text outline based on structural text information using an outline generation model.
[0124] By identifying multiple text sections using structural text information, the outline generation model can determine which text information in the text to be processed corresponds to similar information content. This avoids analyzing text information representing similar information content separately, which would lead to insufficient accuracy in the analysis of information content. Furthermore, by identifying the inclusion relationships between multiple text sections using structural text information, the outline generation model can determine the inclusion relationships between multiple information contents in the text to be processed. Thus, the outline generation model can sort out and summarize the information content included in the text to be processed, extract the content representation information corresponding to each information content, and determine the second-level relationship between multiple content representation information through the inclusion relationships between multiple information contents. Finally, it generates the target text outline corresponding to the text to be processed.
[0125] The target text outline includes multiple content representation pieces of information. These pieces of information represent the various information contents included in the text to be processed. The target text outline identifies the second-level relationships between these multiple content representation pieces of information, and these second-level relationships represent the inclusion relationships between the multiple information contents. The identification methods for these second-level relationships in the target text outline can include various approaches, such as... Figure 1 In this framework, the second-level relationships between the seven content representation information items can be identified by numbering. The information represented by a higher-level content representation information includes the information represented by its corresponding lower-level content representation information in the second-level relationship. Furthermore, through this target text outline, readers can clearly understand the multiple information items within the text and their distribution. This allows readers to quickly grasp the overall text and locate specific information of interest, thus improving their reading experience.
[0126] As can be seen from the above technical solution, when generating the text outline corresponding to the text information to be processed through the outline generation model, this application does not directly input the text information to be processed into the outline generation model. Instead, it first analyzes the chapter structure in the text information to be processed and generates structural text information as the actual input of the outline generation model. This more clearly represents the text information of similar information content in the text information to be processed, as well as the relationship between multiple text chapters, improving the accuracy of the text outline generated by the outline generation model. Thus, the text outline can bring a better reading experience to the reader of the text information. On the other hand, the chapter structuring processing can be automatically achieved through original title recognition and hierarchical relationship determination, without the need for manual preprocessing. This ensures the efficiency of text outline generation. While improving the accuracy of the text outline, it does not bring additional operational pressure and waiting time to the reader, greatly ensuring the overall text reading experience of the reader.
[0127] Next, with reference to the accompanying drawings, the technical details of the outline generation method provided in this application will be described in detail.
[0128] First, we introduce how to identify and analyze the original titles in the text information to be processed, and the first-level relationship between multiple original titles.
[0129] In one possible implementation, when executing step S201, the computer device may execute steps S2011-S2012 (not shown in the figure), where steps S2011-S2012 are a possible implementation of step S201, including:
[0130] S2011: Identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles.
[0131] Computer equipment can first identify multiple original titles included in the text information to be processed through various methods, and determine the title levels corresponding to each of the original titles. These title levels are the corresponding title levels within the text information to be processed, used to indicate whether each original title has a superior or subordinate title. Specific methods will be described below and are not limited here.
[0132] S2012: Determine the first-level relationship based on the distribution of multiple original titles in the text information to be processed and the title levels corresponding to the multiple original titles.
[0133] It's understandable that hierarchical original headings are typically distributed close together in the text being processed. For example, in the reading order of the text, the next original heading after a higher-level one is usually its corresponding lower-level heading, thus forming a structure where larger chapters contain smaller chapters. Based on this, after determining the heading levels corresponding to multiple original headings, and combining this with their distribution in the text, we can accurately analyze which original headings have hierarchical relationships, thereby determining the first-level relationships among them.
[0134] Of course, besides determining hierarchical relationships by combining heading levels and distribution methods, computer devices can also directly determine hierarchical relationships in some scenarios. For example, some original headings in text information have corresponding numbers, and the hierarchical relationship can be directly represented by the numbers. For instance, the original heading numbered "1" is the parent heading of the original heading numbered "1.1".
[0135] In this application, the identification of the original title and the determination of the title level can include a variety of methods, and the following will mainly introduce two methods.
[0136] The first method: format recognition
[0137] It can be understood that the original titles in text information usually have certain title formats. For example, if the number of texts in a piece of text information is small and there are no corresponding punctuation marks, then this piece of text information is likely to be the original title. In addition, the title formats corresponding to original titles at different levels are usually also different. For example, the title level of an original title with Chinese numbering such as one, two, three in the original title is usually above the title level of an original title with pure numbering such as 1, 2, 3, and the title level of an original title with numbered brackets such as (1), (2), (3) is usually lower than the previous two. Based on this, in a possible implementation, the computer device can analyze the formats of each piece of text information in the text information to be processed to determine the original title and title level therein.
[0138] The computer device can first determine multiple title formats, and each of the multiple title formats has a corresponding title level. For example, the computer device can determine that the text information format with the number of texts less than a preset value and without punctuation marks is the title format. If it includes Chinese numbering, it is the title format corresponding to the first-level title, and if it includes pure numbering, it is the title format corresponding to the second-level title, and so on.
[0139] When performing step S2011, the computer device can execute step S20111 (not shown in the figure), and step S20111 is a possible implementation of step S2011, including:
[0140] S20111: Based on the target information in the text information to be processed meeting the target title format, determine the target information as the target original title, and determine the title level corresponding to the target title format as the title level corresponding to the target original title.
[0141] The computer device can analyze each piece of text information in the text information to be processed one by one to determine whether there is text information that meets the above multiple title formats. If the target information therein meets the target title format, it means that the target information is likely to be the original title, and the target information can be determined as the target original title. At the same time, the title level corresponding to the target identification format can be determined as the title level corresponding to the target original title. The target information can be any piece of text information in the text information to be processed, and the target title format can be any one of the multiple title formats. Through the title format, the analysis of the original title can be completed quickly and accurately. Only simple text information format matching is required, without complex text information processing, which can further improve the efficiency of outline generation.
[0142] Second: Tag analysis
[0143] Some types of text information can contain corresponding tags that can identify the original title and heading level within the text. For example, in Hyper Text Markup Language (HTML) text information, there are usually corresponding HTML tags. These HTML tags can identify the original title, and the heading level corresponding to the original title can be identified through tags such as h1 and h2 (h1 corresponds to a first-level original heading, h2 corresponds to a second-level original heading).
[0144] Based on this, in another possible implementation, the computer device can directly perform original title analysis based on the tag information in the text information to be processed. In this implementation, the text information to be processed has corresponding tag information, which is used to identify multiple original titles in the text information to be processed, and to identify the title levels corresponding to the multiple original titles. When executing step S2011, the computer device can execute step S20112 (not shown in the figure). Step S20112 is a possible implementation of step S2011, including:
[0145] S20112: Based on the tag information, identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles.
[0146] Computer equipment can directly perform original title analysis based on tag information, making full use of the information provided in the text to be processed, without having to identify the text information in the text to be processed itself, thus further improving the efficiency of original title analysis.
[0147] like Figure 4 As shown, HTML text information can be divided into multiple nodes. Each node has corresponding tag, content, and child nodes. The tag information stores h tag information, including the original title and information identifying the title level. The content information includes the text information corresponding to the original title, which can be approximated as the text section corresponding to the original title. The child node information identifies the subordinate original titles, and is empty if there are no subordinate original titles. By analyzing HTML text information, the original titles and hierarchical relationships can be quickly identified, thereby enabling rapid generation of structured text information.
[0148] Furthermore, to further improve the accuracy of the original title analysis, in one possible implementation, the computer device can also determine the original titles and hierarchical relationships through an automated model. When executing step S201, the computer device can execute step S2013 (not shown in the figure), where step S2013 is a possible implementation of step S201, including:
[0149] S2013: Determine the original title information based on the text information to be processed using a title recognition model.
[0150] The title recognition model is used to identify the original titles in the text information and determine the corresponding title levels. By analyzing the text information to be processed, the title recognition model can output original title information, which includes multiple original titles and their corresponding hierarchical relationships. These hierarchical relationships constitute the first-level relationship. For example, this hierarchical relationship information can be a number; the numbers corresponding to multiple original titles can identify the first-level relationship. For instance, original title number 1.1 is a subordinate title of original title number 1. This method leverages the model's superior information analysis capabilities to accurately analyze the original titles and title levels in the text information to be processed, further improving the accuracy of text outline generation. It also eliminates the need for manual intervention in original title analysis, thus improving the efficiency of original title analysis.
[0151] In one possible implementation, the title recognition model can be trained in the following way:
[0152] First, the computer device can acquire the first sample text information, which can be any text information. The first sample text information has corresponding original sample title information, which includes multiple original sample titles within the first sample text information, as well as the sample hierarchical relationship information corresponding to each of the multiple original sample titles. Specifically, the multiple original sample titles are the accurate original titles corresponding to the first sample text information, and the sample hierarchical relationship information is the accurate hierarchical relationship between the multiple original sample titles. In other words, this original sample title information is the analysis result obtained after performing accurate original title analysis on the first sample text information.
[0153] Then, the computer device can generate pending original title information based on the first sample text information using the initial title recognition model. This pending original title information is the analysis result of the initial title recognition model analyzing the original titles in the first sample text information, including multiple original titles determined by the initial title recognition model and the hierarchical relationship between the original titles. Therefore, the difference between the pending original title information and the sample original title information can characterize the accuracy of the initial title recognition model's analysis of the original titles in the first sample text information. The greater the difference, the lower the accuracy. The model parameters corresponding to the initial title recognition model can then be adjusted based on this difference, so that the pending original title information output by the initial title recognition model gradually approaches the sample original title information. This allows the initial title recognition model to learn how to accurately identify original titles and how to accurately determine the hierarchical relationship between original titles, thus obtaining the title recognition model. The model architecture of the initial title recognition model can include various types, as long as it can achieve the model functionality described in this application; no limitation is made here.
[0154] Understandably, when the amount of text input into the model is too large, due to model performance limitations, it may be unable to efficiently analyze the information content or comprehensively analyze the complete text information, thus increasing the difficulty of text outline extraction. Therefore, in one possible implementation, to further improve the accuracy and efficiency of text outline generation, the computer can perform multi-level processing on longer text messages to reduce the amount of text while ensuring the integrity of the information content.
[0155] When executing step S203, the computer device may execute step S2031 (not shown in the figure). Step S2031 is a possible implementation of step S203, including:
[0156] S2031: The number of texts based on structural text information does not exceed the number of baseline texts corresponding to the outline generation model. The target text outline is generated based on the structural text information through the outline generation model.
[0157] The computer device can preset a baseline text quantity, which is the maximum text quantity corresponding to the text information that the outline generation model supports for accurate outline generation. If the text quantity based on the structured text information does not exceed the baseline text quantity, it means that the outline generation model can generate a relatively accurate text outline based on the structured text information. At this time, the computer device can directly generate the target text outline based on the structured text information through the outline generation model.
[0158] The number of baseline texts can be determined in various ways. For example, it can be the maximum number of texts corresponding to the sample text information used when training the outline generation model, which is not limited here.
[0159] If the number of texts based on structured text information exceeds the baseline number, it indicates that the outline generation model may be unable to generate an accurate text outline based on the structured text information, making the analysis of the information content within the structured text information more difficult. In this case, the computer device can first identify the final-level text sections within the structured text information. Final-level text sections are text sections that do not contain any other text sections; that is, the information content corresponding to the final-level text sections is the most direct and detailed information. Therefore, under normal circumstances, the outline generation model is more accurate in analyzing this part of the information content.
[0160] Computer equipment can first use an outline generation model to generate sub-text outlines based on the final-level text chapters. These sub-text outlines represent the information content corresponding to the final-level text chapters. Because the outline generation model can accurately analyze the information content in the final-level text chapters, the sub-text outlines can accurately represent that content. Therefore, replacing the final-level text chapters in structured text information with sub-text outlines does not result in a significant loss of the information content corresponding to the final-level text chapters, thus maintaining the integrity of the information content. Furthermore, since the replaced sub-text outlines correspond to the inclusion relationships of the final-level text chapters, the inclusion relationships between text chapters in the structured text information are preserved, thereby maintaining the inclusion relationships between information content. Because the sub-text outlines are representations extracted from the final-level text chapters, their text size is usually much smaller than that of the final-level text chapters. Therefore, this method can reduce the text size of structured text information while maintaining the integrity of the information content and the accuracy of the inclusion relationships.
[0161] Furthermore, if the number of texts in the replaced structural text information does not exceed the baseline text number, the computer device can generate a target text outline based on the replaced structural text information using an outline generation model. If the number of texts still exceeds the baseline text number, the computer device can then prioritize generating and replacing outlines for the parent text chapters containing the final-level text chapters, and so on, until the number of texts in the structural text information does not exceed the baseline text number.
[0162] like Figure 5As shown, the initial structured text information contains chapters 4 through 7 as the final text sections. During the initial text reduction, outline extraction can be performed only on a subset of these final text sections. For example, extracting outlines for chapters 4 and 5 yields sub-text outlines 4 and 5, which are then replaced. If this still exceeds the baseline text count, outline extraction and text replacement are performed on the remaining final text sections. After replacing the final text sections, if the number still exceeds the baseline text count, outline extraction and text replacement can be performed on the parent text sections of these final text sections. For example, outlines for chapters 2 and 3 can be extracted, yielding sub-text outlines 2 and 3. The final structured text information only includes the replaced chapter 1, which contains sub-text outlines 2 and 3.
[0163] Next, we will introduce how to train the outline generation model described above.
[0164] The computer device can first obtain the second sample text information, which can be any text information. The second sample text information has a corresponding sample text outline, which is the accurate text outline corresponding to the second sample text information.
[0165] The sample text outline includes multiple sample content representation information. These multiple sample content representation information are used to represent the multiple sample information contents included in the second sample text information. The sample text outline is used to identify the sample hierarchy relationship between the multiple sample content representation information. The sample hierarchy relationship is used to represent the inclusion relationship between the multiple sample information contents.
[0166] Computer equipment can determine the sample structure text information corresponding to the second sample text information through the aforementioned methods. The sample structure text information includes multiple sample text sections within the second sample text information. This information is used to identify these multiple sample text sections and the inclusion relationships between them, thus accurately representing the information content distribution within the second sample text information. Therefore, if the initial outline generation model can accurately generate a text outline based on the structure text information, the text outline generated based on the sample structure text information should be quite close to the original sample text outline.
[0167] Computer equipment can generate a pending text outline based on sample structural text information using an initial outline generation model. This pending text outline is the text outline obtained by the initial outline generation model through analysis of the information content of the sample structural text information. The model architecture of the initial outline generation model can include various types, as long as it can achieve the model functionality described in this application; no limitations are imposed here.
[0168] Therefore, by analyzing the difference between the outline of the text to be generated and the outline of the sample text, the accuracy of the initial outline generation model in generating the text outline based on structural text information can be characterized. The greater the difference, the lower the accuracy. Based on this, the computer device can adjust the model parameters corresponding to the initial outline generation model according to this difference, so that the outline of the text to be generated by the initial outline generation model gradually approaches the outline of the sample text. In this way, the initial outline generation model can learn how to accurately generate text outlines based on structural text information, thus obtaining the outline generation model.
[0169] Understandably, when a model processes data, it doesn't usually produce a unique result; instead, it generates multiple results. The model then selects the optimal result based on the scores (or probabilities) of these multiple results for output. Similarly, when generating outlines using an outline generation model, the model can first identify multiple candidate text outlines. Without special processing, the model will directly output the text outline with the highest score.
[0170] In one possible implementation, to further improve the accuracy of the text outline, the computer device may not directly determine the final text outline based on model scoring. Instead, it can analyze the accuracy of multiple candidate text outlines to determine the final output text outline, thereby further improving the comprehensiveness and rationality of the text outline quality analysis and increasing the accuracy of text outline generation. When executing step S203, the computer device may execute steps S2032-S2034 (not shown in the figure). Steps S2032-S2034 are a possible implementation of step S203, including:
[0171] S2032: Generate multiple candidate text outlines based on structural text information using an outline generation model.
[0172] Among them, multiple candidate text outlines are obtained by the outline generation model through analysis of the information content of structured text information, and each outline has a certain representational function for the information content in the structured text information. Computer equipment can adjust the model architecture or model parameters to make the outline generation model output multiple generated candidate text outlines instead of a single text outline. For example, computer equipment can set higher temperature parameters and diversity parameters (TopP, TopK, etc.) for the outline generation model to enable it to output more diverse text outlines.
[0173] S2033: Determine the accuracy of each of the multiple candidate text outlines.
[0174] The target accuracy, corresponding to the target candidate text outline, is the accuracy of the representation of the information content included in the text information to be processed, based on the content representation information in the target candidate text outline. This target candidate text outline can be any one of multiple candidate text outlines. Computer devices can determine the accuracy corresponding to the candidate text outline in various ways, which will be described in detail below.
[0175] S2034: Based on the target accuracy being the highest accuracy among the accuracy values corresponding to multiple candidate text outlines, the target candidate text outline is determined as the target text outline.
[0176] Computer devices can identify the candidate text outline with the highest accuracy in representing the information content in the structured text information from multiple candidate text outlines as the final output target text outline. This can further ensure that the final output target text outline can effectively represent the information content in the structured text information, effectively avoid the problem of inaccurate output text outlines due to model errors, and further improve the accuracy of outline generation.
[0177] Specifically, in one possible implementation, a computer device can determine the accuracy of each of the multiple candidate text outlines in the following way.
[0178] When executing step S2033, the computer device may execute steps S20331-S20333 (not shown in the figure). Steps S20331-S20333 are one possible implementation of step S2033, including:
[0179] S20331: Based on the hierarchical relationship between multiple content representation information identified by the target candidate text outline, determine multiple final-level content representation information corresponding to the target candidate text outline.
[0180] Understandably, among multiple pieces of information, the textual information corresponding to the lowest-level information (i.e., information that does not contain other information) is usually more direct and detailed in its expression, containing less information. Therefore, the outline generation model can perform a more detailed analysis of the information content corresponding to this part of the textual information. This makes the analysis less difficult and more accurate when analyzing whether the content representation information used to represent the lowest-level information is accurate. At the same time, since the lowest-level information constitutes the higher-level information, the ability to accurately analyze the lowest-level information is key to accurately analyzing the higher-level information. Based on this, in this implementation, the computer device can measure the accuracy of the text outline's representation of the information content by analyzing whether the content representation information used to represent the lowest-level information is accurate.
[0181] Taking the target candidate text outline as an example, the computer device can determine multiple final-level content representation information based on the hierarchical relationship between multiple content representation information identified by the target candidate text outline. These final-level content representation information are the content representation information that does not have lower-level content representation information among the multiple content representation information included in the target candidate text outline. Since this hierarchical relationship corresponds to the inclusion relationship between information content, the information content represented by the final-level content representation information is the aforementioned final-level information content. Thus, the computer device can measure the accuracy of the text outline by analyzing the accuracy of the information representation of the final-level content representation information.
[0182] S20332: Determine the matching degree corresponding to each of the multiple final-level content representation information.
[0183] Taking a target final-level content representation among multiple final-level content representations as an example, the target matching degree corresponding to the target final-level content representation is the matching degree between the target final-level content representation and the represented information content. The target final-level content representation can be any one of multiple final-level content representations. The higher the matching degree, the higher the accuracy of the target final-level content representation in representing the represented information content. That is, the reader can understand the represented information content more accurately and efficiently through the target final-level content representation. There are various ways to determine the matching degree, which will be described in detail below and will not be elaborated here.
[0184] S20333: Determine the target accuracy based on the sum of the matching degrees corresponding to multiple end-level content representation information.
[0185] By summing the matching degrees corresponding to multiple end-level content representation information, the computer device can determine the accuracy of the target candidate text outline in representing the end-level information content. As can be seen from the above analysis, the accuracy of the representation of the end-level information content can be accurately analyzed to determine the overall representation accuracy of the text outline. Therefore, the accuracy determined by this method is relatively effective, and the target text outline determined by this accuracy can be a text outline with high accuracy.
[0186] Specifically, when determining the matching degree corresponding to multiple end-level content representation information, various matching degree determination methods can be adopted. This application mainly introduces one of these methods.
[0187] In one possible implementation, when executing step S20332, the computer device may execute steps S203321-S203323 (not shown in the figure). Steps S203321-S203323 are a possible implementation of step S20332, including:
[0188] S203321: Determine the first text segment in the structured text information that has the highest matching degree with the target's final-level content representation information.
[0189] First, the computer device can divide the structured text information into multiple text segments based on certain segmentation units. These segmentation units can include various types, such as sentence units, line units, paragraph units, etc., which are not limited here. Taking the target final-level content representation information as an example, the computer device can first analyze which text segment has the highest matching degree among the target final-level content representation information and multiple text segments. The first text segment with the highest matching degree is likely the text information corresponding to the information content represented by the target final-level content representation information.
[0190] S203322: Determine a second text segment in the structured text information whose text interval with the first text segment is less than a preset interval.
[0191] As mentioned above, text information with similar distributions in text information usually corresponds to the same information content. Therefore, a computer device can preset a preset interval to determine whether multiple text fragment values are text fragments with relatively similar distributions. If the interval between two text fragments is less than the preset interval, it can be determined that the two text fragments are relatively similar in distribution and have a high probability of corresponding to the same information content. Therefore, in order to determine the text information corresponding to the information content represented by the target final-level content representation information, the computer device can first determine the second text fragment in the structured text information whose text interval with the first text fragment is less than the preset interval. This second text fragment is likely to be text information corresponding to the same information content as the first text fragment. Under the premise that the information content corresponding to the first text fragment is likely to be the information content represented by the target final-level content representation information, the text information composed of the first text fragment and the second text fragment is highly likely to be the text information corresponding to the information content represented by the target final-level content representation information.
[0192] S203323: The matching degree between the target's final-level content representation information and the target text fragment is determined as the target matching degree.
[0193] The target text fragment consists of a first text fragment and a second text fragment. As seen from the above analysis, the target text fragment can be used to simulate the information content represented by the target's final-level content representation information within structured text information. Therefore, the matching degree between the target's final-level content representation information and the target text fragment can characterize the accuracy of the target's final-level content representation information in representing information content.
[0194] Of course, in addition to accuracy analysis based on the last-level content representation information, computer devices can also perform accuracy analysis based on content representation information at other levels using the above-mentioned matching degree calculation method. These are all technical solutions that are easy to conceive of based on this application and are not limited here.
[0195] In addition to selecting the optimal text outline by analyzing the accuracy of its representation, computer devices can also combine information from multiple other dimensions to measure the quality of the text outline, thereby improving the comprehensiveness of the text outline selection.
[0196] In one possible implementation, when executing step S2034, the computer device may execute step S20341 (not shown in the figure), where step S20341 is a possible implementation of step S2034, including:
[0197] S20341: Based on the target accuracy being the highest accuracy among the accuracy values corresponding to multiple candidate text outlines, and the target candidate text outline meeting the preset conditions, the target candidate text outline is determined as the target text outline.
[0198] Computer equipment can preset various conditions to measure the quality of a text outline. If a target candidate text outline meets the preset conditions, it indicates that the target candidate text outline is likely to have high outline quality. At the same time, due to the high accuracy of the target, the target candidate text outline is not only of high quality but also of high accuracy, thus possessing a relatively high overall quality.
[0199] The preset conditions may include any one or more combinations of the following:
[0200] Condition 1: The model prediction parameters corresponding to the target candidate text outline are greater than the preset parameters.
[0201] The model's preset parameters are predicted by the outline generation model based on structural text information. These parameters characterize the probability that the target candidate text outline is the accurate text outline corresponding to the text information to be processed. This probability represents the accuracy of the text outline analyzed by the outline generation model itself. The computer equipment can use the parameters analyzed by the model as a reference factor for the quality of the text outline. If the model's preset parameters are greater than the preset parameters, it indicates that the outline generation model considers the target candidate text outline to be an accurate text outline. Therefore, from the model's perspective, the accuracy of the target candidate text outline is high, and it can be used as the output target text outline.
[0202] Condition 2: The amount of content representation information in the target candidate text outline is greater than the preset amount.
[0203] Understandably, the more content representation information in a text outline, the more complex and detailed the information content structure represented by the outline is. This indicates a more detailed representation of the text's information content structure, with content representation information extracted for each piece of information. Conversely, if the amount of content representation information is insufficient, multiple pieces of information may be mistakenly identified as the same information for content representation information extraction. Therefore, computer equipment can preset a certain number of content representation information. If the amount of content representation information in the target candidate text outline exceeds this preset number, it indicates that the target candidate text outline represents a more detailed information content structure and thus has higher outline quality. Conversely, if the amount is less than this preset number, it indicates that the target candidate text outline's representation of the information content structure is inaccurate and its outline quality is lower.
[0204] Condition 3: The number of texts corresponding to the first N levels of content representation information in the target candidate text outline does not exceed the preset number of texts.
[0205] The first-level content representation information refers to content representation information that does not have any higher-level content representation information; that is, it is the highest-level content representation information. The Nth-level content representation information refers to content representation information that does not have any higher-level content representation information other than the first N-1 levels. For example, the third-level content representation information refers to content representation information that has no other higher-level content representation information besides the first-level and second-level content representation information. It is understandable that when the level of content representation information is higher, the represented information is more extensive. Therefore, the ability to accurately represent the core points of the information is key to measuring the quality of the content representation information. By setting a preset number of texts, the conciseness of the content representation information can be measured. If the number of texts does not exceed the preset number, it indicates a high degree of conciseness and can be considered relatively high-quality content representation information; conversely, if the number of texts exceeds the preset number, it indicates that the content representation information is too verbose, has a low degree of conciseness, and is of poor quality.
[0206] In addition to the aforementioned preset conditions, computer devices can also use various other conditions to measure the quality of a text outline, such as disallowing duplicate content representation information in the text outline, etc., which are not limited here.
[0207] For example, in a practical application scenario, such as Figure 6 As shown, computer equipment can convert each text outline into... Figure 6 The tree structure format shown is as follows: Figure 6The tree structure format includes multiple nodes, each with corresponding content representation information and the ability to record the subordinate content representation information. The connections between multiple nodes represent the hierarchical relationships between the content representation information corresponding to each node. Text outlines displayed using this tree structure format can be quickly analyzed to determine if there is duplicate content representation information and whether the outline has a reasonable format.
[0208] The above content mainly introduces how to generate outlines efficiently and accurately in the background. In addition, this application also provides a variety of methods for intelligent interaction through text outlines on the front end. Next, with reference to the attached figures, we will introduce the various interaction methods in detail.
[0209] See Figure 7 , Figure 7 This is a flowchart illustrating an interaction method provided in an embodiment of this application. In this embodiment, the computer device can be any type of computer device that supports interaction, such as a terminal device, or a combination of a terminal device and a server. The method includes:
[0210] S701: Displays the text outline interface.
[0211] The text outline interface displays the text outline corresponding to the target text information. The target text information can be any text information. The text outline includes multiple content representation information, which represent the multiple information contents included in the target text information. The text outline identifies the hierarchical relationship between the multiple content representation information, which in turn represents the inclusion relationship between the multiple information contents. Therefore, through this text outline interface, the reader can quickly understand the distribution of information content in the target text information, thereby quickly sorting out the reading logic of the text information and quickly identifying the information content they need. The text outline in this application can be automatically generated using any of the above methods.
[0212] S702: Based on the trigger operation targeting the first content representation information, display the first text interface.
[0213] To facilitate readers' quick access to text information of interest, computer devices can support interaction between readers and any content representation information within the text outline. If a reader is interested in the information represented by a first content representation, they can execute a trigger operation on that first content representation. Based on this trigger operation, the computer device will display a first text interface, which shows the text information corresponding to the information represented by the first content representation. The first content representation can be any one of multiple content representations. Thus, in this way, readers can quickly access text information of interest, optimizing their text reading experience.
[0214] It is important to emphasize that the outline interaction in this application differs significantly from the table of contents interaction in related technologies. In this application, because the information content and content representation information are matched one-to-one during outline generation, text information corresponding to the same information content will correspond to the content representation information during interaction. That is, by interacting with the content representation information, the complete text information corresponding to the information content represented by that content representation information can be directly triggered and displayed. However, text information corresponding to the same information content may not be partially located in the same chapter within the overall text information. Interacting with the table of contents can only locate a specific chapter within the text information, not the complete text information corresponding to the specific content. Therefore, text outline-based interaction provides readers with a more convenient and efficient text reading experience, improving the accuracy of text information location.
[0215] like Figure 8 As shown, after the reader performs a trigger operation on the content representation information 3, the computer device can display a first text interface, which can be used to display the text information corresponding to the information content represented by the content representation information 3.
[0216] The text outline interface can be triggered in various scenarios to facilitate convenient interaction between the reader and the text outline. The following sections will primarily introduce two triggering scenarios.
[0217] The first type: triggered while reading text information.
[0218] In one possible implementation, the computer device can support the reader triggering the display of a text outline interface while reading text information. The computer device can first display a second text interface, which is used to display the target text information; that is, the reader can read the target text information through the second text interface. The second text interface includes a first outline control, which is used to trigger the display of the text outline interface.
[0219] During the reading process, if the reader wants to view the text outline, they can perform a trigger operation on the first outline control. When executing step S701, the computer device can execute step S7011 (not shown in the figure). Step S7011 is a possible implementation of step S701, including:
[0220] S7011: Display the text outline interface based on the trigger operation of the first outline control.
[0221] like Figure 9 As shown, based on the trigger operation of the first outline control, the computer device can determine that the reader has a need to view the text outline. At this time, the computer device can display the text outline interface so that the reader can view and jump to different information content through the text outline interface. In this way, the reader can understand the overall information content structure of the text information in a timely manner while reading the text information, and can flexibly switch between text information corresponding to multiple information contents.
[0222] Furthermore, in one possible implementation, to enable the reader to clearly understand the information content corresponding to the currently read text information, the second text interface can also be used to display second content representation information. This second content representation information represents the target information content, which is the information content corresponding to the text information displayed in the second text interface within the target text information; that is, the information content corresponding to the text information currently being read by the reader. Thus, through this second content representation information, the reader can have a clearer understanding of the information content of the currently read text information. Figure 10 As shown, content representation information 6 is displayed in the upper left corner of the second text interface. This content representation information 6 is the second content representation information, which is used to represent the information content corresponding to the currently read text information.
[0223] The second method: Triggered before the text information is read.
[0224] In another possible implementation, the computer device could support the display of a text outline before the target text information has been read.
[0225] The computer device can first display an initial interface, which includes a text display control and a second outline control. The text display control can be used to trigger the display of target text information; that is, if a reader wants to read the target text information, they can perform a trigger operation on the text display control. Based on the trigger operation on the text display control, the computer device can display a second text interface, which is used to display the target text information, such as... Figure 11 As shown.
[0226] When performing step S701, the computer device may perform step S7012 (not shown in the figure). Step S7012 is a possible implementation of step S701, including:
[0227] S7012: Display the text outline interface based on the trigger operation of the second outline control.
[0228] If the reader wants to view the text outline directly, they can trigger the operation on the second outline control. The computer device will then display the text outline interface, allowing the reader to quickly understand the information content and easily navigate between different sections. Thus, the reader can understand the overall content of the text before actually reading it, enabling them to decide on their reading strategy and resulting in a better reading experience.
[0229] By combining various triggering methods for the text outline interface, computer devices enable readers to easily trigger the display of the text outline in various scenarios, improving the flexibility of readers' interaction with the text outline.
[0230] To facilitate understanding of the technical solutions provided in this application, the outline generation method provided in the embodiments of this application will be introduced in general, taking into account a practical application scenario.
[0231] See Figure 12 , Figure 12 A flowchart illustrating a method for generating an outline in a practical application scenario, provided in this application embodiment, is included.
[0232] S1201: The outline generation model and title recognition model are trained.
[0233] Among them, the outline generation model is used to generate text outlines, and the title recognition model is used to analyze the original titles and hierarchical relationships in the text information.
[0234] S1202: Obtain the text information to be processed.
[0235] The text information to be processed can be any text information that requires outline extraction.
[0236] S1203: Determine the original title and title level in the text information to be processed by format matching.
[0237] The computer equipment can first identify the original titles and determine the title levels in various ways, such as the format matching method in step S1203 or the tag analysis method in step S1204; no specific method is specified here. Then, in step S1206, the first-level relationship between multiple original titles can be determined based on the title levels and the distribution of the original titles.
[0238] S1204: Determine the original title and title level in the text information to be processed based on the label information.
[0239] S1205: Determine the relationship between the original title and the first level by using the title recognition model.
[0240] Computer devices can also directly identify the original title and the first-level relationship through the title recognition model.
[0241] S1206: Determine the first-level relationship by using the heading hierarchy and the original heading distribution method.
[0242] S1207: Determine the structural text information based on the original title and the first-level relationship.
[0243] Computer devices can analyze the text chapters and the inclusion relationships between text chapters in the text information to be processed based on the original title and the first-level relationship, and obtain structural text information to represent the chapter structure.
[0244] S1208: Determine whether the number of texts in the structured text information exceeds the baseline number of texts.
[0245] If the number of texts does not exceed the limit, step S1210 can be executed directly to input the structural text information into the outline generation model to generate candidate text outlines; if the number of texts exceeds the limit, step S1209 can be executed to extract and replace the outlines of the last-level text chapters in order to reduce the number of texts in the structural text information while ensuring that the information content is relatively complete.
[0246] S1209: Extract outlines and replace text in the final-level text chapters.
[0247] S1210: Generate multiple candidate text outlines based on structural text information using an outline generation model.
[0248] S1211: Determine the target text outline by considering the accuracy and preset conditions corresponding to multiple candidate text outlines.
[0249] Computer equipment can combine accuracy and multiple preset conditions to comprehensively analyze the outline quality of multiple candidate text outlines, thereby selecting the text outline with the highest overall quality as the final output target text outline to assist the reader in reading the text information to be processed.
[0250] As can be seen from the above solution, the outline generation method provided in this application has the following technical advantages compared with related technologies:
[0251] 1. This application can first perform structured text processing on the text information to be processed to obtain structured text information used to represent the chapter structure, so that the outline generation model can more accurately analyze the information content distribution in the text information to be processed, and thus generate a more accurate text outline.
[0252] 2. This application can perform structured text processing in multiple ways, ensuring the accuracy and efficiency of text processing.
[0253] 3. This application can analyze the number of texts in structural text information. When the number of texts exceeds the baseline number of texts corresponding to the model, the number of texts can be reduced by prioritizing the extraction of outlines from some text information, thereby ensuring the integrity of the information content and thus ensuring the stability and accuracy of the outline generation model in generating outlines.
[0254] 4. This application can first generate multiple candidate text outlines, and then comprehensively evaluate the quality of the text outlines through accuracy analysis and multiple preset conditions, so as to improve the quality of the final output text outline.
[0255] Based on the outline generation method provided in the above embodiments, this application also provides an outline generation apparatus, see [link to apparatus]. Figure 13 , Figure 13 This application provides a structural block diagram of an outline generation device 1300, which includes an identification unit 1301, a first determination unit 1302, and a first generation unit 1303.
[0256] The identification unit 1301 is used to identify multiple original titles included in the text information to be processed, and to determine the first hierarchical relationship between the multiple original titles;
[0257] The first determining unit 1302 is configured to determine the structural text information corresponding to the text information to be processed based on the plurality of original titles and the first hierarchical relationship. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles.
[0258] The first generation unit 1303 is used to generate a target text outline based on the structured text information using an outline generation model. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify the second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
[0259] In one possible implementation, the identification unit 1301 is specifically used for:
[0260] Identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles;
[0261] The first hierarchical relationship is determined based on the distribution of the multiple original titles in the text information to be processed and the title hierarchy corresponding to the multiple original titles.
[0262] In one possible implementation, the device further includes a second determining unit:
[0263] The second determining unit is used to determine multiple heading formats, wherein the multiple heading formats have corresponding heading levels;
[0264] The identification unit 1301 is specifically used for:
[0265] Based on the fact that the target information in the text information to be processed meets the target title format, the target information is determined as the target original title, and the title level corresponding to the target title format is determined as the title level corresponding to the target original title. The target information is any text information in the text information to be processed, and the target title format is any one of the multiple title formats.
[0266] In one possible implementation, the text information to be processed has corresponding tag information, which is used to identify multiple original titles in the text information to be processed, and to identify the title levels corresponding to the multiple original titles respectively. The identification unit 1301 is specifically used for:
[0267] Based on the tag information, identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles.
[0268] In one possible implementation, the identification unit 1301 is specifically used for:
[0269] The original title information is determined based on the text information to be processed using a title recognition model. The original title information includes multiple original titles and hierarchical relationship information corresponding to each of the multiple original titles. The hierarchical relationship information corresponding to each of the multiple original titles is used to constitute the first hierarchical relationship.
[0270] In one possible implementation, the device further includes a first acquisition unit, a second generation unit, and a first adjustment unit:
[0271] The first acquisition unit is used to acquire first sample text information, the first sample text information having corresponding sample original title information, the sample original title information including multiple sample original titles in the first sample text information, and sample hierarchical relationship information corresponding to the multiple sample original titles respectively;
[0272] The second generation unit is used to generate undetermined original title information based on the first sample text information using an initial title recognition model;
[0273] The first adjustment unit is used to adjust the model parameters corresponding to the initial title recognition model according to the difference between the original title information to be determined and the original title information of the sample, so as to obtain the title recognition model.
[0274] In one possible implementation, the first generating unit 1303 is specifically used for:
[0275] The number of texts based on the structural text information does not exceed the baseline number of texts corresponding to the outline generation model. The target text outline is generated based on the structural text information through the outline generation model.
[0276] The device further includes a third determining unit, a third generating unit, a replacement unit, and a fourth generating unit:
[0277] The third determining unit is used to determine the final-level text chapter in the structural text information based on the fact that the number of texts in the structural text information exceeds the baseline number of texts. The final-level text chapter is a text chapter that does not contain any text chapters among the plurality of text chapters.
[0278] The third generation unit is used to generate a sub-text outline based on the final-level text chapter using the outline generation model. The sub-text outline is used to represent the information content corresponding to the final-level text chapter.
[0279] The replacement unit is used to replace the final-level text chapter in the structured text information with the sub-text outline;
[0280] The fourth generation unit is used to generate the target text outline based on the replaced structural text information, using the outline generation model, based on the premise that the number of texts in the replaced structural text information does not exceed the baseline text number.
[0281] In one possible implementation, the device further includes a second acquisition unit, a fourth determination unit, a fifth generation unit, and a second adjustment unit:
[0282] The second acquisition unit is used to acquire second sample text information. The second sample text information has a corresponding sample text outline. The sample text outline includes multiple sample content representation information. The multiple sample content representation information is used to represent multiple sample information contents included in the second sample text information. The sample text outline is used to identify the sample hierarchy relationship between the multiple sample content representation information. The sample hierarchy relationship is used to represent the inclusion relationship between the multiple sample information contents.
[0283] The fourth determining unit is used to determine the sample structure text information corresponding to the second sample text information. The sample structure text information includes multiple sample text sections in the second sample text information. The sample structure text information is used to identify the multiple sample text sections and to identify the inclusion relationship between the multiple sample text sections.
[0284] The fifth generation unit is used to generate a text outline to be determined based on the sample structure text information through the initial outline generation model.
[0285] The second adjustment unit is used to adjust the model parameters corresponding to the initial outline generation model according to the difference between the text outline to be determined and the sample text outline, so as to obtain the outline generation model.
[0286] In one possible implementation, the first generating unit 1303 is specifically used for:
[0287] Multiple candidate text outlines are generated based on the structured text information using the outline generation model.
[0288] Determine the accuracy corresponding to each of the plurality of candidate text outlines. The target accuracy corresponding to the target candidate text outline is the accuracy of the content representation information in the target candidate text outline in representing the information content included in the text information to be processed. The target candidate text outline is any one of the plurality of candidate text outlines.
[0289] Based on the target accuracy being the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, the target candidate text outline is determined as the target text outline.
[0290] In one possible implementation, the first generating unit 1303 is specifically used for:
[0291] Based on the hierarchical relationship between multiple content representation information identified by the target candidate text outline, multiple final-level content representation information corresponding to the target candidate text outline is determined. The multiple final-level content representation information are the content representation information that does not have lower-level content representation information among the multiple content representation information included in the target candidate text outline.
[0292] Determine the matching degree corresponding to each of the plurality of final-level content representation information, wherein the target matching degree corresponding to the target final-level content representation information is the matching degree between the target final-level content representation information and the represented information content, and the target final-level content representation information is any one of the plurality of final-level content representation information;
[0293] The target accuracy is determined by summing the matching degrees corresponding to the multiple end-level content representation information.
[0294] In one possible implementation, the first generating unit 1303 is specifically used for:
[0295] Determine the first text segment in the structured text information that has the highest matching degree with the target's final-level content representation information;
[0296] Identify a second text segment in the structured text information whose text interval with the first text segment is less than a preset interval;
[0297] The matching degree between the target final-level content representation information and the target text fragment is determined as the target matching degree. The target text fragment is composed of the first text fragment and the second text fragment. The target text fragment is used to simulate the information content represented by the target final-level content representation information in the structured text information.
[0298] In one possible implementation, the first generating unit 1303 is specifically used for:
[0299] Based on the fact that the target accuracy is the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, and the target candidate text outline meets the preset conditions, the target candidate text outline is determined as the target text outline;
[0300] The preset conditions include any one or more combinations of the following:
[0301] The model prediction parameters corresponding to the target candidate text outline are greater than the preset parameters. The preset parameters are the parameters predicted by the outline generation model based on the structural text information, which are used to characterize the probability that the target candidate text outline is the accurate text outline corresponding to the text information to be processed.
[0302] The number of content representation information in the target candidate text outline is greater than the preset number;
[0303] The number of texts corresponding to the first N levels of content representation information in the target candidate text outline does not exceed the preset number of texts. The first level of content representation information is content representation information that does not have higher-level content representation information, and the N-level content representation information is content representation information that does not have higher-level content representation information except for the first N-1 levels of content representation information.
[0304] Based on the interaction method provided in the above embodiments, this application also provides an interaction device, see [link to related document]. Figure 14 , Figure 14 This is a structural block diagram of an interactive device provided in an embodiment of this application. The device 1400 includes a first display unit 1401 and a second display unit 1402.
[0305] The first display unit 1401 is used to display a text outline interface. The text outline interface is used to display a text outline corresponding to the target text information. The text outline includes multiple content representation information. The multiple content representation information is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information. The hierarchical relationship is used to represent the inclusion relationship between the multiple information contents.
[0306] The second display unit 1402 is used to display a first text interface based on a trigger operation on the first content representation information. The first text interface is used to display text information corresponding to the information content represented by the first content representation information. The first content representation information is any one of the plurality of content representation information.
[0307] In one possible implementation, the device further includes a third display unit:
[0308] The third display unit is used to display a second text interface, which is used to display the target text information. The second text interface includes a first outline control.
[0309] The first display unit 1401 is specifically used for:
[0310] Based on the triggered operation of the first outline control, the text outline interface is displayed.
[0311] In one possible implementation, the second text interface is further used to display second content representation information, which represents target information content, wherein the target information content is the information content corresponding to the text information that is displayed in the second text interface.
[0312] In one possible implementation, the device further includes a fourth display unit and a fifth display unit:
[0313] The fourth display unit is used to display the initial interface, which includes a text display control and a second outline control.
[0314] The fifth display unit is used to display a second text interface based on a trigger operation on the text display control, and the second text interface is used to display the target text information;
[0315] The first display unit 1401 is specifically used for:
[0316] Based on the triggered operation of the second outline control, the text outline interface is displayed.
[0317] This application also provides a computer device; please refer to [link to relevant documentation]. Figure 15 As shown, the computer device can be a terminal device; for example, a mobile phone can be used as a terminal device.
[0318] Figure 15 This diagram illustrates a partial structural representation of a mobile phone related to the terminal device provided in this embodiment. (Reference) Figure 15 The mobile phone includes components such as a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless Fidelity (WiFi) module 770, a processor 780, and a power supply 790. Those skilled in the art will understand that... Figure 15 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0319] The following is combined with Figure 15 A detailed introduction to each component of a mobile phone:
[0320] RF circuit 710 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 780; additionally, it transmits uplink data to the base station. Typically, RF circuit 710 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), and a duplexer. Furthermore, RF circuit 710 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0321] The memory 720 can be used to store software programs and modules. The processor 780 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0322] The input unit 730 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 731), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 780, and can also receive and execute commands sent by the processor 780. In addition, the touch panel 731 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 731, the input unit 730 may also include other input devices 732. Specifically, other input devices 732 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0323] The display unit 740 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 740 may include a display panel 741, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel. Further, a touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it transmits the information to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides corresponding visual output on the display panel 741 based on the type of touch event. Although in Figure 15 In this embodiment, the touch panel 731 and the display panel 741 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.
[0324] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 741 according to the ambient light level, and the proximity sensor can turn off the display panel 741 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0325] Audio circuit 760, speaker 761, and microphone 762 provide an audio interface between the user and the mobile phone. Audio circuit 760 converts received audio data into electrical signals and transmits them to speaker 761, where speaker 761 converts them into sound signals for output. On the other hand, microphone 762 converts collected sound signals into electrical signals, which are received by audio circuit 760, converted into audio data, and then processed by processor 780 before being transmitted via RF circuit 710 to, for example, another mobile phone, or the audio data can be output to memory 720 for further processing.
[0326] WiFi is a short-range wireless transmission technology. Through the WiFi module 770, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 15 The WiFi module 770 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0327] The processor 780 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 720, and calls data stored in the memory 720 to perform various functions and process data, thereby performing overall detection of the phone. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 780.
[0328] The mobile phone also includes a power supply 790 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0329] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0330] In this embodiment, the processor 780 included in the terminal device also has the following functions:
[0331] Identify multiple original titles included in the text information to be processed, and determine the first hierarchical relationship between the multiple original titles;
[0332] Based on the plurality of original titles and the first hierarchical relationship, structural text information corresponding to the text information to be processed is determined. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles.
[0333] The outline generation model generates a target text outline based on the structured text information. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify the second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
[0334] In this embodiment, the processor 780 included in the terminal device also has the following functions:
[0335] A text outline interface is displayed, which is used to display the text outline corresponding to the target text information. The text outline includes multiple content representation information, which is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information, and the hierarchical relationship is used to represent the inclusion relationship between the multiple information contents.
[0336] Based on the trigger operation of the first content representation information, a first text interface is displayed. The first text interface is used to display the text information corresponding to the information content represented by the first content representation information. The first content representation information is any one of the plurality of content representation information.
[0337] This application also provides a server; please refer to [link / reference]. Figure 16 As shown, Figure 16 This is a structural diagram of a server 800 provided in an embodiment of this application. The server 800 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 822 (e.g., one or more processors) and a memory 832, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 842 or data 844. The memory 832 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 822 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the server 800.
[0338] Server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input / output interfaces 858, and / or one or more operating systems 841, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0339] The steps performed by the server in the above embodiments can be based on Figure 16 The server structure shown.
[0340] This application also provides a computer-readable storage medium for storing a computer program that executes any one of the outline generation methods or interactive methods described in the foregoing embodiments.
[0341] This application also provides a computer program product including a computer program, which, when run on a computer device, causes the computer device to execute any of the outline generation methods or interactive methods described in the above embodiments.
[0342] It is understood that in the specific embodiments of this application, data related to user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0343] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0344] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0345] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating an outline, characterized in that, The method includes: Identify multiple original titles included in the text information to be processed, and determine the first hierarchical relationship between the multiple original titles; Based on the plurality of original titles and the first hierarchical relationship, structural text information corresponding to the text information to be processed is determined. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles. The outline generation model generates a target text outline based on the structured text information. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify the second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
2. The method according to claim 1, characterized in that, The process of identifying multiple original titles included in the text information to be processed, and determining the first-level relationship between the multiple original titles, includes: Identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles; The first hierarchical relationship is determined based on the distribution of the multiple original titles in the text information to be processed and the title hierarchy corresponding to the multiple original titles.
3. The method according to claim 2, characterized in that, The method further includes: Multiple heading formats are defined, and each heading format has a corresponding heading level. The process of identifying multiple original titles included in the text information to be processed, and determining the title level corresponding to each of the multiple original titles, includes: Based on the fact that the target information in the text information to be processed meets the target title format, the target information is determined as the target original title, and the title level corresponding to the target title format is determined as the title level corresponding to the target original title. The target information is any text information in the text information to be processed, and the target title format is any one of the multiple title formats.
4. The method according to claim 2, characterized in that, The text information to be processed has corresponding tag information, which is used to identify multiple original titles in the text information to be processed, and to identify the title levels corresponding to the multiple original titles respectively. The process of identifying the multiple original titles included in the text information to be processed, and determining the title levels corresponding to the multiple original titles respectively, includes: Based on the tag information, identify multiple original titles included in the text information to be processed, and determine the title level corresponding to each of the multiple original titles.
5. The method according to claim 1, characterized in that, The process of identifying multiple original titles included in the text information to be processed, and determining the first-level relationship between the multiple original titles, includes: The original title information is determined based on the text information to be processed using a title recognition model. The original title information includes multiple original titles and hierarchical relationship information corresponding to each of the multiple original titles. The hierarchical relationship information corresponding to each of the multiple original titles is used to constitute the first hierarchical relationship.
6. The method according to claim 5, characterized in that, The method further includes: Obtain first sample text information, the first sample text information having corresponding original sample title information, the original sample title information including multiple original sample titles in the first sample text information, and sample hierarchical relationship information corresponding to the multiple original sample titles respectively; Using the initial title recognition model, undetermined original title information is generated based on the text information of the first sample. Based on the difference between the undetermined original title information and the sample original title information, the model parameters corresponding to the initial title recognition model are adjusted to obtain the title recognition model.
7. The method according to claim 1, characterized in that, The process of generating a target text outline based on the structured text information using an outline generation model includes: The number of texts based on the structural text information does not exceed the baseline number of texts corresponding to the outline generation model. The target text outline is generated based on the structural text information through the outline generation model. The method further includes: Based on the fact that the number of texts in the structured text information exceeds the baseline number of texts, the final-level text chapter in the structured text information is determined. The final-level text chapter is a text chapter that does not contain any text chapters among the plurality of text chapters. The outline generation model generates a sub-text outline based on the final-level text chapter, and the sub-text outline is used to represent the information content corresponding to the final-level text chapter. Replace the final-level text chapter in the structured text information with the sub-text outline; Based on the premise that the number of texts in the replaced structural text information does not exceed the number of reference texts, the target text outline is generated using the outline generation model according to the replaced structural text information.
8. The method according to claim 1, characterized in that, The method further includes: Obtain second sample text information, which has a corresponding sample text outline. The sample text outline includes multiple sample content representation information, which is used to represent multiple sample information contents included in the second sample text information. The sample text outline is used to identify the sample hierarchy relationship between the multiple sample content representation information, and the sample hierarchy relationship is used to represent the inclusion relationship between the multiple sample information contents. Determine the sample structure text information corresponding to the second sample text information. The sample structure text information includes multiple sample text sections in the second sample text information. The sample structure text information is used to identify the multiple sample text sections and to identify the inclusion relationship between the multiple sample text sections. The initial outline generation model generates a text outline to be determined based on the sample structure text information. Based on the difference between the undetermined text outline and the sample text outline, the model parameters corresponding to the initial outline generation model are adjusted to obtain the outline generation model.
9. The method according to claim 1, characterized in that, The process of generating a target text outline based on the structured text information using an outline generation model includes: Multiple candidate text outlines are generated based on the structured text information using the outline generation model. Determine the accuracy corresponding to each of the plurality of candidate text outlines. The target accuracy corresponding to the target candidate text outline is the accuracy of the content representation information in the target candidate text outline in representing the information content included in the text information to be processed. The target candidate text outline is any one of the plurality of candidate text outlines. Based on the target accuracy being the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, the target candidate text outline is determined as the target text outline.
10. The method according to claim 9, characterized in that, Determining the accuracy of each of the multiple candidate text outlines includes: Based on the hierarchical relationship between multiple content representation information identified by the target candidate text outline, multiple final-level content representation information corresponding to the target candidate text outline is determined. The multiple final-level content representation information are the content representation information that does not have lower-level content representation information among the multiple content representation information included in the target candidate text outline. Determine the matching degree corresponding to each of the plurality of final-level content representation information, wherein the target matching degree corresponding to the target final-level content representation information is the matching degree between the target final-level content representation information and the represented information content, and the target final-level content representation information is any one of the plurality of final-level content representation information; The target accuracy is determined by summing the matching degrees corresponding to the multiple end-level content representation information.
11. The method according to claim 10, characterized in that, Determining the matching degree corresponding to each of the plurality of final-level content representation information includes: Determine the first text segment in the structured text information that has the highest matching degree with the target's final-level content representation information; Identify a second text segment in the structured text information whose text interval with the first text segment is less than a preset interval; The matching degree between the target final-level content representation information and the target text fragment is determined as the target matching degree. The target text fragment is composed of the first text fragment and the second text fragment. The target text fragment is used to simulate the information content represented by the target final-level content representation information in the structured text information.
12. The method according to claim 9, characterized in that, The step of determining the target candidate text outline as the target text outline based on the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines includes: Based on the fact that the target accuracy is the highest accuracy among the accuracy values corresponding to the plurality of candidate text outlines, and the target candidate text outline meets the preset conditions, the target candidate text outline is determined as the target text outline; The preset conditions include any one or more combinations of the following: The model prediction parameters corresponding to the target candidate text outline are greater than the preset parameters. The preset parameters are the parameters predicted by the outline generation model based on the structural text information, which are used to characterize the probability that the target candidate text outline is the accurate text outline corresponding to the text information to be processed. The number of content representation information in the target candidate text outline is greater than the preset number; The number of texts corresponding to the first N levels of content representation information in the target candidate text outline does not exceed the preset number of texts. The first level of content representation information is content representation information that does not have higher-level content representation information, and the N-level content representation information is content representation information that does not have higher-level content representation information except for the first N-1 levels of content representation information.
13. An interaction method, characterized in that, The method includes: A text outline interface is displayed, which is used to display the text outline corresponding to the target text information. The text outline includes multiple content representation information, which is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information, and the hierarchical relationship is used to represent the inclusion relationship between the multiple information contents. Based on the trigger operation of the first content representation information, a first text interface is displayed. The first text interface is used to display the text information corresponding to the information content represented by the first content representation information. The first content representation information is any one of the plurality of content representation information.
14. The method according to claim 13, characterized in that, The method further includes: A second text interface is displayed, which is used to display the target text information. The second text interface includes a first outline control. The interface for displaying the text outline includes: Based on the triggered operation of the first outline control, the text outline interface is displayed.
15. The method according to claim 13, characterized in that, The method further includes: Display an initial interface, which includes a text display control and a second outline control; Based on the trigger operation of the text display control, a second text interface is displayed, which is used to display the target text information; The interface for displaying the text outline includes: Based on the triggered operation of the second outline control, the text outline interface is displayed.
16. An outline generation device, characterized in that, The device includes an identification unit, a first determination unit, and a first generation unit: The identification unit is used to identify multiple original titles included in the text information to be processed, and to determine a first hierarchical relationship between the multiple original titles; The first determining unit is configured to determine the structural text information corresponding to the text information to be processed based on the plurality of original titles and the first hierarchical relationship. The structural text information includes a plurality of text sections in the text information to be processed. The structural text information is used to identify the plurality of text sections and to identify the inclusion relationship between the plurality of text sections. The plurality of text sections are used to constitute the text information to be processed. The plurality of text sections correspond one-to-one with the plurality of original titles. The target text section corresponding to the target original title is the text information corresponding to the target original title in the text information to be processed. The text section corresponding to the superior original title includes the text section corresponding to the subordinate original title corresponding to the superior original title in the first hierarchical relationship. The target original title is any one of the plurality of original titles. The first generation unit is used to generate a target text outline based on the structured text information using an outline generation model. The target text outline includes multiple content representation information, which are used to represent multiple information contents included in the text information to be processed. The target text outline is used to identify a second-level relationship between the multiple content representation information, which is used to represent the inclusion relationship between the multiple information contents.
17. An interactive device, characterized in that, The device includes a first display unit and a second display unit: The first display unit is used to display a text outline interface, which is used to display a text outline corresponding to the target text information. The text outline includes multiple content representation information, which is used to represent multiple information contents included in the target text information. The text outline is used to identify the hierarchical relationship between the multiple content representation information, and the hierarchical relationship is used to represent the inclusion relationship between the multiple information contents. The second display unit is used to display a first text interface based on a trigger operation on the first content representation information. The first text interface is used to display text information corresponding to the information content represented by the first content representation information, where the first content representation information is any one of the plurality of content representation information.
18. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs and to transfer the computer programs to the processor; The processor is configured to execute the outline generation method according to any one of claims 1-12, or the interaction method according to any one of claims 13-15, based on instructions in the computer program.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for executing the outline generation method according to any one of claims 1-12, or for executing the interactive method according to any one of claims 13-15.
20. A computer program product comprising a computer program, which, when run on a computer device, causes the computer device to perform the outline generation method of any one of claims 1-12, or the interaction method of any one of claims 13-15.