Text association method and device, page display method and device, electronic equipment and storage medium
By associating outline items with semantically similar original sentences in electronic documents, the problem of users manually flipping through pages to find the main idea of the content is solved, enabling quick and accurate location of the main idea of the target electronic document, thus improving reading efficiency and user experience.
Patent Information
- Application Number
- CN202410583807.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2025-11-11
AI Technical Summary
When reading electronic documents, users need to manually flip through pages to find the main content of the outline items, which takes a long time.
By obtaining the semantic similarity of the target electronic document, the semantic similarity between the outline item and the original text sentence is determined. Based on the location information, the target sentence is selected for the outline item in the electronic document and associated with it, ensuring the consistency of semantic similarity and position order, so as to quickly locate the main idea of the content.
It enables quick and accurate location of the original text content of outline items, shortening the location time and improving reading efficiency and user experience.
Smart Images

Figure CN120930591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a text association and page display method, apparatus, electronic device, and storage medium. Background Technology
[0002] A document outline is a way to efficiently organize and structure document content, aiming to maintain a clear and coherent structure while helping readers quickly grasp the core content. However, when reading electronic documents, users need to manually turn pages to find the original text of the outline items, which takes a considerable amount of time. Summary of the Invention
[0003] In view of this, embodiments of this application propose a text association, page display method, apparatus, electronic device, and storage medium.
[0004] In a first aspect, embodiments of this application provide a text association method, the method comprising: obtaining a target electronic document and a target outline of the target electronic document, the target outline including multiple outline items; the target electronic document including multiple original text statements; determining the semantic similarity between each outline item and each original text statement in the target electronic document; determining a target statement for each outline item in the multiple original text statements based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document; the relative order of the target statements corresponding to the multiple outline items in the target electronic document being consistent with the relative order of the multiple outline items in the target outline; the semantic similarity between the target statement and the corresponding outline item being not lower than a similarity threshold; associating the target statement with the corresponding outline item; the target statement associated with an outline item being used to locate the original text content in the target electronic document whose main content is the outline item.
[0005] Secondly, embodiments of this application provide a page display method, the method comprising: displaying an outline page of a target electronic document, the outline page including at least one outline item in the target outline of the target electronic document, the at least one outline item including a first outline item; in response to a triggering operation on the first outline item in the outline page, displaying a first original text page of the target electronic document containing a target statement associated with the first outline item; the target statement associated with each outline item is determined according to the text association method of the first aspect described above.
[0006] Thirdly, embodiments of this application provide a text association device, comprising: an acquisition module for acquiring a target electronic document and a target outline of the target electronic document, the target outline including multiple outline items; the target electronic document including multiple original text statements; a first determination module for determining the semantic similarity between each outline item and each original text statement in the target electronic document; a second determination module for determining a target statement for each outline item in the multiple original text statements based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document; the relative order of the target statements corresponding to the multiple outline items in the target electronic document is consistent with the relative order of the multiple outline items in the target outline; the semantic similarity between the target statement and the corresponding outline item is not lower than a similarity threshold; and an association module for associating the target statement with the corresponding outline item; the target statement associated with an outline item is used to locate the original text content in the target electronic document whose main content is the outline item.
[0007] Optionally, the second determining module is further configured to: sort multiple outline items according to their position information in the target outline, in order of priority within the target outline, to obtain a first sort; determine a candidate original text statement for each outline item from multiple original text statements based on semantic similarity; ensure that the semantic similarity between each candidate original text statement and its corresponding outline item is not lower than a similarity threshold; sort multiple candidate original text statements according to their position information in the target electronic document, in order of priority within the target electronic document, to obtain a second sort; traverse multiple outline items according to the first sort; if the current outline item's index in the first sort is the same as the candidate original text statement's index in the second sort, use the candidate original text statement corresponding to the current outline item as the target statement corresponding to the current outline item; and traverse the next outline item in the first sort until the last outline item in the first sort is reached.
[0008] Optionally, the second determining module is further configured to: if the sequence number of the current outline item in the first sorting is different from the sequence number of the candidate original text statement corresponding to the current outline item in the second sorting, re-determine a new candidate original text statement for the current outline item from the original text statements other than the candidate original text statement corresponding to the current outline item; the semantic similarity between the new candidate original text statement and the current outline item is not lower than the similarity threshold, and the new candidate original text statement is located after the target statement corresponding to the previously traversed outline item in the target electronic document; re-determine a new candidate original text statement for the current outline item as the target statement corresponding to the current outline item; traverse the next outline item of the current outline item in the first sorting until the last outline item in the first sorting is reached.
[0009] Optionally, the second determining module is also used to determine, based on semantic similarity, the original text statement with the highest semantic similarity to the outline item among multiple original text statements for each outline item, and to use it as the candidate original text statement corresponding to the outline item.
[0010] Optionally, the second determining module is used to sort multiple outline items according to their position information in the target outline, in order of priority, to obtain a first sort; for the i-th outline item in the first sort, if i=1, the original text statement with the highest semantic similarity to the i-th outline item among the multiple original text statements is taken as the target statement corresponding to the i-th outline item; i is an integer, and i≤N, where N is the total number of outline items in the target outline; if i is greater than 1, the target statement is determined from the multiple candidate statements in the target electronic document according to the position information of each candidate statement among the multiple candidate statements. The candidate statement at the very beginning of the electronic document is taken as the target statement corresponding to the i-th outline item. A candidate statement is a statement in the original text that is located after the target statement corresponding to the (i-1)-th outline item in the target electronic document and has a semantic similarity to the i-th outline item that is not lower than the similarity threshold. Increment i by 1 and return to the execution step if i is greater than 1. Based on the position information of each candidate statement in the target electronic document, determine the candidate statement at the very beginning of the target electronic document as the target statement corresponding to the i-th outline item, until i = N.
[0011] Optionally, the first determining module is further configured to determine the word segmentation relevance of each key word in the outline item in the target electronic document for each outline item; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; the importance of each key word relative to the target original text sentence is determined based on the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of multiple original text sentences; the semantic similarity between the outline item and the target original text sentence is determined based on the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word.
[0012] Optionally, the first determining module is further configured to, for each outline item, determine the word segmentation relevance of each key word in the target electronic document; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; based on the frequency of each key word in the target original text sentence, determine the importance of each key word relative to the target original text sentence; wherein, the target original text sentence is any one of multiple original text sentences; based on the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word, determine the first semantic similarity between the outline item and the target original text sentence; if the first semantic similarity is not less than the sentence similarity threshold, obtain the first semantic similarity as the semantic similarity between the outline item and the target original text sentence; if the first semantic similarity is less than the sentence similarity threshold, determine the longest common subsequence between the outline item and the target original text sentence; based on the longest common subsequence, the outline item, and the original text sentence, determine the semantic similarity between the outline item and the target original text sentence.
[0013] Optionally, the association module is also used to associate and store the location information of the target statement in the target electronic document with the corresponding outline item.
[0014] Fourthly, embodiments of this application provide a page display device, comprising: a display module for displaying an outline page of a target electronic document, the outline page including at least one outline item in the target outline of the target electronic document, the at least one outline item including a first outline item; and a response module for displaying a first original text page of the target electronic document containing a target statement associated with the first outline item in response to a trigger operation on the outline page; wherein the target statement associated with each outline item is determined according to the text association method of the first aspect described above.
[0015] Optionally, the first original page includes an outline return control; the response module is also used to respond to the triggering operation of the outline return control and return to display the outline page of the target electronic document.
[0016] Optionally, the first original page includes a next outline item jump control; the response module is also used to respond to the triggering operation of the next outline item jump control and display the second original page where the target statement associated with the second outline item is located in the target electronic document; the second outline item refers to the next outline item of the first outline item in the target outline.
[0017] Optionally, the first original page includes a jump control to the previous outline item; the response module is also used to respond to the triggering operation of the jump control to the previous outline item and display the third original page in the target electronic document where the target statement associated with the third outline item is located; the third outline item refers to the outline item preceding the first outline item in the target outline.
[0018] Optionally, the first original page displays the first outline item; the response module is further configured to respond to a page-turning operation triggered on the first original page by displaying a fourth original page, wherein the original content displayed on the fourth original page is the content of the next page of the original content displayed on the first original page in the target electronic document; if the original content displayed on the fourth original page does not include the target statement associated with the second outline item, the first outline item is displayed on the fourth original page; if the original content displayed on the fourth original page includes the target statement associated with the second outline item, the second outline item is displayed on the fourth original page; the second outline item refers to the next outline item in the target outline after the first outline item.
[0019] Optionally, the first original page displays the first outline item; the response module is further configured to respond to a page-back operation triggered on the first original page by displaying the fifth original page, wherein the original content presented on the fifth original page is the content of the previous page of the original content displayed on the first original page in the target electronic document; if the original content displayed on the fifth original page does not include the target statement associated with the third outline item, the first outline item is displayed on the fifth original page; if the original content displayed on the fifth original page includes the target statement associated with the third outline item, the third outline item is displayed on the fifth original page; the third outline item refers to the outline item preceding the first outline item in the target outline.
[0020] Optionally, the display module is also used to display a summary page of the target electronic document; the summary page includes an outline control; in response to a triggering operation on the outline control in the summary page, the outline page of the target electronic document is displayed.
[0021] Optionally, the display module is further configured to display a first standard reading page of the target electronic document, wherein the first standard reading page displays the original text content of one page of the target electronic document; the first standard reading page includes a table of contents control; in response to a trigger operation of the table of contents control in the first standard reading page, a table of contents page is displayed, wherein the table of contents page displays the table of contents of the target electronic document, and the table of contents page also includes an outline switching control; in response to a trigger operation of the outline switching control in the table of contents page, an outline page of the target electronic document is displayed.
[0022] Optionally, the first original text page displays the first outline item; the response module is further configured to respond to a close operation triggered by the first outline item displayed on the first original text page, and display a second standard reading page of the target electronic document, wherein the original text content displayed on the second standard reading page is the same as the original text content displayed on the first original text page, the second standard reading page has different controls from the first original text page, and the first outline item is not displayed on the second standard reading page.
[0023] Fifthly, embodiments of this application provide an electronic device, including a processor and a memory; the memory stores computer instructions, which, when executed by the processor, implement the aforementioned method.
[0024] Sixthly, embodiments of this application provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the above-described method.
[0025] In a seventh aspect, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the method described above.
[0026] This application provides a text association and page display method, device, electronic device, storage medium, and computer program product. In this application, based on the semantic similarity between each major outline item in the target outline and each original text statement in the target electronic document, the position information of each major outline item in the target outline, and the position information of each original text statement in the target electronic document, a target statement is determined for each major outline item among multiple original text statements. The semantic similarity between the target statement and its corresponding outline item is not lower than a similarity threshold, ensuring that the target statement determined for each outline item is an original text statement with a high semantic similarity to that outline item. Furthermore, the relative order of the target statements corresponding to multiple outline items in the target electronic document is consistent with the relative order of the multiple outline items in the target outline. This is achieved by considering the orderliness between the original text statements in the target electronic document and the orderliness between the outline items in the target outline. The semantic similarity between outline items and original text statements is used to determine the target original text statements for each outline item in the target electronic document. This ensures that the target statements determined for each outline item are original text statements in the target electronic document whose main content is the outline item, guaranteeing the accuracy of the target statements determined for each outline item. This, in turn, ensures that the target statements determined by the outline items can be accurately located in the target electronic document, eliminating the need for users to manually flip through pages in the target electronic document to locate the original text content whose main content is the triggered outline item. This significantly reduces the time required to locate the corresponding original text content from the outline item, improving the efficiency of locating the corresponding original text content from the outline within the outline. It also allows users to selectively jump to and read the original text content based on the outline item, thereby improving the user's reading experience and efficiency. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0028] Figure 1 A schematic diagram is shown illustrating the application scenarios applicable to the embodiments of this application;
[0029] Figure 2 A flowchart of a text association method according to an embodiment of this application is shown;
[0030] Figure 3 This paper shows a schematic diagram of an outline tree structure in an embodiment of this application;
[0031] Figure 4 A flowchart of a page display method according to an embodiment of this application is shown;
[0032] Figure 5 A schematic diagram of an outline page according to an embodiment of this application is shown;
[0033] Figure 6 A schematic diagram of an introduction page according to an embodiment of this application is shown;
[0034] Figure 7 A schematic diagram of a first standard reading page according to an embodiment of this application is shown;
[0035] Figure 8 A schematic diagram of a directory page according to an embodiment of this application is shown;
[0036] Figure 9 A schematic diagram of a first original text page in an embodiment of this application is shown;
[0037] Figure 10 A schematic diagram of a second original text page in an embodiment of this application is shown;
[0038] Figure 11 A schematic diagram of a fourth original page in an embodiment of this application is shown;
[0039] Figure 12 A schematic diagram of yet another fourth original page in an embodiment of this application is shown;
[0040] Figure 13 A schematic diagram of a second standard reading page according to an embodiment of this application is shown;
[0041] Figure 14 A block diagram of a text association device according to an embodiment of this application is shown;
[0042] Figure 15 A block diagram of a page display device according to an embodiment of this application is shown;
[0043] Figure 16 A structural block diagram of an electronic device for performing a page display method and a text association method according to embodiments of this application is shown. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0045] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the application. It should be noted that "multiple" as used herein refers to two or more. "And / or" describes the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0047] This application discloses a page display method, a device, an electronic device, a storage medium, and a computer program product, which relate to artificial intelligence technology.
[0048] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence.
[0049] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0050] In this application, an outline for a target electronic document can be generated using a neural network model based on artificial intelligence technology, thereby obtaining a target outline for the target electronic document.
[0051] See Figure 1 , Figure 1 A schematic diagram is shown for an application scenario applicable to the embodiments of this application. The terminal device 400 is connected to the server 200 through the network 300, and the server 200 is connected to the database 500. The network 300 can be a wide area network or a local area network, or a combination of both.
[0052] In some embodiments, taking the electronic device as a server as an example, the page display method and text association method provided in this application can both be implemented by the server. For example, the server 200 can obtain the target electronic document and the target outline items from the database 500. Then, based on the semantic similarity between the major outline items in the target outline and the original text statements in the target electronic document, the position information of the major outline items in the target outline, and the position information of the original text statements in the target electronic document, the server 200 determines a target statement for each major outline item among multiple original text statements and associates the target statement with the corresponding outline item.
[0053] After completing the association between the target statement and the corresponding outline item, server 200 can enter the page display stage. Server 200 displays the outline page of the target electronic document. The outline page includes at least one outline item in the target outline of the target electronic document. The at least one outline item includes a first outline item. Then, in response to a trigger operation on the first outline item in the outline page, server 200 selects the target statement associated with the first outline item based on the associated target statement and the corresponding outline item. Then, server 200 displays the first original text page where the target statement associated with the first outline item is located.
[0054] In some embodiments, taking the electronic device as a terminal device as an example, the page display method and text association method provided in this application can both be implemented by the terminal device. For example, the terminal device 400 can receive a target electronic document and target outline items sent by the user. Then, based on the semantic similarity between each outline item in the target outline and each original text statement in the target electronic document, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document, the terminal device 400 determines a target statement for each outline item in multiple original text statements and associates the target statement with the corresponding outline item.
[0055] After the terminal device 400 completes the association between the target statement and the corresponding outline item, it can enter the page display stage. The terminal device 400 displays the outline page of the target electronic document. The outline page includes at least one outline item in the target outline of the target electronic document. The at least one outline item includes a first outline item. Then, in response to the trigger operation on the first outline item in the outline page, the terminal device 400 selects the target statement associated with the first outline item based on the associated target statement and the corresponding outline item. Then, the terminal device 400 displays the first original text page where the target statement associated with the first outline item is located.
[0056] In some embodiments, a portion of the text association method provided in this application can be implemented by a server, and the page display method provided in this application can be implemented by a terminal device. For example, server 200 can obtain a target electronic document and target outline items from database 500. Then, based on the semantic similarity between each outline item in the target outline and each original text statement in the target electronic document, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document, server 200 determines a target statement for each outline item among multiple original text statements, and associates the target statement with the corresponding outline item.
[0057] After server 200 associates the target statement with its corresponding outline item, it can store the association in terminal device 400. Then, it can proceed to the page display stage. Terminal device 400 displays the outline page of the target electronic document. The outline page includes at least one outline item in the target outline of the target electronic document. The at least one outline item includes a first outline item. Then, in response to a trigger operation on the first outline item in the outline page, terminal device 400 selects the target statement associated with the first outline item based on the associated target statement and its corresponding outline item. Finally, terminal device 400 displays the first original text page containing the target statement associated with the first outline item.
[0058] In some embodiments, the terminal device 400 or server 200 can implement the page display method and text association method provided in this application embodiment by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that only needs to be downloaded into the browser environment to run; or it can be a small program that can be embedded in any APP, and the small program can be controlled by the user to run or close. In short, the above-mentioned computer program can be any form of application, module or plugin.
[0059] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal device 400 may be a smartphone, tablet, laptop, desktop computer, intelligent voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., but is not limited to these. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0060] For ease of explanation, the following embodiments will be described using examples of page display methods and text association methods being executed by electronic devices.
[0061] Please see Figure 2 , Figure 2 This application illustrates a flowchart of a text association method according to an embodiment of the present application. The method can be used in an electronic device, which may be... Figure 1 The terminal device 400 or server 200 in the middle, the method may include:
[0062] S110. Obtain the target electronic document and the target outline of the target electronic document.
[0063] The target outline includes multiple outline items; the target electronic document includes multiple source text statements. For ease of description, the electronic document to be text-linked is referred to as the target electronic document, and the outline of the target electronic document is referred to as the target outline.
[0064] In this application, the target electronic document can be an e-book, e-paper, e-report, article, news, etc., with e-books including novels, textbooks, essays, etc. A corresponding target outline can be generated for the target electronic document based on its original content. Each outline item can be a sentence or phrase. For ease of description in this application, the original text content with the outline item as its main theme can be used as the target original text content corresponding to the outline item.
[0065] In this application, the outline of the original content of the target electronic document can be extracted by a trained neural network model to obtain the target outline of the target electronic document, or the outline of the target electronic document can be manually written by personnel to obtain the target outline of the target electronic document.
[0066] The target electronic document can be divided into multiple original sentences. That is, in this application, the original sentences refer to sentences or statements in the target electronic document.
[0067] It is worth mentioning that, to facilitate the rapid identification of each sentence in the target electronic document, the positional information of each sentence within the target document can be determined during the segmentation of the original sentences. This positional information can include the sequence number of the first character (or word) in the original sentence and the sequence number of the last character (or word) in the target document. The sequence number of a character in the target document is determined by arranging the characters in the target document in their chronological order.
[0068] The position of the original sentence in the target electronic document can be determined by the serial number of the first character (or word) in the original sentence and the serial number of the last character (or word) in the original sentence in the target electronic document.
[0069] In other embodiments, the location information of the original text statement in the target electronic document may include the sequence number of the first character (or word) in the original text statement within the target electronic document and the text length of the original text statement, where the text length refers to the number of characters (or words) in the original text statement. Therefore, by using the sequence number of the first character (or word) in the original text statement within the target electronic document and the text length of the original text statement, the sequence number of the last character (or word) in the original text statement within the target electronic document can be determined. Furthermore, by combining this with the sequence number of the first character in the original text statement, the location of the original text statement within the target electronic document can be determined.
[0070] In other embodiments, the location information of the original text statement in the target electronic document may also include the serial number of each word (or phrase) of the original text statement in the target electronic document.
[0071] In some implementations, a vector of the same length as the original text can be created, with one dimension of the vector used to store the sequence number of a word (or phrase) in the original text within the target electronic document. For example, if the determined original text has a length of 10, a 10-dimensional vector can be generated.
[0072] In this application, the outline item in the target outline refers to the argument item (or viewpoint item) to be associated with the original text statement; in other words, the outline item is the argument item that needs to be associated with the original text statement. In specific embodiments, each argument item in the target outline can be regarded as an outline item, or some argument items in the target outline can be regarded as outline items. Since the argument items in the target outline are regarded as outline items, each outline item corresponds to the theme (or viewpoint) expressed by the argument item.
[0073] In this framework, the argument entries in the target outline that require correlation with the original text can be pre-defined. Since the argument entries in the target outline have a hierarchical relationship (also known as a parent-child relationship), they correspond to different levels. The higher the level of the argument entry (i.e., the smaller the level number), the more detailed and specific the viewpoint presented. Based on this, argument entries whose level number does not exceed a first threshold can be designated as outline items, where the first threshold does not exceed the maximum level number corresponding to the target outline.
[0074] Correspondingly, since there is a hierarchical relationship between the different arguments in the target outline, the multiple outline items in the target outline also have a hierarchical relationship. Furthermore, since each argument in the target outline is summarized from the original text in the target electronic document, the multiple outline items in the target outline have a relative order of precedence. The relative order of precedence refers to the arrangement of the outline items in the target outline, which can be consistent with the arrangement of the corresponding original text content in the target electronic document; whereby the target original text content corresponding to an outline item refers to the original text content in the target electronic document whose main theme is that outline item.
[0075] For example, if the outline items include d1 and d2, and the target text content corresponding to d1 precedes the target text content corresponding to d2, then the relative order of the outline items is that outline item a1 precedes outline item a2.
[0076] Regarding the hierarchical relationship between outline items, if the outline item s1 of the nth level (i.e., the corresponding level is n) includes 3 sub-outline items s11, s12 and s13, then the number of levels to which the outline items s11, s12 and s13 belong is n+1; where n is a positive integer.
[0077] In some embodiments, an outline tree corresponding to the target outline can be constructed based on the hierarchical relationship and relative order of multiple outline items in the target outline. The outline tree is used to display the hierarchical relationship and relative order of multiple outline items; each outline item corresponds to a node in the outline tree. If outline item A includes three sub-outline items, namely outline items A1, A2, and A3, then in the outline tree, the node representing outline item A is the parent node representing outline items A1, A2, and A3. The arrangement order of multiple nodes at the same level in the outline tree is determined by the order in which the outline items corresponding to these nodes appear in the target outline. It can be set that the node representing the outline item that appears earlier in the target outline is located on the left side of the outline tree, and the node representing the outline item that appears later in the target outline is located on the right side of the outline tree. For example, if the nodes corresponding to outline items A, B, and C are at the same level, and if the node representing outline item A is node P1, the node representing outline item B is node P2, and the node representing outline item C is node P3, and the order of outline items A, B, and C in the target outline is first outline item A, then outline item B, then outline item C, then we can set nodes P1, P2, and P3 to be arranged from left to right in the outline tree, that is, node P1 is to the left of node P2, and node P3 is to the right of node P2.
[0078] Nodes in the outline tree can store node information. This node information can include the outline item corresponding to the node, information about its child nodes, and the child node information can include the child node's identifier and the outline item corresponding to the child node. In this application, the node identifier can be the outline item corresponding to the node or an identifier configured for the node as needed. It is worth noting that for leaf nodes in the outline tree, since they are not among the corresponding child nodes, the child node information in the leaf node's node information can be empty.
[0079] For example, the target outline includes outline items e1, e21, e22, e31, e32, e33, and e34. The relative order of the outline items is e1-e21-e31-e32-e22-e33-e34. The hierarchical relationship of the outline items is as follows: the first level is outline item e1; the second level includes outline items e21 and e22, where outline items e21 and e22 are both sub-outline items of outline item e1; the third level includes outline items e31, e32, e33, and e34. Among these, the sub-outline items of e1 include e21 and e22; the sub-outline items of e21 include e31 and e32; and the sub-outline items of e22 include e33 and e34. In this case, the constructed outline tree is as follows: Figure 3 As shown, node j1 corresponding to outline item e1 is the parent node of node j21 corresponding to outline item e21 and node j22 corresponding to outline item e22. Node j21 corresponding to outline item e21 is the parent node of node j31 corresponding to outline item e31 and node j32 corresponding to outline item e32. Node j22 corresponding to outline item e22 is the parent node of node j33 corresponding to outline item e33 and node j34 corresponding to outline item e34. Furthermore, in the outline tree, nodes j21 and j22 are arranged in sequence, and nodes j31, j32, j33, and j34 are arranged in sequence.
[0080] exist Figure 3 In the above, the node information of node j21 may include the outline item e21 corresponding to node j21, the node identifier j21 of node j21, the node identifier j31 corresponding to the child node j31 of node j21, and the node identifier j32 corresponding to the child node j32 of node j21.
[0081] S120. Determine the semantic similarity between each major outline item and each original sentence in the target electronic document.
[0082] For each outline item in the target outline, its semantic similarity to each original sentence in the target electronic document can be determined. For example, if the target outline includes 5 outline items and the target electronic document contains 200 original sentences, then the semantic similarity between each outline item and each of the 200 original sentences needs to be calculated, resulting in 1000 semantic similarities.
[0083] In some embodiments, semantic features can be extracted from the outline item to obtain its semantic features, and semantic features can be extracted from the original text to obtain its semantic features. Then, based on the semantic features of the outline item and the semantic features of the original text, the semantic similarity between the outline item and the original text can be calculated. For example, the Euclidean distance or cosine similarity between the semantic features of the outline item and the semantic features of the original text can be calculated, and then the sentence similarity between the outline item and the original text can be determined based on the Euclidean distance or cosine similarity.
[0084] In some embodiments, outline items and original sentences can be input into a text processing model, such as the BERT model. The text processing model then extracts semantic features from the outline items and original sentences, and outputs the semantic similarity between the outline items and original sentences based on the semantic features of the outline items and the semantic features of the original sentences.
[0085] In some embodiments, for each outline item, the word segmentation relevance of each key word in the outline item in the target electronic document can also be determined; the word segmentation relevance of the key word is used to indicate the importance of the key word relative to the target electronic document; the importance of each key word relative to the target original text sentence is determined according to the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of a plurality of original text sentences; the semantic similarity between the outline item and the target original text sentence is determined according to the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word.
[0086] For each outline item, word segmentation can be performed, and key word segments within the outline item can be identified. These key word segments are those that play a crucial role in the semantics of the outline item. In some embodiments, word segments belonging to the stop word category can be deleted from the outline item's word segments, and the remaining word segments can be used as the key word segments in the outline item. The stop word category can refer to the category to which word segments without actual meaning belong; for example, the stop word category can include interjection category, hypothetical word category, and punctuation mark category, etc.
[0087] After identifying the key words for an outline item, the relevance of each key word for that outline item to the word segmentation in the target electronic document can be determined.
[0088] In some implementations, the frequency of occurrence of key word segments in the target electronic document can be determined as the word segmentation relevance of the key word segments in the target electronic document. In some implementations, since some original sentences may only contain modal particles or auxiliary words, to improve computational efficiency and avoid interference from stop word categories, stop word categories in the original sentences can be deleted. Then, the frequency of occurrence of key word segments in the target electronic document after removing stop word categories can be determined as the word segmentation relevance of the key word segments in the target electronic document.
[0089] In some other implementations, the inverse document frequency of the key word in the target electronic document can also be determined as the word segmentation relevance of the key word in the target electronic document. In this case, the word segmentation relevance of the key word in the target electronic document can be calculated using Formula 1, as follows:
[0090]
[0091] Where, q i For the i-th keyword in outline item Q, IDF(q) i ) is the key word segmentation q i Inverse document frequency in the target electronic document, where N is the number of original sentences in the target electronic document, n(q i The target electronic document includes key word segmentation q i The number of original sentences.
[0092] In some implementations, to improve computational efficiency and avoid interference from stop word categories in the segmentation, stop word categories in the original text can be deleted. Then, the original text, which includes the key word q, is removed from the segmentation of stop word categories. i The original text is used as n(q) i ).
[0093] After identifying each key word, the frequency of each key word in the target original text can be counted, and the importance of each key word relative to the target original text can be determined based on the frequency of each key word in the target original text; where the target original text is any one of multiple original texts.
[0094] It is worth mentioning that before calculating the frequency of each key word in the target original text, you can also delete the word segments that belong to the stop word category in the target original text, and then calculate the frequency of the key word in the target original text after removing the stop word category words, which is taken as the frequency of the key word in the target original text.
[0095] In some embodiments, the frequency of occurrence of key words in the target original text can be directly used as the importance of key words relative to the target original text.
[0096] In some other embodiments, the average length of multiple original text sentences and the length of the target original text sentence can also be obtained; the importance of each key word relative to the target original text sentence can be determined based on the frequency of occurrence of each key word in the target original text sentence, the length of the target original text sentence, and the average length of multiple original text sentences.
[0097] It is worth mentioning that if, during the process of determining the frequency of key word occurrences in the target original text, stop word categories are removed from the target original text, then the length of each original text sentence is the length after removing stop word categories. That is, the length of the target original text sentence refers to the length of the target original text sentence after removing stop word categories, and the average length is also the average length of all original text sentences after removing stop word categories. If, during the process of determining the frequency of key word occurrences in the target original text sentence, stop word categories are retained, then the length of each original text sentence is the length of the sentence itself. That is, the length of the target original text sentence refers to the length of the target original text sentence itself, and the average length is also the average length of all original text sentences themselves.
[0098] Optionally, in this application, the importance of each key word relative to the target original text can be calculated based on Formula 2, as follows:
[0099]
[0100] Where Z(q) i D) is the key word segmentation q i relative to the importance of the target original text statement D, f(q) i D) is the key word segmentation q i The frequency of occurrence of the target original text statement D, |D| is the length of the target original text statement, argdl is the average length of multiple original text statements in the target electronic document, and k and b are adjustment parameters that can be set according to requirements. This application does not impose any restrictions.
[0101] After determining the word segmentation relevance of the key word in the target electronic document and the importance of the key word relative to the target original text sentence, the semantic similarity between the outline item and the target original text sentence can be determined based on the word segmentation relevance of each key word in the outline item in the target electronic document and the importance of each key word relative to the target original text sentence.
[0102] In this application, the product of the word segmentation relevance of the key word in the target electronic document and the importance of the key word relative to the target original text sentence can be calculated as the word segmentation similarity between the key word and the target original text sentence. Then, the word segmentation similarity corresponding to all key words in the outline item is summed to obtain the semantic similarity between the outline item and the target original text sentence.
[0103] When the word segmentation relevance of the key words in the target electronic document is calculated according to Formula 1, and the importance of the key words relative to the target original text sentences is calculated according to Formula 2, the semantic similarity between the outline items and the target original text sentences is calculated according to Formula 3, as follows:
[0104]
[0105] Where score(Q,D) represents the semantic similarity between outline item Q and target original text statement D, q i Let be the i-th keyword in outline item Q, and n be the number of keywords in outline item Q.
[0106] In some other embodiments, the longest common subsequence between the outline item and the target original text statement can be determined; based on the longest common subsequence, the outline item, and the target original text statement, the semantic similarity between the outline item and the target original text statement can be determined.
[0107] Specifically, the semantic similarity between an outline item and the target original text sentence can be determined based on the length of the longest common subsequence, the length of the outline item, and the length of the target original text sentence. For example, the ratio of twice the length of the longest common subsequence to the sum of the sentence lengths can be used as the semantic similarity between the outline item and the target original text sentence, where the sum of the sentence lengths refers to the sum of the lengths of the outline item and the target original text sentence. The length of the longest common subsequence refers to the number of characters (or words) in the longest common subsequence; similarly, the length of the outline item refers to the number of characters (or words) in the outline item; and the length of the target original text sentence refers to the number of characters (or words) in the target original text sentence. It is worth mentioning that the word segments of the target original text and the outline item can be deleted. The longest common subsequence of the target original text and the outline item with the deleted stop word segments can be determined. Then, based on the length of the longest common subsequence, the length of the outline item with the deleted stop word segments, and the length of the target original text, the semantic similarity between the outline item and the target original text can be determined.
[0108] In another embodiment, for each outline item, the word segmentation relevance of each key word in the outline item in the target electronic document can be determined; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; the importance of each key word relative to the target original text sentence is determined based on the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of multiple original text sentences; a first semantic similarity between the outline item and the target original text sentence is determined based on the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word; if the first semantic similarity is not less than the sentence similarity threshold, the first semantic similarity is obtained as the semantic similarity between the outline item and the target original text sentence; if the first semantic similarity is less than the sentence similarity threshold, the longest common subsequence between the outline item and the target original text sentence is determined; the semantic similarity between the outline item and the target original text sentence is determined based on the longest common subsequence, the outline item, and the original text sentence. The sentence similarity threshold can be set based on requirements, and this application does not limit it; for example, the sentence similarity threshold can be 0.7.
[0109] The process of determining the word relevance of each key word in the outline item to the target electronic document and the importance of each key word relative to the target original text sentence is described above and will not be repeated here.
[0110] It can be calculated that the word relevance of the key word in the target electronic document and the importance of the key word relative to the target original text sentence are multiplied together to obtain the word similarity between the key word and the target original text sentence. Then, the word similarity corresponding to all key words in the outline item is summed to obtain the first semantic similarity between the outline item and the target original text sentence.
[0111] If the first semantic similarity corresponding to the original sentence is not less than the sentence similarity threshold, it means that the value of the determined first semantic similarity is large. The sentence length of the original sentence and the outline item is relatively long. When the first semantic similarity is used directly to indicate the semantic similarity between the original sentence and the outline item, the accuracy of the semantic similarity is high. Therefore, the first semantic similarity corresponding to the original sentence can be directly used as the semantic similarity between the outline item and the original sentence.
[0112] If the first semantic similarity corresponding to the original sentence is less than the sentence similarity threshold, it means that the determined value of the first semantic similarity is small, the sentence length of the original sentence and the outline item is short, and the accuracy of the semantic similarity is low when the first semantic similarity is directly used to indicate the semantic similarity between the original sentence and the outline item. In this case, the first semantic similarity can no longer be used. Therefore, the longest common subsequence between the outline item and the original sentence can be determined. Based on the longest common subsequence, the outline item and the original sentence, a new semantic similarity is determined as the semantic similarity between the outline item and the original sentence.
[0113] For example, for an outline item and a source sentence, the ratio of twice the length of the longest common subsequence of the outline item and the source sentence to the sum of sentence lengths can be used as the semantic similarity between the outline item and the source sentence, where the sum of sentence lengths refers to the sum of the length of the outline item and the length of the source sentence.
[0114] S130. Based on semantic similarity, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document, determine a target statement for each outline item in multiple original text statements.
[0115] Specifically, the relative order of the target statements corresponding to multiple outline items in the target electronic document is consistent with the relative order of the multiple outline items in the target outline; the semantic similarity between the target statement and its corresponding outline item is not lower than the similarity threshold. The similarity threshold can be set based on requirements; for example, the similarity threshold here can be the same as the aforementioned statement similarity threshold.
[0116] The outline items in the target outline are arranged in a certain order. The position information of the outline item in the target outline is used to indicate the position of the outline item in the target outline. For example, the target outline includes outline item a1 and outline item a2. The position information of outline item a1 in the target outline may mean that outline item a1 is in the first line of the target outline, and the position information of outline item a2 in the target outline may mean that outline item a2 is in the second line of the target outline.
[0117] In this application, the order of outline items in the target outline can be determined based on their position information, serving as the relative order of their positions within the target outline. For example, the earlier an outline item appears in the target outline, the earlier it appears in the target outline's order. For instance, if the target outline includes outline item a1 and outline item a2, the position of outline item a1 in the target outline could be the first line, and the position of outline item a2 in the target outline could be the second line. In this case, the relative order of outline items a1 and a2 in the target outline is: outline item a1 precedes outline item a2.
[0118] In this application, for any outline item, original text statements with semantic similarity not lower than the similarity threshold can be selected from multiple original text statements as initial candidate original text statements (generally multiple) for the outline item. Then, an intermediate candidate original text statement is selected from the initial candidate original text statements for each outline item. Then, the intermediate candidate original text statements for multiple outline items are arranged according to the relative order of the major outline items in the target outline to obtain the initial matching result for the target outline. Since there may be multiple initial candidate original text statements for each major outline item, and each initial candidate original text statement for the outline item can be used as an intermediate candidate original text statement, there may be multiple initial matching results. Then, from the initial matching results, the initial matching result in which the relative order of the intermediate candidate original text statements is consistent with the relative order of the intermediate candidate original text statements in the target electronic document is selected as the target matching result. The target matching result includes determining a target statement for each outline item.
[0119] There can be multiple target matching results. One can be randomly selected from these multiple results as the selected target matching result, where each category identifies a target statement. Alternatively, the result with the highest sum of semantic similarity can be selected from multiple target matching results. Here, the sum of semantic similarity refers to the sum of semantic similarity between the intermediate candidate original text statements in the target matching results.
[0120] For example, the target outline includes outline item a1, outline item a2, and outline item a3. The relative order of the multiple outline items in the target outline is as follows: outline item a1 precedes outline item a2, and outline item a2 precedes outline item a3. The initial candidate source text statements determined for outline item a1 are b11 and b12, the initial candidate source text statements determined for outline item a2 are b21 and b22, and the initial candidate source text statements determined for outline item a3 are b31 and b32. The relative order of the initial candidate source text statements in the target electronic document (from first to last) is: b11, b21, b12, b31, b32, b22 in sequence. At this point, according to the relative order of the major outline items in the target outline... Arrange the intermediate candidate original text statements corresponding to each major outline item according to their order of position, and obtain the initial matching results for the target outline as follows: initial matching result c1 (b11-b21-b31 in sequence), initial matching result c2 (b12-b21-b31 in sequence), initial matching result c3 (b11-b22-b31 in sequence), initial matching result c3 (b11-b21-b32 in sequence), initial matching result c5 (b12-b21-b31 in sequence), initial matching result c6 (b12-b22-b31 in sequence), initial matching result c7 (b12-b22-b32 in sequence), initial matching result c8 (b11-b22-b32 in sequence).
[0121] In the initial matching results, initial matching results c1 and c3 are determined as target matching results. Among them, the sum of semantic similarities of b11, b21, and b31 in target matching result c1 is less than the sum of semantic similarities of b11, b21, and b32 in target matching result c3. Therefore, target matching result c3 is determined as the selected target matching result. At this time, the target statement corresponding to outline item a1 is b11, the target statement corresponding to outline item a2 is a21, and the target statement corresponding to outline item a3 is a32.
[0122] It is worth mentioning that if an outline tree is generated based on the target outline using the aforementioned method, when traversing each outline item in the target outline, the root node of the outline tree can be used as the starting point to traverse each outline item using the DFS (Deep First Search) algorithm.
[0123] In one embodiment, S130 may include: sorting multiple outline items according to their position information in the target outline, in order of priority within the target outline, to obtain a first sort; determining a candidate original text statement for each outline item from multiple original text statements based on semantic similarity; the semantic similarity between each candidate original text statement and its corresponding outline item is not lower than a similarity threshold; sorting multiple candidate original text statements according to their position information in the target electronic document, in order of priority within the target electronic document, to obtain a second sort; traversing multiple outline items according to the first sort; if the current outline item's index in the first sort is the same as the index of the candidate original text statement corresponding to the current outline item in the second sort, using the candidate original text statement corresponding to the current outline item as the target statement corresponding to the current outline item; and traversing the next outline item in the first sort until the last outline item in the first sort is reached.
[0124] This can be done for each outline item, where, based on semantic similarity, one original text statement can be randomly selected from multiple original text statements whose semantic similarity with the outline item reaches a similarity threshold as the candidate original text statement corresponding to the outline item; alternatively, based on semantic similarity, the original text statement with the highest semantic similarity with the outline item can be determined from multiple original text statements as the candidate original text statement corresponding to the outline item.
[0125] Based on the position information of each outline item in the target outline, the multiple outline items are sorted in order from first to last in the target outline to obtain the first sort. At the same time, based on the position information of each candidate original text statement in the target electronic document, the multiple candidate original text statements are sorted in order from first to last in the target electronic document to obtain the second sort. Then, the outline items in the first sort are traversed sequentially.
[0126] For example, the target outline includes outline item a1, outline item a2, and outline item a3. The relative order of the multiple outline items in the target outline is: outline item a1 precedes outline item a2, and outline item a2 precedes outline item a3. In this case, the first order is a1-a2-a3. The candidate original text statement determined for outline item a1 is b11, the candidate original text statement determined for outline item a2 is b21, and the candidate original text statement determined for outline item a3 is b31. The relative order of the candidate original text statements in the target electronic document is: b11, b21, b31 arranged in sequence. The second order is b11-b21-b31. At this point, we should first iterate through outline item a1, then outline item a2, and then outline item a3. When iterating through outline item a1, we determine that outline item a1 has the sequence number 1 in the first sorting, and the sequence number of candidate original text statement b11 determined by outline item a1 has the sequence number 1 in the second sorting. Therefore, candidate original text statement b11 is determined as the target statement corresponding to outline item a1. Similarly, the sequence number of outline item a2 in the first sorting is consistent with the sequence number of candidate original text statement b12 in the target electronic document, and the sequence number of outline item a3 in the first sorting is consistent with the sequence number of candidate original text statement b13 in the target electronic document. Therefore, we determine that the target statements corresponding to outline items a2 and a3 are b21 and b31, respectively.
[0127] If the current outline item's index in the first sorting is different from the index of the corresponding candidate original text statement in the second sorting, a new candidate original text statement is determined from the original text statements excluding the candidate original text statement corresponding to the current outline item. The semantic similarity between the new candidate original text statement and the current outline item is not lower than the similarity threshold, and the new candidate original text statement is located after the target statement corresponding to the previously traversed outline item in the target electronic document. The new candidate original text statement is then determined as the target statement corresponding to the current outline item. The next outline item in the first sorting is traversed until the last outline item in the first sorting is reached.
[0128] In some embodiments, if among the multiple original text statements excluding the candidate original text statement corresponding to the current outline item, the semantic similarity between the original text statement and the current outline item is not lower than the similarity threshold, and there are multiple original text statements in the target electronic document that are located after the target statement corresponding to the previously traversed outline item, then the original text statement with the earliest position in the target electronic document can be used as the new candidate original text statement for the current outline item.
[0129] In the above embodiments, when the sequence number of the current outline item in the first sorting is different from the sequence number of the candidate original text statement corresponding to the current outline item in the second sorting, since the original text statement with a semantic similarity of not less than the similarity threshold and located after the target statement corresponding to the previously traversed outline item in the target electronic document is used as the new candidate original text statement determined by the current outline item, it is ensured that the new candidate original text statement is located after the target statement corresponding to the previously traversed outline item in the target electronic document. Therefore, using the new candidate original text statement determined for the current outline item as the target statement corresponding to the current outline item can ensure that the relative order of the target statement determined for the outline item in the target electronic document is consistent with the relative order of the outline item in the target outline.
[0130] In some embodiments, after obtaining new candidate original text statements, a new second sort needs to be determined based on the new candidate original text statements. Then, traversal begins from the current outline item (outlines that have already been traversed are no longer traversed, because since the new candidate original text statements are located in the target document at the position corresponding to the previously traversed outline item, the selection of new candidate original text statements to construct the second sort does not affect the order of the target statements corresponding to the previously traversed outline item in the second sort), and the most recently obtained second sort is used during traversal. Simultaneously, when traversing the current outline item according to the new second sort, if the sequence number of the currently traversed outline item in the first sort is the same as the sequence number of the new candidate original text statement corresponding to the current outline item in the new second sort, then the next outline item is traversed, and the second sort used for the next outline item is the most recently obtained second sort.
[0131] For example, the target outline includes outline item a1, outline item a2, and outline item a3. The relative order of the multiple outline items in the target outline is: outline item a1 before outline item a2, and outline item a2 before outline item a3. In this case, the first order is a1-a2-a3. The candidate original text statement determined by outline item a1 is b12, the candidate original text statement determined by outline item a2 is b22, and the candidate original text statement determined by outline item a3 is b32. The relative order of the candidate original text statements in the target electronic document is: b12, b32, b22 arranged in sequence. The second order is b12-b32-b22. Outline item a1 should be traversed first, then outline item a2, and then outline item a3.
[0132] When traversing outline item a1, its sequence number in the first sort is determined to be 1, and the sequence number of the candidate original text statement b12 matched by outline item a1 in the second sort is determined to be 1. Therefore, candidate original text statement b12 is determined as the target statement corresponding to outline item a1. When traversing outline item a2, its sequence number in the first sort is determined to be 2, and the sequence number of the candidate original text statement b22 matched by outline item a2 in the second sort is determined to be 3. Then, from the original text statements excluding the candidate original text statement corresponding to the current outline item, a new candidate original text statement b23 is re-determined for the outline item. b23 must have a semantic similarity to the current outline item that is not lower than the similarity threshold, and b23 must be after the target statement b12. At this point, candidate original text statements b12, b23, and b32 are re-selected. The arrangement yields a new second sort: b12-b23-b32. At this point, the candidate original text statement b23, which matches outline item a2, is determined to have an order number of 2 in the second sort, and is thus identified as the target statement corresponding to outline item a2. When traversing outline item a3, the order number of outline item a3 in the first sort is determined to be 3, and the candidate original text statement b32, which matches outline item a3, is determined to have an order number of 3 in the second sort (here, the second sort refers to the most recently obtained second sort, not the first obtained second sort; that is, the order number of the candidate original text statement selected for the first time in a previously traversed outline item in the first generated second sort is different from the order number of the outline item in the first sort) is determined to be 3, and is thus identified as the target statement corresponding to outline item a3.
[0133] In another embodiment, S130 may include: sorting multiple outline items according to their position information in the target outline, in order of priority, to obtain a first sort; for the i-th outline item in the first sort, if i = 1, taking the original text statement with the highest semantic similarity to the i-th outline item from among the multiple original text statements as the target statement corresponding to the i-th outline item; i is an integer, and i ≤ N, where N is the total number of outline items in the target outline; if i is greater than 1, determining the target statement from among the multiple candidate statements based on the position information of each candidate statement in the target electronic document. The candidate statement at the beginning of the target electronic document is taken as the target statement corresponding to the i-th outline item. A candidate statement is a statement in the original text that is located after the target statement corresponding to the (i-1)-th outline item in the target electronic document and has a semantic similarity of not less than the similarity threshold with the i-th outline item. Increment i by 1 and return to the execution step if i is greater than 1. Based on the position information of each candidate statement in the target electronic document, determine the candidate statement at the beginning of the target electronic document as the target statement corresponding to the i-th outline item, until i = N.
[0134] i takes values from 1 to N. When i is 1, the original text statement with the highest semantic similarity to the first outline item is selected as the target statement corresponding to the first outline item. In some embodiments, when i is 1, the original text statement with a semantic similarity to the outline item that is not lower than the similarity threshold can also be selected, and the original text statement that is the first in the target electronic document can be selected as the target statement corresponding to the outline item.
[0135] When i is not 1, the original text statement that follows the target statement corresponding to the (i-1)th outline item in the target electronic document and has a semantic similarity not lower than the similarity threshold is selected as the candidate statement corresponding to the i-th outline item. Then, the first candidate statement in the candidate statements corresponding to the i-th outline item is selected as the target statement corresponding to the i-th outline item. This ensures that the target statement determined for the i-th outline item follows the target statement corresponding to the (i-1)th outline item, guaranteeing the order constraint between outline items and original text statements.
[0136] For example, the target outline includes outline items c1, c2, and c3. The first order of outline items c1, c2, and c3 is c1-c2-c3. From the 100 original text statements in the target electronic document, the original text statement with the highest semantic similarity to outline item c1 is selected as the target statement d1 corresponding to outline item c1. Here, target statement d1 is the 12th statement among the 100 original text statements. Then, iterating through outline items c2, the original text statements from the 13th to the 100th original text statements with a semantic similarity not lower than the similarity threshold are selected as the target statement. Candidate statements are: the 30th, 35th, and 39th original text statements. The first candidate statement (i.e., the 30th original text statement) is selected as the target statement of outline item c2. Then, outline item c3 is traversed, and original text statements from the 31st to the 100th original text statements with a semantic similarity to outline item c3 that is not lower than the similarity threshold are selected as candidate statements: the 60th, 75th, and 89th original text statements. The first candidate statement (i.e., the 60th original text statement) is selected as the target statement of outline item c3.
[0137] S140. Associate the target statement with the corresponding outline item.
[0138] The target statement associated with a major outline item is used to locate the original text content in the target electronic document whose main theme is the outline item. That is, the target statement is a text statement within the target original text content corresponding to the outline item, and the target original text content corresponding to the outline item is also the original text content in the target electronic document whose main theme is the outline item. In some embodiments, the target statement associated with a major outline item can serve as the starting statement within the original text content in the target electronic document whose main theme is that outline item.
[0139] After identifying the major outline items and their corresponding target statements, the outline items and their corresponding target statements can be associated. This allows the target statements associated with the outline items to be used to locate the original text content in the target electronic document whose main theme is that outline item. In other words, the target statements associated with a major outline item serve as a location reference for locating the original text content in the target electronic document whose main theme is that outline item.
[0140] In some implementations, the location information of each target statement in the target electronic document can be obtained, and the location information of each target statement in the target electronic document can be associated and stored with the corresponding outline item, so as to associate each outline item with the corresponding target statement.
[0141] For example, a coordinate list of equal length can be generated from the original text statement. The coordinate list stores the sequence number of each word in the original text statement in the target electronic document. This coordinate list serves as the position information of the original text statement. The position information (coordinate list) of the target statement can be associated with the corresponding outline item and stored, thus realizing the association between the target statement and the corresponding outline item.
[0142] In this embodiment, if an outline tree is constructed based on the target outline, the location information of the target statement corresponding to each outline item can be stored in the node information of the node corresponding to that outline item, thereby associating the location information of the target statement in the target electronic document with the corresponding outline item. At this time, the node information of each node in the obtained outline tree can include the outline item corresponding to the node, the child node information of the node's child nodes, and the location information of the target statement in the outline item corresponding to the node.
[0143] For example, the resulting outline tree is as follows Figure 3In the case shown, the node information of node j1 corresponding to outline item e1 includes the related information Zjx1 of the child nodes of the outline item e1 and the child nodes of node i, as well as the position information Wz1 of the target sentence associated with outline item e1. The node information of node j1 corresponding to outline item e1 includes the related information Zjx1 of the child nodes of the outline item e1 and the child nodes of node i, as well as the position information Wz1 of the target sentence associated with outline item e1. The node information of node j21 corresponding to outline item e21 includes the related information Zjx21 of the child nodes of the outline item e21 and the child nodes of node i, as well as the position information Wz21 of the target sentence associated with outline item e21. The node information of node j22 corresponding to outline item e22 includes the related information Zjx22 of the child nodes of the outline item e22 and the child nodes of node i, as well as the position information Wz22 of the target sentence associated with outline item e22. The node information of node j31 corresponding to item e31 includes the outline item e31, the child node information of the child node of node i Zjx31, and the position information of the target sentence associated with outline item e31 Wz31; the node information of node j32 corresponding to outline item e32 includes the outline item e32, the child node information of the child node of node i Zjx32, and the position information of the target sentence associated with outline item e32 Wz32; the node information of node j33 corresponding to outline item e33 includes the outline item e33, the child node information of the child node of node i Zjx33, and the position information of the target sentence associated with outline item e33 Wz33; the node information of node j34 corresponding to outline item e34 includes the outline item e34, the child node information of the child node of node i Zjx34, and the position information of the target sentence associated with outline item e34 Wz34.
[0144] In this application, based on the semantic similarity between each outline item in the target outline and each original text statement in the target electronic document, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document, a target statement is determined for each outline item from multiple original text statements. The semantic similarity between the target statement and the corresponding outline item is not lower than the similarity threshold, ensuring that the target statement determined for each outline item is an original text statement with a high semantic similarity to that outline item, and the relative order of the target statements corresponding to multiple outline items in the target electronic document is consistent with the relative order of the multiple outline items in the target outline. The method of determining the target statement for each outline item is based on the orderliness of the original text statements in the target electronic document, the orderliness of the outline items in the target outline, and the semantic similarity between the outline items and the original text statements. By identifying the target original text statement within the target electronic document, it is ensured that the target statement identified for the outline item is indeed a direct quote from the original text content of the target electronic document whose main theme is the outline item. This guarantees the accuracy of the target statement identified for the outline item, and consequently, ensures that the original text content whose main theme is the outline item can be accurately located within the target electronic document based on the target statement identified for the outline item. Users do not need to manually flip through pages in the target electronic document to locate the original text content whose main theme is the triggered outline item. This significantly reduces the time required to locate the corresponding original text content from the outline item, improves the efficiency of locating the corresponding original text content from the outline item, and allows users to selectively jump to and read the original text content based on the outline item, thereby improving the user's reading experience and efficiency.
[0145] Meanwhile, in this embodiment, the importance of each key word in the outline item relative to the target original text sentence and the word relevance of each key word are first determined to determine the first semantic similarity between the outline item and the target original text sentence. Then, if the first semantic similarity of the original text sentence is less than the sentence similarity threshold, the longest common subsequence between the outline item and the original text sentence is determined. Based on the longest common subsequence, the outline item, and the original text sentence, the semantic similarity between the outline item and the original text sentence is determined. Combining the two methods to determine the semantic similarity between the outline item and the original text sentence improves the accuracy of semantic similarity, thereby making the target sentence determined based on semantic similarity more accurate.
[0146] In addition, by associating the location information of the target statement in the target electronic document with the corresponding outline item, the target statement associated with the outline item can be directly indexed through the location information associated with the outline item, thereby locating the original text content in the target electronic document whose main content is the outline item.
[0147] In some embodiments, due to the hierarchical relationship between outline items, if an outline item (let's say outline item A) has sub-outline items (e.g., outline items A1 to A3), then in the target electronic document, the original text content whose main theme is outline item A1, the original text content whose main theme is outline item A2, and the original text content whose main theme is outline item A3 are all part of the original text content whose main theme is outline item A in the target electronic document. Based on this, for outline items that have sub-outline items, it is not necessary to calculate the semantic similarity between the outline item and each original text statement.
[0148] For example, for each outline item, after the target statements of each sub-outline item of the outline item are determined in the target electronic document, the target sub-outline item that ranks first in the target outline can be determined, and the target statement associated with the target sub-outline item can be taken as the target statement associated with the outline item.
[0149] For example, the sub-outline items of outline item K include sub-outline items k1, k2, and k3, and the sub-outline items are ordered such that k1 comes before k2, and k2 comes before k3. In this case, sub-outline item k1 can be obtained as the target sub-outline item of outline item K, and the target statement of sub-outline item k1 can be obtained as the target statement of outline item K.
[0150] It's worth noting that if there are multi-level hierarchical relationships between outline items in the target outline, each outline item with sub-outline items can be exempted from semantic similarity calculation. Instead, only the outline items that are leaf nodes are used to calculate semantic similarity with the original text. For example, if outline item M has sub-outline items K, P, and Q (where outline item K precedes outline items P and Q in the target outline), and outline item K has sub-outline items k1, k2, and k3, where sub-outline items k1, k2, and k3 are leaf nodes, and sub-outline item k1 precedes k2 and k3 in the target outline, then the target text corresponding to outline item k1 can be considered the target text corresponding to outline item K, and the target text corresponding to outline item K can be considered the target text corresponding to outline item M. Based on the above embodiments, by utilizing the hierarchical relationship between outline items, the number of outline items that need to be calculated for semantic similarity can be significantly reduced, thus reducing the amount of computation and ensuring the accuracy of text association.
[0151] Please see Figure 4 , Figure 4 This application illustrates a flowchart of a page display method according to an embodiment of the present application. The method can be used in an electronic device, which may be... Figure 1 The terminal device 400 or server 200 in the middle, the method may include:
[0152] S210. Display the outline page of the target electronic document.
[0153] The outline page includes at least one outline item from the target outline of the target electronic document, and the at least one outline item includes a first outline item. That is, the first outline item is any one of the at least one outline item in the outline page.
[0154] After acquiring the target electronic document and the target outline, the electronic device can display the outline page of the target electronic document, which includes at least one outline from the target outline.
[0155] For example, outline pages such as Figure 5 As shown, outline page 50 exemplarily displays outline item 51, outline item 52, outline item 53, and outline item 54. Outline item 51, outline item 52, outline item 53, and outline item 54 can all serve as first outline items. Outline item 52, outline item 53, and outline item 54 are all sub-outline items of outline item 51.
[0156] In some implementations, the outline page may also include sub-argument entries for each outline item. For example, Figure 5 The passage, “Wherever there are people, there is a martial arts world. Everyone says the martial arts world is dangerous, but in my opinion, most of the grudges and feuds in the martial arts world come from the factional disputes within our Great Yu Dynasty!” is a sub-argument of Item 52, “The Birth of the Martial Arts Alliance Leader.”
[0157] In some embodiments, prior to S210, the method may further include: displaying a summary page of the target electronic document; the summary page includes an outline control; correspondingly, S210 includes: displaying the outline page of the target electronic document in response to a triggering operation on the outline control in the summary page.
[0158] Electronic devices can display a summary page of a target electronic document. If the target electronic document has a corresponding outline, an outline control can be displayed on the summary page. Triggering the outline control displays the target outline of the electronic document. When the summary page includes an outline control, the outline page of the target electronic document can be displayed in response to triggering the outline control on the summary page. This triggering operation can include single-click, double-click, long-press, or touch operations.
[0159] The description page of the target electronic document can display basic information such as name, author, number of readers, and total word count. Furthermore, it can also display the target electronic document's ranking information, recommendation information (such as recommendation index), evaluation information, and the number of comments.
[0160] For example, the introductory page of the target electronic document can be referred to Figure 6 As shown, the introduction page 60 may include an outline control 61. The electronic device can respond to the user's triggering operation on the outline control 61 and display, as shown in the figure. Figure 5 The outline page 50 and the introduction page 60 shown also include a "Read" control and an "Add to Bookshelf" control. When the user triggers the "Read" control, the original page of the target electronic document is displayed. When the user triggers the "Add to Bookshelf" control, the target electronic document is added to the bookshelf.
[0161] In some embodiments, the outline page of the target electronic document may be overlaid on the introduction page of the target electronic document, or overlaid on top of the introduction page in the form of a window.
[0162] S220. In response to a trigger operation on the first outline item in the outline page, display the first source page of the target document containing the target statement associated with the first outline item.
[0163] The trigger action for the first outline item on the outline page can be a single click, double click, long press, or tapping the location of the first outline item on the outline page. For example, Figure 5 If outline item 53 is the first outline item, then the trigger operation for outline item 53 can be a long press on the location of outline item 53 (any position within the dotted box surrounding outline item 53).
[0164] In this application, the original page containing the target statement associated with the first outline item in the target electronic document is referred to as the first original page. The original page refers to the original page used to display the original content of the target electronic document.
[0165] In this application, the target statement associated with the outline item refers to the target statement determined for the outline item in accordance with the aforementioned S110-S140.
[0166] After associating a target statement with each outline item, the electronic device can respond to the triggering operation of the first outline item, determine the document block where the target statement associated with the first outline item is located, and then display the reading page of the document block where the target statement is located as the first original text page.
[0167] For example, if the location information of the target statement in the target electronic document is associated with and stored in the electronic device along with the corresponding outline item, the electronic device displays the outline page of the target electronic document. Then, in response to a trigger operation on the first outline item in the outline page, the first location information corresponding to the first outline item is determined based on the associated and stored outline item and location information. The original text statement indicated by the first location information is then obtained as the target statement, and the document block in which the target statement is located is determined. Finally, the reading page of the document block in which the target statement is located is displayed as the first original text page.
[0168] For example, in Figure 5 In the text, the first outline item is 53. After triggering an action on outline item 53, the first original page displayed is as follows: Figure 7 As shown, the first original page is Figure 7 In section 70, the first original page 70 includes the target statement 71 associated with the first outline item 53. Figure 7 In the first outline item 53, the text of the target statement 71 is the same as the text of the first outline item. Of course, there may be cases where the text of the outline item is different from the text of the associated original statement.
[0169] In this embodiment, the outline page is first displayed. Then, in response to a trigger operation on the first outline item in the outline page, the first original text page containing the target statement associated with the first outline item is directly displayed. Since the target statement refers to the original text statement in the target electronic document whose main content is the first outline item, this achieves automatic jumping from the outline item in the outline page to the original text content of the triggered outline item in the target electronic document. Users do not need to manually flip through pages in the target electronic document to locate the original text content of the triggered outline item, thus significantly shortening the time to locate the corresponding original text content from the outline item and improving the efficiency of locating the corresponding original text content from the outline item in the outline. This allows users to selectively jump to the original text content based on the outline item for selective reading, thereby improving the user's reading experience and efficiency.
[0170] In some embodiments, the page that displays the original text content and is accessed by triggering the outline item can be the same as the reading page that is accessed by triggering the introduction page.
[0171] In some embodiments, the original text page accessed by triggering the outline item and displaying the original text content may be different from the original text page accessed by triggering the "Read" control in the introduction page. That is, in this case, the application provides two original text pages for displaying the original text content. In this case, for ease of distinction, the original text page accessed by triggering the "Read" control in the introduction page is referred to as the standard reading page.
[0172] The page displaying the original text content, accessed by triggering an outline item (such as the first original text page mentioned above), can display outline-related controls. These controls include, for example, a next outline item jump control for jumping to the original text page associated with the next outline item, a previous outline item jump control for jumping to the original text page associated with the previous outline item, and a return control for returning to the outline page. For clarity, the original text page displaying outline-related controls will be referred to as the outline-related original text page; correspondingly, the first original text page is the outline-related original text page.
[0173] It's worth noting that in this case, both the original text page accessed by triggering the outline and the original text page accessed by triggering the "Read" control in the introduction page can display the original text content of the target electronic document. The controls on the two original text pages differ. This standard reading page can display one or more commonly used reading controls provided by the reading application client, such as controls for adjusting font size, adjusting page brightness, displaying reading progress, triggering access to the table of contents, jumping to the next page, and jumping to the previous page.
[0174] In some embodiments, the commonly used reading controls listed above may also be displayed on the outline-related original text page. That is, in this case, the difference between the outline-related original text page and the standard reading page is that the standard reading page does not provide outline-related controls, while the outline-related original text page will display outline-related controls.
[0175] If the original text page accessed by triggering the outline item differs from the original text page accessed by triggering the "Read" control in the summary page, the method can switch from the standard reading page to the outline page of the electronic document. In this case, before S210, the method may further include: displaying a first standard reading page of the target electronic document, wherein the first standard reading page displays the original text content of one page of the target electronic document; the first standard reading page includes a table of contents control; in response to a trigger operation on the table of contents control in the first standard reading page, displaying a table of contents page, wherein the table of contents page displays the table of contents of the target electronic document, and the table of contents page further includes an outline switching control; correspondingly, S210 may include: in response to a trigger operation on the outline switching control in the table of contents page, displaying the outline page of the target electronic document.
[0176] The first standard reading page is one of the standard reading pages of the target electronic document. The outline switching control is used to switch from the table of contents to the outline page. It can respond to a trigger action (a single click, double click, or long press) on the table of contents control on the first standard reading page to display the table of contents. The table of contents page displays the target electronic document's table of contents and the outline switching control. When the table of contents page is displayed, it can respond to a trigger action (a single click, double click, or long press) on the outline switching control to enter the outline page.
[0177] For example, such as Figure 8 As shown, the first standard reading page 80 includes a document block 81 and a table of contents control 82. It can display a table of contents page in response to a click on the table of contents control 82. The table of contents page is as follows: Figure 9 As shown, the table of contents page 90 includes a table of contents 91 for the target electronic document and an outline switching control 92. In response to a click on the outline switching control 92, the following is displayed: Figure 5 The outline page shown.
[0178] As mentioned above, the outline page can be displayed in response to the triggering operation of the outline control on the introduction page before the user reads the target electronic document, or it can be displayed in response to the triggering operation of the table of contents control during the user's reading of the target electronic document (reading the original text content of the first standard reading page).
[0179] In one embodiment, after S220, the method may further include: in response to a triggering operation on the outline return control, returning the outline page displaying the target electronic document.
[0180] The first original page includes an outline return control. In response to the triggering operation of the outline return control, the outline page of the target electronic document is returned and displayed.
[0181] like Figure 7 As shown, the first outline page may include a back control 72. In response to a triggering action of the back control 72 (which may be a single click, double click, or long press), the following will be displayed: Figure 5 The outline page shown is 60.
[0182] In this embodiment, a return control is provided to facilitate returning from the page displaying the original text content to the outline page, thereby enabling switching between the original text page and the outline page and improving reading efficiency.
[0183] In one embodiment, the first original page further includes a next outline item jump control. After S220, the method may further include: in response to a triggering operation of the next outline item jump control, displaying the second original page of the target electronic document where the target statement associated with the second outline item is located; the second outline item refers to the next outline item of the first outline item in the target outline.
[0184] The first original page includes a next outline item jump control; the electronic device can respond to the triggering operation of the next outline item jump control, determine the outline item located after the first outline item as the second outline item, then obtain the target statement associated with the second outline item, obtain the document block where the target statement associated with the second outline item is located, and then display the standard reading page of the document block where the target statement associated with the second outline item is located as the second original page.
[0185] For example, such as Figure 7 As shown, the first outline page may include a next outline item jump control 73. In response to a triggering operation of the next outline item jump control 73 (the triggering operation can be a single click, double click, or long press), the following display will appear: Figure 10 The second original page shown, the second original page 100 includes, as follows: Figure 5 The target statement 1001 is associated with the second outline item 54 after the first outline item 53 shown.
[0186] In some embodiments, when the first source page is an outline-related source page, the second source page is also an outline-related source page, and outline-related controls can also be displayed on the second source page. Examples include the next outline item jump control listed above for jumping to the source page of the source page associated with the next outline item, the previous outline item jump control for jumping to the source page of the source page associated with the previous outline item, and the return control for returning to the outline page. For example, in... Figure 10 In the middle, the second original page includes a jump control for the next outline item 73.
[0187] When switching from the first original document page to the second original document page, the original document content displayed on the first original document page may differ from that displayed on the second original document page. However, if the target statement associated with the first outline item and the target statement associated with the second outline item are located on the same page of the target electronic document, the original document content displayed on the first original document page and the original document content displayed on the second original document page will correspond to each other.
[0188] In this embodiment, by setting a jump control for the next outline item, it is easy to directly jump to the original text page where the sentence associated with the next outline item is located. This enables jumping to the original text content at the granular level of outline items, eliminating the need to manually return to the outline page and reselect the next outline item to jump to the original text page where the sentence associated with the next outline item is located, thus improving reading efficiency.
[0189] In one embodiment, the first original text page further includes a previous outline item jump control. After S220, the method may further include: in response to a triggering operation on the previous outline item jump control, displaying the third original text page in the target electronic document where the target statement associated with the third outline item is located; the third outline item refers to the previous outline item of the first outline item in the target outline.
[0190] The first original page includes a previous outline item jump control; the electronic device can respond to the triggering operation of the previous outline item jump control, determine the outline item located after the first outline item as the third outline item, then obtain the target statement associated with the third outline item, obtain the document block where the target statement associated with the third outline item is located, and then display the standard reading page of the document block where the target statement associated with the third outline item is located as the third original page.
[0191] Similarly, if the first original page is an outline-related original page, the third original page is also an outline-related original page, and outline-related controls can also be displayed on the third original page.
[0192] Similarly, when switching from the first original document page to the third original document page, the original document content displayed on the first original document page may differ from that displayed on the third original document page (i.e., the target statement associated with the first outline item and the target statement associated with the third outline item are not located on the same page in the target electronic document). Of course, if the target statement associated with the first outline item and the target statement associated with the third outline item are located on the same page in the target electronic document, the original document content displayed on the first original document page and the original document content displayed on the third original document page will correspond to the same content.
[0193] In this embodiment, by setting a jump control for the previous outline item, it is easy to jump to the original text page where the sentence associated with the previous outline item is located. There is no need to manually return to the outline page and then reselect the previous outline item to jump to the original text page where the target sentence associated with the previous outline item is located, thus improving reading efficiency.
[0194] In some embodiments, the outline-related original text page may also display corresponding outline items so that users can know the outline items corresponding to the original text content presented on the current original text page. For example, the first outline item is... Figure 6 When the outline item 53 is shown, the first original page is as follows: Figure 7As shown, the first original page 70 includes outline item 53, which is located in the outline display control 75 within the first original page. It is worth noting that, since the target statements associated with two or more adjacent outline items may be located on the same page of the target electronic document, in this case, the corresponding original page can display one outline item or multiple outline items.
[0195] When only one outline item is displayed on the original page, the displayed outline item is the one associated with the target statement that appears first in the original content of that page. In one embodiment, when the first outline item is displayed on the first original page, after S220, the method may further include: in response to a page-turning operation triggered on the first original page, displaying a fourth original page, the original content displayed on the fourth original page being the next page of the original content displayed on the first original page in the target electronic document; if the original content displayed on the fourth original page does not include the target statement associated with the second outline item, displaying the first outline item on the fourth original page; if the original content displayed on the fourth original page includes the target statement associated with the second outline item, displaying the second outline item on the fourth original page; the second outline item refers to the next outline item in the target outline after the first outline item.
[0196] The operation of turning to the next page can be swiping the first original page (e.g., swiping from right to left), clicking the page-turning control on the first original page, or double-clicking the first original page.
[0197] It is understandable that if the first original page is an outline-related original page, then the fourth original page is also an outline-related original page. The fourth original page can also display outline-related controls.
[0198] The first outline item is Figure 6 When the outline item 53 is shown, the first original page is as follows: Figure 7 As shown; the first original page 70 includes an outline item 53, which is located in the outline display control 75 in the first original page; after responding to the first original page's page-turning operation, the fourth original page is displayed, which refers to the original page that includes the next document block after the document block containing the target statement associated with the first outline item.
[0199] If the original text displayed on the fourth page includes content related to... Figure 5 If the target statement is associated with the second outline item 54 following outline item 53, then the fourth original page can be as follows: Figure 11 As shown, the fourth original page 110 includes a second outline item 54 and an associated target statement 1101. The second outline item 54 is displayed in the outline display control 75 on the fourth original page.
[0200] If the original text displayed on the fourth original page does not include the target statement associated with the second outline item, then the fourth original page can be as follows: Figure 12 As shown, the fourth original page 120 includes a first outline item 53, which is displayed in the outline display control 75 on the fourth original page.
[0201] It is worth mentioning, such as Figure 11 and 12 As shown, the fourth original page may also include the next outline item jump control 73, the previous outline item jump control 74, and the return control 72 involved in the aforementioned embodiments. The functions of the next outline item jump control 73, the previous outline item jump control 74, and the return control 72 will not be described again.
[0202] In this embodiment, the original text page (such as the first original text page) includes outline items. The outline items displayed on the original text page change as the original text page is turned to the next page, which makes it easier for users to intuitively know the outline items associated with the original text content in the original text page after switching, thus improving the reading experience.
[0203] In one embodiment, after S220, the method may further include: in response to a page-back operation triggered by the first original page, displaying a fifth original page, wherein the original content presented in the fifth original page is the content of the previous page of the original content displayed on the first original page in the target electronic document; if the original content displayed in the fifth original page does not include the target statement associated with the third outline item, displaying the first outline item in the fifth original page; if the original content displayed in the fifth original page includes the target statement associated with the third outline item, displaying the third outline item in the fifth original page; the third outline item refers to the outline item preceding the first outline item in the target outline; the target statement associated with the third outline item refers to the original statement in the original content of the target electronic document whose main content is the third outline item.
[0204] The operation of turning to the previous page can be swiping the first original page (e.g., swiping from left to right), clicking the page-turning control on the first original page, or double-clicking the first original page.
[0205] It's understandable that if the first original page is an outline-related page, then the fifth original page is also an outline-related page. The fifth original page can also display outline-related controls.
[0206] In this embodiment, by setting a jump control for the previous outline item, it is easy to directly jump to the original text page where the statement associated with the previous outline item is located. This enables jumping to the original text content at the granular level of outline items, eliminating the need to manually return to the outline page and reselect the previous outline item to jump to the original text page where the statement associated with the previous outline item is located, thus improving reading efficiency.
[0207] In one embodiment, after S220, the method may further include: in response to a close operation triggered by a first outline item displayed on a first original document page, displaying a second standard reading page of the target electronic document, wherein the original document content displayed on the second standard reading page is the same as the original document content displayed on the first original document page, the second standard reading page has different controls from the first original document page, and the first outline item is not displayed on the second standard reading page.
[0208] The closing operation can include triggering an operation on the location of the first outline item in the first original page (including clicking, double-clicking, or long-pressing) or closing an operation on the outline display control that displays the first outline item in the first original page (the control closing operation can include clicking the outline display control, double-clicking the outline display control, long-pressing the outline display control, and clicking the close button in the outline display control).
[0209] Given the above distinction, the second standard reading page does not include outline-related controls, but displays regular reading controls.
[0210] In response to the close operation triggered by the first outline item, the system can switch from outline reading mode (i.e., the reading mode that displays outline-related pages) to standard reading mode (i.e., the standard reading mode that does not display outline-related controls), allowing users to switch between the two reading modes as needed.
[0211] After displaying the second standard reading page, the first original text page can also be displayed in response to the call-out operation. That is, the first outline item and the hidden controls can continue to be displayed. The call-out operation can include clicking, double-clicking, or long-pressing a blank part of the second standard reading page.
[0212] On the first original page as shown Figure 7 As shown, the first original page 70 includes an outline item 53, which is located in the outline display control 75 on the first original page; in response to the click of the close button 751, the electronic device displays a second standard reading page, as shown in the image. Figure 13As shown, the second standard reading page only includes the document block 1301 that the first original page needs to display. The second standard reading page no longer includes the return control 72, the next outline item jump control 73, the previous outline item jump control 74, and the outline display control 75 (the outline display control 75 is not displayed, and the close button 751 in the outline display control 75 will not continue to be displayed). Figure 10-12 The original text page also shows the corresponding outline items and a close button 751 for triggering the closing of the displayed outline items (that is, the close button 751 can also be regarded as a control for switching from outline reading mode (i.e., reading mode that displays outline-related pages) to standard reading mode (i.e., standard reading mode that does not display outline-related controls)).
[0213] Please see Figure 14 , Figure 14 A block diagram of a text association device according to an embodiment of this application is shown. The text association device 1400 includes:
[0214] The acquisition module 1410 is used to acquire the target electronic document and the target outline of the target electronic document. The target outline includes multiple outline items; the target electronic document includes multiple original text statements.
[0215] The first determining module 1420 is used to determine the semantic similarity between each major outline item and each original sentence in the target electronic document;
[0216] The second determining module 1430 is used to determine a target statement for each of the multiple original statements based on semantic similarity, the position information of each outline item in the target outline, and the position information of each original statement in the target electronic document; the relative order of the target statements corresponding to the multiple outline items in the target electronic document is consistent with the relative order of the multiple outline items in the target outline; the semantic similarity between the target statement and the corresponding outline item is not lower than the similarity threshold;
[0217] The association module 1440 is used to associate target statements with corresponding outline items; the target statement associated with an outline item is used to locate the original text content in the target electronic document whose main idea is the outline item.
[0218] Optionally, the second determining module 1430 is further configured to: sort multiple outline items according to their position information in the target outline, in order of priority within the target outline, to obtain a first sort; determine a candidate original text statement for each outline item from multiple original text statements based on semantic similarity; ensure that the semantic similarity between each candidate original text statement and its corresponding outline item is not lower than a similarity threshold; sort multiple candidate original text statements according to their position information in the target electronic document, in order of priority within the target electronic document, to obtain a second sort; traverse multiple outline items according to the first sort; if the current outline item's index in the first sort is the same as the candidate original text statement's index in the second sort, use the candidate original text statement corresponding to the current outline item as the target statement corresponding to the current outline item; and traverse the next outline item in the first sort until the last outline item in the first sort is reached.
[0219] Optionally, the second determining module 1430 is further configured to, if the sequence number of the current outline item in the first sorting is different from the sequence number of the candidate original text statement corresponding to the current outline item in the second sorting, re-determine a new candidate original text statement for the current outline item from the original text statements other than the candidate original text statement corresponding to the current outline item; the semantic similarity between the new candidate original text statement and the current outline item is not lower than the similarity threshold, and the new candidate original text statement is located after the target statement corresponding to the previous traversed outline item in the target electronic document; the new candidate original text statement is re-determined as the target statement corresponding to the current outline item; the next outline item in the first sorting is traversed until the last outline item in the first sorting is traversed.
[0220] Optionally, the second determining module 1430 is further configured to, for each outline item, determine the original text statement with the highest semantic similarity to the outline item from among multiple original text statements based on semantic similarity, and use it as the candidate original text statement corresponding to the outline item.
[0221] Optionally, the second determining module 1430 is further configured to sort multiple outline items according to their position information in the target outline, in order of priority within the target outline, to obtain a first sort; for the i-th outline item in the first sort, if i = 1, the original text statement with the highest semantic similarity to the i-th outline item among the multiple original text statements is taken as the target statement corresponding to the i-th outline item; i is an integer, and i ≤ N, where N is the total number of outline items in the target outline; if i is greater than 1, the target statement is determined from the multiple candidate statements based on their position information in the target electronic document. The candidate statement at the beginning of the target electronic document is taken as the target statement corresponding to the i-th outline item. A candidate statement is a statement in the original text that is located after the target statement corresponding to the (i-1)-th outline item in the target electronic document and has a semantic similarity of not less than the similarity threshold with the i-th outline item. Increment i by 1 and return to the execution step if i is greater than 1. Based on the position information of each candidate statement in the target electronic document, determine the candidate statement at the beginning of the target electronic document as the target statement corresponding to the i-th outline item, until i = N.
[0222] Optionally, the first determining module 1420 is further configured to determine the word segmentation relevance of each key word in the outline item in the target electronic document for each outline item; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; the importance of each key word relative to the target original text sentence is determined according to the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of multiple original text sentences; the semantic similarity between the outline item and the target original text sentence is determined according to the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word.
[0223] Optionally, the first determining module 1420 is further configured to, for each outline item, determine the word segmentation relevance of each key word in the target electronic document; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; based on the frequency of each key word in the target original text sentence, determine the importance of each key word relative to the target original text sentence; wherein, the target original text sentence is any one of multiple original text sentences; based on the importance of each key word relative to the target original text sentence and the word segmentation relevance of each key word, determine the first semantic similarity between the outline item and the target original text sentence; if the first semantic similarity is not less than the sentence similarity threshold, obtain the first semantic similarity as the semantic similarity between the outline item and the target original text sentence; if the first semantic similarity is less than the sentence similarity threshold, determine the longest common subsequence between the outline item and the target original text sentence; based on the longest common subsequence, the outline item, and the original text sentence, determine the semantic similarity between the outline item and the target original text sentence.
[0224] Optionally, the association module 1440 is also used to associate and store the location information of the target statement in the target electronic document with the corresponding outline item.
[0225] Please see Figure 15 , Figure 15 This illustration shows a block diagram of a page display device according to an embodiment of the present application. The page display device 1500 includes:
[0226] Display module 1510 is used to display the outline page of the target electronic document. The outline page includes at least one outline item in the target outline of the target electronic document, and the at least one outline item includes a first outline item.
[0227] The response module 1520 is used to respond to a trigger operation on the first outline item in the outline page and display the first original text page where the target statement associated with the first outline item is located in the target electronic document; the target statement associated with each outline item is determined according to the text association method described above in this embodiment.
[0228] Optionally, the first original page includes an outline return control; the response module 1520 is also used to return the outline page of the target electronic document in response to the trigger operation of the outline return control.
[0229] Optionally, the first original page includes a next outline item jump control; the response module 1520 is also used to respond to the triggering operation of the next outline item jump control to display the second original page where the target statement associated with the second outline item is located in the target electronic document; the second outline item refers to the next outline item of the first outline item in the target outline.
[0230] Optionally, the first original page includes a previous outline item jump control; the response module 1520 is also used to respond to the trigger operation of the previous outline item jump control to display the third original page in the target electronic document where the target statement associated with the third outline item is located; the third outline item refers to the previous outline item of the first outline item in the target outline.
[0231] Optionally, the first original page displays the first outline item; the response module 1520 is further configured to respond to a page-turning operation triggered on the first original page by displaying a fourth original page, wherein the original content displayed on the fourth original page is the content of the next page of the original content displayed on the first original page in the target electronic document; if the original content displayed on the fourth original page does not include the target statement associated with the second outline item, the first outline item is displayed on the fourth original page; if the original content displayed on the fourth original page includes the target statement associated with the second outline item, the second outline item is displayed on the fourth original page; the second outline item refers to the next outline item in the target outline after the first outline item.
[0232] Optionally, the first original page displays the first outline item; the response module 1520 is further configured to respond to a page-back operation triggered on the first original page by displaying the fifth original page, wherein the original content presented on the fifth original page is the content of the previous page of the original content displayed on the first original page in the target electronic document; if the original content displayed on the fifth original page does not include the target statement associated with the third outline item, the first outline item is displayed on the fifth original page; if the original content displayed on the fifth original page includes the target statement associated with the third outline item, the third outline item is displayed on the fifth original page; the third outline item refers to the outline item preceding the first outline item in the target outline.
[0233] Optionally, the display module 1510 is also used to display a summary page of the target electronic document; the summary page includes an outline control; in response to a triggering operation on the outline control in the summary page, the outline page of the target electronic document is displayed.
[0234] Optionally, the display module 1510 is further configured to display a first standard reading page of the target electronic document, wherein the first standard reading page displays the original text content of one page of the target electronic document; the first standard reading page includes a table of contents control; in response to a trigger operation of the table of contents control in the first standard reading page, a table of contents page is displayed, wherein the table of contents page displays the table of contents of the target electronic document, and the table of contents page also includes an outline switching control; in response to a trigger operation of the outline switching control in the table of contents page, an outline page of the target electronic document is displayed.
[0235] Optionally, the first outline item is displayed on the first original page; the response module 1520 is further configured to respond to a close operation triggered by the first outline item displayed on the first original page, and display a second standard reading page of the target electronic document. The original content displayed on the second standard reading page is the same as the original content displayed on the first original page. The second standard reading page has different controls from the first original page, and the first outline item is not displayed on the second standard reading page.
[0236] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0237] Figure 16 A structural block diagram of an electronic device for performing a page display method and a text association method according to embodiments of this application is shown. The electronic device may be... Figure 1 For example, a server with 200 or a terminal device with 400, etc. It should be noted that... Figure 16 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0238] like Figure 16 As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.
[0239] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0240] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.
[0241] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0242] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0243] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0244] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable storage medium carries computer instructions that, when executed by a processor, implement the methods in any of the above embodiments.
[0245] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the electronic device to perform the methods of any of the above embodiments.
[0246] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal. It can be implemented wholly or partially using software, hardware (e.g., processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that functions as a whole.
[0247] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0248] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause an electronic device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0249] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that this application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A text association method, characterized in that, The method includes: Obtain the target electronic document and the target outline of the target electronic document, wherein the target outline includes multiple outline items; the target electronic document includes multiple original text statements; Determine the semantic similarity between each outline item and each original sentence in the target electronic document; Based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each original text statement in the target electronic document, a target statement is determined for each outline item among the plurality of original text statements; the relative order of the target statements corresponding to the plurality of outline items in the target electronic document is consistent with the relative order of the plurality of outline items in the target outline; the semantic similarity between the target statement and the corresponding outline item is not lower than the similarity threshold; The target statement is associated with the corresponding outline item; the target statement associated with an outline item is used to locate the original text content in the target electronic document whose main idea is the outline item.
2. The method according to claim 1, characterized in that, The step of determining a target statement for each outline item from among the multiple source text statements, based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each source text statement in the target electronic document, includes: Based on the position information of each outline item in the target outline, the multiple outline items are sorted in the target outline in order from first to last to obtain a first sort; Based on the semantic similarity, a candidate original text statement is determined for each outline item from the plurality of original text statements; the semantic similarity between each candidate original text statement and the corresponding outline item is not lower than the similarity threshold. Based on the position information of each candidate original text statement in the target electronic document, the multiple candidate original text statements are sorted in the target electronic document in order from first to last to obtain a second sort; Traverse the multiple outline items according to the first sorting order; If the current outline item's index in the first sorting is the same as the candidate original text statement corresponding to the current outline item's index in the second sorting, then the candidate original text statement corresponding to the current outline item is taken as the target statement corresponding to the current outline item, and the next outline item in the first sorting is traversed until the last outline item in the first sorting is reached.
3. The method according to claim 2, characterized in that, After traversing the plurality of outline items according to the first sorting, the method further includes: If the sequence number of the current outline item in the first sorting is different from the sequence number of the candidate original text statement corresponding to the current outline item in the second sorting, a new candidate original text statement is re-determined for the current outline item from the original text statements other than the candidate original text statement corresponding to the current outline item; the semantic similarity between the new candidate original text statement and the current outline item is not lower than the similarity threshold, and the new candidate original text statement is located after the target statement corresponding to the previous traversed outline item in the target electronic document; A new candidate original text statement will be re-determined for the current outline item as the target statement corresponding to the current outline item; Iterate through the next outline item in the first sorting until the last outline item in the first sorting is reached.
4. The method according to claim 2, characterized in that, The step of determining a candidate original text statement for each outline item from the plurality of original text statements based on the semantic similarity includes: For each outline item, based on the semantic similarity, the original text statement with the highest semantic similarity to the outline item is determined from among the multiple original text statements and used as the candidate original text statement corresponding to the outline item.
5. The method according to claim 1, characterized in that, The step of determining a target statement for each outline item from among the multiple source text statements, based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each source text statement in the target electronic document, includes: Based on the position information of each outline item in the target outline, the multiple outline items are sorted in the target outline in order from first to last to obtain a first sort; For the i-th outline item in the first sort, if i = 1, the original text statement with the highest semantic similarity to the i-th outline item among the multiple original text statements is taken as the target statement corresponding to the i-th outline item; i is an integer, and i ≤ N, where N is the total number of outline items in the target outline; If i is greater than 1, based on the position information of each candidate statement in the target electronic document, the candidate statement at the beginning of the target electronic document is determined from the multiple candidate statements and is taken as the target statement corresponding to the i-th outline item; the candidate statement refers to the original text statement in the target electronic document that is located after the target statement corresponding to the (i-1)-th outline item and has a semantic similarity with the i-th outline item that is not lower than the similarity threshold. Increment i by 1 and return to the step of determining the first candidate statement in the target electronic document based on the position information of each candidate statement in the target electronic document, if i is greater than 1, as the target statement corresponding to the i-th outline item, until i = N.
6. The method according to claim 1, characterized in that, Determining the semantic similarity between each outline item and each original sentence in the target electronic document includes: For each of the outline items, determine the word segmentation relevance of each key word in the outline item to the target electronic document; the word segmentation relevance is used to indicate the importance of the key word relative to the target electronic document; The importance of each key word relative to the target original text sentence is determined based on the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of the plurality of original text sentences; Based on the importance of each key word relative to the target original text sentence and the word relevance of each key word, the semantic similarity between the outline item and the target original text sentence is determined.
7. The method according to claim 1, characterized in that, Determining the semantic similarity between each outline item and each original sentence in the target electronic document includes: For each major outline item, the word segmentation relevance of each key word in the outline item to the target electronic document is determined; the word segmentation relevance of the key word is used to indicate the importance of the key word relative to the target electronic document; The importance of each key word relative to the target original text sentence is determined based on the frequency of occurrence of each key word in the target original text sentence; wherein, the target original text sentence is any one of the plurality of original text sentences; Based on the importance of each key word relative to the target original text sentence and the word relevance of each key word, the first semantic similarity between the outline item and the target original text sentence is determined. If the first semantic similarity is not less than the statement similarity threshold, the first semantic similarity is obtained as the semantic similarity between the outline item and the target original statement; If the first semantic similarity is less than the statement similarity threshold, determine the longest common subsequence between the outline item and the target original statement; determine the semantic similarity between the outline item and the target original statement based on the longest common subsequence, the outline item, and the original statement.
8. The method according to claim 1, characterized in that, Associating the target statement with the corresponding outline item includes: The location information of the target statement in the target electronic document is associated with and stored with the corresponding outline item.
9. A page display method, characterized in that, The method includes: Displays an outline page of the target electronic document, the outline page including at least one outline item in the target outline of the target electronic document, the at least one outline item including a first outline item; In response to a trigger operation on a first outline item in the outline page, the first original text page containing the target statement associated with the first outline item in the target electronic document is displayed; the target statement associated with each outline item is determined according to the text association method according to any one of claims 1-8.
10. The method according to claim 9, characterized in that, The first original page includes an outline return control; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to a trigger operation on the outline return control, the outline page of the target electronic document is returned to display.
11. The method according to claim 9, characterized in that, The first original page includes a jump control for the next outline item; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to the triggering operation of the next outline item jump control, the second original text page of the target document containing the target statement associated with the second outline item is displayed; the second outline item refers to the next outline item of the first outline item in the target outline.
12. The method according to claim 9, characterized in that, The first original page includes a jump control to the previous outline item; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to the triggering operation of the jump control of the previous outline item, the third original text page of the target document containing the target statement associated with the third outline item is displayed; the third outline item refers to the previous outline item of the first outline item in the target outline.
13. The method according to claim 9, characterized in that, The first outline item is displayed on the first original page; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to a page-turning operation triggered on the first original page, a fourth original page is displayed. The original content displayed on the fourth original page is the content of the next page after the original content displayed on the first original page in the target electronic document. If the original content displayed on the fourth original page does not include the target statement associated with the second outline item, the first outline item is displayed on the fourth original page. If the original content displayed on the fourth original page includes the target statement associated with the second outline item, the second outline item is displayed on the fourth original page. The second outline item refers to the next outline item in the target outline after the first outline item.
14. The method according to claim 9, characterized in that, The first outline item is displayed on the first original page; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to a page-back operation triggered on the first original text page, a fifth original text page is displayed. The original text content presented on the fifth original text page is the content of the previous page of the original text content displayed on the first original text page in the target electronic document. If the original text content displayed on the fifth original text page does not include the target statement associated with the third outline item, the first outline item is displayed on the fifth original text page. If the original text content displayed on the fifth original text page includes the target statement associated with the third outline item, the third outline item is displayed on the fifth original text page. The third outline item refers to the outline item preceding the first outline item in the target outline.
15. The method according to claim 9, characterized in that, Before displaying the outline page of the target electronic document, the method further includes: The summary page of the target electronic document is displayed; the summary page includes an outline control; The outline page displaying the target electronic document includes: In response to a triggering operation of the outline control in the introduction page, the outline page of the target electronic document is displayed.
16. The method according to claim 9, characterized in that, Before displaying the outline page of the target electronic document, the method further includes: The first standard reading page of the target electronic document is displayed, and the first standard reading page displays the original text content of one page of the target electronic document; the first standard reading page includes a table of contents control; In response to a trigger operation on the table of contents control in the first standard reading page, a table of contents page is displayed, which displays the table of contents of the target electronic document and also includes an outline switching control; The outline page displaying the target electronic document includes: In response to a triggering operation of the outline switching control in the directory page, the outline page of the target electronic document is displayed.
17. The method according to any one of claims 9 to 16, characterized in that, The first outline item is displayed on the first original page; After responding to a trigger operation on a first outline item in the outline page and displaying the first original text page containing the target statement associated with the first outline item in the target electronic document, the method further includes: In response to a close operation triggered by the first outline item displayed on the first original document page, a second standard reading page of the target electronic document is displayed. The original document content displayed on the second standard reading page is the same as that displayed on the first original document page. The second standard reading page has different controls from the first original document page, and the first outline item is not displayed on the second standard reading page.
18. A text association device, characterized in that, The device includes: The acquisition module is used to acquire a target electronic document and a target outline of the target electronic document, wherein the target outline includes multiple outline items; and the target electronic document includes multiple original text statements. The first determining module is used to determine the semantic similarity between each of the outline items and each original text statement in the target electronic document; The second determining module is used to determine a target statement for each outline item among the plurality of original statements based on the semantic similarity, the position information of each outline item in the target outline, and the position information of each original statement in the target electronic document; the relative order of the target statements corresponding to the plurality of outline items in the target electronic document is consistent with the relative order of the plurality of outline items in the target outline; the semantic similarity between the target statement and the corresponding outline item is not lower than a similarity threshold; The association module is used to associate the target statement with the corresponding outline item; the target statement associated with an outline item is used to locate the original text content in the target electronic document whose main idea is the outline item.
19. A page display device, characterized in that, The device includes: A display module is used to display the outline page of a target electronic document, the outline page including at least one outline item in the target outline of the target electronic document, the at least one outline item including a first outline item; A response module is configured to respond to a trigger operation on a first outline item in the outline page by displaying the first original text page of the target electronic document containing the target statement associated with the first outline item; the target statement associated with each outline item is determined according to the text association method according to any one of claims 1-8.
20. An electronic device, characterized in that, include: processor; A memory storing computer instructions that, when executed by the processor, implement the method as described in any one of claims 1-17.
21. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-17.
22. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-17.