Content extraction method and device, electronic equipment and storage medium
By automatically extracting and displaying document summary in the information interaction interface, the problem of difficult access to key content in massive documents is solved, and the document reading efficiency and user experience are improved.
Patent Information
- Application Number
- CN202311282882.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-04-01
AI Technical Summary
In the era of information explosion, it is difficult for people to understand the key content in a timely manner from massive documents, resulting in inefficient reading of documents. A method is needed to quickly extract the main content of the document.
By providing document selection and uploading functions in the information interaction interface, we automatically extract content of the target document, generate document summary, and display processing progress and results in real time in the interface.
Improves document reading efficiency, enables users to quickly understand the main content of the document, reduces waiting time, and enhances the user experience.
Smart Images

Figure CN119739314A_ABST
Abstract
Description
Background Art
[0002] With the popularization of computer technology and the rapid rise of the Internet, the way people obtain and send information has become more convenient, the network resources on the Internet have grown at an unprecedented rate, and a large amount of information has appeared in front of people in the form of documents.
[0003] Specifically, network resources on the Internet, such as various news reports, scientific papers, legal documents, novels, financial reports, textbooks and other documents, are huge sources of text data. Coupled with some emerging self-media platforms, the presentation of text information has become more complex. Although the rapid development of informatization has brought convenience to people, the information explosion has also brought challenges. It is difficult for the target to understand the key content in a timely manner from the massive amount of information. Therefore, it is particularly urgent and important to extract the main content of various documents.
[0004] In summary, how to extract content from documents and provide convenient document summarization functions to the objects to improve the document reading efficiency of the objects is an urgent problem to be solved. Summary of the invention
[0005] Embodiments of the present application provide a content extraction method, device, electronic device, and storage medium to improve the document reading efficiency of an object.
[0006] A content extraction method provided in an embodiment of the present application includes:
[0007] In response to an upload operation triggered based on the information interaction interface, presenting a document selection interface, wherein the document selection interface includes at least one document;
[0008] In response to a selection operation on a target document in the at least one document, presenting the target document in the information interaction interface, and presenting processing information of the target document in a status area corresponding to the target document, wherein the processing information indicates a current processing node and a corresponding processing status when content is extracted from the target document;
[0009] After the processing of the target document is completed, the display of the status area is cancelled, and a document summary obtained after content extraction of the target document is presented in the information interaction interface.
[0010] Another content extraction method provided in an embodiment of the present application includes:
[0011] After receiving a document processing request for a target document, extracting text information from the target document; the target document is uploaded by the client in response to a selection operation of the target document in at least one document in a document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on an information interaction interface;
[0012] Slice the extracted text information to obtain at least one text slice; extract a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice;
[0013] The obtained slice summaries are summarized to obtain a document summary corresponding to the target document, and the document summary is fed back to the client so that the client presents the document summary obtained after content extraction of the target document in the information interaction interface.
[0014] Optionally, extracting a summary of each of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice includes:
[0015] The at least one text slice is input into a target text processing model respectively, and for each text slice, the target text processing model is used to extract a slice summary corresponding to the text slice according to a preconfigured first summary instruction; the first summary instruction is used to specify the word count and summary format of the slice summary;
[0016] The obtained slice summaries are summarized to obtain a document summary corresponding to the target document, including:
[0017] The slice summaries are respectively input into the target text processing model, and the target text processing model is used to summarize the slice summaries according to a preconfigured second summary instruction to generate the document summary; the second summary instruction is used to specify the number of words and summary format of the document summary.
[0018] An embodiment of the present application provides a content extraction device, including:
[0019] A first response unit, configured to present a document selection interface in response to an upload operation triggered based on the information interaction interface, wherein the document selection interface includes at least one document;
[0020] A second response unit, configured to, in response to a selection operation on a target document in the at least one document, present the target document in the information interaction interface, and present processing information of the target document in a status area corresponding to the target document, wherein the processing information indicates a current processing node and a corresponding processing status when content is extracted from the target document;
[0021] After the processing of the target document is completed, the display of the status area is cancelled, and a document summary obtained after content extraction of the target document is presented in the information interaction interface.
[0022] Optionally, the slice processing unit is specifically used for:
[0023] The at least one text slice is input into a target text processing model respectively, and for each text slice, the target text processing model is used to extract a slice summary corresponding to the text slice according to a preconfigured first summary instruction; the first summary instruction is used to specify the word count and summary format of the slice summary;
[0024] The summarizing unit is specifically used for:
[0025] The slice summaries are respectively input into the target text processing model, and the target text processing model is used to summarize the slice summaries according to a preconfigured second summary instruction to generate the document summary; the second summary instruction is used to specify the number of words and summary format of the document summary.
[0026] Optionally, the status area is in a collapsed state, and the second response unit is further used for:
[0027] In response to an expansion operation triggered on the status area, switching the status area to an expanded state;
[0028] In the status area of the expanded form, various processing nodes when the target document is extracted from the content and the processing status of each processing node are presented.
[0029] Optionally, the second response unit is further used for:
[0030] If the current processing node of the target document is a key processing node, then in the status area, countdown information of the estimated completion time corresponding to the key processing node is presented;
[0031] Among them, the key processing node is at least one of the following: a processing node whose estimated completion time exceeds a preset time threshold, and a preset processing node.
[0032] Optionally, the second response unit is further used for:
[0033] In the status area of the expanded form, after presenting the various processing nodes when content extraction is performed on the target document and the respective processing status of the various processing nodes, for the target processing nodes in the target processing state among the various processing nodes, in response to a selection operation on any target processing node, the processing result of any target processing node is presented.
[0034] Optionally, the target processing status includes at least one of completed and processing failed;
[0035] Wherein, when the processing status of any one of the target processing nodes is processing failure, the processing result includes at least one of a failure reason and a document adjustment suggestion.
[0036] Optionally, when there are multiple target documents, the second response unit is specifically configured to:
[0037] Presenting each target document and the document summary corresponding to each target document in the information interaction interface, wherein each target document and the document summary corresponding to the target document form a group of conversation messages; or
[0038] In the information interaction interface, each target document and an aggregated document summary are presented separately, wherein the aggregated document summary is obtained by extracting the document summaries corresponding to each of the target documents respectively and aggregating multiple document summaries to form a group of session messages, which includes multiple target documents and the aggregated document summary.
[0039] Optionally, the second response unit is further used for:
[0040] Presenting summary prompt information, wherein the summary prompt information is used to prompt whether to perform summary processing on the document summaries corresponding to the respective target documents; wherein the summary processing includes at least one of the following: summarizing the common points of the respective document summaries, and comparing the differences of the respective document summaries;
[0041] In response to a summary operation triggered by the summary prompt information, a summarized document summary corresponding to the summary operation and generated based on the document summaries corresponding to the respective target documents is presented.
[0042] Optionally, the first response unit is further used for:
[0043] Before responding to an upload operation triggered based on the information interaction interface, in response to a document summary operation triggered based on a first function control in the function discovery interface, presenting the information interaction interface; the information interaction interface includes a default session message and a document upload control, wherein the default session message is used to summarize a document example function to the object, and the document summary function represents generating a document summary by extracting content from the document;
[0044] The first response unit is specifically used for:
[0045] In response to an upload operation triggered by a document upload control in the information interaction interface, the document selection interface is presented.
[0046] Optionally, the default session message includes at least one example document; and the first response unit is further configured to:
[0047] Before responding to the upload operation triggered based on the information interaction interface, in response to a selection operation on any one of the at least one example document, presenting a document summary corresponding to the any one example document;
[0048] The second response unit is further used for:
[0049] During the processing of the target document after uploading, the at least one example document is updated to a non-interactive state; and after processing of the target document is completed, the at least one example document is updated to an interactive state.
[0050] Optionally, the document summary is presented in the form of a session message, and the second response unit is further used for:
[0051] presenting a re-summarize control for the target document at a first relevant position of the document summary;
[0052] In response to a triggering operation on the re-summarization control, the target document is re-extracted for content, and after the re-processing is completed, a new document summary is presented at the original conversation message corresponding to the document summary.
[0053] Optionally, the second response unit is further used for:
[0054] presenting a summary toggle control at a second relevant position of the document summary;
[0055] In response to a switching operation triggered by the summary switching control, multiple document summary lines corresponding to the target document in the original conversation message are switched and displayed.
[0056] Optionally, the second response unit is further used for:
[0057] Presenting, at a third relevant position of the document summary, a feedback control for evaluating the summary quality of the document summary;
[0058] In response to the evaluation operation triggered based on the feedback control, a corresponding evaluation result is presented.
[0059] Optionally, the device further comprises:
[0060] A third response unit, configured to present a stop prompt message and a corresponding re-summarization control in the information interaction interface in response to a processing stop operation on the target document during the processing of the target document;
[0061] In response to a triggering operation on the re-summarization control, the target document is re-extracted, and after the re-processing is completed, a document summary obtained after the target document is extracted is presented in the information interaction interface.
[0062] Optionally, the device further comprises:
[0063] The fourth response unit is used to present an exit prompt message in response to an exit operation on the information interaction interface during the processing of the target document, wherein the exit prompt message is used to prompt the object that the target document is currently being processed and to ask the object whether to confirm the exit.
[0064] Optionally, if the target document fails to be uploaded, the device further includes:
[0065] A fifth response unit, configured to present a re-upload control in the information interaction interface;
[0066] In response to a re-upload operation triggered by the re-upload control, the target document is re-uploaded.
[0067] Optionally, the second response unit is further used for:
[0068] Presenting an input box in the information interaction interface;
[0069] In response to a first question-and-answer instruction for the document summary input based on the input box, presenting an answer message corresponding to the first question-and-answer instruction;
[0070] The answer message is any one of the following:
[0071] A fixed phrase indicating that an answer cannot be given is generated based on the first question and answer instruction and content related to the first question and answer instruction in the target document, and is generated based on search results related to the first question and answer instruction.
[0072] Optionally, the information interaction interface further includes a second question-and-answer instruction for non-document content input, and the second response unit is specifically configured to:
[0073] The first question and answer instruction and the answer message corresponding to the first question and answer instruction are presented in a first message format; and the second question and answer instruction and the answer message corresponding to the second question and answer instruction are presented in a second message format;
[0074] Among them, the first question and answer instruction and the second question and answer instruction are distinguished based on at least one of the following methods: special character recognition, key information recognition, and intention recognition.
[0075] Optionally, the second response unit is further used for:
[0076] Presenting an input box in the information interaction interface;
[0077] In response to a modification instruction for the document summary input based on the input box, a modified document summary corresponding to the modification instruction is presented.
[0078] Optionally, the device further comprises:
[0079] A first sharing unit, configured to present at least one second function control corresponding to the document summary of the target document;
[0080] In response to a sharing operation triggered by the at least one second functional control, the document summary and the target document are shared with a to-be-shared object.
[0081] Optionally, the device further comprises:
[0082] A second sharing unit, used to present a shared document and a document summary corresponding to the shared document, as well as a new conversation entry;
[0083] In response to a trigger operation for the new dialogue entry, a default conversation message and a document upload control are presented in the information interaction interface, wherein the default conversation message is used to provide an example document summary function to the object, and the document summary function represents generating a document summary by extracting content from the document.
[0084] Optionally, the device further comprises:
[0085] A history viewing unit, configured to present, in response to a viewing operation on the history records of a target object, each history document of which a document summary has been currently generated and corresponds to the target object;
[0086] In response to a viewing operation on any one of the historical documents, a document summary corresponding to the any one of the historical documents is presented.
[0087] Another content extraction device provided in an embodiment of the present application includes:
[0088] an information extraction unit, configured to extract text information from a target document after receiving a document processing request for the target document; the target document is uploaded by the client in response to a selection operation of the target document in at least one document in a document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on an information interaction interface;
[0089] A slice processing unit, configured to slice the extracted text information to obtain at least one text slice; extract a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice;
[0090] The summarizing unit is used to summarize the obtained slice summaries to obtain a document summary corresponding to the target document, and feed the document summary back to the client so that the client can present the document summary obtained after content extraction of the target document in the information interaction interface.
[0091] Optionally, the device further comprises:
[0092] A node processing unit, used to feed back the processing information of the target document to the client in real time, so that the client presents the processing information in the status area corresponding to the target document, wherein the processing information indicates the current processing node and the corresponding processing status when extracting content from the target document;
[0093] The estimated completion time corresponding to the key processing node is fed back to the client in real time, so that when the current processing node of the target document is the key processing node, the client presents the countdown information of the estimated completion time corresponding to the key processing node in the status area.
[0094] Optionally, when there are multiple target documents, the slicing processing unit is further used to:
[0095] Summarize the topics covered in each target document;
[0096] The summarizing unit is also used for:
[0097] Based on the topics contained in each of the target documents, the document summaries corresponding to the target documents are summarized, and the summarized document summaries are obtained and fed back to the client, so that the client presents the summarized document summaries in the form of conversation messages in the information interaction interface.
[0098] Optionally, the device further comprises:
[0099] A question-answering unit, configured to obtain a first question-answering instruction input by a subject with respect to the document summary;
[0100] Rewrite the first question and answer instruction in combination with other first question and answer instructions input before the first question and answer instruction and the corresponding answer message to obtain a modified first question and answer instruction;
[0101] Extracting first feature information corresponding to the modified first question-and-answer instruction, and obtaining second feature information corresponding to each content slice in the target document, wherein each content slice is obtained by dividing the target document based on a preset slice granularity;
[0102] The first characteristic information is matched with each piece of second characteristic information respectively, and an answer message corresponding to the first question and answer instruction is generated according to the matching result.
[0103] Optionally, the slice processing unit is specifically used for:
[0104] Abstract extraction is performed on the at least one text slice in parallel to obtain a slice abstract corresponding to each of the at least one text slice.
[0105] An electronic device provided in an embodiment of the present application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the above-mentioned content extraction methods.
[0106] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is executed on an electronic device, the computer program is used to enable the electronic device to perform the steps of any one of the above-mentioned content extraction methods.
[0107] An embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of any one of the above-mentioned content extraction methods.
[0108] The beneficial effects of this application are as follows:
[0109] The embodiment of the present application provides a content extraction method, device, electronic device and storage medium. Since the present application supports an object (such as a user) to upload a target document that needs to be extracted through an information interaction interface according to its own needs, and then automatically extracts content from the target document, after the processing of the content extraction of the target document is completed, the document summary obtained after the content extraction of the target document can be directly presented to the object in the information interaction interface, and the object can directly read the document summary information to quickly understand the content of the target document and improve the document reading efficiency. In addition, the process of extracting content from the target document involves multiple processing nodes (such as uploading documents, extracting content information, processing image content, processing text content, extracting core ideas, collating and merging summaries, etc.), and the execution of these processing nodes will consume a certain amount of time. In order to reduce the object's sense of waiting, manage the object's expectations, and avoid the loss of the object in the process of generating the summary, the present application sets a status area for displaying the progress of the processing node in the information interaction interface. Specifically, in the process of extracting content from the target document, the current processing node and the corresponding processing status corresponding to the target document are directly displayed to the object through the status area to enhance the object's experience.
[0110] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0112] Figure 1 A schematic diagram of an application scenario in an embodiment of the present application;
[0113] Figure 2 A flowchart of an implementation method of a content extraction method provided in an embodiment of the present application;
[0114] Figure 3A A schematic diagram of a function discovery interface and a document summary interface in an embodiment of the present application;
[0115] Figure 3B A schematic diagram of another function discovery interface and a document summary interface in an embodiment of the present application;
[0116] Figure 4 A schematic diagram of a document summary viewing process of an example document in an embodiment of the present application;
[0117] Figure 5 A schematic diagram of a document summary interface and a document selection interface in an embodiment of the present application;
[0118] Figure 6 A schematic diagram of a document selection interface in an embodiment of the present application;
[0119] Fig. 7A A schematic diagram of a state area in an embodiment of the present application;
[0120] Figure 7B A schematic diagram of another state area in an embodiment of the present application;
[0121] Fig. 8A A schematic diagram of a default session message and status area in an embodiment of the present application;
[0122] Figure 8B A schematic diagram of another default session message and status area in an embodiment of the present application;
[0123] Fig.9A A schematic diagram of a state area in an expanded form in an embodiment of the present application;
[0124] Fig. 9B It is a schematic diagram of the state area in another expanded form in the embodiment of the present application;
[0125] Fig. 10A A schematic diagram of countdown information in an embodiment of the present application;
[0126] Fig. 10B A schematic diagram of another type of countdown information in an embodiment of the present application;
[0127] Fig.11 A schematic diagram of another countdown information in an embodiment of the present application;
[0128] Fig. 12A A schematic diagram of an upload failure prompt message in an embodiment of the present application;
[0129] Fig. 12B This is a schematic diagram of another upload failure prompt message in an embodiment of the present application;
[0130] Fig.13A A schematic diagram of processing node abnormality in an embodiment of the present application;
[0131] Fig. 13B A schematic diagram of another method for processing node exceptions in an embodiment of the present application;
[0132] Fig.14 A schematic diagram of a processing result in an embodiment of the present application;
[0133] Fig.15 A schematic diagram of another processing result in an embodiment of the present application;
[0134] Fig.16 A schematic diagram of a first document summary in an embodiment of the present application;
[0135] Fig.17A A schematic diagram of a second document summary in an embodiment of the present application;
[0136] Fig. 17B A schematic diagram of a third document summary in an embodiment of the present application;
[0137] Fig. 17C This is a schematic diagram of a fourth document summary in an embodiment of the present application;
[0138] Fig.18A A schematic diagram of a summary switching control in an embodiment of the present application;
[0139] Fig.18B A schematic diagram of another summary switching control in an embodiment of the present application;
[0140] Fig.19A A schematic diagram of a question-and-answer scenario for document summaries in an embodiment of the present application;
[0141] Fig.19B A schematic diagram of another question-and-answer scenario for document summaries in an embodiment of the present application;
[0142] Fig. 20 A schematic diagram of a modification scenario for a document summary in an embodiment of the present application;
[0143] Fig.21 A schematic diagram of a presentation style of a question-and-answer instruction and an answer message in an embodiment of the present application;
[0144] Fig. 22 A schematic diagram of a presentation method of a multi-target document and a document summary in an embodiment of the present application;
[0145] Fig.23 A schematic diagram of another method for presenting multi-target documents and document summaries in an embodiment of the present application;
[0146] Fig.24 A schematic diagram of another method for presenting multi-target documents and document summaries in an embodiment of the present application;
[0147] Fig.25A This is a schematic diagram of a stop prompt message in an embodiment of the present application;
[0148] Fig.25BThis is a schematic diagram of another stop prompt information in an embodiment of the present application;
[0149] Fig.26A A schematic diagram of an exit prompt message in an embodiment of the present application;
[0150] Fig.26B A schematic diagram of another exit prompt message in an embodiment of the present application;
[0151] Fig. 27 is a schematic diagram of a second function control in an embodiment of the present application;
[0152] Fig.28A A schematic diagram of a landing page of a shared party in an embodiment of the present application;
[0153] Fig.28B This is a schematic diagram of another landing page of a shared party in an embodiment of the present application;
[0154] Fig.29 A schematic diagram of a historical record in an embodiment of the present application;
[0155] Fig.30 A flowchart of another content extraction method provided in an embodiment of the present application;
[0156] Fig.31 A schematic diagram of a single document rough summary extraction process in an embodiment of the present application;
[0157] Fig.32 A schematic diagram of a multi-document summary extraction process in an embodiment of the present application;
[0158] Fig.33 A schematic diagram of a feature matching process in an embodiment of the present application;
[0159] Fig.34 A schematic diagram of a document content parsing and question-answering scheduling process in an embodiment of the present application;
[0160] Fig.35 A schematic diagram of the composition structure of a content extraction device in an embodiment of the present application;
[0161] Fig.36 A schematic diagram of the composition structure of a content extraction device in an embodiment of the present application;
[0162] Fig.37 A schematic diagram of a hardware structure of an electronic device to which an embodiment of the present application is applied;
[0163] Fig.38 The present invention is a schematic diagram of the hardware structure of another electronic device to which the embodiments of the present application are applied. DETAILED DESCRIPTION
[0164] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0165] The following is an introduction to some concepts involved in the embodiments of the present application.
[0166] Document summary and slice summary: A document summary is a summary of the overall content of a document, while a slice summary is a summary of each text slice contained in the document. In general, a document summary is a summary of the overall content of a document, and a document can be divided into at least one text slice, and a slice summary is a summary of the content contained in the text slice.
[0167] Text slicing and content slicing: Text slicing is mainly used in the summary extraction process, which refers to slicing the text information contained in the parsed document; while content slicing is mainly used in multi-round question-answering scenarios, which refers to splitting the document into finer granularity according to the preset slicing granularity (such as paragraph granularity, sentence granularity, etc.), which is used for subsequent feature matching with questions.
[0168] Processing node: refers to the process of content extraction from a document divided into multiple steps. Each step can be understood as a processing node. Each step in the process of content extraction from a document will have a corresponding processing status, indicating whether the step is being processed, completed, not yet processed, or failed to process.
[0169] Mini Program: A lightweight application that can be used without downloading. Specifically, the mini program can be run directly on the terminal device, such as chat software, payment software and other related platforms, and used in the relevant platforms. For example, the object can open the mini program by scanning or searching in these software. This type of application will be ubiquitous and available at any time, but there is no need to install or uninstall.
[0170] The embodiments of the present application relate to artificial intelligence (AI) technology, and are designed based on natural language processing (NLP) in artificial intelligence.
[0171] Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0172] Artificial intelligence is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation interaction systems, mechatronics and other technologies; the software technologies of artificial intelligence generally include computer vision technology, natural language processing technology, and machine learning / deep learning and other major directions.
[0173] Natural language processing is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
[0174] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0175] In an embodiment of the present application, the target document can be extracted based on natural language processing technology and machine learning technology to generate a document summary corresponding to the target document. This process can be implemented based on artificial intelligence automatic content generation (AI-Generated Content, AIGC) technology. It can be applied in a variety of scenarios, such as extracting summaries of text documents (which may contain graphics), audio documents, video documents, etc. And, on this basis, multiple rounds of question and answer can be combined with document summaries. When inputting multiple rounds of questions and answers, the system will match the object's questions with the text features of the document parsing results for similarity, find the content in the document that is most relevant to the object's question, and then summarize it through the model and output the answer.
[0176] Specifically, when generating document summaries or multi-round question-answering answers based on AIGC, a large language model (LLM) can be used. LLM is an artificial intelligence model designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. LLMs are characterized by their large scale and billions of parameters, which help them learn complex patterns in language data. These models are often based on deep learning architectures such as transformers, which helps them achieve impressive performance on various NLP tasks.
[0177] With the development and progress of artificial intelligence, artificial intelligence is being studied and applied in many fields, such as common smart homes, smart customer service, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, robots, smart medical care, etc. I believe that with the further development of future technology, artificial intelligence will be applied in more fields and play an increasingly important role.
[0178] The following is a brief introduction to the design concept of the embodiment of the present application:
[0179] With the popularization of computer technology and the rapid rise of the Internet, the way people obtain and send information has become more convenient, the network resources on the Internet have grown at an unprecedented rate, and a large amount of information has appeared in front of people in the form of documents.
[0180] Specifically, network resources on the Internet, such as various news reports, scientific papers, legal documents, novels, financial reports, textbooks and other documents, are huge sources of text data. Coupled with some emerging self-media platforms, the presentation of text information has become more complex. Although the rapid development of informatization has brought convenience to people, the information explosion has also brought challenges. It is difficult for the target to understand the key content in a timely manner from the massive amount of information. Therefore, it is particularly urgent and important to extract the main content of various documents.
[0181] In summary, how to extract content from documents and provide convenient document summarization functions to the objects to improve the document reading efficiency of the objects is an urgent problem to be solved.
[0182] In view of this, the embodiments of the present application provide a content extraction method, device, electronic device and storage medium. Since the present application supports the object to upload the target document that needs to be extracted through the information interaction interface according to its own needs, and then automatically extract the content of the target document, after the processing of the content extraction of the target document is completed, the document summary obtained after the content extraction of the target document can be directly presented to the object on the information interaction interface, and the object can directly read the document summary information to quickly understand the content of the target document and improve the document reading efficiency. In addition, the process of extracting the content of the target document will involve multiple processing nodes, and the execution of these processing nodes will consume a certain amount of time. In order to reduce the object's sense of waiting, manage the object's expectations, and avoid the loss of the object during the summary generation process, the present application sets a status area for displaying the progress of the processing node in the information interaction interface. Specifically, in the process of extracting the content of the target document, the current processing node and the corresponding processing status corresponding to the target document are directly displayed to the object through the status area to enhance the object's experience.
[0183] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0184] like Figure 1 As shown, it is a schematic diagram of an application scenario in an embodiment of the present application. The application scenario diagram includes two terminal devices 110 and a server 120.
[0185] In the embodiment of the present application, the terminal device 110 includes but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, e-book readers, intelligent voice interaction devices, smart home appliances, car terminals and other devices; a client related to content extraction can be installed on the terminal device, which can be software (such as a browser, instant messaging software, etc.), or a web page, a small program, etc. The server 120 is a background server corresponding to the software or web page, small program, etc., or a server specifically used for content extraction, which is not specifically limited in the present application. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0186] It should be noted that the content extraction method in each embodiment of the present application can be executed by an electronic device, which can be a terminal device 110 or a server 120, that is, the method can be executed by the terminal device 110 or the server 120 alone, or can be executed by the terminal device 110 and the server 120 together. For example, when the method is executed by the terminal device 110 and the server 120 together, a client related to content extraction can be installed on the terminal device 110, and the object can trigger an upload operation based on the information interaction interface in the client. The client responds to the upload operation and presents a document selection interface to the object, supporting the object to select a document from the document selection interface for uploading. Specifically, the client responds to the object's selection operation for a target document in at least one document in the document selection interface, presents the target document in the information interaction interface, and sends a document processing request for the target document to the server 120 through the terminal device 110. Then, the server 120 extracts the content of the target document, generates a corresponding document summary and feeds it back to the client, and the client presents the document summary to the object in the information interaction interface through the terminal device 120.
[0187] In addition, the server 120 is also used to provide real-time feedback of the processing information of the target document to the client, so that the client can present the processing information in the status area corresponding to the target document through the terminal device 110; and the server 120 is also used to provide real-time feedback of the estimated completion time corresponding to the key processing node to the client, so that the client can present the countdown information of the estimated completion time corresponding to the key processing node in the status area through the terminal device 110 when the current processing node of the target document is the key processing node.
[0188] In an optional implementation, the terminal device 110 and the server 120 may communicate with each other via a communication network.
[0189] In an optional implementation, the communication network is a wired network or a wireless network.
[0190] It should be noted that Figure 1 The figure is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically limited in the embodiments of the present application.
[0191] In an embodiment of the present application, when there are multiple servers, the multiple servers can form a blockchain, and the servers are nodes on the blockchain; as in the content extraction method disclosed in the embodiment of the present application, the document-related data involved can be saved on the blockchain, for example, the document content of the target document, the generated slice summary, the document summary, the summarized document summary, the estimated completion time of the key processing nodes corresponding to the target document, the answer messages in multiple rounds of document processes, etc.
[0192] In addition, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving and other scenarios.
[0193] The following describes the content extraction method provided by the exemplary embodiment of the present application in combination with the application scenario described above and with reference to the accompanying drawings. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.
[0194] See also Figure 2 As shown, it is an implementation flow chart of a content extraction method provided in an embodiment of the present application. Taking the client as the execution subject as an example, the specific implementation process of the method is as follows S21-S23:
[0195] S21: The client presents a document selection interface in response to an upload operation triggered by the information interaction interface, where the document selection interface includes at least one document.
[0196] In an embodiment of the present application, uploading of different types of documents, such as WORD, PDF, EXCEL, PPT, etc. can be supported.
[0197] In addition, it supports uploading documents of various contents. In general, the contents contained in the documents can be in various data forms, such as text documents (including pictures and text), audio documents, video documents, etc. From a more detailed content classification point of view, it can be public account articles, research reports, news reports, resumes, product analysis reports, English articles, legal documents, financial reports, papers, textbooks, novels, etc. This article does not make specific restrictions.
[0198] In the embodiment of the present application, the object can trigger the upload operation in the information interaction interface, and then select the target document for content extraction from the document selection interface. Specifically, the object can upload only one document at a time, and then only extract the summary of the document; in addition, multiple documents can be uploaded at one time. In the case that the object uploads multiple documents at one time, the summary of each document can be extracted separately, or the summary of multiple documents as a whole can be directly extracted. This will be described in detail below and will not be repeated here.
[0199] It should be noted that the information interaction interface in the embodiment of the present application can be any interactive interface that supports the conversation function. In general, the information interaction interface can be any conversation interface in the client (such as a chat interface), or it can be a functional interface that supports the conversation function and is specifically used for document summarization, which can be called a document summary interface.
[0200] In addition, the client in the embodiments of the present application includes but is not limited to: mini-programs, APPs, web pages, and other forms.
[0201] The following mainly takes the information interaction interface as a document summary interface as an example. Of course, the information interaction interface can also be other conversation interfaces, which will not be described one by one here.
[0202] Optionally, the document summary function in the embodiment of the present application can be used as only one function in the client. In addition, the client can also support other functions, such as AI painting, AI copywriting generation, AI outline generation, etc. Based on this, the information interaction interface can be opened by the object based on the function discovery interface in the client. An optional implementation method is as follows:
[0203] Before S21, the client presents an information interaction interface in response to the document summary operation triggered by the first function control in the function discovery interface; wherein the information interaction interface includes a default session message and a document upload control, wherein the default session message is used to summarize the document example function to the object, and the document summary function represents generating a document summary by extracting content from the document.
[0204] The information interaction interface presented in this case can be understood as a functional interface that supports conversation functions and is specifically used for document summarization, that is, a document summary interface.
[0205] On this basis, the specific implementation method of S21 is: the client presents a document selection interface in response to an upload operation triggered by a document upload control in the information interaction interface.
[0206] See also Figure 3AAs shown, it is a schematic diagram of a function discovery interface and a document summary interface in an embodiment of the present application. The function discovery interface includes multiple first function controls, such as document summary, public account article summary, circle of friends copy, A application seed copy, short video script, travel plan, etc. The object can click on the document summary shown in S31 to trigger the document summary operation, presenting Figure 3A The document summary interface is shown.
[0207] Among them, the document summary interface also presents a default conversation message in the form of a conversation message, as shown in message box S32, prompting the object to upload the document, extract the core content of the document, and generate a document summary. For example, S32 contains a text prompt message "I can help you summarize the documents in application B. After uploading the document, I can help you quickly summarize the core content."
[0208] In addition, a document upload control is displayed at the bottom of the document summary interface (it can also be set at other locations), that is, Figure 3A The object can click the "Import B application document" control to enter the document selection interface.
[0209] like Figure 3B As shown, it is a schematic diagram of another function discovery interface and document summary interface in the embodiment of the present application. The function discovery interface includes multiple first function controls: document summary, cyberpunk style, travel plan, acrostic poem, PPT outline, fitness plan, etc. The object can click on the document summary shown in S32 to trigger the document summary operation, presenting Figure 3B The document summary interface is shown.
[0210] Same as above Figure 3A In the document summary interface, a default session message is presented in the form of a session message, as shown in the message box S34. In addition, a document upload control is displayed at the bottom of the document summary interface (it can also be set at other locations), that is, Figure 3B "Import PDF Document" is shown. The object can click this control to enter the document selection interface.
[0211] It should be noted that the triggering actions listed above for the controls may be clicks, long presses, double clicks, and other actions. The same applies to the following, and this article does not make specific limitations.
[0212] In the above implementation, the object can enter the information interaction interface through the function discovery interface, and can also enter other AI function-related interfaces through the function discovery interface, and the document upload control is directly presented in the information interaction interface, which is convenient for the object to directly upload documents by operating the document upload control, thereby reducing the complexity of the object operation and saving operation time.
[0213] Of course, the above-mentioned method of entering the information interaction interface is only one embodiment supported by the present application. In addition, the object can also enter the information interaction interface in other ways, such as the object directly opening the chat window with the AI summary robot in the client (which can be used as an information interaction interface), etc. This article does not make specific limitations.
[0214] Optionally, the default conversation message in the information interaction interface includes at least one example document; in an embodiment of the present application, when content is not extracted from the target document, the example document is in an interactive state, and the interactive state means that a selection operation can be performed on any example document in an interactive state on the current information interaction interface.
[0215] Therefore, before S21, the object may also view the document summary of the sample document to further understand the document summary function supported by the client. An optional implementation is as follows:
[0216] In response to a selection operation on any one of the at least one example document, the client presents a document summary corresponding to the any one of the example documents.
[0217] See also Figure 4 As shown, it is a schematic diagram of a document summary viewing process of an example document in an embodiment of the present application. Figure 4 The sample documents shown in the document summary interface 1 and the document summary interface 2 are in an interactive state. After the object selects the sample document 1 in the document summary interface 1, the sample document and the document summary of the sample document can be presented in the document summary interface, such as Figure 4 As shown in the document summary interface 2, specifically, the document summary here is presented in the form of a conversation message.
[0218] In the above implementation, the sample document is presented to the object based on the default session message, and the object can understand the document summary function more directly and quickly based on the sample document, thereby reducing the complexity of the object operation and saving operation time.
[0219] In addition, in addition to understanding the document summary function based on the sample document, the object can also upload the target document based on the document upload control in the information interaction interface.
[0220] See also Figure 5 As shown, it is a schematic diagram of a document summary interface and a document selection interface in an embodiment of the present application. Figure 5 The document summary interface shown in the figure shows a document upload control at the bottom. Figure 5 The object can click (or long press, double click, or other actions) the control to enter Figure 5 The document selection interface shown.
[0221] in, Figure 5 The document upload control shown is based on the example of importing a local document of the client (i.e., application B). Figure 5 There are three documents presented in the document selection interface shown, namely: Article 1, Article 2 and Article 3.
[0222] Among them, these three articles are all related to the object "Xiao A" currently logged in by the B application, such as Article 1 uploaded by Xiao A to the B application on May 4, 2023, and Article 2 and Article 3 sent by Xiao B to Xiao A on April 30, 2023.
[0223] The subject A may select at least one of the three articles as a target document to extract content from the target document.
[0224] like Figure 6 As shown, it is a schematic diagram of a document selection interface in an embodiment of the present application. Among them, document selection interface 1 indicates that subject A has selected "Article 1" as the target document, that is, only one target document needs to be abstracted. Document selection interface 2 indicates that subject A has selected "Article 1", "Article 2" and "Article 3" as target documents, that is, abstracts need to be extracted for three target documents.
[0225] It should be noted that the above Figure 3A , Figure 4 , Figure 5 The document upload control shown takes the import of local client documents or PDF type as an example. In addition, it can also import documents from other applications, or import other types of documents, document links, etc. In summary, the target document in the embodiment of the present application can be any type of document uploaded through any channel, which will not be described one by one here.
[0226] In addition, it should be noted that the document uploading methods listed above are only simple examples. The document upload control may not be set in the information interaction interface in the present application. For example, the object can directly send the target document to the dialog window of the information interaction interface in the form of a conversation message; or, the object can also call up the document selection interface based on voice commands in the information interaction interface, and then select the target document for upload, etc. Any method of uploading the target document based on the information interaction interface is applicable to the embodiments of the present application and will not be described one by one here.
[0227] S22: In response to a selection operation on a target document in at least one document, the client presents the target document in the information interaction interface and presents processing information of the target document in a status area corresponding to the target document, where the processing information indicates a current processing node and a corresponding processing status when content is extracted from the target document.
[0228] In the embodiment of the present application, the process of extracting content from the target document can be divided into multiple steps, each of which can be regarded as a processing node. Therefore, the process of extracting content from the target document includes multiple processing nodes, as listed below:
[0229] Upload documents, extract content information, process image content, process text content, extract core ideas, and organize and merge summaries.
[0230] Among them, uploading a document means uploading all the contents contained in the document (including one or more contents such as text, pictures, videos, etc.); extracting content information means extracting specific information of one or more contents such as text, pictures, videos, etc. contained in the document; processing picture content can be understood as extracting text information in the picture (such as using optical character recognition (OCR) technology to recognize picture content); processing text content can be understood as slicing the extracted text information to obtain at least one text slice, etc.; extracting the core idea can be understood as extracting the summary of each text slice to obtain the slice summary corresponding to each text slice, etc.; collating and merging summaries can be understood as summarizing the obtained slice summaries to obtain the document summary corresponding to the target document, etc. For details, please refer to the relevant instructions on the server side, and the repeated parts will not be repeated.
[0231] In summary, the above processing nodes can be divided into two categories. One is document uploading, which corresponds to the processing node of "uploading document", and the other is document summarization, which corresponds to the above processing nodes of "extracting content information, processing image content, processing text content, extracting core ideas, and organizing and merging summaries".
[0232] It should be noted that the several processing nodes listed above are just simple examples. In addition, other processing nodes may also be included, such as processing video content, processing voice content, etc., which are not specifically limited in this article.
[0233] The processing status corresponding to each processing node may be processing, completed, not yet processed, processing failed, etc. In the processing status, the processing progress may be further indicated, which is not specifically limited in this document.
[0234] In summary, you first need to upload the document. After the document is uploaded, you can extract the content information contained in the document. If the extracted content information includes image content, then process the image content. Furthermore, if the extracted content information includes text content, then process the text content, and then extract the core ideas of the processed content information. Finally, organize and merge these extracted core ideas to generate a document summary.
[0235] In an embodiment of the present application, taking into account that the execution of these processing nodes will consume a certain amount of time, in order to reduce the object's sense of waiting, manage the object's expectations, and avoid the loss of the object during the summary generation process, the present application sets up a status area in the information interaction interface for displaying the progress related to the processing nodes. Specifically, in the process of extracting content from the target document, the current processing node and the corresponding processing status corresponding to the target document are directly displayed to the object through the status area to enhance the object's experience.
[0236] The status area may be presented at a relevant position of the target document, such as any position near the target document, such as below the target document message box, or above, left, or right, etc., which is not specifically limited herein.
[0237] See also Fig. 7A As shown, it is a schematic diagram of a state area in an embodiment of the present application. Fig. 7A S71 in the figure is a status area in the embodiment of the present application. Taking the target document "Great CCC" which is a 22.5M PDF as an example, at the current moment, the current processing node corresponding to the target document is "Upload Document", and the upload progress (i.e., processing status) is 75%, then the processing information "Uploading Document 75%" can be presented in the status area shown in S71.
[0238] See also Figure 7B As shown, it is a schematic diagram of another state area in the embodiment of the present application. Figure 7B S73 in FIG. 1 is a state area in the embodiment of the present application. Fig. 7A Similar to S71 in the figure, the processing information “90% of the document is being uploaded” can be presented in the status area shown in S73, indicating that the current processing node is uploading the document and the corresponding processing status is 90% uploaded.
[0239] During this process, if the object does not want to extract the content of the document, it can cancel it at any time. For example, when the object is uploading the target document, the document upload control is Figure 3B , Figure 4 , Figure 5 The style shown is updated to the style shown in S72 or S74, that is, the object is prompted "Uploading, click to cancel", and the object clicks the control shown in S72 or S74 to cancel the uploading of the target document.
[0240] Optionally, during the processing after the target document is uploaded, at least one sample document is updated to a non-interactive state.
[0241] See also Fig. 8A As shown, it is a schematic diagram of a default session message and status area in an embodiment of the present application. Fig. 8AThe processing information "Processing text content" in the status area S82 shown indicates that the current processing node is processing text content and the processing status is processing. That is, the current processing node belongs to the processing process after the upload is completed. In this case, the sample document needs to be updated to a non-interactive state, such as Fig. 8A The default session message S81 shown indicates a non-interactive state.
[0242] See also Figure 8B As shown, it is a schematic diagram of another default session message and status area in an embodiment of the present application. Figure 8B The processing information "Processing image content" in the status area S85 shown is the same as Fig. 8A The meaning of S81 in the example is the same as that of S81, and the default session message S84 also indicates a non-interactive state.
[0243] During this process, if the object does not want to extract the content of the document, it can cancel it at any time. For example, when the object is uploading the target document, the document upload control is Figure 3B , Figure 4 , Figure 5 The style shown is updated to the style shown in S83 or S86, that is, the object is prompted "summarizing, click to cancel", and the object clicks the control shown in S83 or S86 to cancel the uploading of the target document.
[0244] In the above implementation, the processing progress of the target document is instantly presented to the object through the status area, which effectively manages the object's expectations and facilitates the object to intuitively understand the progress.
[0245] Optionally, in an initial situation, the status area is collapsed to facilitate the object to promptly understand the current processing node.
[0246] In addition, if the object wants to know more processing nodes in time, the status area can be switched to an expanded state. An optional implementation is as follows:
[0247] In response to the expansion operation triggered on the status area, the client switches the status area to an expanded state; in the expanded state, the various processing nodes when extracting content from the target document and the respective processing states of the various processing nodes are presented.
[0248] In order to facilitate the object to further quickly understand the processing status of each processing node, different display styles can be used to distinguish processing nodes in different processing statuses to present different sensory effects to the object.
[0249] Specifically, different display styles may be different colors, different text styles, additional different icons, patterns, etc., which are not specifically limited herein.
[0250] For example, when there are processing nodes that have failed to be processed, such processing nodes are displayed in red font to serve as a warning; or, the processing nodes being processed are displayed in bold font to serve as emphasis; and so on.
[0251] In an embodiment of the present application, the status area can be divided into a collapsed state and an expanded state. In the collapsed state, the status area only needs to present the current processing node of the target document and the processing status corresponding to the current processing node, which can ensure that the object is aware of the current processing status of the target document in a timely manner.
[0252] In the expanded form, the status area can present the various processing nodes involved in the process of content extraction of the target document, as well as the processing status of each of these processing nodes, to ensure that the object has a clear understanding of the complete processing flow corresponding to the target document, such as which processing node(s) have been completed, which are being processed, which have not yet been completed, and so on.
[0253] See also Fig.9A As shown, it is a schematic diagram of the state area in an expanded form in an embodiment of the present application. Fig.9A As shown in the S91 part in the expanded form, various processing nodes are displayed, and different processing states corresponding to these processing nodes are represented by different text styles.
[0254] Among them, uploading documents and extracting content information are in the completed state, processing image content is in the processing state, and processing text content, extracting core ideas, and collating and merging summaries are in the unprocessed state.
[0255] In addition, the object can control the state of the status area to be collapsed or expanded through the control shown in S910.
[0256] See also Fig. 9B As shown, it is a schematic diagram of the state area in another unfolded form in the embodiment of the present application. Fig. 9B As shown in the S92 part in the expanded form, various processing nodes are displayed, and different processing states corresponding to these processing nodes are represented by different text styles.
[0257] Among them, uploading documents, extracting content information and processing image content are in the completed state, processing text content is in the processing state, and extracting core ideas and collating and merging summaries are in the unprocessed state.
[0258] In the above embodiment, the status area is supported to have at least two forms, namely, an expanded form and a collapsed form. In addition to facilitating the subject to intuitively understand the current processing progress of the target document, it can also support the subject to timely understand other processes required for content extraction of the target document, so as to reduce the subject's sense of waiting and avoid the subject from being lost during the summary generation process.
[0259] Optionally, regardless of whether the status area is in a collapsed state or an expanded state, if the current processing node of the target document is a critical processing node, countdown information of the estimated completion time corresponding to the critical processing node is presented in the status area.
[0260] The key processing node is at least one of the following: a preset processing node and at least one of a processing node whose estimated completion time exceeds a preset time threshold.
[0261] That is, the key node in the embodiment of the present application may be one or more pre-set processing nodes. Generally, some more important and complex processing nodes may be preferentially set as key processing nodes according to the importance or complexity of each processing node.
[0262] Alternatively, a time threshold (i.e., a preset time threshold) is set in advance. After the server estimates the estimated completion time corresponding to each processing node for the target document, these estimated completion times are compared with the preset time threshold respectively, and the processing nodes whose estimated completion time exceeds the preset time threshold are regarded as key processing nodes.
[0263] The preset time threshold can be flexibly set according to actual needs, the main model used when extracting content, the ratio of the estimated completion time between each processing node, etc., and this article does not make specific restrictions. For example, if the estimated completion time corresponding to most processing nodes is 1 to 2 seconds, and the estimated completion time of some processing nodes is more than ten seconds, the preset time threshold can be set to 10 seconds, and so on.
[0264] Alternatively, the key processing node may be determined by combining the above two methods.
[0265] Specifically, based on the above step-by-step progress display, in order to enhance the user experience of the object, reduce the object's sense of waiting, and let the object know the time required for processing in a timely manner, a countdown can also be displayed at some key processing nodes.
[0266] like Fig. 10A As shown, it is a schematic diagram of countdown information in an embodiment of the present application. Fig. 10AThe current processing node presented in the status area S101 is "Extracting core ideas", the processing status is not "Processing", and the corresponding estimated completion time countdown information is 12s. As time goes by, the countdown information also changes, such as decreasing to 11s, 10s, 9s...
[0267] like Fig. 10B As shown, it is a schematic diagram of another countdown information in an embodiment of the present application. Fig. 10B The current processing node presented in the status area S102 is "Sorting and Merging Summary", the processing status is not "Processing", and the corresponding estimated completion time countdown information is 11s. As time goes by, the countdown information also changes, such as decreasing to 10s, 9s, 8s...
[0268] It should be noted that Fig. 10A or Fig. 10B The countdown information listed is displayed in the status area of the collapsed form. In addition, the countdown information of the key processing nodes can also be displayed in the status area of the expanded form.
[0269] like Fig.11 As shown, it is a schematic diagram of another countdown information in an embodiment of the present application. Fig.11 The completed processing nodes are shown as follows: upload document, extract content information, process image information, process text information, extract core idea. The processing node being processed is: organize and merge summary. This processing node is a key processing node and can further display countdown information, such as Fig.11 The 11s shown in the countdown information can be gradually reduced to 10s, 9s, 8s... as time goes by.
[0270] In the above implementation, the duration can be calculated in advance for some more complex, important or time-consuming links, and a countdown can be displayed to ensure that the subject is aware of the current processing progress and remaining processing time of the target document in a timely manner, so as to reduce the subject's sense of waiting, manage the subject's expectations, and avoid the loss of the subject during the summary generation process.
[0271] It should be noted that the above Fig.9A , Fig. 9B , Fig. 10A , Fig. 10B or Fig.11 The content extraction process listed in the figure did not have any exceptions, but in actual application, processing failure may occur at some processing nodes.
[0272] Optionally, in the event that the upload of the target document fails (i.e., the processing node for uploading the document fails), a re-upload control may be presented, and the object may re-trigger the upload operation based on the re-upload control. The client re-uploads the target document in response to the re-upload operation triggered by the re-upload control.
[0273] Specifically, an upload failure prompt message may also be presented. The upload failure prompt message may be in the form of a control, a pop-up window, etc., or it may be directly presented in the status area (that is, the processing information corresponding to the upload document processing node when the processing fails, which may also be called the upload failure prompt message), or a combination of two or more of the above situations, etc. This article does not make specific limitations. When the upload failure prompt message is in the form of a control, it is the re-upload control in the embodiment of the present application, and the object can trigger the operation of re-uploading the document based on the re-upload control.
[0274] like Fig. 12A As shown, it is a schematic diagram of an upload failure prompt message in an embodiment of the present application. In the case of a target document upload failure, the status area is shown in S121, prompting the object "upload failure", and a "re-upload" control is further presented below the status area, as shown in S122, wherein S121 and S122 can be regarded as a manifestation of an upload failure prompt message in an embodiment of the present application. The object can click the re-upload control shown in S122 to re-upload the target document.
[0275] It should be noted that Fig. 12A The above-listed upload prompt information presentation methods are just simple examples. In addition, it can also be in other forms, such as pop-up windows. In addition, it can also further indicate the reasons for the upload failure, such as Fig. 12B As shown, it is a schematic diagram of another upload failure prompt information in an embodiment of the present application, wherein: Fig. 12B Taking the control as an example, two types of upload failure prompt messages are listed. For example, you can only prompt the object "document upload failed", or you can prompt the reason for the upload failure, such as "the document is too large, please upload a document smaller than 10M", and so on.
[0276] In addition to the above-listed exceptions in the upload document node, other nodes may also have exceptions. For example, if the image content processing node fails, the processing information indicating the failure can be directly presented in the status area.
[0277] like Fig.13A As shown, it is a schematic diagram of processing node exceptions in an embodiment of the present application. Fig.13AThe status area is collapsed, wherein the processing information shown in S131 indicates that the processing status of the processing image content node is: processing failed. In this case, a re-summarization control may be presented below the status area, as shown in S132, and the subject may click the control to re-extract the content of the target document.
[0278] Another example Fig. 13B As shown, it is a schematic diagram of another method of processing node exceptions in an embodiment of the present application. Fig. 13B The status area in the state area is in an expanded form, wherein the processing status corresponding to the processing image content node in the state area shown in S133 is: image processing failed, and the subsequent summary step cannot be continued after the step fails. In this case, a re-summarization control can also be presented below the status area, as shown in S134, and the subject can click the control to re-extract the content of the target document.
[0279] It should be noted that Fig.13A or Fig. 13B The processing node for processing image content is taken as an example. When an exception occurs in other processing nodes, the same processing method is used, and the repeated parts will not be repeated.
[0280] In the above implementation, when the object fails to upload or other nodes process abnormally, the document can be quickly re-uploaded through the re-upload control, and the content of the target document can be re-extracted through the re-summarize control, thereby reducing the complexity of object operations and saving operation time.
[0281] Optionally, in the expanded status area, after presenting each processing node when extracting content from the target document and the processing status of each processing node, the object can also view the specific processing status of these processing nodes.
[0282] For the target processing nodes in the target processing state among the processing nodes, in response to a selection operation on any target processing node, a processing result of any target processing node is presented.
[0283] The target processing status may be any specified processing status, such as completed, processing, or processing failure.
[0284] Generally, the object wants to view the processing result corresponding to the completed processing node, or wants to view the failure reason corresponding to the failed processing node, etc. Therefore, an optional implementation is: the target processing status includes at least one of completed and failed processing, and when the processing status of any target processing node is failed processing, the processing result includes at least one of the failure reason and document adjustment suggestion.
[0285] In the embodiment of the present application, the above processing results can be presented in a floating layer, a pop-up window, a new page, a certain area in the current page, etc., which is not specifically limited herein. The following is a simple example using a floating layer as an example.
[0286] See also Fig.14 As shown, it is a schematic diagram of a processing result in an embodiment of the present application. For example, the currently completed processing nodes include uploading documents, extracting content information, and processing image content. The object selects the target processing node "Processing Image Content" to view the image content processing result corresponding to the target document, which is the text information extracted from each image.
[0287] See also Fig.15 As shown in the figure, it is a schematic diagram of another processing result in the embodiment of the present application. For example, the processing node that currently fails to process is processing image content. The object selects the target processing node "Processing Image Content" to view the image content processing result corresponding to the target document. The processing result is the text information successfully extracted from the image, and the image that failed to process. In addition, the failure reason and document adjustment suggestions can be further presented, such as Fig.15 "The image is too large, it is recommended to be adjusted to within 20M", etc.
[0288] It should be noted that the above-mentioned several processing result presentation methods are just simple examples. In addition, other processing result presentation methods are also applicable to the embodiments of the present application and will not be described in detail here.
[0289] In the above implementation, the processing result can be directly viewed based on the processing node shown in the status area, so that the object can quickly understand the relevant processing process and results of the document.
[0290] S23: After the client completes processing the target document, it cancels the display of the status area and presents a document summary obtained after content extraction from the target document in the information interaction interface.
[0291] Specifically, this application supports outputting document summaries in various forms, including but not limited to: text, pictures (flow charts, mind maps, etc.), tables, etc.
[0292] In the embodiment of the present application, when the processing of the target document is completed, it means that the content extraction has been completed, and a document summary for the target document is obtained, which is an overall document summary generated by summarizing the overall content of the target document. The subject can quickly understand the main content of the target document by reading the document summary.
[0293] In addition, considering that the processing of the target document has been completed, that is, each processing node has been completed, there is no need to display the processing information in the status area, and the display of the status area can be cancelled.
[0294] In the embodiment of the present application, when presenting the document summary in the information interaction interface, any method may be adopted, such as presenting the document summary in the form of a conversation message. Specifically, a new message box is directly generated in the information interaction interface, and the generated document summary is fully presented in the message box. Alternatively, in order to enhance the subject's experience, the document summary corresponding to the target document may be streamed and output in the form of a conversation message in the information interaction interface, so that the subject feels that these document summaries are output bit by bit.
[0295] In addition, after the processing of the target document is completed, at least one example document may be updated to an interactive state. It should be noted that, in the case of streaming output of the document summary, at least one example document may be updated to an interactive state before / when the document summary is output; or at least one example document may be updated to an interactive state after the document summary is completely output.
[0296] Take the above-mentioned streaming output method as an example. Fig.16 As shown, it is a schematic diagram of the first document summary in the embodiment of the present application. Fig.16 The document summary interface 3 and the document summary interface 4 in the document summary interface 3 are shown, wherein the document summary shown in the message box S161 in the document summary interface 3 has not been completely output, and the document summary shown in the message box S163 in the document summary interface 4 indicates the result of complete output. In the case that the document summary has not been completely output, the aforementioned "summarizing, click to cancel" is updated to "stop generating" shown in S162, and the subject can randomly click the control shown in S162 to pause outputting the document summary.
[0297] In addition, after the document summary is completely output, the sample document can be updated from the non-interactive state shown in the document summary interface 3 to the interactive state shown in the document summary interface 4.
[0298] like Fig.17A As shown, it is a schematic diagram of the second document summary in the embodiment of the present application. Fig.17A An example of a document summary interface showing a situation where a document summary is being output, which is the same as document summary interface 3 in 16. The document summary in the message box has not been completely output, and the subject can randomly click "Stop Generation" to pause outputting the document summary.
[0299] Another example Fig. 17B As shown, it is a schematic diagram of the third document summary in the embodiment of the present application. Fig. 17BAn example of a document summary interface when a complete document summary is output is shown, which is the same as document summary interface 4 in 16. The document summary in the message box has been completely output, and a re-summary control can be presented below the message box. The object can click the control to re-extract the content of the target document.
[0300] If the document summary is long and exceeds one screen, it can be scrolled and the "Import New PDF Document" button at the bottom will be suspended. Fig. 17C As shown, it is a schematic diagram of the fourth document summary in an embodiment of the present application. A scroll bar may be presented on the right side of the document summary interface, namely S171, and the object may slide the screen up and down by pulling the scroll bar to view the complete document summary.
[0301] In the embodiment of the present application, the document summary can be presented in the form of a conversation message. The present application also supports the object to generate different document summaries for the same document multiple times. An optional implementation is as follows:
[0302] A re-summarize control for the target document is presented at a first relevant position of the document summary; then, the object can click on the re-summarize control, and the client re-extracts the content of the target document in response to the triggering operation on the re-summarize control, and after the re-processing is completed, a new document summary is presented at the original session message corresponding to the document summary.
[0303] The first relevant position may be any position near the document summary, such as below the document summary message box, or above, on the left, or on the right, etc., which is not specifically limited herein.
[0304] Specifically, when outputting a complete document summary, a re-summarization control may be presented at the first relevant position of the document summary, still in the form of Fig.16 As shown in the example, Fig.16 S164 in the document summary interface 4 shown is an example of a re-summarization control in the embodiment of the present application. The object can click the control to repeat the above content extraction process. Specifically, the content extraction process in the embodiment of the present application includes multiple processing nodes. When re-extracting the content of the target document, only some of the multiple processing nodes can be re-executed, or all of the multiple processing nodes can be re-executed. Among them, when re-executing some of the multiple processing nodes, it is mainly to repeat at least the last processing node, and it is also possible to repeat several processing nodes before the last processing node.
[0305] Optionally, considering that the present application supports extracting summaries of the same document multiple times, in this case, the object can also switch to view the document summaries generated these times.
[0306] An optional implementation is as follows:
[0307] A summary switch control is presented at a second relevant position of the document summary; the object can switch the document summary for viewing based on the summary switch control, and the client switches and displays multiple document summary lines corresponding to the target document in the original session message in response to the switching operation triggered by the summary switch control.
[0308] Specifically, when the target document is summarized multiple times based on the above method, the document summaries corresponding to the target document, generated each time, can be displayed in the same message box and switched through the summary switching control.
[0309] The second relevant position may be any position near the document summary, such as below the document summary message box, or above, to the left, or to the right, etc., which is not specifically limited herein. The second relevant position may be the same as or close to the first relevant position, or may be different.
[0310] First of all, it should be noted that in the process of re-extracting the content of the target document, the status area can be presented in any of the ways listed in the embodiments of the present application, and the display of the status area can be cancelled after the content extraction is completed. The newly generated document summary can be presented in the form of a new conversation message, or it can be updated based on the original conversation message presented when the document summary was previously generated, and so on.
[0311] Take updating based on the original session message as an example, Fig.18A As shown, it is a schematic diagram of a summary switching control in an embodiment of the present application. In the case of re-summarizing the summary, the newly generated document summary can still be displayed in the message box shown in S181, which is generated when summarizing the target document for the first time. In the case of generating a new document summary, the summary switching control can be presented at the position shown in S182 and S183. Fig.18A The summary switching control shown in S182 is used to view the document summary generated last time for the currently displayed article summary, and the summary switching control shown in S183 is used to view the document summary generated next time for the currently displayed article summary.
[0312] In the case where the message box shown in S181 presents the most recently generated document summary, the summary switching control shown in S183 is in a non-interactive state, which means that the currently displayed article summary is the most recently generated one.
[0313] like Fig.18BAs shown, it is a schematic diagram of another summary switching control in an embodiment of the present application. The summary switching control can be presented at the position shown in S186, and the object can view the document summary generated last / next time of the currently displayed article summary, where 2 / 2 means that a total of 2 document summaries have been generated for the target document, and the currently presented one is the document summary generated for the second time.
[0314] In the above implementation, the object is supported to extract content from the target document multiple times, and quickly obtain a new document summary through the re-summarization control until a more satisfactory summary is obtained, and the object is supported to switch to view the document summary generated each time.
[0315] This application also supports the subject to provide evaluation feedback on the quality of the generated document summary. An optional implementation is as follows:
[0316] A feedback control for evaluating the summary quality of the document summary is presented at a third relevant position of the document summary; and the client presents a corresponding evaluation result in response to an evaluation operation triggered by the feedback control.
[0317] For example, positive feedback and negative feedback can be generated by likes and dislikes respectively. Alternatively, the subject can give feedback by scoring the document summary or lighting up different numbers of small stars, etc., which is not specifically limited in this article. In addition, when multiple document summaries are generated for the same target document, the support subject can evaluate each document summary separately.
[0318] Still Fig.18A For example, Fig.18A S184 in the figure is an example of a positive feedback control in an embodiment of the present application. When the subject is relatively satisfied with the generated document summary, the subject can give a positive evaluation by clicking "like", and the evaluation result can be presented in the form of the current number of likes or successful likes; S185 is an example of a negative feedback control in an embodiment of the present application. When the subject is dissatisfied with the generated document summary, the subject can give a negative evaluation by clicking "dislike", and the evaluation result can be presented in the form of the current number of dislikes or successful dislikes.
[0319] It should be noted that the above Fig.18A The feedback controls listed are just simple examples. In addition, other styles of feedback controls are also applicable to the embodiments of the present application and will not be described in detail here.
[0320] In the above implementation, the subjects are supported to evaluate the generated document summaries, and the main model can be fine-tuned based on the subject feedback to improve the accuracy of the generated document summaries.
[0321] It should be noted that the content extraction method in the embodiment of the present application, based on the content summarization capability, supports the encapsulation of different upper-layer applications in different industries. After fine-tuning the model and encapsulating the upper-layer product application for different file scenarios in different industries, more product forms can be derived. Specific application scenarios include but are not limited to some or all of the following:
[0322] Financial report assistant: extract financial report summaries; paper assistant: extract academic papers; textbook assistant: extract textbook summaries; novel assistant: extract novel summaries, extract novel character relationships, etc.
[0323] In summary, the content extraction method in the embodiment of the present application supports the extraction of summaries of various types of documents, and the extracted summaries are not limited to paragraph-style texts, but can also be in the form of pictures, tables, or other forms, which are not specifically limited in this article.
[0324] Furthermore, the content extraction method in the embodiment of the present application also supports multiple rounds of question and answer based on the generated document summary. The generation of the document summary can be regarded as the first round of dialogue / question and answer, and the object of support starts from the second round of dialogue, and answers the subsequent questions according to the content of the document, or repeatedly modifies the document summary.
[0325] An optional implementation is: in addition to presenting the document summary obtained after content extraction of the target document in the information interaction interface, an input box can also be presented; the object can input question instructions or modification instructions for the document summary based on the input box.
[0326] The input box may be presented in any area of the information interaction interface, such as at the bottom of the information interaction interface.
[0327] Specifically, in the case where a document upload control previously existed in the information interaction interface (i.e., the document summary interface) specifically used for document summarization, an input box may be presented at the location of the original document upload control, such as Fig.19A S191 in the example, and collapse the original document upload control into a small icon and present it in other locations, such as Fig.19A As shown in S192 in .
[0328] In addition, considering that the information interaction interface in the embodiment of the present application only needs to support the conversation function, it can be any conversation interface. Therefore, in addition to asking questions about the document content in the above-mentioned manner, questions can also be asked about non-document content (i.e., ordinary question and answer based on AI).
[0329] Correspondingly, the input box may also be an input box that originally exists in the conversation interface. The subject may input a first question-and-answer instruction for the document content based on the input box, or may input a second question-and-answer instruction for non-document content.
[0330] The time of presentation of the input box is not specifically limited in this article. For example, the input box can be presented at the same time as the document summary is presented in the information interaction interface, or the input box is presented after the object triggers a preset operation (such as a target gesture, voice command, etc.) in the information interaction interface. After the input box is presented, the object can input the first question and answer command, the second question and answer command, the modification command, etc. through text, voice, etc., which is not specifically limited in this article.
[0331] The following first introduces the question-and-answer scenario related to the first question-and-answer instruction:
[0332] Optionally, the client presents an answer message corresponding to the first question-and-answer instruction in response to the first question-and-answer instruction for the document summary input based on the input box; wherein the answer message is any one of the following:
[0333] A fixed phrase indicating that an answer cannot be given is generated based on the first question and answer instruction and content related to the first question and answer instruction in the target document, and is generated based on search results related to the first question and answer instruction.
[0334] In summary, when the subject inputs the first question and answer instruction, if the document content of the target document can answer the question, an answer message is generated directly based on the relevant content in the target document; if the document content of the target document has relevant parts but cannot answer the question, a search plug-in can be started to generate an answer message based on the search results; if the document content of the target document has no relevant parts, a fixed phrase is returned to indicate that it cannot be answered.
[0335] See also Fig.19A As shown, it is a schematic diagram of a question-and-answer scenario for a document summary in an embodiment of the present application. An input box S191 is displayed at the bottom of the information interaction interface, and the object can enter the first question-and-answer instruction based on the input box. For example, if the object enters the first question-and-answer instruction "How to make D dish" shown in S193, and there is content related to "How to make D dish" in the target document, and the answer message can be directly generated according to the relevant content in the target document, then the answer message shown in S194 can be presented.
[0336] It should be noted that the first question and answer instruction and the answer message in the embodiment of the present application can both be presented in the form of conversation messages.
[0337] In addition, the object may also upload a new target document based on the document upload control shown in S192 to extract content from the new target document.
[0338] Furthermore, the above can be recorded as the second round of dialogue. On this basis, the subject can continue to ask questions and conduct the third round or even the fourth or fifth round of dialogue...
[0339] See also Fig.19B As shown, it is a schematic diagram of another question-answering scenario for document summaries in an embodiment of the present application. Fig.19A On the basis of this, the first question and answer instruction "How should soy sauce be added" shown in S195 is input. In this case, the first question and answer instruction (i.e., S193) and the answer message (i.e., S194) before the first question and answer instruction shown in S195 can be combined to perform contextual rewriting on the first question and answer instruction S195 at this time. For example, the rewritten question is "How should soy sauce be added in the process of making D dish?", if the target document contains relevant content of the question "How should soy sauce be added in the process of making D dish?", the answer message shown in S196 can be directly generated according to the relevant content in the target document.
[0340] The following describes the modification scenario:
[0341] Optionally, in response to a modification instruction for the document summary input based on the input box, the client presents a modified document summary corresponding to the modification instruction.
[0342] The modification instruction may be for the content, word count, person, etc. of the document summary. For example, it may be adjusted from 300 words to 200 words, or from the first person to the third person, etc. In addition, the modified document summary corresponding to the modification instruction in this application may be presented in the original message box corresponding to the document summary previously generated for the target document, or in a new message box, which is not specifically limited herein.
[0343] See also Fig. 20 As shown, it is a schematic diagram of a modification scenario for a document summary in an embodiment of the present application. As shown in S201, the modification instruction is input by the object, and the word count of the currently generated document summary is reduced to within 100 words. The generated modified document summary can be presented in a new message box, as shown in S202.
[0344] It should be noted that the above Fig.19A , Fig.19B or Fig. 20 The several processes listed for question-and-answer or modification based on document summaries are just simple examples. In addition, other implementation processes of the same functions are also applicable to the embodiments of the present application and are not specifically limited in this article.
[0345] In the above implementation, after the summary is output, the application supports further questions based on the content of the summary. The model will further produce answer content, support the object to repeatedly modify the summary or ask questions about the content in the summary, which can enhance interactivity and facilitate the object to more quickly access the target document and obtain effective information.
[0346] The above is an example of question and answer for document content. If the information interaction interface also includes a second question and answer instruction for non-document content input, an optional implementation of the question and answer instruction and the answer message is as follows:
[0347] A first message style is used to present a first question and answer instruction and an answer message corresponding to the first question and answer instruction; and a second message style is used to present a second question and answer instruction and an answer message corresponding to the second question and answer instruction.
[0348] That is, different message styles are used to distinguish between ordinary Q&A (non-document content Q&A) scenarios and document Q&A scenarios. Specifically, different message styles can be different message fonts (such as fonts of different colors, fonts of different sizes, etc.), different message boxes (such as different message bubbles), etc., which are not specifically limited in this article.
[0349] See also Fig.21 As shown, it is a schematic diagram of the presentation style of a question-and-answer instruction and an answer message in an embodiment of the present application. Obviously, Fig.21 S211 in the figure is a second question-and-answer instruction that is irrelevant to the document content, and S212 is an answer message corresponding to the question-and-answer instruction. S211 and S212 are message boxes in the form of dotted lines. Fig.21 S213 is a first question-and-answer instruction related to the document content, and S214 is an answer message corresponding to the question-and-answer instruction. S213 and S214 are message boxes in the form of solid lines. Different message styles are reflected by message boxes with different lines.
[0350] Before the client uses different message styles to make the above distinction, it also needs to use certain logic to distinguish which of the question and answer instructions input by the object belong to the first question and answer instructions and which belong to the second question and answer instructions.
[0351] In an embodiment of the present application, the first question and answer instruction and the second question and answer instruction are distinguished based on at least one of the following methods: special character recognition, key information recognition, and intent recognition.
[0352] For example, when special characters are used for distinction, when the object of the prompt asks questions about the content of the document, the special characters need to be entered in the question and answer instructions. Furthermore, when the question and answer instructions are distinguished, if the special character (such as " / ") is recognized in the question and answer instructions, it can be used as the first question and answer instruction. If it is not recognized, it can be used as the second question and answer instruction.
[0353] Another example is to identify key information (keywords, keywords, etc.) of the question and answer instruction, such as setting the keyword "this document", etc. If the keyword is recognized in the question and answer instruction, it can be used as the first question and answer instruction, if it is not recognized, it can be used as the second question and answer instruction.
[0354] Alternatively, the question-and-answer instruction is subjected to intent recognition to identify the intent of the question and analyze whether the intent is relevant to the previous target document. If so, it can be used as the first question-and-answer instruction; if not, it can be used as the second question-and-answer instruction.
[0355] In addition, the above-mentioned methods can also be combined, such as using special characters or keyword recognition, combined with intent recognition to distinguish question and answer instructions.
[0356] It should be noted that the above process of distinguishing question and answer instructions can also be executed by the server, that is, the client sends the question instruction to the server, and the server uses the above logic to distinguish and feeds back the distinction result to the client.
[0357] In the above implementation, when the subject asks questions about both document content and non-document content, the message style is used to effectively distinguish between question and answer instructions and answer messages, thereby ensuring that the subject clearly understands which answer messages correspond to which questions, and clarifies the current questioning scenario, thereby enhancing the subject experience.
[0358] It should be noted that the above examples are all based on the example of a subject uploading a target document, extracting a summary of the target document, and performing question and answering, modifying, etc. on the document summary of the target document. In addition to this, the subject can also upload multiple target documents, extract summaries of multiple documents, and perform question and answering, modify, etc. on the document summaries of multiple documents.
[0359] In the case where the object uploads multiple target documents at one time, summary extraction may be performed on the multiple target documents to generate a document summary corresponding to each target document, or to generate a document summary corresponding to the multiple target documents as a whole.
[0360] That is, when there are multiple target documents, each target document can be presented in the information interaction interface, and the processing information of each target document can be presented in the status area corresponding to each target document. The specific presentation method is the same as the presentation method of the status area corresponding to the single target document listed above, including the collapsed form and the expanded form, etc., which are not specifically limited in this article. Similarly, after the processing of each target document is completed, the display of the status area corresponding to the target document can be cancelled.
[0361] Specifically, the multiple target documents can be processed in parallel to ensure the efficiency of abstract extraction and reduce the waiting time of the object. When presenting the document abstract, there are two presentation methods, including but not limited to the following:
[0362] Presentation method 1: presenting each target document and the document summary corresponding to each target document in the information interaction interface, wherein each target document and the document summary corresponding to the target document form a group of conversation messages.
[0363] This method means that every time a target document is processed, the document summary corresponding to the target document can be presented in the information interaction interface.
[0364] It should be noted that the target document in the embodiment of the present application can be a variety of presentation styles such as an actual document, a document icon, a document name, a document link, etc., and this article does not make specific limitations.
[0365] In the embodiment of the present application, when each target document and the document summary corresponding to the target document are presented through a group of session messages, the group of session messages essentially includes at least one session message, that is, it can be one session message or multiple session messages. Therefore, there are actually multiple display styles, including but not limited to some or all of the following:
[0366] Display style 1: In a conversation message, a partition block displays each target document and its document summary.
[0367] Display style 2: multiple conversation messages are displayed, and each conversation message displays a target document and its document summary.
[0368] Display style 3: multiple conversation messages are displayed. These conversation messages are divided into two categories. The first category is that each conversation message displays a target document, and the second category is that each conversation message displays a document summary.
[0369] Display style 4: Display a session message, which includes the document name of each target document and the document summary of each target document displayed in segments, wherein the document name and document summary of the same target document can be displayed in the same paragraph.
[0370] It should be noted that the several display styles listed above are just simple examples. The method of presenting each target document and its corresponding document summary through at least one conversation message is applicable to the embodiments of the present application and will not be described one by one here.
[0371] The following uses the above display style 3 as an example for explanation.
[0372] See also Fig. 22 As shown, it is a schematic diagram of a presentation method of multiple target documents and document summaries in an embodiment of the present application. If the subject uploads two target documents at the same time, namely "Great CCC1" and "Great CCC2", the two target documents can be processed in parallel to ensure that the document summaries corresponding to each target document are presented synchronously as much as possible.
[0373] Specifically, when presenting the document summary corresponding to each target document, each target document and its document summary are taken as a group of session messages, and the following is presented: Fig. 22For each target document, a re-summarization control, a feedback control, etc. may also be presented at its relevant position. The specific implementation method is the same as the above embodiment, and the repeated parts will not be repeated.
[0374] In addition, the present application also supports the object to choose whether to summarize the document summaries of multiple target documents. An optional implementation is as follows:
[0375] In addition to presenting each target document and the document summary corresponding to each target document in the information interaction interface, summary prompt information is further presented.
[0376] Among them, the summary prompt information is used to prompt whether to summarize the document summaries corresponding to each target document. The presentation time of the summary prompt information is not specifically limited in this article. For example, the summary prompt information can be presented at the same time as the document summary is presented in the information interaction interface. Alternatively, the summary prompt information is presented after the object triggers a preset operation (such as a target gesture, voice command, etc.) in the information interaction interface.
[0377] In the embodiment of the present application, the summarization process includes at least one of the following: summarizing the common points of each document summary and comparing the differences of each document summary. Based on this, the corresponding summary prompt information can also have multiple forms, such as only prompting the object to summarize the common points of multiple document summaries; only prompting the object to compare the differences of multiple document summaries; or asking the object whether to summarize the common points of multiple document summaries and compare the differences of multiple document summaries; or directly asking the object whether to summarize multiple document summaries, etc.
[0378] Furthermore, in the case where the object triggers a summary operation, the client responds to the summary operation triggered by the summary prompt information by presenting a summarized document summary corresponding to the summary operation, which is generated based on the document summaries corresponding to each target document.
[0379] Still Fig. 22 As shown in the example, Fig. 22 The S221 part in is an example of a summary prompt information in an embodiment of the present application, and the summary prompt information includes the text "Whether to summarize the above summary in the following manner", and the controls "Merge" and "Compare". Among them, the merge control supports summarizing the common points of multiple document summaries, and the comparison control supports comparing the differences between multiple document summaries. If the objects are selected to be merged, the summarized document summary shown in S222 can be presented. The summarized document summary is obtained by summarizing the common points in the document summaries corresponding to the two target documents generated previously. Similarly, if multiple objects are selected for comparison, the differences in the document summaries corresponding to the two target documents generated previously can be compared to generate a summarized document summary.
[0380] See also Fig.23 As shown, it is a schematic diagram of another presentation method of multi-target documents and document summaries in an embodiment of the present application. Fig. 22 The difference is, Fig.23 The summary prompt information in is of another style, as shown in S231. The summary prompt information includes the text "Do you want to summarize the above summaries?" and the controls "Yes" and "No", that is, there is no need to ask the object whether to merge or compare multiple document summaries, but directly ask the object whether to summarize. If the object chooses yes, the summarized document summary shown in S232 can be presented, which not only compares the differences in the document summaries corresponding to the two target documents generated previously, but also summarizes the common points to generate a summarized document summary.
[0381] It should be noted that the above Fig. 22 or Fig.23 The listed summary prompt information is only a simple example, and other styles of summary prompt information are also applicable to the embodiments of the present application, which will not be described one by one here.
[0382] In addition, if the object uploads three or more target documents at the same time, the object can select the document summaries that it wants to summarize. If the object does not make a selection, the document summaries of multiple target documents uploaded by the object at the same time will be summarized by default.
[0383] Presentation method two: presenting each target document and the aggregated document summary separately in the information interaction interface, wherein the aggregated document summary is obtained by extracting the document summaries corresponding to each target document separately and aggregating multiple document summaries.
[0384] Specifically, a group of conversation messages is presented in the information interaction interface, and the group of conversation messages includes multiple target documents and summarized document summaries.
[0385] Specifically, the above presentation method 1 refers to presenting the separate summaries of each target document. Fig. 22 or Fig.23 The object is asked whether to summarize multiple documents in a summarized manner.
[0386] Different from the above-mentioned presentation method 1, the presentation method 2 does not ask or present a separate summary of each target document, but directly presents the summary of multiple documents.
[0387] In the embodiment of the present application, when a group of conversation messages is used to present multiple target documents and the summarized document summaries, the group of conversation messages essentially includes at least one conversation message, that is, it can be one conversation message or multiple conversation messages. Specifically, multiple target documents and the summarized document summaries can be presented through one conversation message. It can also be presented through multiple conversation messages, where these conversation messages are divided into two categories, the first category is that each conversation message displays one target document, and the second category has only one conversation message, which is used to display the summarized document summary; and so on.
[0388] It should be noted that the several display styles listed above are just simple examples. The method of presenting each target document and the summarized document summary through at least one conversation message is applicable to the embodiments of the present application and will not be described one by one here.
[0389] See also Fig.24 As shown in FIG. 1 , it is a schematic diagram of another method of presenting multiple target documents and document summaries in an embodiment of the present application. If the subject uploads two target documents at the same time, namely, "Great CCC1" and "Great CCC2", the document summaries corresponding to each target document may no longer be presented separately, but the summarized document summaries may be presented directly, such as Fig.24 As shown in S241.
[0390] It should be noted that, in the above-mentioned embodiment of the present application, when extracting content from a single target document, the relevant processing methods for the status area and document summary are also applicable to the content extraction of multiple document summaries, and the repeated parts will not be repeated.
[0391] In the above implementation, it is supported to extract summaries of multiple documents at the same time, and the object is supported to choose whether to merge the summaries of multiple documents according to its own needs, so that the object can understand multiple documents in a timely manner. In addition, when multiple documents are related documents, by merging or comparing the summaries of multiple documents, the object can more conveniently know the connection between multiple documents, understand the focus of each document and other information, and further improve the efficiency of document reading.
[0392] In addition, it should be noted that during the processing of the target document, if the subject wants to pause the current content extraction, or leave the current information interaction interface, the current content extraction process can be interrupted.
[0393] An optional implementation is as follows: the client responds to a processing stop operation on a target document by presenting a stop prompt message and a corresponding re-summarize control in an information interaction interface; the object can re-trigger a content extraction process for the target document based on the re-summarize control, and the client responds to a triggering operation on the re-summarize control by re-extracting content from the target document, and after the reprocessing is completed, presents a document summary obtained after content extraction from the target document in the information interaction interface.
[0394] In addition, it should be noted that in the process of re-extracting the content of the target document, a status area can also be presented, in which the current processing node and the corresponding processing status are presented. The object can also expand the status area to view a more specific processing process, and can also view the processing results corresponding to the processing node under the target processing status, etc. This article will not repeat them.
[0395] See also Fig.25A As shown, it is a schematic diagram of a stop prompt information in an embodiment of the present application. Fig.25A As shown in S251 in FIG. 1 , the stop prompt information indicates stopping the generation of the document summary of the target document. The presentation of the stop prompt information can be triggered in the following manner:
[0396] like Fig.16 As shown in S162, when the document summary has not been completely output, the aforementioned "summarizing, click to cancel" is updated to "stop generating" shown in S162, and the subject can click the control shown in S162 to suspend the output of the document summary, and the stop prompt information shown in S251 is presented. Alternatively, in the summarizing process before outputting the document summary, "summarizing, click to cancel" shown in S83 or S86 can be presented, and the subject can also click the control shown in S83 or S86 to suspend the generation of the document summary, and the stop prompt information shown in S251 is presented; and so on.
[0397] Same as above Fig.25A , see Fig.25B As shown, it is a schematic diagram of another stop prompt information in an embodiment of the present application. Fig.25B As shown in S252 in FIG. 1 , the stop prompt information indicates stopping the generation of the document summary of the target document.
[0398] When presenting a stop prompt message, a re-summary control may be further presented. The presentation time of the re-summary control is not specifically limited in this article. For example, the re-summary control may be presented at the same time as the stop prompt message is presented in the information interaction interface. Alternatively, the re-summary control may be presented after the object triggers a preset operation (such as a target gesture, voice command, etc.) in the information interaction interface.
[0399] like Fig.25AS252 or Fig.25B S254 in the figure is an example of a re-summarization control listed in the embodiment of the present application. The object can click the re-summarization control to re-trigger the content extraction process for the target document. The client re-extracts the content of the target document in response to the triggering operation on the re-summarization control, and after the re-processing is completed, presents the document summary obtained after the content extraction of the target document in the information interaction interface.
[0400] In the above implementation, the object is supported to stop at any time during the document summary generation process, or to quickly re-extract the document summary through the re-summarization control, thereby providing the object with higher operational flexibility.
[0401] In addition, during the processing of the target document, if the subject wants to leave the current information interaction interface, the subject can be asked through a secondary confirmation reminder to reduce the possibility of the subject exiting the current content extraction due to misoperation. An optional implementation is as follows:
[0402] During the processing of the target document, the client responds to the exit operation on the information interaction interface and presents exit prompt information, wherein the exit prompt information is used to prompt the object that the target document is currently being processed and to ask the object whether to confirm the exit.
[0403] If the object confirms the exit based on the exit prompt information, then exit the information interaction interface; if the object cancels the exit based on the exit prompt information, then the content extraction process for the target document can continue.
[0404] See also Fig.26A As shown, it is a schematic diagram of an exit prompt message in an embodiment of the present application, wherein the exit prompt message includes the text "Are you sure to leave? The task is in progress, leaving the current page will terminate the task", as well as the controls "Cancel" and "Confirm to leave". The object clicks Confirm to leave to exit the current information interaction interface, and clicks Cancel to continue to extract content from the target document.
[0405] In addition, if the object directly clicks Fig.26A The “×” in the upper right corner of the pop-up window can also be considered as the object canceling the current exit and continuing to extract content from the target document.
[0406] See also Fig.26B As shown, it is a schematic diagram of another exit prompt information in an embodiment of the present application, wherein the exit prompt information includes the text "Are you sure to leave? Task in progress, leaving the current page will terminate the current task", as well as controls "Leave" and "Continue Task". The object clicks to leave to exit the current information interaction interface, and clicks to continue to extract content from the target document.
[0407] In the above implementation, the object is supported to exit at any time during the document summary generation process, and the object is prevented from terminating the summary extraction process by mistake through a secondary confirmation prompt.
[0408] It should be noted that after the document summary is normally generated, in addition to supporting the object to conduct multiple rounds of questions and answers based on the document summary, this application also supports the object to share and forward the generated document summary.
[0409] An optional implementation is as follows:
[0410] The client presents at least one second function control corresponding to the document summary of the target document; these second function controls are all operation controls for the document summary, and the object can share and forward the document summary based on the second function control. The client then shares the document summary and the target document with the object to be shared in response to the sharing operation triggered by at least one second function control.
[0411] Specifically, the document summary can be shared in the form of links, mini-programs, pictures, etc. For example, a personal computer (PC) supports sharing in the form of links, a mobile terminal supports sharing in the form of mini-programs, etc. This article does not make specific limitations.
[0412] The second function control can be presented after the object performs the target action. Fig. 27 As shown, it is a schematic diagram of a second function control in an embodiment of the present application. Taking the target action as a long press as an example, if the object long presses the document summary message box (also called a bubble), four second function controls shown in S271 can be presented, namely: copy, excerpt copy, multiple selection, and forward. The object can click forward and select the object to be shared, and then the client responds to the sharing operation triggered by the forwarding control and shares the document summary and the target document to the object to be shared.
[0413] In addition, the second functional control can also be presented while presenting the document summary, still in Fig.18B Take the example shown in the figure, where S187 is a copy control in the embodiment of the present application, and S188 is a forwarding control in the embodiment of the present application. Both belong to the second function control corresponding to the document summary of the target document. The object can click forward and select the object to be shared to be forwarded, and then the client responds to the sharing operation triggered by the forwarding control, and shares the document summary and the target document with the object to be shared.
[0414] It should be noted that the several second function controls listed above are just simple examples, and any operation control related to the document summary can be used as a second function control, which will not be described in detail in this article.
[0415] In addition, it should be noted that the above is a process of sharing the current conversation message. In addition, the object can also select one or more conversation messages from the current interface to share.
[0416] Specifically, when the object selects one or more conversation messages by himself, the object can select a conversation message to share directly, or after selecting a conversation message and presenting a multi-select control, the object can select multiple conversation messages through the multi-select control and then share them; alternatively, the object can click a sharing control in the upper right corner of the current interface (or other location), click the sharing control and select multiple conversation messages to share, and so on.
[0417] Through the above method or other selection methods, the object can choose to share multiple conversation messages. In addition to sharing the target document and document summary, it can also further share the target document, multiple rounds of questions and answers related to the target document, or share other conversation messages.
[0418] In the above implementation, the object may share and forward the document summary generated for the target document so as to discuss and communicate with other objects.
[0419] Optionally, if the object is the shared party, if it receives a link / applet shared by other objects for the shared document, it can click on the link / applet, and then present the shared document and the document summary corresponding to the shared document, as well as a new dialogue entry; the object can perform a new information interaction interface based on the new dialogue entry, and the client responds to the trigger operation for the new dialogue entry by presenting a default session message and a document upload control in the information interaction interface, wherein the default session message is used to show the object an example document summary function, and the document summary function means generating a document summary by extracting content from the document. The object can upload a new document for content extraction based on the document upload control, wherein the process of uploading a new document and extracting content from the new document can refer to the above embodiment, and the repeated parts will not be repeated.
[0420] See also Fig.28A As shown, it is a schematic diagram of a landing page of a shared party in an embodiment of the present application. Fig.28A S281 is the shared document, S282 is the document summary of the shared document, and S283 is a new dialogue entry in the embodiment of the present application. The object can click on the new dialogue entry to enter Fig.28A The interface shown on the right side, where S284 is a default session message and S285 is a document upload control. The object can upload a new document for content extraction based on the document upload control shown in S285.
[0421] See also Fig.28BAs shown, it is a schematic diagram of another landing page of the shared party in the embodiment of the present application. Fig.28B S286 is the shared document, S287 is the document summary of the shared document, S288 is the summary switching control of the document summary, and S289 is a new dialogue entry in the embodiment of the present application. In particular, when the sharing party generates multiple summaries for the shared document, the summary switching control shown in S288 can also be presented to switch to the previous summary or the next summary, etc.
[0422] In the above implementation, the supporting objects can share and forward the document summary, so that other objects can quickly understand the document content and increase the discussion between objects.
[0423] The content extraction method in the embodiment of the present application also supports the object to view the historical records related to the document content extraction. An optional implementation is as follows:
[0424] In response to a viewing operation on the historical records of a target object, the client presents each historical document corresponding to the target object for which a document summary has been currently generated; when viewing each historical document, the object can view the corresponding document summary for any historical document, and in response to a viewing operation on any of the historical documents, the client presents the document summary corresponding to any historical document.
[0425] The target object may refer to the account currently logged in by the client.
[0426] Specifically, the target object can be returned to the history record interface from the information interaction interface, or the history record interface can be directly opened, etc., in which the history record interface displays various historical documents corresponding to the target object whose document summaries have been generated, as well as the corresponding content extraction time.
[0427] like Fig.29 As shown, it is a schematic diagram of a historical record in an embodiment of the present application. The historical record interface displays various historical documents for which the target object "Xiao A" has currently generated document summaries, such as Fig.29 The target object can select one of them. For example, if the target object selects "Great CCC3", the Fig.29 In the information interaction interface shown on the right, you can view the document summary corresponding to the document. In addition, the object can also click Start a New Conversation to enter the information interaction interface containing the default conversation message and document upload control, etc.
[0428] In the above implementation, the object is supported to view the historical records and to understand the document summaries of each generated historical document in a timely and convenient manner.
[0429] It should be noted that during the process of extracting content from a target document, or after the content extraction is completed, or in a sharing state, you can click on the target document shown in the information interaction interface to download the target document.
[0430] In addition, it should be noted that the above is a brief introduction to the content extraction method in the embodiment of the present application mainly from the client side. The following further describes the content extraction method in the embodiment of the present application from the server side:
[0431] See also Fig.30 As shown, it is an implementation flow chart of another content extraction method provided in an embodiment of the present application. Taking the server as the execution subject as an example, the specific implementation process of the method is as follows S301-S303:
[0432] S301: After receiving a document processing request for a target document, the server extracts text information from the target document.
[0433] The target document is uploaded by the client in response to a selection operation of the target document in at least one document in the document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on the information interaction interface.
[0434] In summary, the content extraction method in this application supports uploading single / multiple documents. Taking a single document as an example, it is necessary to slice the document content and summarize the content of each slice to summarize the summary of the entire document. In order to achieve this function, it is first necessary to parse the document, extract all the text information in the document, then slice and divide it, summarize each slice, and finally summarize the document summary corresponding to the full text. Multiple documents can be summarized on the basis of obtaining the document summaries of each single document.
[0435] In an embodiment of the present application, the object may select at least one target document based on the document selection interface in the client and upload it to the server. The document processing request may be sent to the server by the client in response to the object's upload operation on the target document.
[0436] After receiving the document processing request of the target document, the server first needs to parse the document and extract all the text information (also called text information) in the document. Specifically, document parsing refers to parsing the document content to obtain the text in the document, including text, text extracted from pictures (which can be obtained through OCR), subtitles and text of the video, and text converted from the speech in the video (which can be obtained through automatic speech recognition (Automatic Speech Recognition, ASR)), and then organize each type of text in spatial order, and then perform the following operations S302~S303:
[0437] S302: The server slices the extracted text information to obtain at least one text slice; extracts a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice.
[0438] When slicing a document, the slicing granularity may be paragraphs, or a fixed text length L may be set, where L is a positive integer and the specific value may be determined according to actual needs.
[0439] For example, if a fixed text length L=3000 is set, then in the embodiment of the present application, document slicing refers to dividing the text obtained in the document parsing step into text segments with a length not exceeding L (L=3000) tokens, also known as text slicing.
[0440] The specific segmentation method is: starting from the start token, take L tokens each time. If a complete sentence is segmented, find the last punctuation mark such as a period, question mark, or exclamation mark and segment it, or find the first punctuation mark such as a period, question mark, or exclamation mark and segment it.
[0441] That is to say, the length of each text slice obtained in the end is not necessarily L. It is just sliced with reference to the length L. In order to ensure the integrity of the sentence as much as possible and not affect the semantics of the sentence, if there is a need to split the complete sentence, it is possible to consider combining punctuation marks to generate text slices with a length close to L.
[0442] Based on the above slicing method, the original semantics of the sentence can be kept as unaffected as possible, so as to improve the accuracy of subsequent content extraction.
[0443] In the present application, when at least one text slice is obtained, each of the above-obtained text slices can be respectively extracted using the main model to obtain the main content of each text slice (i.e., the slice summary). An optional implementation is as follows:
[0444] At least one text slice is input into the target text processing model respectively. For each text slice, the target text processing model is used to extract a slice summary corresponding to the text slice according to a preconfigured first summary instruction; wherein the first summary instruction is used to specify the number of words and summary format of the slice summary.
[0445] Among them, the target text processing model in this article is also called the main model, which can be used to extract summary of text content (here refers to text slices). It can also be understood as summarizing the content of text slices and summarizing the main content as the slice summary. Therefore, the target text processing can be any text processing model with summary extraction function.
[0446] For example, when using the above model to extract a summary of a text slice, the extraction method is to add the first summary instruction in the prompt to require the main model to extract a content summary, and specify the number of words and summary format of the slice summary, such as "summarize the text slice as concisely and clearly as possible, no more than XXXX words, and cover the important information of the text slice". The main model will summarize each text slice according to such instructions and return the slice summary corresponding to each text slice.
[0447] In the above implementation, by pre-configuring the first summary instruction, the large model can be used to output a slice summary that meets the relevant requirements of the summary instruction, which is convenient for subsequent summary aggregation.
[0448] S303: The server summarizes the obtained slice summaries to obtain a document summary corresponding to the target document, and feeds the document summary back to the client, so that the client presents the document summary obtained after content extraction of the target document in the information interaction interface.
[0449] Specifically, after obtaining the slice summary of each text slice, all the obtained slice summaries can be aggregated together, and then summarized using the main model to obtain the overall summary corresponding to the target document, that is, the document summary in this article. An optional implementation method is as follows:
[0450] Each slice summary is input into the target text processing model respectively, and the target text processing model is used to summarize each slice summary according to the preconfigured second summary instruction to generate a document summary; wherein the second summary instruction is used to specify the word count and summary format of the document summary.
[0451] Among them, the target text processing model in this article is also called the main model, which can also be used to summarize the text content (the content after the slice summary is summarized), and can be any text processing model with summary function.
[0452] For example, when using the above model to summarize the slice summaries of each text slice, the summary method is to add a second summary instruction in the prompt that requires the main model to summarize the content, and specify the word count and summary format of the document summary, such as "summarize the above content, no more than 300 words, need to include the main idea of the article, and list 3 to 5 important information of the article". The main model will summarize the content after the slice summary is summarized according to such instructions, and return the document summary corresponding to the overall target document.
[0453] In the above implementation, by pre-configuring the second summary instruction, the large model can be used to output a document summary that meets the relevant requirements of the summary instruction, thereby effectively summarizing the overall content of the target document.
[0454] It should be noted that the main model in the embodiment of the present application can be used to extract the main content and theme of the text, summarize the text, etc., and belongs to a natural language processing model. Specifically, it can be any text processing model with the above functions, such as LLM or other models, which is not specifically limited in this article.
[0455] Furthermore, the present application takes into account that each text slice of an article is generally long, and a large language model of more than 6B is required for slice summarization. Therefore, in the embodiment of the present application, a large LLaMA 13B model is specially trained for summary extraction.
[0456] Optionally, when there are multiple target documents, in addition to summarizing the document summaries corresponding to each target document based on the above method, it is also necessary to summarize the topics contained in each target document; based on the topics contained in each target document, the document summaries corresponding to each target document are summarized, and then the summarized document summaries can be obtained and fed back to the client, so that the client presents the summarized document summaries in the form of conversation messages in the information interaction interface, such as Fig. 22 , Fig.23 or Fig.24 shown.
[0457] In summary, this application also supports the object to upload multiple documents at a time, summarize the contents of multiple documents separately, and aggregate the contents of the documents. The following is a detailed description of the content extraction process of multiple documents:
[0458] In order to achieve this capability, this application needs to be able to interpret and summarize each document from multiple perspectives, and then aggregate the information from multiple perspectives for summary and / or comparison. The specific implementation details are as follows:
[0459] First, parse multiple documents. Similar to the single document parsing process listed above, multiple document parsing is to parse the content of each document to obtain the text in the document, including text, text extracted from pictures, subtitles and text of videos, and text converted from the speech in videos. Then, organize each type of text in spatial order. The text information corresponding to a target document finally obtained here is recorded as:
[0460]
[0461] The above T corresponds to a target document, and the parsed text information corresponding to each target document can be recorded as a T, including the extracted texts (text1, text2), ..., the texts recognized by the image (OCR1, OCR2), ..., the texts recognized by the speech (ASR1)...
[0462] After parsing each target document and extracting the text information corresponding to each text, each document can be summarized and summarized, and the long document can be organized into a rough summary of M words (such as M=500), that is, the document summary corresponding to each target document is extracted (which can be understood as a rough summary). Among them, M is a positive integer, and the value of M can be flexibly set according to actual needs, such as 500, 300, 200, etc., and this article does not make a specific limitation.
[0463] After parsing the target document, the process of extracting the rough summary of the document can be summarized as follows: document segmentation, slice summary extraction, summary summary and content integration.
[0464] The process of document slicing, extracting slicing summaries, and summarizing summaries can refer to the above embodiments. Fig.31 Provide a brief explanation.
[0465] See also Fig.31 As shown, it is a schematic diagram of a single document rough summary extraction process in an embodiment of the present application. Fig.31 , based on L, the parsed document is sliced to obtain n slice texts. Then, slice summaries can be extracted from these n slice texts based on the large language model LLM to obtain n slice summaries. Then, all the slice summaries are aggregated together and summarized using the large language model LLM to obtain the integrated document summary, which is the rough document summary corresponding to the entire article.
[0466] In addition, in the step of summarizing the summary, it is also necessary to summarize the aspects of the theme of this article so that in the subsequent content integration step, the document summaries of multiple single documents can be summarized to obtain the summarized document summaries corresponding to the multiple documents as a whole.
[0467] In the embodiment of the present application, content integration refers to merging the results obtained in the summary step and expanding the description according to the topics summarized in the summary step to achieve multi-document aggregation. In order to achieve this capability, it is necessary to be able to interpret and summarize each article from multiple angles, and then summarize the information from multiple angles.
[0468] See also Fig.32 As shown, it is a schematic diagram of a multi-document summary extraction process in an embodiment of the present application. For example, for multiple parsed documents, rough article summaries are extracted respectively, such as Fig.32 The rough summary corresponding to the parsed document 1 is the integration result 1, the rough summary corresponding to the parsed document 2 is the integration result 3, ..., and the rough summary corresponding to the parsed document n is the integration result n. Each integration result is obtained by interpreting and summarizing the document from multiple perspectives, such as Fig.32 The following takes m aspects as examples.
[0469] After the rough summary of each document is extracted, the n integration results can be summarized according to the themes integrated from the rough classification, specifically divided into merging and comparing, to generate commonalities and differences (i.e., distinguishing points) in various aspects.
[0470] In the above implementation, the object can upload documents (document format is not limited) through the front-end support, call various parsing services to parse the document after uploading, slice it through intelligent slicing after parsing, summarize the slice summary for each slice content, and then the model summarizes the slice summary into the overall article summary for output. After experimental analysis, the content extraction method in the embodiment of the present application has achieved significant results in terms of the correctness, completeness, simplicity, intuitiveness and coherence of the generated document summary.
[0471] In addition, it should be noted that the above is a simple description of the process of extracting summaries from a single document or multiple documents. Combined with the above, it can be seen that the process of extracting summaries for each document includes multiple processing nodes, such as uploading documents, extracting content information, processing image content, processing text content, extracting core ideas, collating and merging summaries, etc. The processing status corresponding to these processing nodes also needs to be fed back to the client in a timely manner, and presented to the object by the client through the status area. An optional implementation method is as follows:
[0472] Feedback the processing information of the target document to the client in real time, so that the client can present the processing information in the status area (folded form) corresponding to the target document, such as Fig. 7A S71 in, etc.; or, in the status area (expanded form), various processing nodes when the target document is extracted from the content, and the processing status of each processing node, such as Fig.9A S91 in, and so on.
[0473] The processing information indicates the current processing node and the corresponding processing status when extracting content from the target document. For details, please refer to the above embodiments, and the repeated parts will not be repeated.
[0474] In addition, when the subsequent object views the processing result corresponding to the target processing node through the client, the client can also send a corresponding request to the server, and the server will feed back the processing result to the client and present it to the object, such as Fig.14 or Fig.15 As shown, etc.
[0475] In addition, the server can also estimate the estimated completion time corresponding to each processing node for the target document. The time can be predicted based on the amount of content data to be processed, the complexity of the content, the model performance required for processing the content, etc., and then provide the client with real-time feedback on the estimated completion time corresponding to the key processing node, so that when the current processing node of the target document is a key processing node, the client will present the countdown information of the estimated completion time corresponding to the key processing node in the status area, such as Fig. 10A S101 in Fig. 10B S102 in Fig.11 As shown in the following table.
[0476] This application also supports subjects to ask questions about the document summary, such as Fig.19A , Fig.19B As shown in the above, the object can input a first question and answer instruction for the document summary corresponding to the target document on the client side, and then the client sends the first question and answer instruction to the server. After the server obtains the first question and answer instruction input by the object for the document summary, it rewrites the first question and answer instruction in combination with other first question instructions and corresponding answer messages input before the first question and answer instruction to obtain a modified first question and answer instruction; then, the server extracts the first feature information corresponding to the modified first question and answer instruction, and obtains the second feature information corresponding to each content slice in the target document; finally, by matching the first feature information with each second feature information respectively, and generating an answer message corresponding to the first question and answer instruction according to the matching results.
[0477] It should be noted that the second feature information corresponding to each content slice in the target document can be pre-stored on the server side. Each content slice is obtained by dividing the target document based on a preset slice granularity, and the preset slice granularity can be flexibly set according to actual needs. For example, the preset slice granularity can be a paragraph, a sentence, etc., which is not specifically limited in this article.
[0478] In summary, whether it is a single-document or multi-document scenario, this application supports answering subsequent questions based on the content of the document starting from the second round of the conversation.
[0479] In order to achieve this capability, on the one hand, the question needs to be rewritten based on the context, and on the other hand, the document needs to be split into more fine-grained paragraphs or even sentences.
[0480] The following uses the preset slice granularity as a sentence as an example to illustrate the relevant process of the above question and answer:
[0481] First, the question is rewritten in one or more rounds based on the context and the previous answer, keeping the original meaning of the question and answer content, and finally the rewritten question is obtained; for example, the subject asks "How to make scrambled eggs with tomatoes" for the first time, and asks "How do I put soy sauce in this dish" for the second time (this question and answer), then in this question and answer process, it is first necessary to combine the previous (i.e. the first) question and answer questions and answer messages, etc., and rewrite the second question, such as "How do I put soy sauce when making scrambled eggs with tomatoes".
[0482] After obtaining the modified question (ie, the modified first question-and-answer instruction), feature extraction is performed on the rewritten question to obtain first feature information.
[0483] Furthermore, it is also necessary to perform feature extraction on the target document to be queried, such as extracting features from the document content at the sentence level, and modeling the correlation between sentences to obtain and store the second feature information corresponding to each sentence (content slice).
[0484] Then, the document content is searched in combination with the first feature information and the second feature information to find the document content related to the question. In this step, the similarity between the first feature information and each second feature information can be calculated, such as representing the similarity by the distance between vectors, and the sentences corresponding to the second feature information with a similarity higher than a certain threshold are regarded as the document content related to the question.
[0485] See also Fig.33 As shown in FIG. 1 , it is a schematic diagram of a feature matching process in an embodiment of the present application. For the parsed document, the sentence can be used as the granularity to split it into multiple content segments, such as Fig.33 Sentence 1, sentence 2, ..., sentence n in the document can be encoded to extract the second feature information corresponding to each sentence, that is, extract the sentence-level embedding for each sentence in the document, such as Fig.33 These embeddings can be stored on the server side and can be directly queried when performing question and answering.
[0486] In addition, after the question is rewritten in context, the first feature information corresponding to the rewritten question can be extracted by encoding (Encoder), that is, the sentence-level embedding is extracted for the question raised in the conversation, such as Fig.33 embedding a in .
[0487] Then, question retrieval is performed. Based on the embedding extracted from the features, similar content is searched in the document embedding. Specifically, embedding a is matched with embedding 1, embedding 2, ..., embedding n, and the distance between the vectors is calculated. The closer the distance between the two vectors, the higher the corresponding similarity. Then, the sentence corresponding to the second feature information with a similarity higher than a certain threshold is regarded as the document content related to the question.
[0488] In actual application scenarios, retrieval is divided into the following three situations:
[0489] a. The article content contains relevant parts that can answer the question: answer directly based on the relevant content.
[0490] b. The article content has relevant parts, but cannot answer the question: start the search plug-in and return the search results. Specifically, when matching the question features with the document features, if the question content is mentioned in the document but there is no clear answer, the search plug-in can also be used to search based on the clues mentioned in the document.
[0491] c. If there is no relevant part in the article content, a fixed line of reply will be returned to indicate that the answer cannot be given.
[0492] Finally, in case a, the main model can be used to generate an answer message corresponding to the first question-answer instruction based on the relevant questions and the relevant content of the retrieved document to provide an answer. In case b, the main model can be used to generate an answer message based on the search results and questions, as well as the relevant content of the retrieved document, to provide an answer.
[0493] In addition, it should be noted that when extracting features, the structural information of the document is retained, including page numbers, chapters and other information. In this way, when performing subsequent searches, the scope of the content slices to be searched can be narrowed down based on the page numbers, chapters and other information. Instead of searching in the content slices contained in the entire document, the search is performed from the content slices contained in the page numbers, chapters and other information related to the first question and answer instruction. For example, if the question instruction specifies the page number and / or chapter number, a round of content slice screening is first performed based on the chapter, page number and other information in the question instruction to narrow the scope of the content slices that need to be matched with features later.
[0494] See also Fig.34As shown, it is a schematic diagram of a document content parsing and question-answering scheduling process in an embodiment of the present application. The process involves the business side front-end page, engineering service, parsing service (crawler / OCR), algorithm preprocessing, and main model processing (also understood as model service).
[0495] Among them, the front-end page on the business side is mainly used to realize the interaction with the object. For example, in the first round of dialogue, the object uploads a PDF (i.e., the target document); then, the engineering service performs intent recognition, classification analysis, and other processing on the PDF uploaded by the object; then, the PDF is parsed through the parsing service, specifically including extracting text from the PDF, performing OCR recognition on images, and web crawler processing to exclude subject-irrelevant information, pop-ups / advertisements / comments, etc., and dividing the chapter content in the PDF into paragraphs; then, the PDF is text-sliced based on algorithm preprocessing. Referring to the above embodiment, taking L=3k (i.e., 3000) as an example, it is necessary to parse whether the content token is greater than 3k. If so, based on the specific implementation method in the above embodiment, the text information contained in the parsed document is text-sliced, otherwise the main model processing related steps are executed.
[0496] After obtaining at least one text slice based on algorithm preprocessing, the main model is used to generate summaries of each slice, which are then summarized to generate a document summary corresponding to the target document body and returned to the business side front end for content display. The specific implementation method can be found in the above embodiment, and the repeated parts will not be repeated.
[0497] In the main model processing process, the number of abstracts extracted will be different according to the number of text slices obtained in the previous step, because the process also needs to determine whether the number of abstracts is greater than 1. If so, the abstracts of each slice (such as Fig.34 The slice summary 1, slice summary 2, ... slice summary N) in the target document are summarized to obtain the document summary corresponding to the target document. Otherwise, the document summary corresponding to the target document is directly extracted based on the main model.
[0498] Based on the main model, the target document is extracted to obtain a document summary, which is then sent to the engineering service to cache the summary content. The summary content, session ID, and file ID are combined with the previously cached parsed source content to bind. In addition, the content can be displayed on the business side front-end page to display the document summary of the target document, such as Fig.16 S161, S163, etc. The specific implementation method can be found in the above embodiment, and the repeated parts will not be repeated.
[0499] In a multi-round dialogue scenario, the subject can upload a new document, ask questions about the document summary of the target document, etc. When the subject extracts the target document, the question instruction is rewritten in combination with the context, and the rewritten question instruction is semantically parsed and keyword extracted. Then, based on the above results, the search object and quantity are circled. For example, after keyword extraction of the rewritten question instruction, the description related to the chapter page number is determined, and the object to be retrieved (referring to the content slice) and the corresponding quantity can be circled based on this. Then, the keyword search history is combined with the stored content, which refers to the previously stored content slice of the target document and the corresponding second feature information, and the matching result of the first feature information corresponding to the rewritten question instruction, to retrieve the document history source content (that is, the content related to the question instruction in the target document). Finally, the keyword fragment is entered in the main model, and the model is required to give a reply in combination with the context body information. After obtaining the answer message corresponding to the question instruction using the main model, it is returned to the business side front-end page for content display, such as Fig.19A , Fig.19B The specific implementation method can refer to the above embodiments, and the repeated parts will not be repeated.
[0500] In summary, this application implements support for multi-round question-answering by storing text features of document parsing results. When the subject inputs multi-round questions and answers, the system will match the subject's questions with the text features of the document parsing results for similarity, find the most relevant content in the document to the subject's questions, and then summarize them through the model and output answers. This approach can implement multi-round question-answering and performs well in terms of effect.
[0501] Optionally, in S301, if the server receives multiple document processing requests within a certain period of time, the document processing requests may be scheduled in the following manner to extract content from multiple documents and generate corresponding document summaries:
[0502] Based on the receiving times corresponding to the multiple received document processing requests, each document processing request with a receiving time difference within a preset time range is processed in parallel to extract content from the corresponding document and generate a corresponding document summary.
[0503] The preset time range can be flexibly set according to actual needs, such as 1 minute, 30 seconds, 10 seconds, etc., and is not specifically limited in this article.
[0504] Compared with related technologies, which often encounter problems such as insufficient resources and long object queuing time, the request scheduling method proposed in this application greatly improves the utilization rate of model resources. By accessing the same model service for questions with similar time, the concurrency of the model can be increased; and it ensures that newly arrived questions always access available model resources when there are available model resources, avoiding poor experience caused by blocking of objects when questions access resources being inferred.
[0505] Optionally, the process of extracting the summary of each slice in S302 may also be implemented through multi-model parallelism, that is, performing summary extraction on at least one text slice in parallel to obtain a slice summary corresponding to each of the at least one text slice.
[0506] In the process of extracting content from the target document, the application first slices the text information of the parsed document through an algorithm, divides it into multiple text slices with a limited number of words, and then calls the model service in parallel to summarize and obtain the summary of the slices after multiple summaries; then summarizes the summary of the slices after multiple summaries, calls the model service again, obtains the final content summary, and feeds it back to the object. This method can control the time of the content summary generation process in a short time.
[0507] In addition, it should be noted that this application also supports solving input audit and output audit without affecting performance to ensure output security.
[0508] Specifically, security audits will be conducted in real time on the document content, extracted summary content, the first question-and-answer instruction entered by the subject, modification instructions, etc. Once sensitive and / or harmful information appears, the current conversation can be withdrawn or terminated to prevent the subject from maliciously guiding the model to generate sensitive and harmful information.
[0509] Based on the same inventive concept, the present application also provides a content extraction device. Fig.35 As shown, it is a schematic diagram of the structure of the content extraction device 3500, which may include:
[0510] The first response unit 3501 is used to present a document selection interface in response to an upload operation triggered based on the information interaction interface, where the document selection interface includes at least one document;
[0511] The second response unit 3502 is used to respond to the selection operation of the target document in the at least one document, present the target document in the information interaction interface, and present the processing information of the target document in the status area corresponding to the target document, where the processing information indicates the current processing node and the corresponding processing status when the content is extracted from the target document;
[0512] After the processing of the target document is completed, the display of the status area is cancelled, and the document summary obtained after the content extraction of the target document is presented in the information interaction interface.
[0513] Optionally, when the status area is in a collapsed state, the second response unit 3502 is further used to:
[0514] In response to an expansion operation triggered on the status area, switching the status area to an expanded state;
[0515] In the expanded status area, various processing nodes when extracting content from the target document and the processing status of each processing node are presented.
[0516] Optionally, the second response unit 3502 is further configured to:
[0517] If the current processing node of the target document is a critical processing node, the countdown information of the estimated completion time corresponding to the critical processing node is presented in the status area;
[0518] Among them, the key processing node is at least one of the following: a processing node whose estimated completion time exceeds a preset time threshold, and a preset processing node.
[0519] Optionally, the second response unit 3502 is further configured to:
[0520] In the expanded status area, the various processing nodes when content extraction is performed on the target document and the processing status of each processing node are presented. Then, for the target processing nodes in the target processing state among the processing nodes, in response to the selection operation on any target processing node, the processing result of any target processing node is presented.
[0521] Optionally, the target processing status includes at least one of completed and processing failed;
[0522] When the processing status of any target processing node is processing failure, the processing result includes at least one of a failure reason and a document adjustment suggestion.
[0523] Optionally, when there are multiple target documents, the second response unit 3502 is specifically used to:
[0524] Presenting each target document and the document summary corresponding to each target document in the information interaction interface, wherein each target document and the document summary corresponding to the target document form a group of conversation messages; or
[0525] In the information interaction interface, each target document and an aggregated document summary are presented separately, wherein the aggregated document summary is obtained by extracting the document summaries corresponding to each target document respectively and aggregating multiple document summaries to form a group of session messages, which includes multiple target documents and the aggregated document summaries.
[0526] Optionally, the second response unit 3502 is further configured to:
[0527] Presenting summary prompt information, the summary prompt information is used to prompt whether to summarize the document summaries corresponding to each target document; wherein the summary processing includes at least one of the following: summarizing the common points of each document summary, and comparing the differences of each document summary;
[0528] In response to the summary operation triggered by the summary prompt information, a summarized document summary corresponding to the summary operation and generated based on the document summaries corresponding to the respective target documents is presented.
[0529] Optionally, the first response unit 3501 is further configured to:
[0530] Before responding to the upload operation triggered based on the information interaction interface, in response to the document summary operation triggered based on the first function control in the function discovery interface, the information interaction interface is presented; the information interaction interface includes a default session message and a document upload control, wherein the default session message is used to summarize the document example to the object, and the document summary function means generating a document summary by extracting content from the document;
[0531] The first response unit 3501 is specifically used for:
[0532] In response to an upload operation triggered by a document upload control in the information interaction interface, a document selection interface is presented.
[0533] Optionally, the default session message includes at least one example document; the first response unit 3501 is further configured to:
[0534] Before responding to the upload operation triggered based on the information interaction interface, in response to a selection operation on any one of the at least one example document, presenting a document summary corresponding to any one of the example documents;
[0535] The second response unit 3502 is further configured to:
[0536] During the processing after the target document is uploaded, at least one example document is updated to a non-interactive state; and after the processing of the target document is completed, at least one example document is updated to an interactive state.
[0537] Optionally, the document summary is presented in the form of a conversation message, and the second response unit 3502 is further configured to:
[0538] presenting a re-summarize control for the target document at a first relevant position of the document summary;
[0539] In response to the triggering operation on the re-summarization control, the target document is re-extracted, and after the re-processing is completed, a new document summary is presented at the original session message corresponding to the document summary.
[0540] Optionally, the second response unit 3502 is further configured to:
[0541] presenting a summary toggle control at a second relevant location in the document summary;
[0542] In response to a switching operation triggered by the summary switching control, multiple document summary lines corresponding to the target document in the original conversation message are switched and displayed.
[0543] Optionally, the second response unit 3502 is further configured to:
[0544] Presenting, at a third relevant position of the document summary, a feedback control for evaluating a summary quality of the document summary;
[0545] In response to the evaluation operation triggered based on the feedback control, the corresponding evaluation result is presented.
[0546] Optionally, the device further comprises:
[0547] The third response unit 3503 is used to present a stop prompt message and a corresponding re-summarization control in the information interaction interface in response to a processing stop operation on the target document during the processing of the target document;
[0548] In response to the triggering operation for the re-summarization control, the target document is re-extracted, and after the re-processing is completed, the document summary obtained after the target document is extracted is presented in the information interaction interface.
[0549] Optionally, the device further comprises:
[0550] The fourth response unit 3504 is used to present an exit prompt message in response to an exit operation on the information interaction interface during the processing of the target document. The exit prompt message is used to prompt the object that the target document is currently being processed and to ask the object whether to confirm the exit.
[0551] Optionally, if the target document fails to be uploaded, the device further includes:
[0552] The fifth response unit 3505 is used to present a re-upload control in the information interaction interface;
[0553] In response to a re-upload operation triggered by the re-upload control, the target document is re-uploaded.
[0554] Optionally, the second response unit 3502 is further configured to:
[0555] Present an input box in the information interaction interface;
[0556] In response to a first question-and-answer instruction for the document summary input based on the input box, presenting an answer message corresponding to the first question-and-answer instruction;
[0557] The answer message is any of the following:
[0558] A fixed phrase indicating that an answer cannot be given is generated based on the first question and answer instruction and content related to the first question and answer instruction in the target document, and is generated based on search results related to the first question and answer instruction.
[0559] Optionally, the information interaction interface further includes a second question-and-answer instruction for non-document content input, and the second response unit 3502 is specifically used to:
[0560] Using a first message style, presenting a first question and answer instruction and an answer message corresponding to the first question and answer instruction; and using a second message style, presenting a second question and answer instruction and an answer message corresponding to the second question and answer instruction;
[0561] Among them, the first question and answer instruction and the second question and answer instruction are distinguished based on at least one of the following methods: special character recognition, key information recognition, and intent recognition.
[0562] Optionally, the second response unit 3502 is further configured to:
[0563] Present an input box in the information interaction interface;
[0564] In response to a modification instruction for the document summary input based on the input box, a modified document summary corresponding to the modification instruction is presented.
[0565] Optionally, the device further comprises:
[0566] A first sharing unit 3506, configured to present at least one second function control corresponding to the document summary of the target document;
[0567] In response to a sharing operation triggered by at least one second functional control, the document summary and the target document are shared with a to-be-shared object.
[0568] Optionally, the device further comprises:
[0569] The second sharing unit 3507 is used to present the shared document and the document summary corresponding to the shared document, as well as a new conversation entry;
[0570] In response to a trigger operation for a new dialogue entry, a default conversation message and a document upload control are presented in the information interaction interface, wherein the default conversation message is used to summarize the object example document, and the document summary function represents generating a document summary by extracting content from the document.
[0571] Optionally, the device further comprises:
[0572] A history viewing unit 3508, configured to present each historical document of the currently generated document summary corresponding to the target object in response to a viewing operation of the historical records of the target object;
[0573] In response to a viewing operation on any one of the historical documents, a document summary corresponding to the any one of the historical documents is presented.
[0574] Based on the same inventive concept, the present application embodiment also provides another content extraction device. Fig.36 As shown, it is a schematic diagram of the structure of the content extraction device 3600, which may include:
[0575] The information extraction unit 3601 is configured to extract text information from a target document after receiving a document processing request for the target document; the target document is uploaded by the client in response to a selection operation of the target document in at least one document in a document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on the information interaction interface;
[0576] The slice processing unit 3602 is used to slice the extracted text information to obtain at least one text slice; extract a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice;
[0577] The summarizing unit 3603 is used to summarize the obtained slice summaries to obtain the document summary corresponding to the target document, and feed the document summary back to the client so that the client can present the document summary obtained after content extraction of the target document in the information interaction interface.
[0578] Optionally, the slice processing unit 3602 is specifically used for:
[0579] Inputting at least one text slice into the target text processing model respectively, and for each text slice, using the target text processing model to extract a slice summary corresponding to the text slice according to a pre-configured first summary instruction; the first summary instruction is used to specify the word count and summary format of the slice summary;
[0580] The summarizing unit 3603 is specifically used for:
[0581] Each slice summary is input into the target text processing model respectively, and the target text processing model is used to summarize each slice summary according to the pre-configured second summary instruction to generate a document summary; the second summary instruction is used to specify the number of words and summary format of the document summary.
[0582] Optionally, the device further comprises:
[0583] The node processing unit 3604 is used to feed back the processing information of the target document to the client in real time, so that the client can present the processing information in the status area corresponding to the target document, wherein the processing information indicates the current processing node and the corresponding processing status when extracting content from the target document;
[0584] The estimated completion time corresponding to the key processing node is fed back to the client in real time, so that when the current processing node of the target document is the key processing node, the client presents the countdown information of the estimated completion time corresponding to the key processing node in the status area.
[0585] Optionally, when there are multiple target documents, the slicing processing unit 3602 is further used to:
[0586] Summarize the topics covered in each target document;
[0587] The summarizing unit 3603 is also used for:
[0588] Based on the topics contained in each target document, the document summaries corresponding to each target document are summarized, and the summarized document summaries are obtained and fed back to the client, so that the client presents the summarized document summaries in the form of conversation messages in the information interaction interface.
[0589] Optionally, the device further comprises:
[0590] Question and answer unit 3605, used to obtain a first question and answer instruction input by the subject for the document summary;
[0591] Rewrite the first question and answer instruction in combination with other first question and answer instructions input before the first question and answer instruction and the corresponding answer message to obtain a modified first question and answer instruction;
[0592] Extracting the first feature information corresponding to the modified first question-and-answer instruction, and obtaining the second feature information corresponding to each content slice in the target document, where each content slice is obtained by dividing the target document based on a preset slice granularity;
[0593] The first characteristic information is matched with each piece of second characteristic information respectively, and an answer message corresponding to the first question and answer instruction is generated according to the matching result.
[0594] Optionally, the slice processing unit 3602 is specifically used for:
[0595] Abstract extraction is performed on at least one text slice in parallel to obtain a slice abstract corresponding to each of the at least one text slice.
[0596] Since the present application supports the object to upload the target document that needs to be extracted through the information interaction interface according to its own needs, and then automatically extract the content of the target document, after the processing of the content extraction of the target document is completed, the document summary obtained after the content extraction of the target document can be directly presented to the object in the information interaction interface, and the object can directly read the document summary information to quickly understand the content of the target document and improve the document reading efficiency. In addition, the process of extracting the content of the target document will involve multiple processing nodes, and the execution of these processing nodes will consume a certain amount of time. In order to reduce the object's sense of waiting, manage the object's expectations, and avoid the loss of the object during the summary generation process, the present application sets a status area in the information interaction interface for displaying the progress of the processing node. Specifically, in the process of extracting the content of the target document, the current processing node and the corresponding processing status corresponding to the target document are directly displayed to the object through the status area to enhance the object's experience.
[0597] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0598] After introducing the content extraction method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0599] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0600] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Fig.37 As shown, it includes a memory 3701, a communication module 3703 and one or more processors 3702.
[0601] The memory 3701 is used to store computer programs executed by the processor 3702. The memory 3701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0602] The memory 3701 may be a volatile memory, such as a random-access memory (RAM); the memory 3701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 3701 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 3701 may be a combination of the above memories.
[0603] The processor 3702 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 3702 is configured to implement the above content extraction method when calling the computer program stored in the memory 3701 .
[0604] The communication module 3703 is used to communicate with terminal devices and other servers.
[0605] The specific connection medium between the memory 3701, the communication module 3703 and the processor 3702 is not limited in the embodiment of the present application. Fig.37 In the embodiment, the memory 3701 and the processor 3702 are connected via a bus 3704. The bus 3704 is connected to the processor 3702 via a bus 3704. Fig.37 The connections between the other components are only for illustration and are not intended to be limiting. Bus 3704 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.37 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.
[0606] The memory 3701 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the content extraction method of the embodiment of the present application. The processor 3702 is used to execute the above-mentioned content extraction method, such as Fig.30 shown.
[0607] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 The terminal device 110 shown in FIG. 1 is a terminal device 110 shown in FIG. 1 . In this embodiment, the structure of the electronic device can be as follows: Fig.38 As shown, it includes: a communication component 3810, a memory 3820, a display unit 3830, a camera 3840, a sensor 3850, an audio circuit 3860, a Bluetooth module 3870, a processor 3880 and other components.
[0608] The communication component 3810 is used to communicate with the server. In some embodiments, a circuit wireless fidelity (Wireless Fidelity, WiFi) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help users send and receive information through the WiFi module.
[0609] The memory 3820 can be used to store software programs and data. The processor 3880 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 3820. The memory 3820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 3820 stores an operating system that enables the terminal device 110 to run. In the present application, the memory 3820 can store an operating system and various application programs, and can also store a computer program for executing the content extraction method of the embodiment of the present application.
[0610] The display unit 3830 can also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 3830 may include a display screen 3832 disposed on the front of the terminal device 110. The display screen 3832 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 3830 may be used to display the information interaction interface, the document selection interface, etc. in the embodiments of the present application.
[0611] The display unit 3830 can also be used to receive input digital or character information, and generate signal input related to user settings and function control of the terminal device 110. Specifically, the display unit 3830 may include a touch screen 3831 arranged on the front of the terminal device 110, which can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.
[0612] The touch screen 3831 can be covered on the display screen 3832, or the touch screen 3831 and the display screen 3832 can be integrated to realize the input and output functions of the terminal device 110, and the integrated display screen can be referred to as a touch display screen. In this application, the display unit 3830 can display the application and the corresponding operation steps.
[0613] Camera 3840 can be used to capture still images, and users can publish images taken by camera 3840 through an application. There can be one or more cameras 3840. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the processor 3880 to convert it into a digital image signal.
[0614] The terminal device may further include at least one sensor 3850, such as an acceleration sensor 3851, a distance sensor 3852, a fingerprint sensor 3853, and a temperature sensor 3854. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.
[0615] The audio circuit 3860, the speaker 3861, and the microphone 3862 can provide an audio interface between the user and the terminal device 110. The audio circuit 3860 can transmit the electrical signal converted from the received audio data to the speaker 3861, which is converted into a sound signal for output. The terminal device 110 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 3862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 3860 and converted into audio data, and then the audio data is output to the communication component 3810 to be sent to, for example, another terminal device 110, or the audio data is output to the memory 3820 for further processing.
[0616] The Bluetooth module 3870 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 3870 to exchange data.
[0617] The processor 3880 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 3820 and calling data stored in the memory 3820. In some embodiments, the processor 3880 may include one or more processing units; the processor 3880 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 3880. In the present application, the processor 3880 can run the operating system, application programs, user interface display and touch response, as well as the content extraction method of the embodiment of the present application. In addition, the processor 3880 is coupled to the display unit 3830.
[0618] In some possible implementations, various aspects of the content extraction method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the content extraction method according to various exemplary implementations of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 2 or Fig.30 Follow the steps shown in .
[0619] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0620] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.
[0621] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.
[0622] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0623] The computer program for performing the operation of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The computer program can be executed entirely on the user electronic device, partially on the user electronic device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).
[0624] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0625] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0626] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0627] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0628] These computer program commands may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the commands stored in the computer readable memory produce an article of manufacture comprising a command device, the command device implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0629] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the commands executed on the computer or other programmable device provide the instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0630] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0631] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A content extraction method, characterized in that: The method comprises: In response to an upload operation triggered based on the information interaction interface, presenting a document selection interface, wherein the document selection interface includes at least one document; In response to a selection operation on a target document in the at least one document, presenting the target document in the information interaction interface, and presenting processing information of the target document in a status area corresponding to the target document, wherein the processing information indicates a current processing node and a corresponding processing status when content is extracted from the target document; After the processing of the target document is completed, the display of the status area is cancelled, and a document summary obtained after content extraction of the target document is presented in the information interaction interface.
2. The method according to claim 1, characterized in that The state area is in a collapsed state, and the method further includes: In response to an expansion operation triggered on the status area, switching the status area to an expanded state; In the status area of the expanded form, various processing nodes when the target document is extracted from the content and the processing status of each processing node are presented.
3. The method according to claim 1, characterized in that The method further comprises: If the current processing node of the target document is a key processing node, then in the status area, countdown information of the estimated completion time corresponding to the key processing node is presented; Among them, the key processing node is at least one of the following: a processing node whose estimated completion time exceeds a preset time threshold, and a preset processing node.
4. The method according to claim 2, characterized in that After presenting, in the status area of the expanded form, various processing nodes when extracting content from the target document and respective processing statuses of the various processing nodes, the method further includes: For the target processing nodes in the target processing state among the processing nodes, in response to a selection operation on any target processing node, a processing result of the any target processing node is presented.
5. The method according to claim 4, characterized in that The target processing status includes at least one of completed and processing failed; Wherein, when the processing status of any one of the target processing nodes is processing failure, the processing result includes at least one of a failure reason and a document adjustment suggestion.
6. The method according to any one of claims 1 to 5, characterized in that: When there are multiple target documents, presenting the target documents in the information interaction interface, and presenting a document summary obtained after content extraction from the target documents, includes: Presenting each target document and the document summary corresponding to each target document in the information interaction interface, wherein each target document and the document summary corresponding to the target document form a group of conversation messages; or In the information interaction interface, each target document and an aggregated document summary are presented separately, wherein the aggregated document summary is obtained by extracting the document summaries corresponding to each of the target documents respectively and aggregating multiple document summaries to form a group of session messages, which includes multiple target documents and the aggregated document summary.
7. The method according to claim 6, characterized in that The information interaction interface presents each target document and a document summary corresponding to each target document, and further includes: Presenting summary prompt information, wherein the summary prompt information is used to prompt whether to perform summary processing on the document summaries corresponding to the respective target documents; wherein the summary processing includes at least one of the following: summarizing the common points of the respective document summaries, and comparing the differences of the respective document summaries; In response to a summary operation triggered by the summary prompt information, a summarized document summary corresponding to the summary operation and generated based on the document summaries corresponding to the respective target documents is presented.
8. The method according to any one of claims 1 to 5, characterized in that: Before responding to the upload operation triggered based on the information interaction interface, the method further includes: In response to a document summary operation triggered by a first function control in the function discovery interface, presenting the information interaction interface; the information interaction interface includes a default session message and a document upload control, wherein the default session message is used to provide an example document summary function to the object, and the document summary function represents generating a document summary by extracting content from the document; The presenting of a document selection interface in response to an upload operation triggered by the information interaction interface includes: In response to an upload operation triggered by a document upload control in the information interaction interface, the document selection interface is presented.
9. The method according to claim 8, characterized in that The default session message includes at least one example document; Before responding to the upload operation triggered by the information interaction interface, the method further includes: In response to a selection operation on any one of the at least one example document, presenting a document summary corresponding to the any one example document; The method further comprises: During the processing of the target document after uploading, the at least one example document is updated to a non-interactive state; and after processing of the target document is completed, the at least one example document is updated to an interactive state.
10. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: During the processing of the target document, in response to a processing stop operation on the target document, a stop prompt message and a corresponding re-summarization control are presented in the information interaction interface; In response to a triggering operation on the re-summarization control, the target document is re-extracted, and after the re-processing is completed, a document summary obtained after the target document is extracted is presented in the information interaction interface.
11. The method according to any one of claims 1 to 5, characterized in that: The presenting of a document summary obtained after content extraction of the target document in the information interaction interface also includes: Presenting an input box in the information interaction interface; In response to a first question-and-answer instruction for the document summary input based on the input box, presenting an answer message corresponding to the first question-and-answer instruction; The answer message is any one of the following: A fixed phrase indicating that an answer cannot be given is generated based on the first question and answer instruction and content related to the first question and answer instruction in the target document, and is generated based on search results related to the first question and answer instruction.
12. The method according to claim 11, characterized in that The information interaction interface further includes a second question-and-answer instruction input for non-document content, and the presenting of an answer message corresponding to the first question-and-answer instruction includes: The first question and answer instruction and the answer message corresponding to the first question and answer instruction are presented in a first message format; and the second question and answer instruction and the answer message corresponding to the second question and answer instruction are presented in a second message format; Among them, the first question and answer instruction and the second question and answer instruction are distinguished based on at least one of the following methods: special character recognition, key information recognition, and intention recognition.
13. The method according to any one of claims 1 to 5, characterized in that: The presenting of a document summary obtained after content extraction of the target document in the information interaction interface also includes: Presenting an input box in the information interaction interface; In response to a modification instruction for the document summary input based on the input box, a modified document summary corresponding to the modification instruction is presented.
14. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Presenting at least one second functional control corresponding to the document summary of the target document; In response to a sharing operation triggered by the at least one second functional control, the document summary and the target document are shared with a to-be-shared object.
15. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Presenting a shared document and a document summary corresponding to the shared document, as well as a new conversation entry; In response to a trigger operation for the new dialogue entry, a default conversation message and a document upload control are presented in the information interaction interface, wherein the default conversation message is used to provide an example document summary function to the object, and the document summary function represents generating a document summary by extracting content from the document.
16. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to a viewing operation on the historical records of a target object, presenting each historical document of which the document summary has been currently generated and corresponds to the target object; In response to a viewing operation on any one of the historical documents, a document summary corresponding to the any one of the historical documents is presented.
17. A content extraction method, characterized in that: The method comprises: After receiving a document processing request for a target document, extracting text information from the target document; the target document is uploaded by the client in response to a selection operation of the target document in at least one document in a document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on an information interaction interface; Slice the extracted text information to obtain at least one text slice; extract a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice; The obtained slice summaries are summarized to obtain a document summary corresponding to the target document, and the document summary is fed back to the client so that the client presents the document summary obtained after content extraction of the target document in the information interaction interface.
18. The method according to claim 17, characterized in that The method further comprises: Feedback the processing information of the target document to the client in real time, so that the client presents the processing information in a status area corresponding to the target document, wherein the processing information indicates a current processing node and a corresponding processing status when extracting content from the target document; The estimated completion time corresponding to the key processing node is fed back to the client in real time, so that when the current processing node of the target document is the key processing node, the client presents the countdown information of the estimated completion time corresponding to the key processing node in the status area.
19. The method according to claim 17, characterized in that When there are multiple target documents, the method further includes: Summarize the topics covered in each target document; Based on the topics contained in each of the target documents, the document summaries corresponding to the target documents are summarized, and the summarized document summaries are obtained and fed back to the client, so that the client presents the summarized document summaries in the form of conversation messages in the information interaction interface.
20. The method according to any one of claims 17 to 19, characterized in that: The method further comprises: Obtaining a first question-and-answer instruction input by a subject with respect to the document summary; Rewrite the first question and answer instruction in combination with other first question and answer instructions input before the first question and answer instruction and the corresponding answer message to obtain a modified first question and answer instruction; Extracting first feature information corresponding to the modified first question-and-answer instruction, and obtaining second feature information corresponding to each content slice in the target document, wherein each content slice is obtained by dividing the target document based on a preset slice granularity; The first characteristic information is matched with each piece of second characteristic information respectively, and an answer message corresponding to the first question and answer instruction is generated according to the matching result.
21. A content extraction device, characterized in that: include: A first response unit, configured to present a document selection interface in response to an upload operation triggered based on the information interaction interface, wherein the document selection interface includes at least one document; A second response unit, configured to, in response to a selection operation on a target document in the at least one document, present the target document in the information interaction interface, and present processing information of the target document in a status area corresponding to the target document, wherein the processing information indicates a current processing node and a corresponding processing status when content is extracted from the target document; After the processing of the target document is completed, the display of the status area is cancelled, and a document summary obtained after content extraction of the target document is presented in the information interaction interface.
22. A content extraction device, characterized in that: include: an information extraction unit, configured to extract text information from a target document after receiving a document processing request for the target document; the target document is uploaded by the client in response to a selection operation of the target document in at least one document in a document selection interface, and the document selection interface is presented by the client in response to an upload operation triggered based on an information interaction interface; A slice processing unit, configured to slice the extracted text information to obtain at least one text slice; extract a summary of the at least one text slice to obtain a slice summary corresponding to each of the at least one text slice; The summarizing unit is used to summarize the obtained slice summaries to obtain a document summary corresponding to the target document, and feed the document summary back to the client so that the client can present the document summary obtained after content extraction of the target document in the information interaction interface.
23. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 20.
24. A computer-readable storage medium, characterized in that: It comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any method described in claims 1 to 20.
25. A computer program product, characterized in that It includes a computer program, which is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of any method described in claims 1 to 20.
Citation Information
Cited By
AI dialogue flow control method, system and device supporting real-time interruption of user, medium and program product
CN121641022A