Document summarization method and device, and storage medium
By displaying a summary control on the document page and generating summary content, the problem of poor reading experience for long documents is solved, and the effect of quickly understanding the document content is achieved.
Patent Information
- Application Number
- PCT/CN2025/097480
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-05
- Filing Date
- 2025-05-27
- Publication Date
- 2025-12-11
AI Technical Summary
When reading or editing long documents, users need to spend time browsing the document to understand the content, resulting in a poor reading experience.
Display a summary control on the document page. In response to access or trigger operations, display summary content in the document body area associated with the summary control. The summary content is generated based on the document content.
By automatically or through user-triggered document summaries, users can quickly understand the document content and improve their reading experience.
Smart Images

Figure CN2025097480_11122025_PF_FP_ABST
Abstract
Description
Summary method, device and storage medium of document
[0001] Cross-reference to related applications
[0002] The present application claims priority to the Chinese patent application No. 202410725992.8, filed on June 5, 2024, and entitled "Summary method, device and storage medium of document", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] Embodiments of the present disclosure relate to the technical field of computer and network communication, and particularly relate to a summary method, device and storage medium of document. BACKGROUND
[0004] With the improvement of terminal device hardware performance, more and more terminal devices can read and edit documents, which brings a lot of convenience to the work and life of users. SUMMARY
[0005] Embodiments of the present disclosure provide a summary method, device and storage medium of document.
[0006] In a first aspect, embodiments of the present disclosure provide a summary method of document, the method comprising:
[0007] displaying a summary control in a page of the document in response to an access operation on the document;
[0008] displaying summary content in a document body area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document.
[0009] In a second aspect, embodiments of the present disclosure provide a summary device of document, comprising:
[0010] a control unit configured to display a summary control in a page of the document in response to an access operation on the document;
[0011] a display unit configured to display summary content in a document body area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document.
[0012] In a third aspect, embodiments of the present disclosure provide an electronic device, comprising at least one processor and a memory;
[0013] the memory stores computer execution instructions;
[0014] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the summarization method of the document as described in the first aspect and various possible designs of the first aspect.
[0015] In a fourth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the summarization method of the document as described in the first aspect and various possible designs of the first aspect is implemented.
[0016] In a fifth aspect, the embodiments of the present disclosure provide a computer program product, and the computer program product includes computer-executable instructions. When a processor executes the computer-executable instructions, the summarization method of the document as described in the first aspect and various possible designs of the first aspect is implemented.
[0017] The summarization method of the document, the device, and the storage medium provided by the embodiments of the present disclosure display a summary control in a page of a document in response to an access operation on the document; and display summary content in a document body area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] FIG. 1 is a scenario example diagram of a summarization method of a document provided by an embodiment of the present disclosure;
[0020] FIG. 2 is a flow diagram of a summarization method of a document provided by an embodiment of the present disclosure;
[0021] FIGS. 3a, 3b, and 3c are interface diagrams of a document provided by an embodiment of the present disclosure;
[0022] FIG. 4 is a structural block diagram of a summarization device of a document provided by an embodiment of the present disclosure;
[0023] FIG. 5 is a hardware structure diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to make the purposes, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.
[0025] In the prior art, when a user edits or reads a document, if the content of the document is long or the user is not familiar with the content of the document, the user needs to spend a certain amount of time to browse the document before being able to understand the content of the document, and the reading experience is poor.
[0026] In order to solve the above technical problems, the present disclosure provides a summary method of a document, which displays a summary control in a page of the document in response to an access operation on the document; and displays summary content in a document body area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on the content of the document. By setting the summary control in the document, the document summary of the document can be automatically or triggered by the user when the user accesses the document, which can facilitate the editor or reader of the document to quickly understand the content of the document and improve the reading experience of the user on the document.
[0027] An application scenario of the summary method of the document provided by the present disclosure is shown in FIG. 1, which includes a client and a server. When the client needs to view the summary content of the document, the client can obtain the summary content of the document from the server and display the summary content in the document body area.
[0028] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0029] The summary method of the document of the present disclosure will be described in detail below with reference to specific embodiments.
[0030] Referring to FIG. 2, FIG. 2 is a flowchart of a summary method of a document provided by an embodiment of the present disclosure. The method of the present embodiment can be applied in a client, which can be any electronic device. The summary method of the document includes the following steps.
[0031] S201, in response to an access operation on a document, a summary control is displayed in a page of the document.
[0032] In the embodiment, the document can be a traditional document (e.g., a local document, etc.), an online document edited by multiple persons in collaboration, or any other form of document.
[0033] When the user needs to access the document, an access operation on the document can be triggered on the client, and then the client opens the document and displays a summary control in a page of the document, for example, as shown in FIG. 3a, the summary control can be a “document summary” button, and the summary control can be located at any position of the page of the document.
[0034] S202, in response to the document meeting a preset condition or receiving a triggering operation on the summary control, displaying summary content in a document body area associated with the summary control, the summary content being generated based on the content of the document.
[0035] In the embodiment, the document summary can be triggered automatically or triggered by the user. When the document summary is needed, considering that not all documents are suitable for document summary, for example, the document has a small number of words, the user can quickly read the document, and thus the document summary is not meaningful; or the document can be in the process of being edited, and the content of the document can change in real time. If the document summary is performed, the summary content also needs to change in real time, which is a waste of computing resources and not meaningful. Therefore, considering the above situations, it can be determined whether the document meets a preset condition to filter out situations not suitable for document summary, to avoid inaccurate summary content or waste of resources. The preset condition is a condition under which the document summary can be performed. When it is determined that the document meets the preset condition, the summary content of the document can be obtained, and the summary content can be displayed in a document body area associated with the summary control in the document. For example, the box below the summary control (“document summary” button) in FIG. 3a is the document body area associated with the summary control. The document body area associated with the summary control is located below the title and above the body of the document, so that the user can quickly understand the content of the document through the summary content before reading the body, to facilitate the user to decide whether to continue reading or to read in a targeted manner. Of course, the document body area associated with the summary control is not limited to the position in FIG. 3a, but can be located at any position of the body of the document. The document body area is associated with the summary control, and can be expanded and hidden under the control of the summary control (hidden as shown in FIG. 3b).
[0036] Optionally, the preset condition can include but is not limited to that the number of words of the document exceeds a preset word threshold (for example, 300 words or 500 words, which can be read by the user within one minute), and / or the time interval from the last editing time of the document to the current time exceeds a preset time threshold.
[0037] If the preset condition only includes the word number condition, it is determined whether the document meets the preset condition, i.e., whether the word number of the document exceeds the preset word number threshold; if the preset condition only includes the time interval condition of the last editing time to the current time, it is determined whether the document meets the preset condition, i.e., whether the time interval of the last editing time of the document to the current time exceeds the preset time threshold; if the preset condition includes the word number condition and the time interval condition of the last editing time to the current time, it is determined whether the document meets the preset condition, i.e., whether the word number of the document exceeds the preset word number threshold and whether the time interval of the last editing time of the document to the current time exceeds the preset time threshold. After the preset condition is met, the summary content of the document is obtained and displayed in the document body area associated with the summary control.
[0038] Of course, if the preset condition is not met, for example, the word number of the document does not exceed the preset word number threshold, or the time interval of the last editing time of the document to the current time does not exceed the preset time threshold, a prompt information can be displayed in the document body area associated with the summary control to prompt that the document currently does not meet the preset condition, for example, when the word number of the document does not exceed the preset word number threshold, "the document content is too little, and the document summary is not supported temporarily" can be displayed, as shown in FIG. 3c; when the time interval of the last editing time of the document to the current time does not exceed the preset time threshold, "the document can be in editing, and the document summary is not supported temporarily" can be displayed, and the like.
[0039] In addition, if the client receives the triggering operation on the summary control, i.e., the user triggers the summary control in the page of the document, the summary of the document can also be triggered, the summary content of the document is obtained and displayed in the document body area associated with the summary control.
[0040] Optionally, when the triggering operation on the summary control is received, the summary of the document can be forced, i.e., the above-mentioned preset condition is not determined, and the summary content of the document is directly displayed in the document body area associated with the summary control; or, after the triggering operation on the summary control is received, the preset condition can be determined first (the determination process can refer to the above-mentioned embodiment), in the case that the document meets the preset condition, the summary of the document is performed, and the summary content of the document is displayed in the document body area associated with the summary control, in the case that the document does not meet the preset condition, a prompt information can also be displayed in the document body area associated with the summary control to prompt that the document currently does not meet the preset condition.
[0041] The summary method of the document provided by the embodiment displays a summary control in a page of the document in response to an access operation on the document; and displays summary content in a document body area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document. By setting the summary control in the document, the document summary of the document can be automatically or triggered by the user when the user accesses the document, which can facilitate the editor or reader of the document to quickly understand the content of the document and improve the reading experience of the user on the document.
[0042] On the basis of any of the above embodiments, the summary content of the document can be obtained before the summary content is displayed in the document body area associated with the summary control, and the obtaining method can adopt any document summarization method.
[0043] Optionally, a preset language model can be used for document summarization, for example, the preset language model can be a large language model (LLM) or any other feasible machine learning model. Considering that the document is stored on the server, the server can be used to summarize the document, that is, the preset language model is deployed on the server in advance, the client can send a summarization request for the document to the server, and then the server can call the preset language model to summarize the document according to the summarization request, generate the summary content, and return the summary content to the client. The summary content of the document includes but is not limited to the summary content of the full text of the document, the summary content of the chapter or paragraph of the document, and the like.
[0044] Optionally, considering that the document can be edited and read by multiple people, multiple clients (including any client editing the document or any client reading the document) can have a demand for document summarization, and in order to avoid the server from repeatedly summarizing the same document, the server can store the summary content after summarizing the document for the first time, so that other clients can directly read the summary content when requesting document summarization in the future, without the need to repeatedly summarize the document. The request for the first document summarization can be sent by any client editing the document or any client reading the document to the server.
[0045] Further, when the current client acquires the summary content of the document, it can first query whether the server stores the summary content of the document. If the server stores the summary content of the document, the client can directly acquire the summary content from the server, and then display the summary content in the document body area associated with the summary control. If the server does not store the summary content of the document, the client can send a summary request for the document to the server, so that the server calls a preset language model to summarize the document, generates the summary content (and stores it), and then returns it to the client, and then displays the summary content in the document body area associated with the summary control.
[0046] Alternatively, the current client only sends a summary request for the document to the server, and the server queries whether it stores the summary content of the document according to the summary request. If it stores the summary content of the document, it is directly returned to the client. If it does not store the summary content of the document, it calls a preset language model to summarize the document, generates the summary content (and stores it), and then returns it to the client.
[0047] Of course, the client can also acquire the summary content of the document from other channels, such as deploying a preset language model locally to acquire the summary content of the document, or requesting a third party to acquire the summary content of the document, etc.
[0048] Optionally, during the process of acquiring the summary content of the document, a waiting state can be displayed in the document body area associated with the summary control, such as "Document summarizing".
[0049] On the basis of any of the above embodiments, the document body area associated with the summary control can be expanded or hidden, such as the expanded state in FIG. 3a and the hidden state in FIG. 3b.
[0050] Optionally, the user can freely hide the document body area associated with the summary control. Optionally, in the expanded state of the document body area associated with the summary control, the user can hide the document body area associated with the summary control by triggering the summary control, that is, no longer display the summary content. Optionally, in the expanded state of the document body area associated with the summary control, the summary control can display a prompt or icon indicating that the document summary is hidden, and in the hidden state of the document body area associated with the summary control, the summary control can display a prompt or icon indicating that the document summary is enabled, such as the "Document summary" button in FIGS. 3a and 3b, which indicates the hiding or displaying of the document body area associated with the summary control through the direction of the arrow icon.
[0051] In addition, the hiding or displaying of the document body area associated with the summary control can also be set.
[0052] Optionally, for the reader, the content of the document can not be familiar, and it is more likely to have the need to view the summary content (or the abstract content) of the document, so the document is opened in the reading mode, and the document summary is enabled by default, that is, when the access instruction for the document in the reading mode is received, the document is opened, and the document body area associated with the summary control is displayed by default in the document.
[0053] Optionally, for the editor, the content of the document has a certain degree of familiarity, and it is more likely that the summary content of the document does not need to be viewed, so the document is opened in the editing mode, and the document summary is disabled by default, and when the summary content needs to be viewed, the document summary is triggered, that is, when the access instruction for the document in the editing mode is received, the document is opened, and the document body area associated with the summary control is hidden in the document, when the editor needs to view the summary content, the summary control can be triggered, the hidden document body area associated with the summary control can be displayed, the summary content of the document is obtained, and the summary content is displayed in the document body area associated with the summary control, becoming the interface shown in FIG. 3a, and the document summary is realized by one key.
[0054] Optionally, the editing mode or the reading mode can also not be distinguished, and the user can freely select to trigger the summary instruction or not to trigger the summary instruction, for example, the document summary trigger control is displayed in the document in the editing mode and the reading mode, and the user can trigger the summary control when the summary content needs to be viewed.
[0055] Optionally, the user can also freely set whether the document content summary is enabled by default, in the case of enabling by default, the document is opened, the summary instruction for the document is triggered, and the document body area associated with the summary control is displayed by default in the document; and in the case of disabling by default, the document is opened, the summary instruction for the document is not triggered, and the document body area associated with the summary control is hidden in the document, and the user can trigger the summary control when the summary content needs to be viewed, to trigger the summary instruction for the document and display the document body area associated with the summary control. Optionally, the user can set whether the document content summary is enabled by default in the control panel.
[0056] On the basis of any of the above embodiments, after the summary content is displayed in the document body area associated with the summary control, the following can also be included:
[0057] If it is determined that the document is changed and the changed document meets the preset condition, the summary content of the changed document is reacquired and updated into the document body area associated with the summary control.
[0058] In the embodiment, the document can be collaboratively edited by multiple persons, and the content of the document can be changed at any time. Therefore, after detecting that the document is changed, it can be determined whether the changed document meets the preset condition. If the changed document meets the preset condition, the summary content of the changed document can be reacquired, and the summary content is updated in the document body area associated with the summary control, that is, the summary content of the changed document is replaced. The process of reacquiring the summary content of the changed document can be the same as that in any of the above embodiments, and will not be described here again. As shown in FIG. 3a, the document body area associated with the summary control of the document further includes an update control. After the user triggers the update control, a request for re-summarizing the document can be sent to the server to acquire new summary content and update the summary content in the document body area.
[0059] Optionally, after determining that the document is changed, it can be determined that the document is changed in the reading mode or in the editing mode. The change includes adding, deleting, or modifying the content in the document. Further, the changed part of the document can be summarized to obtain the summary content of the changed part of the document. The server can determine the changed part of the document and generate the summary content of the changed part. Further, the summary content of the changed part of the document can be displayed in the document body area associated with the summary control, for example, below the summary content of the document, so that the user can understand the content of the changed part of the document and understand what changes have been made to the document.
[0060] Based on any of the above embodiments, the embodiment further provides a document summarization method on the server side, which includes receiving a summary request for a document sent by a client, calling a preset language model to summarize the document according to the summary request, generating summary content, and returning the summary content to the client.
[0061] In addition, after the summary content of the document is generated for the first time, the summary content of the document can be stored. Subsequently, when a summary request for the document is received, it can be determined whether the summary content of the document is stored. If the summary content of the document is stored, the stored summary content of the document can be directly read and returned to the client. Otherwise, the preset language model is called to summarize the document to generate the summary content, and the summary content is returned to the client.
[0062] Corresponding to the document summarization method in the above embodiment, FIG. 4 is a structural block diagram of a document summarization device provided by the embodiment of the disclosure. For ease of description, only parts related to the embodiment of the disclosure are shown. Referring to FIG. 4, the document summarization device 400 includes a control unit 401 and a display unit 402.
[0063] The control unit 401 is configured to display a summary control in a page of a document in response to an access operation on the document.
[0064] The display unit 402 is configured to display summary content in a document body region associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document.
[0065] In one or more embodiments of the present disclosure, the control unit 401 is further configured to:
[0066] determine whether a word count of the document exceeds a preset word count threshold and / or whether a time interval from a last editing time of the document to a current time exceeds a preset time threshold.
[0067] If the word count of the document exceeds the preset word count threshold and / or the time interval from the last editing time of the document to the current time exceeds the preset time threshold, it is determined that the document meets the preset condition.
[0068] In one or more embodiments of the present disclosure, the display unit 402 is further configured to:
[0069] If the word count of the document does not exceed the preset word count threshold or the time interval from the last editing time of the document to the current time does not exceed the preset time threshold, display a prompt information in the document body region associated with the summary control, the prompt information being used to prompt that the document does not currently meet the preset condition.
[0070] In one or more embodiments of the present disclosure, when the display unit 402 displays the summary content in the document body region associated with the summary control, the display unit 402 is configured to:
[0071] send a summary request for the document to a server, so that the server invokes a preset language model to summarize the document to generate the summary content;
[0072] receive the summary content returned by the server, and display the summary content in the document body region associated with the summary control.
[0073] In one or more embodiments of the present disclosure, when the display unit 402 displays the summary content in the document body region associated with the summary control, the display unit 402 is configured to:
[0074] query whether the server stores the summary content, wherein the stored summary content is summary content that any collaborative editing client or any reading client of the document pre-requests the server to generate for the document;
[0075] If the server stores the summary content, the summary content stored in the server is directly obtained, and the summary content is displayed in the document text area associated with the summary control.
[0076] If the server does not store the summary content, a summary request for the document is sent to the server, the server is instructed to generate the summary content by using a preset language model to summarize the document, the summary content returned by the server is received, and the summary content is displayed in the document text area associated with the summary control.
[0077] In one or more embodiments of the present disclosure, after the display unit 402 displays the summary content in the document text area associated with the summary control, the display unit 402 is further configured to:
[0078] If it is determined that the document is changed and the changed document meets the preset condition, the summary content of the changed document is re-obtained and updated to the document text area associated with the summary control.
[0079] In one or more embodiments of the present disclosure, the display unit 402 is further configured to:
[0080] If it is determined that the document is changed, the summary content of the changed part of the document is obtained, and the summary content of the changed part of the document is also displayed in the document text area associated with the summary control.
[0081] In one or more embodiments of the present disclosure, the control unit 401, in response to an access operation on a document, displays a summary control in a page of the document, is configured to:
[0082] In response to an access operation on a document in a reading mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is displayed in the document.
[0083] In one or more embodiments of the present disclosure, after the control unit 401 displays the summary content in the document text area associated with the summary control, the control unit 401 is further configured to:
[0084] A trigger instruction for the summary control is received, and the document text area associated with the summary control is hidden in the document text area.
[0085] In one or more embodiments of the present disclosure, the display unit 402 is further configured to:
[0086] In response to an access operation on a document in an editing mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is hidden in the document;
[0087] In response to receiving the triggering operation on the summary control, a document body region associated with the summary control is displayed in the document, and the summary content is displayed in the document body region associated with the summary control.
[0088] The device provided by the embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects. Details are not described herein.
[0089] Referring to FIG. 5, a structural schematic diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure is shown. The electronic device 500 can be a terminal device or a server. The terminal device can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a portable multimedia player (PMP), a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.
[0090] As shown in FIG. 5, the electronic device 500 can include a processing device (such as a central processor, a graphics processor, and the like) 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or loaded from a storage device 508 to a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0091] In general, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, a magnetic tape, a hard disk, and the like; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or wired with other devices to exchange data. While FIG. 5 illustrates the electronic device 500 with various devices, it is understood that all of the illustrated devices are not required to be implemented or possessed. More or less devices can alternatively be implemented or possessed.
[0092] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing devices 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0093] It should be noted that the computer-readable medium in the above disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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. In the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present disclosure, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, an RF (radio frequency) or the like, or any suitable combination of the above.
[0094] The computer-readable medium described above can be contained in the electronic device described above; or can exist separately and not be assembled into the electronic device.
[0095] The computer-readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0096] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0097] The flow diagrams and the block diagrams in the drawings are meant as possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0098] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself. For example, the first obtaining unit can also be described as a unit for obtaining at least two Internet protocol addresses.
[0099] The functions described above in the specification of the present disclosure can be performed by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0100] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0101] In a first aspect, according to one or more embodiments of the present disclosure, a summarization method of a document is provided, the method comprising:
[0102] displaying a summarization control in a page of the document in response to an access operation on the document;
[0103] displaying summarization content in a document body region associated with the summarization control in response to that the document meets a preset condition or a triggering operation on the summarization control, the summarization content being generated based on content of the document.
[0104] According to one or more embodiments of the present disclosure, the method further comprises:
[0105] determining whether a word count of the document exceeds a preset word count threshold and / or whether a time interval from a last editing time of the document to a current time exceeds a preset time threshold;
[0106] if the word count of the document exceeds the preset word count threshold and / or the time interval from the last editing time of the document to the current time exceeds the preset time threshold, determining that the document meets the preset condition.
[0107] According to one or more embodiments of the present disclosure, the method further comprises:
[0108] if the word count of the document does not exceed the preset word count threshold or the time interval from the last editing time of the document to the current time does not exceed the preset time threshold, displaying a prompt information in the document body region associated with the summarization control, the prompt information being used to prompt that the document does not currently meet the preset condition.
[0109] According to one or more embodiments of the present disclosure, the displaying the summarization content in the document body region associated with the summarization control comprises:
[0110] sending a summary request of the document to a server, so that the server invokes a preset language model to summarize the document to generate the summary content;
[0111] receiving the summary content returned by the server, and displaying the summary content in a document body area associated with the summary control.
[0112] According to one or more embodiments of the present disclosure, the displaying of the summary content in the document body area associated with the summary control comprises:
[0113] querying whether the server stores the summary content, wherein the stored summary content is summary content previously requested by any collaborative editing client or any reading client of the document from the server to generate;
[0114] if the server stores the summary content, directly obtaining the stored summary content from the server, and displaying the summary content in the document body area associated with the summary control; or
[0115] if the server does not store the summary content, sending a summary request of the document to the server, so that the server invokes a preset language model to summarize the document to generate the summary content, receiving the summary content returned by the server, and displaying the summary content in the document body area associated with the summary control.
[0116] According to one or more embodiments of the present disclosure, after the displaying of the summary content in the document body area associated with the summary control, the method further comprises:
[0117] if it is determined that the document is changed and the changed document meets the preset condition, re-obtaining the summary content of the changed document, and updating the summary content to the document body area associated with the summary control.
[0118] According to one or more embodiments of the present disclosure, the method further comprises:
[0119] if it is determined that the document is changed, obtaining the summary content of the changed part of the document, and displaying the summary content of the changed part of the document in the document body area associated with the summary control.
[0120] According to one or more embodiments of the present disclosure, the displaying of the summary control in the page of the document in response to the access operation of the document comprises:
[0121] In response to an access operation on the document in a reading mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is shown in the document.
[0122] According to one or more embodiments of the present disclosure, after the summary content is displayed in the document text area associated with the summary control, the method further includes:
[0123] A triggering instruction on the summary control is received, and the document text area associated with the summary control is hidden in the document text area.
[0124] According to one or more embodiments of the present disclosure, the method further includes:
[0125] In response to an access operation on the document in an editing mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is hidden in the document.
[0126] Correspondingly, in response to receiving a triggering operation on the summary control, the summary content is displayed in the document text area associated with the summary control, including:
[0127] In response to receiving a triggering operation on the summary control, the document text area associated with the summary control is shown in the document, and the summary content is displayed in the document text area associated with the summary control.
[0128] In a second aspect, according to one or more embodiments of the present disclosure, a summary device of a document is provided, including:
[0129] A control unit is configured to display a summary control in a page of the document in response to an access operation on the document.
[0130] A display unit is configured to display summary content in a document text area associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document.
[0131] According to one or more embodiments of the present disclosure, the control unit is further configured to:
[0132] Determine whether a word count of the document exceeds a preset word count threshold, and / or whether a time interval from a last editing time of the document to a current time exceeds a preset time threshold.
[0133] If the word count of the document exceeds the preset word count threshold, and / or the time interval from the last editing time of the document to the current time exceeds the preset time threshold, it is determined that the document meets the preset condition.
[0134] According to one or more embodiments of the present disclosure, the display unit is further configured to:
[0135] If the number of words of the document does not exceed the preset word threshold, or the time interval from the last editing time of the document to the current time does not exceed the preset time threshold, display prompt information in the document body area associated with the summary control, the prompt information is used to prompt that the document currently does not meet the preset condition.
[0136] According to one or more embodiments of the present disclosure, when the display unit displays the summary content in the document body area associated with the summary control, the display unit is configured to:
[0137] send a summary request for the document to the server, so that the server invokes a preset language model to summarize the document to generate the summary content;
[0138] receive the summary content returned by the server, and display the summary content in the document body area associated with the summary control.
[0139] According to one or more embodiments of the present disclosure, when the display unit displays the summary content in the document body area associated with the summary control, the display unit is configured to:
[0140] query whether the server stores the summary content, wherein the stored summary content is the summary content that any collaborative editing client or any reading client of the document pre-requests the server to generate for the document;
[0141] if the server stores the summary content, directly obtain the stored summary content from the server, and display the summary content in the document body area associated with the summary control; or
[0142] if the server does not store the summary content, send a summary request for the document to the server, so that the server invokes a preset language model to summarize the document to generate the summary content, and receive the summary content returned by the server, and display the summary content in the document body area associated with the summary control.
[0143] According to one or more embodiments of the present disclosure, after the display unit displays the summary content in the document body area associated with the summary control, the display unit is further configured to:
[0144] if it is determined that the document is changed and the changed document meets the preset condition, re-obtain the summary content of the changed document, and update the summary content to the document body area associated with the summary control.
[0145] According to one or more embodiments of the present disclosure, the display unit is further configured to:
[0146] If it is determined that the document is changed, a summary content of the changed part of the document is acquired, and the summary content of the changed part of the document is also displayed in the document text area associated with the summary control.
[0147] According to one or more embodiments of the present disclosure, the control unit, in response to an access operation on a document, is configured to:
[0148] In response to an access operation on a document in a reading mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is displayed in the document.
[0149] According to one or more embodiments of the present disclosure, the control unit, after displaying the summary content in the document text area associated with the summary control, is further configured to:
[0150] Receive a triggering instruction on the summary control, and hide the document text area associated with the summary control in the document text area.
[0151] According to one or more embodiments of the present disclosure, the display unit is further configured to:
[0152] In response to an access operation on a document in an editing mode, the summary control is displayed in a page of the document, and a document text area associated with the summary control is hidden in the document.
[0153] In response to receiving a triggering operation on the summary control, a document text area associated with the summary control is displayed in the document, and the summary content is displayed in the document text area associated with the summary control.
[0154] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0155] The memory stores computer execution instructions;
[0156] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the summary method of the document as described in the first aspect and various possible designs of the first aspect.
[0157] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer readable storage medium is provided, and the computer readable storage medium has stored therein computer executing instructions which, when executed by a processor, implement the method for summarizing a document as described above in the first aspect and various possible designs of the first aspect.
[0158] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, and the computer program product includes computer executing instructions which, when executed by a processor, implement the method for summarizing a document as described above in the first aspect and various possible designs of the first aspect.
[0159] The above description merely illustrates the preferred embodiments of the present disclosure and a principle of applied technologies. It should be understood by those skilled in the art that the disclosed range of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0160] In addition, although each operation is depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.
[0161] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A method for summarizing a document, comprising: displaying a summary control in a page of the document in response to an access operation on the document; displaying summary content in a document body region associated with the summary control in response to the document meeting a preset condition or receiving a triggering operation on the summary control, the summary content being generated based on content of the document. 2.The method of claim 1, further comprising: determining whether a word count of the document exceeds a preset word count threshold and / or whether a time interval from a last editing time of the document to a current time exceeds a preset time threshold; determining that the document meets the preset condition if the word count of the document exceeds the preset word count threshold and / or the time interval from the last editing time of the document to the current time exceeds the preset time threshold. 3.The method of claim 2, further comprising: displaying a prompt message in the document body region associated with the summary control if the word count of the document does not exceed the preset word count threshold or the time interval from the last editing time of the document to the current time does not exceed the preset time threshold, the prompt message being used to prompt that the document does not currently meet the preset condition. 4.The method of claim 1, wherein the displaying the summary content in the document body region associated with the summary control comprises: sending a summary request for the document to a server to cause the server to invoke a preset language model to summarize the document and generate the summary content; receiving the summary content returned by the server and displaying the summary content in the document body region associated with the summary control. 5.The method of claim 1, wherein the displaying the summary content in the document body region associated with the summary control comprises: inquiring whether the server stores the summary content, wherein the stored summary content is summary content previously requested by any collaborative editing client or any reading client of the document from the server to generate; if the server stores the summary content, directly obtaining the stored summary content from the server and displaying the summary content in the document body region associated with the summary control; or if the server does not store the summary content, sending a summary request for the document to the server to cause the server to invoke a preset language model to summarize the document and generate the summary content, and receiving the summary content returned by the server and displaying the summary content in the document body region associated with the summary control. 6.The method of any one of claims 1-3, wherein after the displaying the summary content in the document body region associated with the summary control, the method further comprises: if it is determined that the document is changed and the changed document meets the preset condition, re-obtaining summary content of the changed document and updating the summary content into the document body region associated with the summary control. 7.The method of claim 6, further comprising: If it is determined that the document is changed, a summary content of a changed part of the document is acquired and the summary content of the changed part of the document is also displayed in a document body area associated with the summary control. 8.The method of claim 1, wherein the displaying the summary control in a page of the document in response to an access operation of the document comprises: in response to an access operation of the document in a reading mode, displaying the summary control in a page of the document while showing a document body area associated with the summary control in the document. 9.The method of claim 8, wherein after displaying the summary content in the document body area associated with the summary control, the method further comprises: receiving a triggering instruction of the summary control, and hiding the document body area associated with the summary control in the document body area. 10.The method of claim 1, further comprising: in response to an access operation of the document in an editing mode, displaying the summary control in a page of the document while hiding a document body area associated with the summary control in the document; correspondingly, in response to receiving a triggering operation of the summary control, displaying the summary content in the document body area associated with the summary control, comprising: in response to receiving the triggering operation of the summary control, showing the document body area associated with the summary control in the document and displaying the summary content in the document body area associated with the summary control. 11.A summary device of a document, comprising: a control unit configured to display a summary control in a page of the document in response to an access operation of the document; a display unit configured to display a summary content in a document body area associated with the summary control in response to that the document meets a preset condition or receiving a triggering operation of the summary control, the summary content being generated based on a content of the document.
12. An electronic device comprising: at least one processor and a memory; the memory stores computer-executed instructions; the at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the method of any one of claims 1-10. 13.A computer-readable storage medium, the computer-readable storage medium storing computer-executed instructions, when a processor executes the computer-executed instructions, the method of any one of claims 1-10 is implemented. 14.A computer program product, comprising computer-executed instructions, when a processor executes the computer-executed instructions, the method of any one of claims 1-10 is implemented.
Citation Information
Patent Citations
Method for displaying service information in preview interface, and electronic device
CN111465918A
Method for reminding generation of text abstract and method and device for generating text abstract
CN114115670A
Interaction method and device and electronic equipment
CN117131844A
Word processing method and device
CN117194653A
Book information display method and device, electronic equipment and readable storage medium
CN117763138A