Text summarization method, apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202310506167.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-05-05
AI Technical Summary
[0004]本发明提供一种文本摘录方法、装置、电子设备和存储介质,用以解决现有技术中生成的摘要无法重点体现用户所关注的内容的缺陷
[0034]本发明提供的文本摘录方法、装置、电子设备和存储介质,通过基于用户操作从文档中定位相应的关键内容,以实现针对关键内容进行文本摘录,从而生成关键内容所对应的摘录文本,由此得到的摘录文本能够重点体现用户所关注的内容,使得用户通过摘录文本可以快速获取到所关注的重点信息。
Smart Images

Figure CN117251090B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a text extraction method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of the internet, people receive a vast amount of information every day, such as news, blogs, academic papers, microblogs, and chat logs. To improve the efficiency of information acquisition, it is necessary to extract this information and generate concise summaries so that people can grasp the basic content or key points of the relevant information through these summaries, facilitating previewing.
[0003] Existing summarization technologies typically extract summaries from the full text. However, in practical applications, especially when summarizing long texts such as work reports and meeting summaries, users may focus on specific points or sections within the text. Existing technologies that directly extract summaries from the full text fail to highlight the content of interest to the user, preventing them from quickly obtaining the key information they need. Summary of the Invention
[0004] This invention provides a text extraction method, apparatus, electronic device, and storage medium to address the shortcomings of existing technologies in generating summaries that fail to highlight the content of interest to the user.
[0005] This invention provides a text extraction method, comprising:
[0006] Receive user actions;
[0007] In response to the user action, locate the key content corresponding to the user action from the document;
[0008] Based on the document, text extraction is performed on the key content to obtain the extracted text of the key content.
[0009] According to a text extraction method provided by the present invention, the step of locating key content corresponding to the user operation from a document in response to the user operation includes:
[0010] In response to the user action, locate the text segment corresponding to the user action from the document;
[0011] The text fragments are used as options to construct a fragment list and are then displayed.
[0012] Upon receiving a selection operation, and in response to the selection operation, determine the text fragment corresponding to the selected option from the fragment list, as the key content.
[0013] According to a text extraction method provided by the present invention, the step of extracting text from the document based on the key content to obtain the extracted text of the key content includes:
[0014] Based on the semantic relevance between the key content and each segment in the document, the relevant segments of the key content are determined from each segment;
[0015] Based on the relevant passages, text extraction is performed on the key content to obtain the extracted text of the key content.
[0016] According to a text extraction method provided by the present invention, after locating the key content corresponding to the user operation from the document in response to the user operation, the method further includes:
[0017] Based on the key content and the document, a summary text for the document is generated.
[0018] According to a text extraction method provided by the present invention, generating a summary text for the document based on the key content and the document includes:
[0019] Based on the document and the extracted text of the key content, a summary text for the document is generated.
[0020] According to a text extraction method provided by the present invention, the method further includes extracting key content from the document to obtain extracted text of the key content, and then includes:
[0021] Select fragments related to the key content from the excerpted text and / or the summary text of the document as key fragments;
[0022] The key fragment is displayed in a first form, and the excerpted text and / or fragments in the summary text other than the key fragment are displayed in a second form.
[0023] According to a text extraction method provided by the present invention, the method further includes extracting key content from the document to obtain extracted text of the key content, and then includes:
[0024] Receive matching input;
[0025] In response to the matching input, determine the content to be matched selected by the matching input from the excerpted text and / or the summary text of the document, and determine the target content related to the content to be matched from the document;
[0026] Display the target content.
[0027] The present invention also provides a text extraction device, comprising:
[0028] The receiving unit is used to receive user operations;
[0029] A positioning unit is used to locate the key content corresponding to the user operation from the document in response to the user operation;
[0030] The extraction generation unit is used to extract text from the document, focusing on the key content, to obtain the extracted text of the key content.
[0031] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the text extraction method as described above.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the text extraction method as described above.
[0033] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the text extraction method as described above.
[0034] The text extraction method, apparatus, electronic device, and storage medium provided by this invention locate corresponding key content from a document based on user operations, thereby enabling text extraction of key content and generating extracted text corresponding to the key content. The resulting extracted text highlights the content that the user is interested in, allowing the user to quickly obtain the key information they are interested in through the extracted text. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 This is one of the flowcharts illustrating the text extraction method provided by the present invention;
[0037] Figure 2 This is a flowchart illustrating step 120 in the text extraction method provided by the present invention;
[0038] Figure 3 This is a flowchart illustrating step 130 in the text extraction method provided by the present invention;
[0039] Figure 4This is the second flowchart illustrating the text extraction method provided by the present invention;
[0040] Figure 5 This is a schematic diagram of a text extraction scenario provided by the present invention;
[0041] Figure 6 This is a schematic diagram of the structure of the text extraction device provided by the present invention;
[0042] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0044] With the widespread adoption of the internet, the sheer volume of information has led to information overload for users. Improving information reading and processing capabilities is essential for enhancing user efficiency. Automatic text summarization, based on natural language processing (NLP) technology, automatically generates concise summaries from detailed text descriptions. This technology efficiently produces succinct abstracts, allowing users to quickly access useful information, and has become a hot research topic in both academia and industry in recent years.
[0045] In practical applications, users may pay particular attention to one or several parts of a text. For example, long texts such as work reports and meeting summaries often involve multiple different pieces of information, but users may focus on one or a few key points. However, when summarizing long texts like work reports and meeting summaries, since the summary is directly based on the full text, it may not explicitly reflect the content that the user is interested in, thus preventing the user from quickly obtaining the key information from the summary. To address this, this invention proposes a text extraction method to ensure that the extracted text that highlights the content that the user is interested in is generated.
[0046] Figure 1 This is one of the flowcharts illustrating the text extraction method provided by the present invention, such as... Figure 1 As shown, the method includes:
[0047] Step 110: Receive user input;
[0048] Step 120: In response to the user action, locate the key content corresponding to the user action in the document;
[0049] Specifically, the key content here can be keywords, key sentences, or key paragraphs in the document. The user operation can be a specified action performed by the user based on the target text content displayed on the terminal screen. The target text content refers to the text content that the user is interested in, i.e., the aforementioned key content. The specified operation here can be any one of the following: underlining the text content, selecting or highlighting the text content, clicking the checkbox corresponding to the text content, or directly typing in the text box. This embodiment of the invention does not specifically limit this.
[0050] Upon receiving a user's action, the terminal can respond by locating the selected key content within the document. For example, a user can underline text directly on the terminal screen using an electromagnetic stylus, and the terminal can quickly locate and display the selected content. Alternatively, a user can long-press or right-click to access the editing menu to select, highlight, or underline text; the terminal can then locate the selected content. Furthermore, checkboxes can be pre-set for each sentence or paragraph on the document display interface; clicking these buttons allows the terminal to select and locate the key content. Finally, users can directly input text into text boxes on the document display interface; the terminal then matches and locates the selected content within the document based on this input.
[0051] Step 130: Based on the document, extract the key content to obtain the extracted text of the key content.
[0052] Specifically, after locating the key content, a Large Language Model (LLM) can be used to extract the text from the key content. For example, models like ChatGPT (Chat Generative Pre-trained Transformer) or XLNet (extreme Multi-label Learning Network) can be used to extract the text corresponding to the key content, generating the extracted text. The located key content and the document are then input into the LLM model, which generates and outputs the extracted text corresponding to the key content.
[0053] Furthermore, to improve the accuracy and efficiency of text extraction of key content, after the terminal locates the key content based on user operations, it can first identify relevant segments from the document, and then generate the corresponding extracted text based on these segments. Here, when identifying relevant segments from the document, character matching or semantic matching can be used to search for related segments. The obtained segments are then input into the LLM model, which generates the extracted text corresponding to the key content.
[0054] After the terminal locates the key content based on user operation, it can also input all paragraphs of the document and the key content into the LLM model at the same time. The LLM model calculates the relevance between each paragraph and the key content in the document, and generates the excerpt text corresponding to the key content based on the relevance between each paragraph and the key content, thereby improving the accuracy and efficiency of generating the excerpt text.
[0055] It is understandable that the excerpted text here corresponds one-to-one with the key content. That is, each key content corresponds to an excerpted text generated specifically for its own information, and the excerpted text can reflect the outline of the content in the document related to that key content.
[0056] The text extraction method provided in this invention locates key content in a document based on user operations, thereby extracting text from the key content and generating extracted text corresponding to the key content. The resulting extracted text highlights the content that the user is interested in, allowing the user to quickly obtain the key information they are interested in through the extracted text.
[0057] After locating key content based on user operations, the terminal generates corresponding excerpts for all selected key content. However, when users operate on the document display interface, they typically read the document content quickly while performing corresponding operations, which may lead to misoperations. That is, the selected key content may not all be what the user is interested in, resulting in unnecessary content in the excerpts and affecting the efficiency of reading and information acquisition. To make the excerpts more accurately reflect the content that the user is interested in, this embodiment of the invention performs the following steps 121, 122, and 123: first, it locates text fragments from the document based on user operations, and then further filters the text fragments based on selection operations, thereby obtaining more accurate key content. The resulting excerpts not only reflect the content that the user is interested in but also better meet the user's needs, eliminating the need for the user to regenerate the excerpts.
[0058] Based on the above embodiments, Figure 2 This is a flowchart illustrating step 120 of the text extraction method provided by the present invention, as follows: Figure 2 As shown, step 120 specifically includes:
[0059] Step 121: In response to the user action, locate the text fragment corresponding to the user action in the document;
[0060] Specifically, the text fragment here can be a word, sentence, or paragraph from a document. The user performs operations on the document displayed on the terminal screen. Upon receiving the user's operation, the terminal can respond by locating the selected text fragment from the document. The specific user operations in this embodiment are consistent with those in the above embodiments and will not be repeated here.
[0061] Step 122: Construct a list of text fragments as options and display it;
[0062] Step 123: Receive the selection operation. In response to the selection operation, determine the text fragment corresponding to the selected option from the fragment list as the key content.
[0063] It should be noted that after the terminal locates the text fragment based on the user's operation, it can treat the text fragment as an optional item, construct a fragment list, and display all selected text fragments in a list format, making it convenient for the user to select from the various options in the fragment list as needed. The selection operation here refers to the corresponding operation performed by the user based on the fragment list displayed on the terminal screen to obtain key content. Specifically, the selection operation can be any one of the following: checking the text fragment corresponding to an optional item, deleting the text fragment corresponding to an optional item, or dragging the text fragment corresponding to an optional item to the target area. This embodiment of the invention does not specifically limit this. The target area here refers to the area on the terminal screen used to display the key content selected by the user.
[0064] Specifically, upon receiving a selection operation, the terminal can respond to the user's selection and determine the key content selected by the user from the fragment list. For example, by constructing a fragment list with text fragments as options, a checkbox can be set for each text fragment. The user can check each option in the fragment list as needed. After receiving the user's checkbox operation, the terminal can either directly use the text fragment corresponding to the checked option as the key content, or it can choose not to use the text fragment corresponding to the checked option as the key content and use the remaining text fragments as the key content.
[0065] Here, when constructing a list of text fragments as optional options, the text fragments can also be displayed in a list format. Users can bring up the edit menu by long-pressing or right-clicking to delete each option in the fragment list. After receiving the user's deletion operation, the terminal can use the text fragments corresponding to the retained options as key content.
[0066] When constructing a fragment list with text fragments as options, the terminal display screen can be divided into two columns, left and right or top and bottom, which are set as the fragment list and the target area, respectively. The text fragments are displayed as options in the fragment list. Users can drag and drop the corresponding text fragments from the fragment list to the target area. After receiving the user's drag operation, the terminal can use the text fragments in the target area as key content.
[0067] In this embodiment of the invention, text fragments are located from a document based on user operations, and a fragment list is constructed based on the text fragments. This allows users to select from the fragment list as needed, and further determine the key content selected by the user from the fragment list based on the selection operation. As a result, the excerpted text generated based on the key content can more accurately reflect the content that the user is interested in, thereby improving the efficiency of the user in reading the excerpted text and obtaining information from it.
[0068] Based on any of the above embodiments Figure 3 This is a flowchart illustrating step 130 of the text extraction method provided by the present invention, as follows: Figure 3 As shown, step 130 specifically includes:
[0069] Step 131: Based on the semantic relevance between the key content and each paragraph in the document, identify the relevant paragraphs of the key content from each paragraph;
[0070] Specifically, after the terminal obtains key content based on user operation location, it can extract the key content into text. In order to improve the efficiency and accuracy of text extraction, the key content can be compared with each paragraph in the document to obtain the semantic relevance between the key content and each paragraph in the document. Then, based on the semantic relevance, relevant paragraphs corresponding to the key content are selected from the document, and text extraction is performed based on the relevant paragraphs.
[0071] When comparing key content with various segments in a document, this can be achieved through character matching or semantic matching to obtain the semantic relevance between the key content and each segment in the document; alternatively, it can be achieved using an LLM model. For example, the key content and all segments in the document can be input into an LLM model, and the semantic relevance between each segment in the document and the key content can be calculated using the LLM model. This embodiment of the invention does not impose specific limitations on this approach.
[0072] After obtaining the semantic relevance between the key content and each segment in the document, the relevant segments corresponding to the key content can be determined from each segment of the document based on the semantic relevance. If the semantic relevance between the key content and a segment in the document reaches a preset relevance threshold, the segment can be determined to be a relevant segment corresponding to the key content; if the semantic relevance between the key content and a segment in the document does not reach the preset relevance threshold, the segment can be determined not to be a relevant segment corresponding to the key content. It should be understood that the preset relevance threshold here is pre-set and used to determine the relevance value between each segment in the document and the key content. It can be set according to actual needs, for example, it can be set to 60%, 70%, or 80%, and the embodiments of the present invention do not specifically limit it in this regard.
[0073] Step 132: Based on the relevant paragraphs, extract the key content to obtain the extracted text of the key content.
[0074] Specifically, after identifying the relevant segments corresponding to the key content from each segment of the document, the relevant segments can be input into the LLM model, which then generates the excerpt text corresponding to the key content.
[0075] Understandably, in step 131, obtaining the semantic relevance between the key content and each segment in the document can also be achieved through an LLM model. Therefore, all segments and key content of the document can be directly input into the LLM model. The LLM model calculates the semantic relevance between each segment and the key content in the document, and determines the relevant segments corresponding to the key content based on the semantic relevance between each segment and the key content. Thus, the excerpt text corresponding to the key content is generated based on the relevant segments.
[0076] This invention identifies relevant paragraphs corresponding to key content from a document by determining the semantic relevance between key content and various paragraphs within the document. Based on these relevant paragraphs, it generates excerpts of the key content, resulting in more accurate and semantically coherent excerpts. Furthermore, compared to the full text of the document, the amount of text data for relevant paragraphs is significantly reduced, leading to less processing and higher efficiency, thus improving the efficiency of excerpt generation.
[0077] Based on any of the above embodiments Figure 4 This is the second flowchart illustrating the text extraction method provided by the present invention, as follows: Figure 4 As shown, after step 120, the method further includes:
[0078] Step 140: Generate a summary text for the document based on the key content and the document.
[0079] Specifically, the summary text here is a full-text summary generated based on the key content located by the user and all the text content of the document. Therefore, this summary text contains both the important content of the document and the key content selected by the user. The generation of the summary text can be achieved through an LLM model. The user-selected key content and all the text content of the document are input into the LLM model. The LLM model extracts summary information from the document based on the key content, thereby generating and outputting personalized summary text.
[0080] The text extraction method of this invention identifies key content from a document through interaction (i.e., user operation), and then generates personalized summary text containing the key content based on the key content and the document. This enables the summary text to reflect the content that the user is interested in, making it easier for the user to read and quickly obtain relevant information, thus meeting the user's needs.
[0081] Based on the above embodiments, step 140 specifically includes: generating a summary text for the document based on the document and the extracted text of key content.
[0082] Specifically, when generating summary text based on documents and key content, in order to make the resulting summary text more semantically coherent, more accurate in content, and more efficient in generation, a summary text of the document can be generated based on the excerpted text of the document and key content.
[0083] When generating summary text for a document, an LLM model can be used. For example, you can first generate separate excerpts for each key content point, and then input both the document and each excerpt into the LLM model to generate a summary text that integrates the excerpts. Alternatively, you can first generate summary information for the document and separate excerpts for each key content point, and then use the LLM model to integrate the summary information and the excerpts to obtain the summary text for the document.
[0084] In this embodiment of the invention, by generating excerpt texts corresponding to each key content, and then generating summary texts based on the excerpt texts and documents, not only can the efficiency of generating summary texts be improved, but the generated summary texts also better meet user needs.
[0085] Based on any of the above embodiments, the method further includes the following after step 130:
[0086] Select key segments from the excerpted text and / or the summary text of the document that are relevant to the key content.
[0087] The key fragments are presented in the first format, and the fragments other than the key fragments in the excerpt and / or summary text are presented in the second format.
[0088] Specifically, after generating the extracted text corresponding to key content and / or obtaining the document's summary text based on interaction, the extracted text and / or summary text can be displayed to facilitate user reading and quick retrieval of the content of interest. Here, the document's summary text can be a personalized summary text containing key content generated based on the above embodiments, or a summary text automatically generated based on existing text summarization technology, or a summary text summarized and extracted by the user themselves. This embodiment of the invention does not specifically limit this.
[0089] During the presentation, key content in the excerpted and / or summarized text can be highlighted, making the key content more intuitive and allowing users to quickly obtain crucial information. The terminal can automatically select relevant segments from the excerpted and / or summarized text as key segments based on the user-selected key content. Here, key segments refer to words, phrases, or paragraphs in the excerpted and / or summarized text that match the key content. When selecting segments related to key content as key segments, character matching or semantic matching can be used; this embodiment of the invention does not specifically limit this method.
[0090] After obtaining the key segments, the key segments in the excerpted and / or summarized text can be highlighted in a first format, while other segments in the excerpted and / or summarized text can be displayed in a second format. Both formats are text display formats, but they differ in their presentation to distinguish between key segments and other segments. For example, key segments can be bolded or highlighted, while other segments are neither bolded nor highlighted, making the key content in the excerpted and / or summarized text more intuitive and eye-catching, allowing users to quickly obtain the crucial information.
[0091] Furthermore, the aforementioned user actions and selections can be executed multiple times. This means that multiple rounds of interaction can generate extracts and / or summaries that better meet user needs. After a new round of user actions and selections, new content may be generated in the extracts and / or summaries. For example, if one or more key points are added after a new round of user actions and selections, new extracts and summaries will be generated for these new key points. These newly generated key points in the extracts and / or summaries can also be highlighted. For example, they can be highlighted by outlining the newly generated key points, allowing users to quickly access relevant information.
[0092] Based on any of the above embodiments, the method further includes the following after step 130:
[0093] Receive matching input;
[0094] In response to the matching input, determine the content to be matched selected by the matching input from the extracted text and / or the summary text of the document, and determine the target content related to the content to be matched from the document;
[0095] Display the target content.
[0096] Specifically, after generating the extracted text corresponding to key content and / or obtaining the document's summary text based on interaction, the user can confirm the content in the extracted text and / or summary text to ensure that the extracted text and / or summary text are generated based on the document, thereby ensuring the accuracy of the generated extracted text and / or summary text. Here, the document's summary text can be a personalized summary text containing key content generated based on the above embodiments, or a summary text automatically generated based on existing text summarization technology, or a summary text summarized and extracted by the user themselves. This embodiment of the invention does not specifically limit this.
[0097] The aforementioned matching input refers to the user's confirmation instruction regarding the generated excerpt and / or summary text. The content to be matched refers to the text content in the user-selected excerpt and / or summary text that needs to be confirmed for matching. Upon receiving the user's confirmation instruction, the terminal can retrieve the user-selected content to be matched from the excerpt and / or summary text, search for text content in the document that matches the content to be matched, and highlight that text content as the target content so that the user can quickly view and confirm it.
[0098] When a user selects content to be matched in the generated excerpt and / or summary text, they can do so using any of the following methods: selection by highlighting, circling, or boxing. The user can then long-press or right-click to bring up the operation menu and click the "Smart Match" menu. Upon receiving confirmation from the user, the terminal can quickly retrieve the selected content and highlight the matching content within the document. It should be understood that users may perform multiple confirmation operations on the excerpt and / or summary text to ensure greater accuracy.
[0099] Based on any of the above embodiments Figure 5 This is a schematic diagram of a text extraction scenario provided by the present invention, such as... Figure 5As shown in (a), users can underline text content in a document displayed on the terminal screen. For example, if a user underlines four text phrases in the document: "Students fully recognize the importance of learning," "Class leaders are conscientious and responsible," "Ideological qualities are gradually improved," and "Physical fitness has been comprehensively improved," the terminal can quickly locate and display the selected text fragments in the document after receiving the user's operation. The terminal also displays the number of underlined text fragments at the bottom of the document display page for easy viewing. After underlining, the user can click the "Generate Summary" button at the bottom of the page. The terminal will automatically construct a list of selected text fragments based on the user's operation and display all selected text fragments in a list format, such as... Figure 5 As shown in (b), this allows users to easily select from the list of text segments as needed. Users can check the text segments they are interested in from the list. For example, after checking the boxes corresponding to the three text segments "Students fully recognize the importance of learning," "Ideological quality gradually improves," and "Physical fitness has been comprehensively improved," users can click the "Generate" button at the bottom of the page. The terminal will automatically generate key content based on the selected text segments according to the user's selection, and then generate corresponding excerpt text and summary text containing the key content. After generating the excerpt text and summary text, the terminal will automatically redirect to the summary display page, as shown below. Figure 5 As shown in (c), the terminal automatically generates a "Summary of the Work Report" based on interaction. It includes two parts: the summary text and the excerpt text. The key content in the excerpt text and the summary text is displayed in bold, making the display more intuitive and eye-catching. In addition, the newly generated excerpt text is also highlighted with a wireframe, making it easier for users to quickly obtain key information.
[0100] Based on any of the above embodiments Figure 6 This is a schematic diagram of the text extraction device provided by the present invention, as shown below. Figure 6 As shown, the device includes:
[0101] The receiving unit 610 is used to receive user operations;
[0102] The positioning unit 620 is used to locate the key content corresponding to the user operation from the document in response to the user operation;
[0103] The extraction generation unit 630 is used to extract text from key content based on a document, and obtain the extracted text of the key content.
[0104] The text extraction device provided in this embodiment of the invention locates the corresponding key content in a document based on user operations, thereby extracting the key content and generating the extracted text corresponding to the key content. The extracted text can highlight the content that the user is interested in, allowing the user to quickly obtain the key information they are interested in through the extracted text.
[0105] Based on any of the above embodiments, the positioning unit 620 is specifically used for:
[0106] In response to user actions, locate the corresponding text fragment from the document;
[0107] Build and display a list of text snippets as options;
[0108] Receive a selection operation, and in response to the selection operation, determine the text fragment corresponding to the selected option from the fragment list as the key content.
[0109] Based on any of the above embodiments, the extraction generation unit 630 is specifically used for:
[0110] Based on the semantic relevance between key content and various paragraphs in the document, relevant paragraphs of key content are identified from each paragraph.
[0111] Based on relevant passages, key content is extracted to obtain the extracted text of key content.
[0112] Based on any of the above embodiments, the apparatus further includes a summary generation unit, which is used for:
[0113] Generate summary text for the documents based on key content and documents.
[0114] Based on any of the above embodiments, the summary generation unit is specifically used for:
[0115] Based on the document and excerpts of key content, generate a summary text for the document.
[0116] Based on any of the above embodiments, the device further includes a display unit, which is used for:
[0117] Select key segments from the excerpted text and / or the summary text of the document that are relevant to the key content.
[0118] The key fragments are presented in the first format, and the fragments other than the key fragments in the excerpt and / or summary text are presented in the second format.
[0119] Based on any of the above embodiments, the device further includes a matching unit, which is used for:
[0120] Receive matching input;
[0121] In response to the matching input, determine the content to be matched selected by the matching input from the extracted text and / or the summary text of the document, and determine the target content related to the content to be matched from the document;
[0122] Display the target content.
[0123] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can invoke logical instructions in the memory 730 to execute a text extraction method, which includes: receiving a user operation; responding to the user operation by locating key content corresponding to the user operation in a document; and extracting text from the key content based on the document to obtain extracted text of the key content.
[0124] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the text extraction method provided by the above methods. The method includes: receiving a user operation; responding to the user operation, locating the key content corresponding to the user operation from the document; and extracting text from the key content based on the document to obtain the extracted text of the key content.
[0126] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the text extraction method provided by the above methods, the method comprising: receiving a user operation; responding to the user operation, locating key content corresponding to the user operation from a document; and extracting text from the key content based on the document to obtain extracted text of the key content.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.
Claims
1. A text extraction method, characterized in that, include: Receive user actions; In response to the user action, locate the key content corresponding to the user action from the document; Based on the document, the key content is extracted to obtain the extracted text of the key content; Receive matching input; In response to the matching input, the content to be matched selected by the matching input is determined from the extracted text and / or the summary text of the document, and the text content that matches the content to be matched in the document is searched as the target content; The target content is highlighted in the document for confirmation of the excerpt and / or the summary text; The step of locating the key content corresponding to the user action from the document in response to the user action includes: In response to the user action, locate the text segment corresponding to the user action from the document; The terminal display screen is divided into a fragment list area and a target area. The text fragments are used as options to construct a fragment list and are displayed in the fragment list area. Receive a selection operation, wherein the selection operation is to drag the text fragment corresponding to the option in the fragment list area to the target area; In response to the selection operation, the text fragment dragged to the target area is used as the key content.
2. The text extraction method according to claim 1, characterized in that, The step of extracting text from the document, focusing on the key content, to obtain the extracted text of the key content, includes: Based on the semantic relevance between the key content and each segment in the document, the relevant segments of the key content are determined from each segment; Based on the relevant passages, text extraction is performed on the key content to obtain the extracted text of the key content.
3. The text extraction method according to claim 1 or 2, characterized in that, In response to the user action, after locating the key content corresponding to the user action from the document, the method further includes: Based on the key content and the document, a summary text for the document is generated.
4. The text extraction method according to claim 3, characterized in that, The step of generating a summary text for the document based on the key content and the document includes: Based on the document and the extracted text of the key content, a summary text for the document is generated.
5. The text extraction method according to claim 1 or 2, characterized in that, Based on the document, the text is extracted from the key content to obtain the extracted text of the key content, and then the process further includes: Select fragments related to the key content from the excerpted text and / or the summary text of the document as key fragments; The key fragment is displayed in a first form, and the excerpted text and / or fragments in the summary text other than the key fragment are displayed in a second form.
6. A text extraction device, characterized in that, include: The receiving unit is used to receive user operations; A positioning unit is used to locate the key content corresponding to the user operation from the document in response to the user operation. The extraction generation unit is used to extract text from the document, focusing on the key content, to obtain the extracted text of the key content. A matching unit is configured to receive matching input, and in response to the matching input, determine the content to be matched selected by the matching input from the extracted text and / or the summary text of the document, and search for text content in the document that matches the content to be matched as the target content; and highlight the target content in the document for confirmation of the extracted text and / or the summary text. The positioning unit is specifically used for: In response to the user action, locate the text segment corresponding to the user action from the document; The terminal display screen is divided into a fragment list area and a target area. The text fragments are used as options to construct a fragment list and are displayed in the fragment list area. Receive a selection operation, wherein the selection operation is to drag the text fragment corresponding to the option in the fragment list area to the target area; In response to the selection operation, the text fragment dragged to the target area is used as the key content.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the text extraction method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the text extraction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for reminding generation of text abstract and method and device for generating text abstract
CN114115670A
Text summary generation method and device, equipment and storage medium
CN114328899A
Interaction method and device and electronic equipment
CN114936001A
