Document processing method and device, electronic equipment and storage medium
By introducing revision mode and display of revision cards in the online document system, the problem of unclear revision traces in the existing system is solved, effective display and management of revision content is achieved, collaborative work efficiency is improved, and system functions are supported quickly Expand.
Patent Information
- Application Number
- CN202411267650.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-13
AI Technical Summary
The existing online document collaborative editing system is difficult to effectively display and manage revision traces of multiple users, resulting in unclear distinction between revision content and operation types, affecting the efficiency of collaborative work.
Provide a document processing method and device to display the revision content in a style different from non-revised content when entering the revision mode, and display the revision cards associated with the revision content in the comment area, including adding, deleting, replacing and formatting revision cards. , achieve a clear display of revision traces.
It improves the visualization and management capabilities of revision content in the document collaborative editing system, enhances users' understanding of revision traces and the efficiency of collaborative work, and supports rapid expansion of functions without affecting existing functions.
Smart Images

Figure CN119129539A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a document processing method, device, electronic device and storage medium. Background Art
[0002] Online documents are usually stored in a server. Multiple different users can view the same online document at the same time, and multiple users can collaboratively edit the online document. Summary of the invention
[0003] The present disclosure provides a document processing method, device, electronic device and storage medium.
[0004] The present disclosure adopts the following technical solutions.
[0005] In some embodiments, the present disclosure provides a document processing method, including:
[0006] Display the target document;
[0007] In response to a first operation event, entering a revision mode of the target document;
[0008] In response to a revision operation performed on the target document in the revision mode, displaying revision content of the revision operation in a revision style in the target document, and displaying a revision card associated with the revision content;
[0009] The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
[0010] In some embodiments, the present disclosure provides a document processing device, comprising:
[0011] A display unit, used for displaying a target document;
[0012] A control unit, configured to enter a revision mode of the target document in response to a first operation event;
[0013] The control unit is further configured to, in response to a revision operation performed on the target document in the revision mode, display the revision content of the revision operation in the target document in a revision style, and display a revision card associated with the revision content;
[0014] The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
[0015] In some embodiments, the present disclosure provides an electronic device, comprising: at least one memory and at least one processor;
[0016] The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the above method.
[0017] In some embodiments, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to perform the above method.
[0018] In the document processing method provided by the embodiment of the present disclosure, the target document has a revision mode. After the revision operation is performed on the target document, in addition to displaying the revised content in the document content of the target document in a revision style, the revision card associated with the revised content (such as a card for a new operation, a card for a deletion operation, a card for a replacement operation, and a card for a format revision operation) will also be displayed. By simultaneously displaying the revision operation type, the revision traces can be better displayed. In some embodiments, the present disclosure adjusts the architecture of the document system so that the document system can quickly expand its functions without affecting existing functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0020] Figure 1 It is a flowchart of the document processing method of the embodiment of the present disclosure.
[0021] Figure 2 It is a schematic diagram of displaying a target document according to an embodiment of the present disclosure.
[0022] Figure 3 It is a schematic diagram of displaying a target document according to an embodiment of the present disclosure.
[0023] Figures 4 to 7 It is a flowchart of the document processing method of the embodiment of the present disclosure.
[0024] Figure 8 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0026] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0027] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0028] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0029] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in sequence and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0034] It should be noted that the modification of “one” mentioned in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that it should be understood as “one or more” unless otherwise clearly indicated in the context.
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] The solution provided by the embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0037] like Figure 1 As shown, Figure 1 It is a flowchart of the document processing method of the embodiment of the present disclosure, which includes the following steps.
[0038] S11. Display the target document.
[0039] In some embodiments, the target document may be an online document. The target document may be displayed in a browser or a client. The execution subject of the method in the disclosed embodiment may be a browser or a client. The target document may be a structured document, and the target document may include one or more content blocks, and a content block is a unit that carries the document content. In some embodiments, when writing content in the target document, a content block needs to be selected, and then the content is written in the content block. The document content in the target document may be located in each content block.
[0040] S12: In response to the first operation event, entering a revision mode of the target document.
[0041] In some embodiments, the first operation event may include one or more operations. Figure 2 As shown, the interface where the target document is located may have a control for the selection mode ( Figure 2 The down arrow on the right side of the revision in the upper right corner) can be triggered to display the selectable controls, and the corresponding mode can be entered by selecting the controls. In some embodiments of the present disclosure, there can be three modes: edit mode, revision mode and reading mode. In edit mode, users with editing permissions can edit the document content of the target document without generating revisions or revision traces. In revision mode, users with editing permissions can edit the document content of the target document and generate revisions or revision traces. In reading mode, the document content of the target document cannot be edited.
[0042] S13. In response to a revision operation performed on the target document in the revision mode, displaying revision content of the revision operation in a revision style in the target document, and displaying a revision card associated with the revision content.
[0043] In some embodiments, the revision operations performed on the document content of the target document may include: adding operations (such as inputting text, pasting text, creating a content library, wrapping, etc.), deleting operations (such as deleting text, cutting text, deleting content blocks, deleting wrapping, etc.), replacing operations (such as selecting document content and pasting or inputting, selecting content blocks and pasting or inputting) or formatting revision operations (such as setting bold, highlighting, italics, etc.). Adding operations are operations that add new content to the target document. Deleting operations are operations that delete content from the target document. Replacing operations are operations that replace original content with new content in the target document. Formatting revision operations are operations that change the document content in the target document. After performing a revision operation on the target document, the revised content will be displayed in a revision style (including adding style, deleting style, replacing style, and formatting revision style). The revised content is the content that is added, deleted, replaced, or formatted by the revision operation. The revision style is a display style that is different from the non-revised content in the target document, and the revised content is displayed differently through the revision style. The revision styles corresponding to different revision operations may be different. The revision style of the content added by the add operation (for example, it can be called the add style) can be different from the revision style of the content deleted by the delete operation (for example, it can be called the delete style). The revision card displays the associated revision content and the revision operation type (add, delete, replace, format revision, etc.). One revision operation type corresponds to one revision card, and different revision operations correspond to different revision cards. The revision content and the revision operation type are displayed in the revision card. For example Figure 3 As shown, Figure 3 Document A in the example is the target document. The add operation is performed in the target document to add "Content 1 in Content Block 1". A revision card is displayed in the comment area, which displays the revision operation type "Add" and the revision content "Content 1 in Content Block 1". The revision content is associated with the revision card. For example, clicking on the revision card can highlight the revision content in the target document. Another example is that the revision content can be modified in the revision card. For example, Figure 3 The edits made to the revision content added in the revision card will be synchronized back to the document content of the target document. The revision content is the content modified (added, deleted, replaced or changed in style) in the revision mode.
[0044] In some embodiments of the present disclosure, a revision mode is set for a target document. After a revision operation is performed on the target document, in addition to displaying the revised content in the document content of the target document in a revision style, a revision card associated with the revised content (e.g., a card for a new operation, a card for a delete operation, a card for a replacement operation, and a card for a format revision operation) is also displayed. By simultaneously displaying the revision operation type (e.g., a new operation, a delete operation, a replacement operation, a format revision operation, etc.), the revision traces can be better displayed.
[0045] In some embodiments of the present disclosure, a revision card associated with the revised content is displayed in the comment area of the target document, and the revision card is unrelated to and independent of the comment card in the comment area.
[0046] In some embodiments, Figure 3 As shown in the figure, the comment area is used to display comment cards and revision cards, so that users can view all important modifications and comments in the target document in the comment area, but the comment card and the revision card are independent of each other and unrelated. For example, after triggering the control to jump to the next card in the comment card, it will only jump to the comment card, and it is impossible to jump to the revision card. After triggering the control to jump to the next card in the revision card, it will only jump to the revision card, and it will not jump to the comment card.
[0047] In some embodiments of the present disclosure, the target document is displayed in a document system, and the document system includes: a comment module, a document front-end module and a document back-end module; the comment module is used to control the cards displayed in the comment area of the target document, the document front-end module is used to display the content of the target document, and the document back-end module is used to store the data of the target document; wherein, the comment module includes a comment component and a revision component that are independent of each other, the comment component is used to generate a comment card for the target document, and the revision component is used to generate a revision card for the target document.
[0048] In some embodiments, the document system where the target document of the disclosed embodiment is located has a comment module, and the cards displayed in the comment area are generated and controlled by the comment module. Two independent components are set in the comment module, namely the comment component (such as the comment SDK) and the revision component (such as the revision SDK), which are responsible for generating comment cards and revision cards respectively. The two components communicate with the interactive component of the comment module and the document front-end module respectively, so that operations on the document front end will be displayed in the comment area, but the displayed comment cards and revision cards are generated by different components, so they are only displayed in the same comment area, but there is no direct association between them and they do not communicate with each other. In the editing mode of the relevant document, when the revision traces are displayed with annotations, the revision annotations and the comment annotations are generated by the same component, and the two are essentially the same. When clicking on the next annotation, it is not distinguished whether the next one is a revision annotation or a comment annotation. It is possible to jump from the current revision annotation to the comment annotation, or it is possible to jump from the comment annotation to the revision annotation. The method in the related art leads to strong coupling between comments and revisions, which is not conducive to business expansion. In this embodiment, comment cards and revision cards are generated by different components to achieve business decoupling, and when other businesses are expanded in the comment area in the future, similar separate components are used to be responsible for other businesses, thereby removing the coupling with existing components, which is conducive to business expansion. If there are other types of other content that need to be displayed in the comment area in the form of cards, other components responsible for generating the other content can communicate with the document front-end module and the interactive component independently of the revision component and the comment component. In this way, the content types presented in the comment area of the target document can be expanded by extending the components. Since they are independent of each other, they will not affect the coupling of existing cards and contact functions.
[0049] In some embodiments of the present disclosure, the comment module further includes an interactive component that communicates with the comment component and the revision component respectively; the interactive component is used to implement the card interactive operations shared by the comment card and the revision card. In some embodiments, the interactions between revision cards and comment cards are highly similar. Therefore, in this embodiment, similar interactive operation capabilities are abstracted. The interactive component is originally responsible for the interactive operations of comment cards. Since the interactive operations between revision cards and comment cards are highly similar, for example, both cards can be replied to, both cards can be deleted, and both cards can be marked (for example, the importance of the card mark is registered, so that the cards can be displayed according to the importance level, such as only displaying cards of a certain or several levels of importance). Therefore, in this embodiment, the interactive capabilities of the comment card are reused. By abstracting the functional capabilities, the original interactive capabilities of the comment card are reused. An interactive module is abstracted on the upper layer of the comment card and the revision card, which is responsible for the general interactive operations of the card. The interactive module will be responsible for the reply, rating and other interactive operations of the card. In this way, when other cards with other types of content are added later, other components responsible for the other cards can also communicate with the interactive module, thereby reusing the general interactive operation capabilities in the interactive module. In this embodiment, the revision card is highly similar to the comment card in terms of interactive operations, but the data belongs to different data sources. Based on the overall question-and-answer system maintenance cost and architectural rationality, a new revision component is used in terms of data, interaction and general capabilities. By abstracting the functional capabilities to the interactive module, the original capabilities of the comment card are reused in the interactive module to quickly implement the new revision capabilities of the document, and to achieve rapid plug-in and unplug of different business capabilities.
[0050] In some embodiments of the present disclosure, the data of the comment card and the data of the revision card are stored independently in the document back-end module. In some embodiments, the data of the comment card includes information such as the comment content, commentator, and comment time, and the data of the revision card includes information such as the revision content, reviser, and revision time. The data of the revision card and the data of the comment card are stored independently in the document back-end module, thereby further decoupling each other. If there is data of other types of other content displayed in the comment area, it will also be stored independently in the document back-end module. In this embodiment, the data of different card types are stored independently, achieving high scalability. When other types of cards are added, the data of each other will also be stored independently according to the card type, thereby supporting fast docking of different data functions.
[0051] In some embodiments of the present disclosure, the revision card further displays one or more of the following: a control for switching to the previous revision card or the previous revision card of the same revision operation type, a control for switching to the next revision card or the next revision card of the same revision operation type, a control for accepting revisions, a control for rejecting revisions, the person who performs the revision operation, the time information of the revision operation, the revision content, or the type of the revision operation. In some embodiments, such as Figure 3 As shown, the revision card shows the person who performed the revision operation, "Zhang Yi", and the time of performing the revision operation, "9:20 am". The upper right corner shows an up arrow and a down arrow, which are controls for switching to the previous revision card and the next revision card, respectively. "Delete Revision" and "Accept Revision" on the revision card are controls for accepting the revision corresponding to the revision card and rejecting the revision corresponding to the revision card, respectively. After accepting the revision, the revision will be applied to the target document and will no longer be displayed in the revision style. After rejecting the revision, it is equivalent to not performing the revision operation.
[0052] In some embodiments of the present disclosure, if the internal content of the revised content, the adjacent previous content, or the subsequent content is the same revision as the revised content, the revised content inherits the revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content. In some embodiments, before performing a revision operation, if the internal content of the revised content, the previous content adjacent to the revised content, or the subsequent content adjacent to the revised content is a revision of the same type as the revised content (for example, all are new revisions, deleted revisions, etc.), the revised content will inherit the revision and the revision card. Specifically, for example, if the revision operation is a new operation, then the revised content is a new revision (also referred to as new content), and before the revision operation, the adjacent previous content or the subsequent content of the revised content is new content, then the revised content will inherit the new revision and the revision card of the previous content. Inheriting revisions and revision cards may mean: merging the revised content of this revision operation with the previous content or the subsequent content, treating them as the same revision, and displaying them in the same revision card. For example, the previous content is the previous newly added revision (i.e., the previously added content), and the revised content is also a newly added revision (recorded as the newly added content this time), the revised content and the previous content are merged into a newly added revision, and displayed in the previous content and the revised content in the revision card originally associated with the previous content. In a revision card, two revision records can be displayed, corresponding to the previous content and the current revision content, as well as information such as the time when the new operation is performed on each. In another embodiment, it can also be merged into a revision record. In some embodiments, the revised content has revision attributes, and the revision attributes can record what type of revision the revised content is, so that it is displayed according to the revision style and using a revision card. When inheriting revisions, it can be to obtain the revision attributes of the internal content, the previous content, or the subsequent content, and inject the obtained revision attributes into the revised content, so as to realize the revision and revision card of the revised content inheriting the previous content. Because the revision content is injected into the revision attributes of the previous content or the subsequent content, the two are treated as the same revision in processing, so that the processing can be convenient by injecting the revision attributes without complicated code modification.
[0053] In some embodiments of the present disclosure, a revision card associated with the revised content is displayed, including: in response to the revision operation being a new addition operation, determining whether the previous content or the following content adjacent to the revised content is a new revision; in response to the previous content or the following content being a new revision, the revised content inherits the new revision of the previous content or the following content and the revision card of the previous content or the following content, or, in response to the previous content or the following content not being a new revision, creating the revision card for the revised content.
[0054] In some embodiments, Figure 4As shown, it can be first determined whether the operation identifier (such as a mouse) is displayed as a cursor, that is, it is in a state where content can be input. Then determine whether the adjacent previous content before the revised content input by the revision operation is a newly added revision (a certain content is a newly added revision, which means that the content has been subjected to a new operation, and it is displayed in a new style and has a revision card for the new operation). If the previous content is a new revision, the revised content will inherit the new revision of the previous content, merge the two into a new revision, and display them in the same revision card (displayed in the revision card of the new operation originally associated with the previous content). If the previous content is not a new revision, it will continue to determine whether the subsequent content is a new revision. If so, the current revised content will inherit the new revision of the subsequent content and be displayed in the same revision card (displayed in the revision card of the new operation originally associated with the subsequent content). If neither the previous content nor the subsequent content is a new revision, the revised content will be set to a new revision, and a revision card will be created.
[0055] In some embodiments of the present disclosure, in response to a revision operation performed on the target document in the revision mode, the revision content of the revision operation is displayed in the target document in a revision style, and a revision card associated with the revision content is displayed, including: in response to the revision operation being a deletion operation, determining whether the revision content is already a deletion revision; in response to the revision content being already a deletion revision, not processing the revision content; or, in response to the revision content not being a deletion revision, processing according to whether the revision content is already a new addition revision.
[0056] In some embodiments, such as Figure 5 As shown, when the revision operation is a deletion operation, the selected content (the content to be deleted, i.e., the revision content) can be converted to a selection (converting to a selection is to clear other non-revised formats for easy processing). At this time, the revision content has not been set to a deletion revision. Determine whether the selection has a deletion revision (i.e., the revision content has been deleted before the deletion operation). If the revision content is already a deletion revision (a certain content is a deletion revision, which means that the content has been deleted, and it is displayed in a deletion style and has a revision card for the deletion operation), then there is no need to set it to a deletion revision again, so the operation ends. If the selection is not a deletion revision, it will be determined whether the selection is a new revision (i.e., the content is displayed in the style of a new revision), and processing will be performed based on the judgment result.
[0057] In some embodiments of the present disclosure, processing is performed based on whether the revision content is already a newly added revision, including: in response to the revision content being already a newly added revision, deleting the revision content and not displaying it. In some embodiments, if the selection is a newly added revision, then this deletion operation will offset the newly added revision, which is equivalent to the revision content being neither added nor deleted, and the revision content will not be displayed in the target document, rather than being displayed in a new style or a deleted style.
[0058] In some embodiments of the present disclosure, processing is performed based on whether the revised content is a new revision, including: in response to the revised content being not a new revision, determining whether the internal content, adjacent previous content, or subsequent content of the revised content is a deletion revision; in response to the internal content, previous content, or subsequent content being a deletion revision, displaying the revised content in a deletion style, the revised content inheriting the deletion revision of the internal content, previous content, or subsequent content and the revision card of the internal content, previous content, or subsequent content; or, in response to the previous content or subsequent content not being a deletion revision, displaying the revised content in the deletion style and creating a revision card for the revised content.
[0059] In some embodiments, continue to refer to Figure 5 If the selection is not a new revision (that is, the content to be deleted is not displayed in the new style of the new revision), it will determine in turn whether the internal content, previous content, or subsequent content of the selection is a deletion revision. If it is a deletion revision, the revision content will inherit the deletion revision, that is, the revision content and the internal content, previous content, or subsequent content that is already a deletion revision will be merged into a deletion revision, and displayed in a revision card representing the deletion revision, that is, displayed in the revision card originally associated with the internal content, previous content, or subsequent content. If none of them are deletion revisions, a revision card will be created for the revision content, and the revision content will be displayed in the deletion style representing the deletion revision.
[0060] In some embodiments of the present disclosure, in response to a revision operation performed on the target document in the revision mode, the revised content of the revision operation is displayed in the target document in a revision style, and a revision card associated with the revised content is displayed, including: in response to the revision operation being a replacement operation, determining a newly added part and a replaced part in the revised content; performing a new operation on the newly added content and a delete operation on the replaced part; displaying the newly added part in a new revision style and displaying the replaced part in a deleted revision style, and creating a revision card for the revised content.
[0061] In some embodiments, the replacement operation may be equivalent to the addition operation and the deletion operation, and the revision content of the replacement operation includes the added part and the replaced part, that is, the replaced part is replaced with the added part. Figure 6 As shown, for the newly added part, you can perform a adding operation on it, and the execution process is the same as the aforementioned process of performing a adding operation on the newly added content. For the replaced content, you can perform a deleting operation on it, and the execution process is the same as the aforementioned process of deleting operation. However, for the newly added part and the replaced part, the two are not displayed in the revision card of the adding operation and the revision card of the deleting operation respectively, but are displayed in a revision card of the replacing operation. The newly added part and the replaced part can be recorded separately in the revision card of the replacing operation. For the replaced part, if there is a newly added revision in it, the newly added revision will be removed, which is equivalent to rejecting the newly added revision.
[0062] In some embodiments of the present disclosure, in response to a revision operation performed on the target document in the revision mode, the revised content of the revision operation is displayed in the target document in a revision style, and a revision card associated with the revised content is displayed, including: in response to the revision operation being a format revision operation, determining whether the revised content is already a new revision; in response to the revision content being already a new revision, changing the format of the revision content, displaying a revision card indicating the new revision for the revised content, and not displaying a revision card indicating the format revision for it; in response to the revision content not being a new revision, processing according to whether the revised content is already a format revision.
[0063] In some embodiments, such as Figure 7 As shown, taking the format revision operation as changing the format of a certain content block as an example, after determining that the revision operation is a format revision operation, the content block on which the format revision operation is executed can be converted into a selection and the format to be changed to can be calculated. Then first determine whether the selection is a newly added revision, because a newly added revision indicates that the revision content is the content added by the new operation. If the revision content is already a new revision, the current format revision operation and the previous new operation will be merged into an operation of adding content of a specific format. At this time, the revision content is still a new revision, but its format will be changed to the format set by this format revision operation. The revision content is displayed in a revision card of a new operation, and the revision operation type is a new operation. If the revision content is not a new revision, then it will be further determined whether the revision content is a format revision (a certain content is a format revision, which means that the content has been subjected to a format revision operation, and it is displayed in a format revision style and has a revision card of a format revision operation), that is, it will be determined whether the revision content has been subjected to a format revision operation before the current format revision operation is executed. And further processing is performed based on the judgment result.
[0064] In some embodiments of the present disclosure, processing is performed according to whether the revised content is already a format revision, including: in response to the revised content being already a format revision, determining whether the existing format revision of the revised content includes the format set by the format revision operation; in response to the existing format revision of the revised content including the format set by the format revision operation, not processing the format revision operation. In response to the existing format revision of the revised content not including the format set by the format revision operation, changing the format of the revised content according to the format revision operation, merging the existing format revision of the revised content and the format set by the format revision operation into one format revision, and displaying them in one revision card.
[0065] For some embodiments, please continue to refer to Figure 7 On the lower left side, if the revised content has already been subjected to a format revision operation (a format revision operation has been performed, and a revision card corresponding to the format operation is displayed), and the existing format revision includes the format set by this format revision operation, that is, the format in the existing format revision of the revised content is judged to include the format set by this format revision operation. For example, if the format in the existing format revision is bold and italic, and the format set by this format revision operation is italic, and the values of the two are the same in the italic format, then no processing is required, and only this format revision needs to be removed, and the existing format revision and the corresponding revision card are retained. If the existing format revision does not include the format set by this format revision (for example, the existing format revision is set to bold and italic, and the format set by this format revision operation is set to underline), then this format revision is merged with the existing format revision into one format revision (this format revision sets the format to bold, italic, and underline), and the merged format revision is displayed in one revision card.
[0066] In some embodiments of the present disclosure, processing is performed based on whether the revised content is already a format revision, including: in response to the revised content not being a format revision, determining whether the internal content, adjacent preceding content, or succeeding content of the revised content is a format revision that is the same as the format set by the format revision operation; in response to the internal content, preceding content, or succeeding content being a format revision that is the same as the format set by the format revision operation, changing the format of the revised content, the revised content inheriting the format revision of the internal content, preceding content, or succeeding content and the revision card of the internal content, preceding content, or succeeding content; or, in response to the preceding content or succeeding content not being a format revision that is the same as the format set by the format revision operation, changing the format of the revised content and creating a revision card for the revised content.
[0067] For some examples, please refer to Figure 7On the lower right side, if the selection (i.e. the revised content) does not include a format revision (i.e. the revised content is not the content that has been previously format revised), it will determine in turn whether the internal content, previous content, and subsequent content of the revised content are format revisions. If it is a format revision and its format is the same as the format set this time, the revised content will inherit the format revisions of the internal content, previous content, and subsequent content, as well as the revision cards associated with them. That is, the format revision operation executed on the revised content and the format revision operation executed on the content with the inherited format revision will be regarded as one format revision operation, and the revised content and the content with the inherited format revision will be associated with the revision card of the same format revision operation and displayed in it.
[0068] In some embodiments of the present disclosure, displaying a revision card associated with the revised content includes: in response to the revised content not being saved to a database, displaying a temporary card associated with the revised content; in response to the revised content being saved to the database, displaying the revision card and stopping displaying the temporary card; wherein the temporary card does not have controls and / or cannot be replied to, and the revision card has controls and can be replied to.
[0069] In some embodiments, after a revision operation is detected, in order to increase the display speed and allow users to view the revision card as soon as possible, a temporary card can be generated before the revision content (newly added content, deleted content, etc.) is stored in the database. The temporary card can be stored in the cache. The revision content and the revision operation type can be displayed in the temporary card, but it cannot be replied and does not have controls (controls for receiving revisions, controls for rejecting revisions, etc.). After the revision content is stored in the database, the revision card is generated. In this way, in addition to increasing the display speed, the read and write operations on the database can be reduced, because users often make modifications when performing revision operations. Temporary cards can reduce the interaction with the database when users make modifications. When the target document is an online document, after the revision content is stored in the database, other collaborative documents (such as copies of the target document) can be notified to display the revision content and revision cards, further reducing the number of read and write operations.
[0070] In some embodiments of the present disclosure, the method further includes: obtaining the revised content and the associated revision card in the target document at every preset period, and pushing the revised content and the revision card to the collaborative document of the target document. In some embodiments, the preset period is, for example, 0.5s, 0.7s or 1s, etc., and the revised content and the revision card in the target document are obtained and synchronized with the collaborative document at each preset period, rather than in real time, so as to reduce the problem of excessive synchronization times caused by repeated modifications by users.
[0071] In some other embodiments, the method further includes: in response to a third operation event, accepting or rejecting a revision operation on the revised content, and pushing the result of accepting or rejecting the revision operation on the revised content to the collaborative document of the target document in real time. In some embodiments, the third operation event may be a control that triggers acceptance of revisions or a control that triggers rejection of revisions, and the revision operation on the revised content may be accepted or rejected, and the result of the operation will be synchronized to the collaborative document in real time, because this indicates that the user has decided to keep the revised content for a long time, and therefore real-time synchronization is required.
[0072] In some embodiments of the present disclosure, it also includes: in response to a second operation event on the revision content or the revision card, displaying the revision content in a revision activation state; wherein the in-line activation state has a highlighted style.
[0073] In some embodiments, the revised content can be activated by selecting the revised content in the control mark box, hovering the control mark over the revised content or the revision card, or clicking the revision card to put it in an activated state. The activated revised content can be marked with a highlighted background color.
[0074] In some embodiments of the present disclosure, the revised content is part of the content in the content block, and displaying the revised content in a revised activated state includes: adding a wrapping layer to the revised content, and adding a style with transparency to the revised content in the wrapping layer.
[0075] In some embodiments, when the revised content is part of the content in the content block, it will be displayed in an inline activated state, and the inline activated state cannot cover the original text background color of the target document. Therefore, the display of the revised content cannot be controlled by modifying the background color attribute of the text leaf node of the content block. In this embodiment, it can be achieved by rendering a new wrapper layer Wrapper through the Editor-Kit Plugin plug-in and setting a background color with transparency. Since the wrapper layer has transparency, it will not completely cover the text background color.
[0076] In some embodiments of the present disclosure, the revised content is one or more content blocks, and the revised content is displayed in a revised activated state, including: adding a mask layer with a border and style to the content block, and setting the mask layer not to respond to the control mark located thereon. In some embodiments, if the revised content is one or more complete content blocks, and the activated state is a content block activated state, a mask layer Mask with a border will be covered on the content block where the revised content is located, so as to achieve a highlight effect of the activated state, and by setting not to respond to the control mark located thereon, the penetration of the control mark is achieved, so that the control mark can directly interact with the content displayed below the mask layer.
[0077] In some embodiments of the present disclosure, when the revision operation is a new addition operation, if the revised content inherits the newly added revision of the previous content or the subsequent content, then it is necessary to require that the inherited previous content or the subsequent content is a newly added revision created by the current user. If the previous content or the subsequent content is a newly added revision created by a non-current user or is not a newly added revision, then the revised content is a newly added revision and will not inherit the revision of the previous content or the subsequent content. A revision card representing the newly added revision will be created for the revised content. If both the previous content and the subsequent content are newly added revisions, the revised content will preferentially inherit the newly added revision of the previous content. The revised content inherits revisions (new revisions, deleted revisions, etc.) by injecting revision attributes into the revised content, so that the revised content and the inherited revision are regarded as the same revision and displayed in one revision card.
[0078] In some embodiments, the method further includes: when the control mark (such as a mouse) is displayed in a cursor state (usually displayed as a vertical bar in the document, indicating that input can be made), the document content can be edited and revised. At this time, if a line break is entered, a new paragraph will be added and the new revision of the paragraph will be displayed, and the paragraph identifier will be displayed at the end of the previous line. The new revision of the paragraph can be directly stored in the database. If the control mark displayed in the cursor state is located in a list content block (the list content block indicates that the content in the content block is a list) and the list content block is empty, after a line break is entered in the list content block, the list content block will be changed to a text content block (the text content block indicates that the content in the content block is text, and no longer a list). In this way, the type of the content block can be quickly changed in certain circumstances.
[0079] In some embodiments, the method further includes: the revision operation includes a new operation of inserting a new content block into the target document, and the revised content is the new content block. The new content block also has the newly added revised attribute. Specifically, when creating a new content block in the target document, a snapshot of the new content block may be created first, and then the newly added revised attribute is created, and then injected into the snapshot so that the new content block has the newly added revised attribute, and then the new content block is inserted into the target document.
[0080] In some embodiments, the method further includes: when the control mark is displayed in a cursor state, the revised content in the document content can be deleted by triggering the delete button, or the revised content can be deleted by selecting the revised content and then triggering the delete button or the delete option. If the previous content or the following content of the deleted revised content is not a deletion revision created by the current user when the control is represented as a cursor state, the revised content will be created as a new deletion revision, and a corresponding revision card will be created. If the revised content is deleted by selecting the revised content and then triggering the delete button or the delete option, the previous content or the following content of the deleted revised content is not a deletion revision created by the current user, or the existing deletion revision or the cross-deletion revision covered by the selected revised content is not a deletion revision created by the current user, then the revised content will be created as a new deletion revision, and a corresponding revision card will be created, and the existing deletion revision will not be inherited. If the previous content, the internal content, or the following content of the revised content is an existing deletion revision created by the current user, the revised content will inherit the existing deletion revision.
[0081] In some embodiments, if the revision operation is a delete operation, and the revision content on which the deletion operation is performed is a newly added revision (content) or a newly added part in a replaced revision, the revision content can be directly deleted without being displayed and a revision card can be not created, rather than displaying the revision content in a deleted style. If the revision operation is a delete operation, and the revision content on which the deletion operation is performed is a deleted revision created by the current user, then this deletion operation will not be processed.
[0082] In some embodiments, deleting a line break at the header of a paragraph in the cursor state will generate a deletion revision of the line break of the previous paragraph. Specifically, the line break of the previous paragraph is given a deletion revision attribute and is marked as a line break.
[0083] In some embodiments, if the revision operation is a replacement operation, the replaced part can be selected first and then the newly added part can be entered. If the selected replaced part is not a revision of any type, a replacement revision will be created. If the internal content, the previous content, or the following content of the newly added part creates an existing newly added revision for the current user, the newly added part will inherit the existing newly added revision, that is, the newly added part and the existing newly added revision will be regarded as the newly added content in one addition operation, and displayed in a revision card of the newly added revision. At this time, there is no need to create a replacement card. The replaced part will be regarded as a deletion operation, displayed in a deletion style (the style of the deletion revision), and a deletion card will be created. If the internal content, the previous content, or the following content of the replaced part creates an existing deletion revision for the current user, the replaced part will inherit the existing deletion revision, that is, the replaced part and the existing deletion revision will be regarded as the content deleted in one deletion operation, and displayed in a revision card of the deletion revision. At this time, the newly added part will be processed as a newly added revision, displayed in a new style (the style of the newly added revision), and a revision card of the newly added revision will be created for it.
[0084] In some embodiments, the revision operation can be to select the revision content in a line of content and then enter a line break. At this time, a line break is added before the selected revision content (i.e., a new line is added) with the selected revision content as the boundary in the line of content, and the selected revision content and the subsequent content will be moved down one line. This revision operation is a type of replacement operation, the selected revision content is the replaced part, the new part is the paragraph, and a revision card for the replacement revision will be created.
[0085] In some embodiments, the revision operation can be to select the revision content in multiple lines of content and then enter a line break. At this time, a line break will be added before the selected revision content (i.e., a new line will be added), and the selected revision content and the content after it will be moved down one line. This revision operation is a type of replacement operation, the selected revision content is the replaced part, the new part is the paragraph, and a revision card for the replacement revision will be created.
[0086] In some embodiments, the revision operation may be a format revision operation. When the format revision operation is performed multiple times, if the multiple format revision operations are performed for the same user and the revision contents of the multiple format revision operations are the same, the multiple different format revision operations will be merged into one for processing, and only one revision card of the format revision will be displayed. If the internal content, the previous content, or the subsequent content of the revised content is an existing format revision, and it is a format renewal created by the current user, then the revised content will inherit the existing format revision. Otherwise, a format revision will be created for the revised content. When inheriting an existing format revision, the properties of the existing format revision will be obtained and injected into the revised content.
[0087] In some embodiments, the revision operation may be a paste operation in revision mode, and the pasting operation may be pasting text or pasting a content block (which may be a non-text content block), and the pasted content will be bound to a revision identifier (such as an id). If the paste operation is performed after selecting part of the document content, then this paste operation is a replacement operation, the selected content is the replaced part, and the pasted content is the newly added part. In some embodiments, the pasted content may be preprocessed when pasted, and a cursor may be set before the selected document content (if the first line of the selected document content is non-text content, a blank line is inserted before it, and a cursor is set in the blank line), and then the pasted content is assigned the properties of the newly added part in the replacement revision, and the selected document content is assigned the properties of the replaced part in the replacement revision.
[0088] In some embodiments, if the revision operation is a copy-and-paste operation, and the copied content is the revised content of the previous revision operation (for example, the newly added content previously), that is, the copied content has revision attributes, then when pasting the copied content, the original revision attributes of the copied content need to be removed, and only the text is retained, and the original revision style of the copied content will not be carried when pasting. If the revision operation is a cut-and-paste operation, and the cut content is the revised content of the previous revision operation (for example, the newly added content previously), that is, the cut content has revision attributes, then when pasting the cut content, the original revision attributes of the cut content need to be retained, and the original revision style of the copied content will be carried when pasting. The revision attributes identify the revision type of the revised content (addition, deletion, format revision, replacement, etc.), and the revision attributes can be used to determine whether the revised content needs to be displayed in the revision style, and in which revision style the revised content is displayed. When the copied content has revision attributes, the content with revision attributes will be copied, but when pasting, the revision attributes will be removed and only the data will be pasted. When copying and cutting, the source of the copied and cut content is calculated, so as to determine whether to retain the revision attribute when pasting based on the source. In addition, for the cut content, the revision attribute can be retained only when pasting for the first time, and its revision attribute can be removed when pasting it afterwards.
[0089] In some embodiments, a cut operation on document content in edit mode will delete the cut document content, and a cut operation on document content in revision mode will not delete the cut document content, but will assign it a revision attribute of a deletion revision and display it in the revision style of a deletion revision.
[0090] In some embodiments of the present disclosure, a document processing device is also provided, including:
[0091] A display unit, used for displaying a target document;
[0092] A control unit, configured to enter a revision mode of the target document in response to a first operation event;
[0093] The control unit is further configured to, in response to a revision operation performed on the target document in the revision mode, display the revision content of the revision operation in the target document in a revision style, and display a revision card associated with the revision content;
[0094] The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
[0095] For the embodiments of the device, since they basically correspond to the method embodiments, the relevant parts refer to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separation modules may or may not be separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present embodiment. Those of ordinary skill in the art can understand and implement without paying creative work.
[0096] The method and device of the present disclosure are described above based on the embodiments and application examples. In addition, the present disclosure also provides an electronic device and a computer-readable storage medium, which are described below.
[0097] Reference below Figure 8 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
[0098] The electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0099] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 800 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0100] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0101] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-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 computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0102] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0103] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0104] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method of the present disclosure.
[0105] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0108] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.
[0110] According to one or more embodiments of the present disclosure, a document processing method is provided, including:
[0111] Display the target document;
[0112] In response to a first operation event, entering a revision mode of the target document;
[0113] In response to a revision operation performed on the target document in the revision mode, displaying revision content of the revision operation in a revision style in the target document, and displaying a revision card associated with the revision content;
[0114] The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
[0115] According to one or more embodiments of the present disclosure, a document processing method is provided, in which a revision card associated with the revised content is displayed in a comment area of the target document, wherein the revision card and the comment card in the comment area are unrelated and independent of each other.
[0116] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the target document is displayed in a document system, and the document system comprises: a comment module, a document front-end module and a document back-end module; the comment module is used to control the card displayed in the comment area of the target document, the document front-end module is used to display the content of the target document, and the document back-end module is used to store the data of the target document;
[0117] The comment module includes a comment component and a revision component which are independent of each other. The comment component is used to generate a comment card for the target document, and the revision component is used to generate a revision card for the target document.
[0118] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the comment module further includes an interaction component that communicates with the comment component and the revision component respectively;
[0119] The interaction component is used to implement the card interaction operations common to the comment card and the revision card.
[0120] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the data of the comment card and the data of the revision card are stored independently of each other in the document backend module.
[0121] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the revision card further displays one or more of the following:
[0122] A control for switching to the previous revision card, a control for switching to the next revision card, a control for accepting a revision, a control for rejecting a revision, the person who performs the revision operation, the time information of the revision operation, the revision content, or the type of the revision operation.
[0123] According to one or more embodiments of the present disclosure, a document processing method is provided, in which if the internal content, adjacent previous content, or subsequent content of the revised content is the same revision as the revised content, the revised content inherits the revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content.
[0124] According to one or more embodiments of the present disclosure, a document processing method is provided, which displays a revision card associated with the revision content, including:
[0125] In response to the revision operation being a new addition operation, determining whether a preceding content or a succeeding content adjacent to the revision content is a newly added revision;
[0126] In response to the previous content or the subsequent content being a newly added revision, the revised content inherits the newly added revision of the previous content or the subsequent content and the revision card of the previous content or the subsequent content, or, in response to the previous content or the subsequent content not being a newly added revision, the revision card is created for the revised content.
[0127] According to one or more embodiments of the present disclosure, a document processing method is provided, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including:
[0128] In response to the revision operation being a deletion operation, determining whether the revision content is a deletion revision;
[0129] In response to the revision content being a deletion revision, not processing the revision content; or,
[0130] In response to the revision content not being a deletion revision, processing is performed according to whether the revision content is an addition revision.
[0131] According to one or more embodiments of the present disclosure, a document processing method is provided, which processes the document according to whether the revision content is a new revision, including:
[0132] In response to the revision content being a newly added revision, deleting the revision content and not displaying it;
[0133] or,
[0134] In response to the revised content being not a new revision, determine whether the internal content, adjacent previous content, or subsequent content of the revised content is a deletion revision; in response to the internal content, the previous content, or the subsequent content being a deletion revision, display the revised content in a deletion style, and the revised content inherits the deletion revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content; or, in response to the previous content or the subsequent content being not a deletion revision, display the revised content in the deletion style and create a revision card for the revised content.
[0135] According to one or more embodiments of the present disclosure, a document processing method is provided, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including:
[0136] In response to the revision operation being a replacement operation, determining a newly added part and a replaced part in the revision content;
[0137] Performing a adding operation on the added content, and performing a deleting operation on the replaced part;
[0138] The newly added part is displayed in a style of a newly added revision and the replaced part is displayed in a style of a deleted revision, and a revision card is created for the revised content.
[0139] According to one or more embodiments of the present disclosure, a document processing method is provided, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including:
[0140] In response to the revision operation being a format revision operation, determining whether the revision content is a newly added revision;
[0141] In response to the revision content being a newly added revision, changing the format of the revision content, displaying a revision card indicating a newly added revision for the revision content, instead of displaying a revision card indicating a format revision for the revision content;
[0142] In response to the revision content not being a newly added revision, processing is performed according to whether the revision content is already a format revision.
[0143] According to one or more embodiments of the present disclosure, a document processing method is provided, which processes the revised content according to whether the revised content is a format revision, including:
[0144] In response to the revised content being a format revision, determining whether the existing format revision of the revised content includes the format set by the format revision operation;
[0145] In response to the existing format revision of the revised content including the format set by the format revision operation, not processing the format revision operation; or,
[0146] In response to the existing format revision of the revised content not including the format set by the format revision operation, changing the format of the revised content according to the format revision operation, merging the existing format revision of the revised content and the format set by the format revision operation into one format revision, and displaying the format revision in one revision card;
[0147] or,
[0148] Processing is performed based on whether the revised content is a format revision, including:
[0149] In response to the revised content not being a format revision, determining whether internal content, adjacent preceding content, or succeeding content of the revised content is a format revision that is the same as the format set by the format revision operation;
[0150] In response to the internal content, the preceding content, or the following content being in the same format revision as the format set by the format revision operation, the format of the revised content is changed, and the revised content inherits the format revision of the internal content, the preceding content, or the following content and the revision card of the internal content, the preceding content, or the following content; or
[0151] In response to the preceding content or the succeeding content not being in the same format revision as the format set by the format revision operation, the format of the revised content is changed and a revision card is created for the revised content.
[0152] According to one or more embodiments of the present disclosure, a document processing method is provided, which displays a revision card associated with the revision content, including:
[0153] In response to the revised content not being saved in the database, displaying a temporary card associated with the revised content;
[0154] In response to the revised content being saved in the database, displaying the revised card and stopping displaying the temporary card;
[0155] The temporary card does not have controls and / or cannot be replied, while the revised card has controls and can be replied.
[0156] According to one or more embodiments of the present disclosure, a document processing method is provided, further comprising:
[0157] In response to a second operation event on the revision content or the revision card, displaying the revision content in a revision activation state;
[0158] The inline activation state has a highlighted style.
[0159] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the revised content is part of the content in the content block, and the revised content is displayed in a revised activated state, including: adding a wrapping layer to the revised content, and adding a style with transparency to the revised content in the wrapping layer; or,
[0160] The revised content is one or more content blocks, and displaying the revised content in a revised activated state includes: adding a mask layer with a border and a style to the content block, and setting the mask layer not to respond to a control mark located thereon.
[0161] According to one or more embodiments of the present disclosure, a document processing method is provided, further comprising:
[0162] Obtaining the revised content and the associated revision card in the target document at every preset period, and pushing the revised content and the revision card to the collaborative document of the target document;
[0163] and / or,
[0164] In response to the third operation event, the revision operation on the revised content is accepted or rejected, and the result of accepting or rejecting the revision operation on the revised content is pushed to the collaborative document of the target document in real time.
[0165] According to one or more embodiments of the present disclosure, there is provided a document processing device, comprising:
[0166] A display unit, used for displaying a target document;
[0167] A control unit, configured to enter a revision mode of the target document in response to a first operation event;
[0168] The control unit is further configured to, in response to a revision operation performed on the target document in the revision mode, display the revision content of the revision operation in the target document in a revision style, and display a revision card associated with the revision content;
[0169] The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
[0170] In some embodiments, a revision card associated with the revised content is displayed in the comment area of the target document, and the revision card is unrelated to and independent of the comment card in the comment area.
[0171] In some embodiments, the target document is displayed in a document system, which may be the document processing device, and the document system includes: a comment module, a document front-end module, and a document back-end module; the comment module may belong to a control unit, which is used to control the card displayed in the comment area of the target document, the document front-end module may be the display unit itself or a part of the display unit, which is used to display the content of the target document, and the document back-end module may belong to the control unit, which is used to store the data of the target document;
[0172] The comment module includes a comment component and a revision component which are independent of each other. The comment component is used to generate a comment card for the target document, and the revision component is used to generate a revision card for the target document.
[0173] In some embodiments, the review module further includes an interaction component that communicates with the review component and the revision component, respectively;
[0174] The interaction component is used to implement the card interaction operations common to the comment card and the revision card.
[0175] In some embodiments, the data of the comment card and the data of the revision card are stored independently of each other in the document backend module.
[0176] In some embodiments, the revision card also displays one or more of the following:
[0177] A control for switching to the previous revision card, a control for switching to the next revision card, a control for accepting a revision, a control for rejecting a revision, the person who performs the revision operation, the time information of the revision operation, the revision content, or the type of the revision operation.
[0178] In some embodiments, if the internal content, adjacent previous content, or subsequent content of the revised content is the same revision as the revised content, the revised content inherits the revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content.
[0179] In some embodiments, displaying a revision card associated with the revision content includes:
[0180] In response to the revision operation being a new addition operation, determining whether a preceding content or a succeeding content adjacent to the revision content is a newly added revision;
[0181] In response to the previous content or the subsequent content being a newly added revision, the revised content inherits the newly added revision of the previous content or the subsequent content and the revision card of the previous content or the subsequent content, or, in response to the previous content or the subsequent content not being a newly added revision, the revision card is created for the revised content.
[0182] In some embodiments, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, includes:
[0183] In response to the revision operation being a deletion operation, determining whether the revision content is a deletion revision;
[0184] In response to the revision content being a deletion revision, not processing the revision content; or,
[0185] In response to the revision content not being a deletion revision, processing is performed according to whether the revision content is an addition revision.
[0186] In some embodiments, processing is performed according to whether the revision content is a newly added revision, including:
[0187] In response to the revision content being a newly added revision, deleting the revision content and not displaying it;
[0188] or,
[0189] In response to the revised content being not a new revision, determine whether the internal content, adjacent previous content, or subsequent content of the revised content is a deletion revision; in response to the internal content, the previous content, or the subsequent content being a deletion revision, display the revised content in a deletion style, and the revised content inherits the deletion revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content; or, in response to the previous content or the subsequent content being not a deletion revision, display the revised content in the deletion style and create a revision card for the revised content.
[0190] In some embodiments, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, includes:
[0191] In response to the revision operation being a replacement operation, determining a newly added part and a replaced part in the revision content;
[0192] Performing a adding operation on the added content, and performing a deleting operation on the replaced part;
[0193] The newly added part is displayed in a style of a newly added revision and the replaced part is displayed in a style of a deleted revision, and a revision card is created for the revised content.
[0194] In some embodiments, in response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, includes:
[0195] In response to the revision operation being a format revision operation, determining whether the revision content is a newly added revision;
[0196] In response to the revision content being a newly added revision, changing the format of the revision content, displaying a revision card indicating a newly added revision for the revision content, instead of displaying a revision card indicating a format revision for the revision content;
[0197] In response to the revision content not being a newly added revision, processing is performed according to whether the revision content is already a format revision.
[0198] In some embodiments, processing is performed according to whether the revised content is a format revision, including:
[0199] In response to the revised content being a format revision, determining whether the existing format revision of the revised content includes the format set by the format revision operation;
[0200] In response to the existing format revision of the revised content including the format set by the format revision operation, not processing the format revision operation; or,
[0201] In response to the existing format revision of the revised content not including the format set by the format revision operation, changing the format of the revised content according to the format revision operation, merging the existing format revision of the revised content and the format set by the format revision operation into one format revision, and displaying the format revision in one revision card;
[0202] or,
[0203] Processing is performed based on whether the revised content is a format revision, including:
[0204] In response to the revised content not being a format revision, determining whether internal content, adjacent preceding content, or succeeding content of the revised content is a format revision that is the same as the format set by the format revision operation;
[0205] In response to the internal content, the preceding content, or the following content being in the same format revision as the format set by the format revision operation, the format of the revised content is changed, and the revised content inherits the format revision of the internal content, the preceding content, or the following content and the revision card of the internal content, the preceding content, or the following content; or
[0206] In response to the preceding content or the succeeding content not being in the same format revision as the format set by the format revision operation, the format of the revised content is changed and a revision card is created for the revised content.
[0207] In some embodiments, displaying a revision card associated with the revision content includes:
[0208] In response to the revised content not being saved in the database, displaying a temporary card associated with the revised content;
[0209] In response to the revised content being saved in the database, displaying the revised card and stopping displaying the temporary card;
[0210] The temporary card does not have controls and / or cannot be replied, while the revised card has controls and can be replied.
[0211] In some embodiments, the control unit is further configured to: in response to a second operation event on the revision content or the revision card, display the revision content in a revision activation state;
[0212] The inline activation state has a highlighted style.
[0213] In some embodiments, the revised content is part of the content in the content block, and displaying the revised content in a revised activated state includes: adding a wrapping layer to the revised content, and adding a style with transparency to the revised content in the wrapping layer; or,
[0214] The revised content is one or more content blocks, and displaying the revised content in a revised activated state includes: adding a mask layer with a border and a style to the content block, and setting the mask layer not to respond to a control mark located thereon.
[0215] In some embodiments, the control unit is further configured to: obtain the revised content and the associated revision card in the target document at every preset period, and push the revised content and the revision card to the collaborative document of the target document;
[0216] And / or, in response to a third operation event, accepting or rejecting the revision operation on the revised content, and pushing the result of accepting or rejecting the revision operation on the revised content to the collaborative document of the target document in real time.
[0217] According to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one memory and at least one processor;
[0218] The at least one memory is used to store program codes, and the at least one processor is used to call the program codes stored in the at least one memory to execute any one of the above methods.
[0219] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to execute the above method.
[0220] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0221] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0222] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A document processing method, characterized in that: include: Display the target document; In response to a first operation event, entering a revision mode of the target document; In response to a revision operation performed on the target document in the revision mode, displaying revision content of the revision operation in a revision style in the target document, and displaying a revision card associated with the revision content; The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
2. The method according to claim 1, characterized in that A revision card associated with the revision content is displayed in the comment area of the target document, wherein the revision card and the comment card in the comment area are not associated with each other and are independent of each other.
3. The method according to claim 1, characterized in that The target document is displayed in a document system, which includes: a comment module, a document front-end module and a document back-end module; the comment module is used to control the card displayed in the comment area of the target document, the document front-end module is used to display the content of the target document, and the document back-end module is used to store the data of the target document; The comment module includes a comment component and a revision component which are independent of each other. The comment component is used to generate a comment card for the target document, and the revision component is used to generate a revision card for the target document.
4. The method according to claim 3, characterized in that The review module also includes an interaction component that communicates with the review component and the revision component respectively; The interaction component is used to implement the card interaction operations common to the comment card and the revision card.
5. The method according to claim 3, characterized in that: The data of the comment card and the data of the revision card are stored independently of each other in the document backend module.
6. The method according to claim 1, characterized in that The revision card also displays one or more of the following: A control for switching to the previous revision card, a control for switching to the next revision card, a control for accepting a revision, a control for rejecting a revision, the person who performs the revision operation, the time information of the revision operation, the revision content, or the type of the revision operation.
7. The method according to claim 1, characterized in that If the internal content, adjacent previous content or subsequent content of the revised content is the same revision as the revised content, the revised content inherits the revision of the internal content, the previous content or the subsequent content and the revision card of the internal content, the previous content or the subsequent content.
8. The method according to claim 1, characterized in that Displays the revision cards associated with the revision in question, including: In response to the revision operation being a new addition operation, determining whether a preceding content or a succeeding content adjacent to the revision content is a newly added revision; In response to the previous content or the subsequent content being a newly added revision, the revised content inherits the newly added revision of the previous content or the subsequent content and the revision card of the previous content or the subsequent content, or, in response to the previous content or the subsequent content not being a newly added revision, the revision card is created for the revised content.
9. The method according to claim 1, characterized in that: In response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including: In response to the revision operation being a deletion operation, determining whether the revision content is a deletion revision; In response to the revision content being a deletion revision, not processing the revision content; or, In response to the revision content not being a deletion revision, processing is performed according to whether the revision content is an addition revision.
10. The method according to claim 9, characterized in that Processing is carried out based on whether the revision content is a new revision, including: In response to the revision content being a newly added revision, deleting the revision content and not displaying it; or, In response to the revised content being not a new revision, determine whether the internal content, adjacent previous content, or subsequent content of the revised content is a deletion revision; in response to the internal content, the previous content, or the subsequent content being a deletion revision, display the revised content in a deletion style, and the revised content inherits the deletion revision of the internal content, the previous content, or the subsequent content and the revision card of the internal content, the previous content, or the subsequent content; or, in response to the previous content or the subsequent content being not a deletion revision, display the revised content in the deletion style and create a revision card for the revised content.
11. The method according to claim 1, characterized in that: In response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including: In response to the revision operation being a replacement operation, determining a newly added part and a replaced part in the revision content; Performing a adding operation on the added content, and performing a deleting operation on the replaced part; The newly added part is displayed in a style of a newly added revision and the replaced part is displayed in a style of a deleted revision, and a revision card is created for the revised content.
12. The method according to claim 1, characterized in that In response to a revision operation performed on the target document in the revision mode, displaying the revision content of the revision operation in the target document in a revision style, and displaying a revision card associated with the revision content, including: In response to the revision operation being a format revision operation, determining whether the revision content is a newly added revision; In response to the revision content being a newly added revision, changing the format of the revision content, displaying a revision card indicating a newly added revision for the revision content, instead of displaying a revision card indicating a format revision for the revision content; In response to the revision content not being a newly added revision, processing is performed according to whether the revision content is already a format revision.
13. The method according to claim 12, characterized in that Processing is performed based on whether the revised content is a format revision, including: In response to the revised content being a format revision, determining whether the existing format revision of the revised content includes the format set by the format revision operation; In response to the existing format revision of the revised content including the format set by the format revision operation, not processing the format revision operation; or, In response to the existing format revision of the revised content not including the format set by the format revision operation, changing the format of the revised content according to the format revision operation, merging the existing format revision of the revised content and the format set by the format revision operation into one format revision, and displaying the format revision in one revision card; or, Processing is performed based on whether the revised content is a format revision, including: In response to the revised content not being a format revision, determining whether internal content, adjacent preceding content, or succeeding content of the revised content is a format revision that is the same as the format set by the format revision operation; In response to the internal content, the preceding content, or the following content being in the same format revision as the format set by the format revision operation, the format of the revised content is changed, and the revised content inherits the format revision of the internal content, the preceding content, or the following content and the revision card of the internal content, the preceding content, or the following content; or In response to the preceding content or the succeeding content not being in the same format revision as the format set by the format revision operation, the format of the revised content is changed and a revision card is created for the revised content.
14. The method according to claim 1, characterized in that Displays the revision cards associated with the revision in question, including: In response to the revised content not being saved in the database, displaying a temporary card associated with the revised content; In response to the revised content being saved in the database, displaying the revised card and stopping displaying the temporary card; The temporary card does not have controls and / or cannot be replied, while the revised card has controls and can be replied.
15. The method according to claim 1, characterized in that Also includes: In response to a second operation event on the revision content or the revision card, displaying the revision content in a revision activation state; The inline activation state has a highlighted style.
16. The method according to claim 15, characterized in that The revised content is part of the content in the content block, and displaying the revised content in a revised activated state includes: adding a wrapping layer to the revised content, and adding a style with transparency to the revised content in the wrapping layer; or The revised content is one or more content blocks, and displaying the revised content in a revised activated state includes: adding a mask layer with a border and a style to the content block, and setting the mask layer not to respond to a control mark located thereon.
17. The method according to claim 1, characterized in that Also includes: Obtaining the revised content and the associated revision card in the target document at every preset period, and pushing the revised content and the revision card to the collaborative document of the target document; and / or, In response to the third operation event, the revision operation on the revised content is accepted or rejected, and the result of accepting or rejecting the revision operation on the revised content is pushed to the collaborative document of the target document in real time.
18. A document processing device, characterized in that: include: A display unit, used for displaying a target document; A control unit, configured to enter a revision mode of the target document in response to a first operation event; The control unit is further configured to, in response to a revision operation performed on the target document in the revision mode, display the revision content of the revision operation in the target document in a revision style, and display a revision card associated with the revision content; The revision style is a display style that is different from the non-revision content in the target document, and the revision card displays its associated revision content and revision operation type.
19. An electronic device comprising: at least one memory and at least one processor; The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method according to any one of claims 1 to 17.
20. A computer-readable storage medium, the computer-readable storage medium being used to store program code, wherein when the program code is executed by a processor, the processor is prompted to execute the method according to any one of claims 1 to 17.
Citation Information
Cited By
Document revision method, document revision device and storage medium
CN121435933A
Document revision methods, document revision devices and storage media
CN121435933B
