Document processing method and device, electronic equipment, storage medium and program product

By setting independent copies of supplementary data and content layout parameters for document pages, the complexity of updating headers and footers in documents is solved, enabling fast and accurate updates of page supplementary information and improving document processing efficiency.

CN120951933APending Publication Date: 2025-11-14TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410592085.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, headers and footers in documents are managed by the global document object model, which requires modifying the global DOM tree every time a change is made, increasing the complexity of layout and editing costs, and making it difficult to update page information quickly and flexibly.

Method used

By setting independent copies of supplementary data and content layout parameters for each document page, editing events are detected and mapped to the original supplementary data structure model for updates, enabling fast and accurate updates of page supplementary information.

Benefits of technology

It allows for quick and accurate updates of supplementary information on document pages without the need for global adjustments, improving document processing efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120951933A_ABST
    Figure CN120951933A_ABST
Patent Text Reader

Abstract

The invention discloses a document processing method and device, electronic equipment, a storage medium and a program product. The method comprises the steps of obtaining a target document; when an editing event for page affiliated information of the target document page is detected, determining a target affiliated element from an affiliated data copy of the target document page based on editing attribute information of the editing event and content typesetting parameters of the target document page; in an original affiliated data structure model corresponding to a target document content module to which the target document page belongs, determining an original affiliated element corresponding to the target affiliated element so as to update the original affiliated element to obtain an updated original affiliated element; obtaining an updated affiliated data copy of each document page in the target document content module based on the updated original affiliated element; and obtaining an updated target document based on the updated affiliated data copy. In the embodiment of the invention, complicated global adjustment is not needed. Therefore, the scheme can improve the document processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and specifically to a document processing method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] In document design, headers and footers are commonly used. Located at the top and bottom of the page, they add extra information and navigation. By including elements such as titles, authors, dates, and page numbers in headers and footers, readers can more easily read and understand the document's content. These elements not only enhance the overall appearance and professionalism of the document but also provide readers with convenient reference and navigation functions, thereby optimizing readability and management efficiency.

[0003] However, currently, headers and footers for all pages in a document are managed and controlled by a global Document Object Model (DOM) tree. Therefore, every change to a header or footer requires modification of the global DOM tree, not just a specific page. This can increase layout complexity, especially when the document contains a large number of pages. Furthermore, because all pages share the same source, any change to a header or footer directly affects the entire document, potentially triggering a series of re-formatting efforts, thus increasing the time and effort required for editing. Therefore, under the current setup, quickly and flexibly formatting header and footer content within a page becomes more difficult, and the efficiency of updating the document is limited. Summary of the Invention

[0004] This application provides a document processing method, apparatus, electronic device, storage medium, and program product. These methods enable page-related information on each page of a document to be controlled by its respective associated data copy and content layout parameters. When editing page-related information, editing events can be mapped to the original associated data structure model through their corresponding associated data copy, thereby updating the original associated data structure model. Furthermore, after the original associated data structure model is updated, the associated data copy generated by it is modified in reverse. This allows for rapid and accurate updating of the page-related information controlled by these associated data copies in the document, improving document processing efficiency.

[0005] This application provides a document processing method, including:

[0006] Obtain the target document, which includes at least one document content module. Each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0007] When an edit event for page-related information of the target document page is detected, the target related element is determined from the related data copy of the target document page based on the edit attribute information of the edit event and the content layout parameters of the target document page. The target document page can be any document page of the target document.

[0008] In the original subordinate data structure model corresponding to the target document content module of the target document page, determine the original subordinate element corresponding to the target subordinate element, and perform element update processing on the original subordinate element to obtain the updated original subordinate element;

[0009] Based on the updated original subordinate elements, the subordinate data copies of each document page in the target document content module are updated to obtain the updated subordinate data copies of each document page in the target document content module.

[0010] Based on the updated supplementary data copy, the page supplementary information of the document pages in the target document content module is updated to obtain the updated target document.

[0011] This application also provides a document processing apparatus, including:

[0012] The document acquisition unit is used to acquire the target document. The target document includes at least one document content module. Each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0013] The target determination unit is used to determine the target dependent element from the dependent data copy of the target document page when an editing event for page dependent information of the target document page is detected, based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document page can be any document page of the target document.

[0014] The original determination unit is used to determine the original subordinate element corresponding to the target subordinate element in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, so as to perform element update processing on the original subordinate element and obtain the updated original subordinate element.

[0015] The copy update unit is used to update the copies of the subordinate data of each document page in the target document content module based on the updated original subordinate elements, so as to obtain the updated copies of the subordinate data of each document page in the target document content module.

[0016] The document update unit is used to update the page information of the document pages in the target document content module based on the updated attached data copy, so as to obtain the updated target document.

[0017] In some embodiments, the original determination unit includes an edit determination subunit and an original update subunit:

[0018] The edit determination sub-unit is used to determine the element editing information for the target subordinate element based on the edit attribute information of the edit event;

[0019] The original update subunit is used to update the original subordinate elements corresponding to the target subordinate element according to the element editing information, so as to obtain the updated original subordinate element.

[0020] In some embodiments, the apparatus further includes a change determination unit and an editing management unit:

[0021] The change determination unit is used to determine the element change information corresponding to the edit event based on the updated original attached elements;

[0022] The editing management unit is used to add the editing operations corresponding to the editing events and element change information to the historical editing record, so as to manage the editing operations through the historical editing record.

[0023] In some embodiments, the document update unit includes a typesetting parameter acquisition subunit and a document update subunit:

[0024] The layout parameter acquisition sub-unit is used to obtain the reference content layout parameters of the target document page's supplementary information after the edit event;

[0025] The document update subunit is used to update the page information of the document pages in the target document content module based on the layout parameters of the reference content and the updated attached data copy, so as to obtain the updated target document.

[0026] In some embodiments, the apparatus further includes a current layout unit, a copy acquisition unit, an element layout unit, and a page display unit:

[0027] The current layout unit is used to determine the current layout page of the target document;

[0028] The copy acquisition unit is used to acquire a copy of the current subordinate data of the current layout page during the layout process of the current layout page;

[0029] The element layout unit is used to layout the subordinate elements in the current subordinate data copy into the current layout page according to the content layout parameters of the current layout page, so as to obtain the page subordinate information of the current layout page;

[0030] The page display unit is used to display the current layout page after the current layout page has been completed.

[0031] In some embodiments, the element layout unit is further configured to display the current layout page after the current layout page has been laid out if a copy of the current subordinate data of the current layout page is not obtained.

[0032] In some embodiments, if a copy of the current supplementary data of the current layout page is not obtained, after the current layout page is completed and displayed, the device further includes a copy creation unit, a copy matching unit, and a structural model creation unit:

[0033] The copy creation unit is used to create a new copy of the attached data based on the attached elements in the attached information of the current layout page when the addition of page attachment information is detected to be added to the current layout page.

[0034] The copy matching unit is used to identify matching subsidiary data copies that are similar to the new subsidiary data copy from the subsidiary data copies of each document page of the target document;

[0035] The structural model creation unit is used to create the original auxiliary data structural model of the document content module corresponding to the current layout page based on the matching auxiliary data copy.

[0036] In some embodiments, the structural model creation unit is used to determine the correspondence between the original subsidiary data structural model corresponding to the matching subsidiary data copy and the new subsidiary data copy when a matching subsidiary data copy exists; and to create the original subsidiary data structural model of the document content module corresponding to the current layout page when no matching subsidiary data copy exists.

[0037] In some embodiments, the device further includes a relative position acquisition unit, a cursor position determination unit, and a cursor display unit:

[0038] The relative position acquisition unit is used to obtain the relative position between the cursor and the subordinate elements in the page information of the target document page based on the editing event;

[0039] The cursor position determination unit is used to determine the cursor position in the updated target document based on the correspondence between the element layout position and the subordinate elements, as well as the relative position, provided by the content layout parameters of the target document page.

[0040] The cursor display unit is used to display the cursor at the cursor position in the updated target document.

[0041] In some embodiments, the original subsidiary data structure model includes dynamic subsidiary elements, which correspond to dynamic change conditions. The dynamic copy elements corresponding to the dynamic subsidiary elements in the subsidiary data copy generated by the original subsidiary data structure model are generated under the control of the dynamic change conditions.

[0042] This application also provides an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute steps in any of the document processing methods provided in this application.

[0043] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the document processing methods provided in this application.

[0044] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of any of the document processing methods provided in this application.

[0045] This application embodiment can obtain a target document, which includes at least one document content module. Each document content module includes at least one document page. The appended elements in the page appended information of each document page are controlled by the appended data copies of each document page. The appended data copies of the document pages are generated by the original appended data structure model of the document content module to which the document page belongs. When an editing event is detected on the page appended information of the target document page, the target appended element is determined from the appended data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document page can be any document page of the target document. In the original appended data structure model corresponding to the target document content module to which the target document page belongs, the original appended element corresponding to the target appended element is determined, and the original appended element is updated to obtain the updated original appended element. Based on the updated original appended element, the appended data copies of each document page in the target document content module are updated to obtain the updated appended data copies of each document page in the target document content module. Based on the updated appended data copies, the page appended information of the document pages in the target document content module is updated to obtain the updated target document.

[0046] In this application, since the subsidiary elements in the page subsidiary information of each document page are controlled by the subsidiary data copy of each document page, and the subsidiary data copy of a document page is generated by the original subsidiary data structure model of the document content module to which the document page belongs, when an editing event targeting the page subsidiary information of a target document page is detected, the target subsidiary element corresponding to the editing attribute information of the editing event can be determined from the subsidiary data copy of the target document page through the content layout parameters of the target document page. The editing event targeting the target subsidiary element is then mapped to the original subsidiary data structure model corresponding to the target document content module to which the target document page belongs through the subsidiary data copy of the target document page, so as to update the original subsidiary element. After the update, the original subsidiary element in turn updates the subsidiary data copy generated by the original subsidiary data structure model. This enables fast and accurate updating of the page subsidiary information of document pages in the target document content module without involving complex global adjustments. As a result, document processing efficiency is improved. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1a This is a schematic diagram of a scenario for the document processing method provided in an embodiment of this application;

[0049] Figure 1b This is a flowchart illustrating the document processing method provided in an embodiment of this application;

[0050] Figure 2a This is a flowchart illustrating the application of the document processing method provided in this embodiment in a header scenario;

[0051] Figure 2b This is a schematic diagram illustrating the management of header data copies provided in an embodiment of this application;

[0052] Figure 2c This is a flowchart illustrating the editing process of the target document page provided in an embodiment of this application;

[0053] Figure 3 This is a schematic diagram of the structure of the document processing device provided in the embodiments of this application;

[0054] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] This application provides a document processing method, apparatus, electronic device, storage medium, and program product.

[0057] Specifically, the document processing device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0058] In some embodiments, the document processing apparatus may also be integrated into multiple electronic devices, such as multiple servers, with the document processing method of this application being implemented by multiple servers.

[0059] In some embodiments, the server may also be implemented as a terminal.

[0060] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0061] For example, refer to Figure 1aThe electronic device can acquire a target document, which includes at least one document content module. Each document content module includes at least one document page. The appended elements in the page appended information of each document page are controlled by the appended data copies of each document page. The appended data copies of the document pages are generated by the original appended data structure model of the document content module to which the document page belongs. When an editing event targeting the page appended information of the target document page is detected, the target appended element is determined from the appended data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document page can be any document page of the target document. In the original appended data structure model corresponding to the target document content module to which the target document page belongs, the original appended element corresponding to the target appended element is determined, and the original appended element is updated to obtain the updated original appended element. Based on the updated original appended element, the appended data copies of each document page in the target document content module are updated to obtain the updated appended data copies of each document page in the target document content module. Based on the updated appended data copies, the page appended information of the document pages in the target document content module is updated to obtain the updated target document.

[0062] In this application, since the subsidiary elements in the page subsidiary information of each document page are controlled by the subsidiary data copy of each document page, and the subsidiary data copy of a document page is generated by the original subsidiary data structure model of the document content module to which the document page belongs, when an editing event targeting the page subsidiary information of a target document page is detected, the target subsidiary element corresponding to the editing attribute information of the editing event can be determined from the subsidiary data copy of the target document page through the content layout parameters of the target document page. The editing event targeting the target subsidiary element is then mapped to the original subsidiary data structure model corresponding to the target document content module to which the target document page belongs through the subsidiary data copy of the target document page, so as to update the original subsidiary element. After the update, the original subsidiary element in turn updates the subsidiary data copy generated by the original subsidiary data structure model. This enables fast and accurate updating of the page subsidiary information of document pages in the target document content module without involving complex global adjustments. As a result, document processing efficiency is improved, making editing and updating page subsidiary information more convenient and flexible.

[0063] The following sections provide detailed descriptions of each example. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0064] In this embodiment, a document processing method is provided, such as... Figure 1b As shown, the specific process of this document processing method can be as follows:

[0065] 101. Obtain the target document. The target document includes at least one document content module. Each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0066] The target document is the document that currently needs to be formatted. For example, the target document could be a document that is currently being viewed, edited, printed, or published.

[0067] A document page refers to a single page within a target document, used to present a portion of the document's information.

[0068] A document content module is a unit of content within a target document that consists of document pages with the same theme. Each content module may include one or more document pages that are interconnected in terms of theme or content, forming a complete thematic unit. For example, a document content module may specifically be a table of contents module, a section content module, or a chapter content module within the target document.

[0069] Additional information on a document page refers to supplementary information related to that page, located in the boundary area of ​​the document page. This information is usually not directly included in the main content of the document page, but it can provide additional context or guidance to help readers understand the page content or navigate the entire document.

[0070] For example, supplementary information on a page can be information in the header and footer of the document page, or it can be page margins, including footnotes, endnotes, etc. Margins are notes or supplementary information located on the side of the page, related to the main content of the page, but not directly inserted into the text, and so on. Specifically, supplementary information on a page can include at least one of the following: title, author, date, page number, link, image, etc.

[0071] Additional elements are elements that constitute supplementary information on a page. For example, additional elements can be words, phrases, numbers, strings, sentences, and so on.

[0072] Each supplementary data copy corresponds one-to-one with a document page and is used to control the generation of supplementary elements in the supplementary information of that document page.

[0073] In some embodiments, to facilitate control over the page appendage information of each document page of the target document, and to control the presentation of appendage elements in the page appendage information of the document page, the appendage data copy corresponding to the document page includes multiple element nodes and the node content corresponding to the element nodes; it also includes:

[0074] For any document page of the target document, when the document page is being formatted, obtain a copy of the corresponding supplementary data for the document page;

[0075] Arrange the node content of each element node in the supplementary data copy on the document page to obtain the supplementary elements in the supplementary information of the document page.

[0076] Element nodes can represent the content structure within a document page.

[0077] For example, element nodes can represent the content structure corresponding to headers, footers, and margins on a document page. Under the element nodes corresponding to headers, footers, and margins, there can be other element nodes, which can represent the content structure corresponding to titles, authors, dates, page numbers, links, images, etc. on a document page.

[0078] Node content refers to the content corresponding to an element node, used to control the generation of auxiliary elements in the document page's page information. For example, node content is the specific content corresponding to element nodes such as title, author, date, page number, link, and image.

[0079] For example, if the ancillary data copies corresponding to a document page include title element nodes under the header element node and page number element nodes under the footer element node, when typesetting the document page, the node content corresponding to the title element node under the header element node and the node content corresponding to the page number element node under the footer element node are typed into the document page. After the document page is typed, the node content corresponding to the title element node can be viewed in the header and the node content corresponding to the page number element node can be viewed in the footer. The original ancillary data structure model is a structural model that controls the page ancillary information of each document page in the document content module, and is used to generate the ancillary data copies corresponding to each document page in the document content module.

[0080] In some embodiments, the original subsidiary data structure model includes dynamic subsidiary elements, which correspond to dynamic change conditions. The dynamic copy elements corresponding to the dynamic subsidiary elements in the subsidiary data copy generated by the original subsidiary data structure model are generated under the control of the dynamic change conditions.

[0081] Dynamic dependent elements are node elements in the original dependent data structure model that are in a state of dynamic change. For example, dynamic dependent elements can be page numbers, dates, etc.

[0082] Dynamic copy elements are the dependent elements generated under the control of dynamic dependent elements. For example, dynamic copy elements can be page numbers, dates, etc., in the dependent data copy generated from the original dependent data structure model.

[0083] Dynamic change conditions are used to control the generation of dynamic copy elements corresponding to dynamic dependent elements.

[0084] For example, after a document page obtains its corresponding supplementary data copy, the page number in the supplementary data copy can be determined by its corresponding dynamic change conditions based on the arrangement order of the document pages in the document content module.

[0085] The dates in the supplementary data copy can be determined by their corresponding dynamic change conditions, such as the time the document page was edited or the time the document page was last viewed.

[0086] In some embodiments, different document content modules in the target document correspond to different thematic content.

[0087] 102. When an edit event is detected that targets the page's attached information, the target attached element is determined from the attached data copy of the target document page based on the edit attribute information of the edit event and the content layout parameters of the target document page. The target document page can be any page of the target document.

[0088] The target document page is the document page containing the information attached to the currently edited page in the target document.

[0089] Edit events refer to events that modify, add, or delete supplementary information on a target document page. They are used to modify or delete supplementary elements in the supplementary information of a target document page, and can also be used to add new supplementary elements to the supplementary information of a target document page.

[0090] The editing attribute information records detailed information about each editing operation corresponding to the editing event. This information may include editing type, editing location, editing content, editing event, and editor information.

[0091] Editing type refers to the specific type of editing, such as modify, add, delete, etc.

[0092] The editing location refers to the specific location or area where the editing event occurs.

[0093] Edited content refers to the specific content within the page's supplementary information involved in the editing event, such as supplementary elements that are modified, added, or deleted within the page's supplementary information.

[0094] An edit event refers to the time when an edit event occurs, including the date and time.

[0095] Editor information refers to information about the user or system performing the editing event, including username, user ID, etc.

[0096] Content layout parameters are used to control the layout of the supplementary data copies of the target document page within the target document page, obtaining the supplementary information of the target document page, and controlling the appearance and layout of the supplementary information.

[0097] For example, content layout parameters can include font and font size, line spacing and paragraph spacing, font color and background color, alignment, indentation and first-line indentation, page size and margins, header and footer, page number, image and chart layout, number of columns and columns, punctuation and spacing, line breaks and pagination, etc.

[0098] The target dependent element refers to the dependent element found in the dependent data copy of the target document page that matches the editing attribute information of the edit event, based on the content layout parameters of the target document page.

[0099] For example, the edit attribute information of the edit event records the editing of the page attachment information in the header of the target text page. Based on the parameters used for the layout of the edited attachment elements in the page attachment information in the target document page, and the parameters required for the layout of the attachment elements in the attachment data copy in the content layout parameters of the target document page, the target attachment element that matches the edited attachment element in the attachment data copy can be obtained.

[0100] 103. In the original subordinate data structure model corresponding to the target document content module of the target document page, determine the original subordinate element corresponding to the target subordinate element, so as to perform element update processing on the original subordinate element and obtain the updated original subordinate element.

[0101] The target document content module is a content unit consisting of a group of document pages in the target document that have the same theme as the target document page.

[0102] The original dependent element is the original dependent element in the original dependent data structure model corresponding to the target document content module, which is used to control the target dependent element. The target dependent element can be edited by editing the original dependent element.

[0103] For example, the auxiliary data copy of the target document page is generated by the original auxiliary data structure model corresponding to the target document content module to which it belongs. That is, the original auxiliary element is the auxiliary element referenced in generating the target auxiliary element. Thus, the original auxiliary element that matches the target auxiliary element in the original auxiliary data structure can be obtained.

[0104] The updated original dependent element is the element obtained by editing the original dependent element according to the edit attribute information of the edit event.

[0105] In some embodiments, in order to directly map edit events for a target dependent element to the target dependent element without updating the target dependent element at this time, and to update the target dependent element when subsequently updating the dependent data copies of each document page in the target document content module, the number of updates to the target dependent element can be reduced, effectively saving system resources and reducing system load pressure. The original dependent element is updated to obtain the updated original dependent element, including:

[0106] Based on the edit attribute information of the edit event, determine the element edit information for the target subordinate element;

[0107] Based on the element editing information, the original subordinate elements corresponding to the target subordinate element are updated to obtain the updated original subordinate elements.

[0108] Among them, element editing information refers to the information about the content that needs to be edited obtained by the target subordinate element under the action of the editing attribute information of the editing event.

[0109] For example, by editing the edit attribute information of an event, the content that needs to be edited in the target subordinate element can be obtained, that is, the element editing information of the target subordinate element can be obtained without directly updating the target subordinate element. Through the element editing information, the original subordinate element corresponding to the target subordinate element can be precisely updated. Once the update is complete, the updated original subordinate element can be obtained. This process ensures the accuracy and effectiveness of editing, while maintaining the integrity and consistency of the target subordinate element.

[0110] In some embodiments, in order to allow for retrospective and re-execution of previous editing operations, the original subordinate element corresponding to the target subordinate element is determined in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, and the original subordinate element is updated. After obtaining the updated original subordinate element, the method further includes:

[0111] Based on the updated original attached elements, determine the element change information corresponding to the edit event;

[0112] Add the editing operations corresponding to the editing events and the element change information to the historical editing record so as to manage editing operations through the historical editing record.

[0113] The element change information records the changes in the original subordinate elements caused by the update of the original subordinate elements under the action of the edit event. The element change information provides a detailed description of the impact of the edit event, which helps to find and record the relevant results after the edit event.

[0114] An editing operation refers to the specific editing behavior performed in an editing event. For example, an editing operation can be modifying, adding, or deleting.

[0115] Edit history is used to record relevant information about the target document during the editing process, so as to find and manage the editing history of the target document, understand the specific modifications made in each editing event, and review or rewind when needed.

[0116] 104. Based on the updated original subordinate elements, update the subordinate data copies of each document page in the target document content module to obtain the updated subordinate data copies of each document page in the target document content module.

[0117] The updated ancillary data copy is a new version copy obtained by synchronously updating the ancillary data copies of each document page in the target document content module under the action of the updated original ancillary element.

[0118] 105. Based on the updated supplementary data copy, update the page supplementary information of the document pages in the target document content module to obtain the updated target document.

[0119] The updated target document is the document obtained by reformatting the page information of the document pages corresponding to the updated supplementary data copy in the target document, based on the updated supplementary data copy.

[0120] In some embodiments, in order to update the page attachment information of document pages in the target document content module, the page attachment information of document pages in the target document content module is updated based on the updated attachment data copy to obtain the updated target document, including:

[0121] Retrieve page-related information of the target document page and its reference content layout parameters after the edit event;

[0122] Based on the reference content layout parameters and the updated supplementary data copy, the page supplementary information of the document pages in the target document content module is updated to obtain the updated target document.

[0123] The reference content layout parameters are the layout style parameters used by each subordinate element in the page information of the target document page after the editing event.

[0124] For example, the layout parameters of the reference content can include the style features of the elements in the page information of the target document page, such as font, size, spacing, and alignment.

[0125] In some embodiments, to ensure that the layout of the page-related information of each document page in the target document content module is the same as the layout of the page-related information of the target document page, the following methods are included:

[0126] Based on the reference content layout parameters, the auxiliary elements in the updated auxiliary data copy are laid out on their corresponding document pages to update the page auxiliary information of the document pages in the target document content module, thus obtaining the updated target document.

[0127] In some embodiments, where a secondary data copy is provided on the current layout page of the target document, in order to layout and display the current layout page of the target document, the method further includes:

[0128] Determine the current layout page of the target document;

[0129] During the layout process of the current layout page, obtain a copy of the current auxiliary data of the current layout page;

[0130] Based on the content layout parameters of the current layout page, the subordinate elements in the current subordinate data copy are laid out in the current layout page to obtain the page subordinate information of the current layout page;

[0131] Once the current layout page is completed, the current layout page will be displayed.

[0132] The current formatting page refers to the document page in the target document that is currently undergoing formatting processing. For example, the current formatting page could be a document page that is being loaded, exported, or previewed during the viewing, editing, printing, or publishing process of the target document.

[0133] The current supplementary data copy is used to support the layout of supplementary information on the current layout page. By using the content layout parameters of the current layout page, the supplementary elements in the current supplementary data copy can be laid out on the current layout page to obtain the supplementary information of the current layout page.

[0134] In some embodiments, where no subsidiary data copy is set for the current layout page of the target document, the current layout page can be directly formatted and displayed without considering the page subsidiary information of the current layout page, and further includes:

[0135] If a copy of the current subordinate data for the current layout page is not obtained, the current layout page will be displayed after the current layout page has been completed.

[0136] For example, if the current layout page in the target document does not have a copy of the current associated data, then when the current layout page is displayed, it does not show any associated page information related to that document page.

[0137] In some embodiments, considering the addition of page supplementary information when no supplementary data copy is set on the current layout page of the target document, in order to ensure that the target document can still display the page supplementary information after subsequent layout, if no current supplementary data copy of the current layout page is obtained, after the current layout page is completed and displayed, the method further includes:

[0138] When adding page-related information to the current layout page, create a new copy of the related data based on the related elements in the page-related information of the current layout page;

[0139] Identify matching subsidiary data copies that are similar to the new subsidiary data copy from the subsidiary data copies of each document page of the target document;

[0140] Based on the matching subsidiary data copy, create the original subsidiary data structure model for the document content module corresponding to the current layout page.

[0141] The new supplementary data copy is a supplementary data copy generated after the current layout page adds supplementary information, which is used to control the supplementary information of that page.

[0142] Matching ancillary data copies refers to the ancillary data copies of document pages in the target document that are similar to the new ancillary data copy. It can be understood that, except for dynamically changing elements, the ancillary elements in the ancillary information of the page controlled by the new ancillary data copy are the same as the ancillary elements in the ancillary information of the page controlled by the matching ancillary data copy.

[0143] In some embodiments, in order to obtain an original subsidiary data structure model for managing matching subsidiary data copies, an original subsidiary data structure model for the document content module corresponding to the current layout page is created based on the matching subsidiary data copies, including:

[0144] When a matching subsidiary data copy exists, determine the correspondence between the original subsidiary data structure model corresponding to the matching subsidiary data copy and the new subsidiary data copy;

[0145] When no matching subsidiary data copy exists, create the original subsidiary data structure model for the document content module corresponding to the current layout page.

[0146] Specifically, the correspondence between the original subsidiary data structure model corresponding to the matched subsidiary data copy and the new subsidiary data copy is used to enable the original subsidiary data structure model corresponding to the matched subsidiary data copy to control the new subsidiary data copy. This allows the subsidiary data copy controlled by the original subsidiary data structure model to be synchronously updated after the subsidiary elements in the original subsidiary data structure model are edited.

[0147] In some embodiments, in order to update the cursor position in the target document after an edit event, the method further includes:

[0148] Based on the edit event, obtain the relative position between the cursor and the subordinate elements in the page information of the target document page;

[0149] Based on the correspondence and relative positions between the element layout positions and their subordinate elements provided by the content layout parameters of the target document page, determine the cursor position in the updated target document;

[0150] Display the cursor at the cursor position in the updated target document.

[0151] The cursor is a visible marker on a computer screen used to indicate the user's input position. It is usually presented in a blinking form, indicating the position where the user is currently typing text or is about to type text. The appearance of the cursor can vary depending on the operating system and application settings, and is usually a vertical line, a blinking rectangle, or an underline.

[0152] The cursor position is controlled by the user's input device (such as a mouse, keyboard, touchscreen, etc.). By moving the mouse or using the arrow keys, the user can move the cursor to the desired location and then perform text input, editing, or other operations. The cursor plays a crucial role in user interaction with the computer interface, helping users accurately locate and manipulate text or other editable content.

[0153] Relative position describes the position of the cursor relative to the subordinate elements of the page information in the target document page after an editing event.

[0154] The element layout position is a parameter used in the content layout parameters of the target document page to control the position occupied by the subordinate elements in the page's supplementary information.

[0155] The correspondence between element layout position and subordinate elements can control the subordinate elements in the subordinate data copy of the target document page to be arranged in the target document page according to the element layout position, thereby generating subordinate elements in the page subordinate information of the target document page.

[0156] The cursor position is the location of the cursor in the target document after the update.

[0157] As can be seen from the above, the embodiments of this application can obtain a target document, which includes at least one document content module, each document content module including at least one document page, and the subordinate elements in the page subordinate information of each document page are controlled by the subordinate data copy of each document page. The subordinate data copy of the document page is generated by the original subordinate data structure model of the document content module to which the document page belongs. When an editing event for the page subordinate information of the target document page is detected, the target subordinate element is determined from the subordinate data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document page is any document page of the target document. In the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, the original subordinate element corresponding to the target subordinate element is determined, and the original subordinate element is updated to obtain the updated original subordinate element. Based on the updated original subordinate element, the subordinate data copy of each document page in the target document content module is updated to obtain the updated subordinate data copy of each document page in the target document content module. Based on the updated subordinate data copy, the page subordinate information of the document page in the target document content module is updated to obtain the updated target document.

[0158] Therefore, this solution addresses the issue that since the appended elements in the page appended information of each document page are controlled by the appended data copies of each document page, and these appended data copies are generated from the original appended data structure model of the document content module to which the document page belongs, this solution can quickly and accurately update the page appended information of document pages in the target document content module without involving complex global adjustments, thus improving document processing efficiency. This is achieved by using the content layout parameters of the target document page to determine the target appended element corresponding to the edit attribute information of the edit event from the appended data copy of the target document page when an edit event is detected. The solution then maps the edit event for the target appended element to the original appended data structure model of the target document content module through the appended data copy of the target document page, updating the original appended element.

[0159] The method described in the above embodiments will be further described in detail below.

[0160] In this embodiment, the method of this application embodiment will be described in detail by taking the formatting or editing of the header of the target document page during the formatting process of the target document as an example.

[0161] like Figure 2a As shown, the specific process of a document processing method is as follows:

[0162] 201. The target document includes at least one document content module, each document content module includes at least one document page, the page information of the document page includes the header of the document page, the auxiliary elements in the header of each document page are controlled by the header data copy of each document page, the auxiliary data copy of the document page includes the header data copy, and the auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0163] like Figure 2b As shown, in some embodiments, before step 201, the following steps are further included:

[0164] When formatting a page of a target document, if it is found that the current page needs a header, it will first check if there is a copy of the header data for the current page in the auxiliary data manager. If there is, it will return directly; otherwise, it will trigger the creation of a copy of the current header data for the current page and add it to the auxiliary data manager for management. Based on the copy of the current header data, it will create the original auxiliary data structure model of the document content module corresponding to the current page, so as to control the copy of the current header data through the original auxiliary data structure model.

[0165] Based on the content layout parameters of the current layout page, the subordinate elements in the current header data copy are laid out on the current layout page to obtain the header of the current layout page. The current subordinate data copy and the content layout parameters of the current layout page are in one-to-one correspondence.

[0166] In some embodiments, the subsidiary data manager includes keywords corresponding to header data copies, which are used to identify header data copies in the subsidiary data manager.

[0167] 202. When an edit event is detected on the header of the target document page, the target subordinate element is determined from the header data copy of the target document page based on the edit attribute information of the edit event and the content layout parameters of the target document page. The target document page is any document page of the target document.

[0168] like Figure 2c As shown, in some embodiments, prior to step 202, the following steps are also included:

[0169] When an edit event is detected targeting a document page, the corresponding content layout parameters are determined based on the edit position in the edit attribute information of the edit event.

[0170] If the content layout parameters corresponding to the editing position are used to format the header of the target document page, then a copy of the header data of the target document page is obtained. The content layout parameters of the header of each document page in the target document correspond one-to-one with the copy of the header data.

[0171] 203. In the original subordinate data structure model corresponding to the target document content module of the target document page, determine the original subordinate element corresponding to the target subordinate element, and perform element update processing on the original subordinate element to obtain the updated original subordinate element.

[0172] like Figure 2c As shown, in some embodiments, in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, the original subordinate element corresponding to the target subordinate element is determined, including:

[0173] Based on the edit event, the header data copy of the target document page is back-mapped to the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, and the original subordinate element corresponding to the target subordinate element is determined;

[0174] The original dependent elements are updated to obtain the updated original dependent elements, including:

[0175] The original subordinate elements in the original subordinate data structure model corresponding to the target document content module are updated to obtain the updated original subordinate data structure model, which includes the updated original subordinate elements.

[0176] like Figure 2c As shown, in some embodiments, the original subordinate elements are updated to obtain the updated original subordinate elements, including:

[0177] Based on the edit attribute information of the edit event, determine the element edit information for the target subordinate element;

[0178] Based on the element editing information, the original subordinate elements corresponding to the target subordinate element are updated to obtain the updated original subordinate elements.

[0179] In some embodiments, it also includes:

[0180] Based on the updated original auxiliary data structure model, determine the element change information corresponding to the edit event;

[0181] Add the editing operations corresponding to the editing events and the element change information to the historical editing record so as to manage editing operations through the historical editing record.

[0182] 204. Based on the updated original subordinate elements, update the header data copies of each document page in the target document content module to obtain the updated header data copies of each document page in the target document content module.

[0183] 205. Obtain the reference content layout parameters of the header of the target document page after the edit event; and update the header of the document page in the content module of the target document according to the reference content layout parameters and the updated header data copy to obtain the updated target document.

[0184] 206. Based on the editing event, obtain the relative position between the cursor and the subordinate elements in the page information of the target document page, and determine the cursor position in the updated target document according to the correspondence between the element layout position and the subordinate elements provided by the content layout parameters of the target document page, as well as the relative position. Finally, display the cursor at the cursor position in the updated target document.

[0185] In some embodiments, the header data copies of document pages in various document content modules of the target document share the same content layout parameters to reduce the memory resources occupied by the content layout parameters. As can be seen from the above, this application can achieve fast and accurate updates to the headers and / or footers of document pages in the target document content modules without involving complex global adjustments. This improves document processing efficiency and makes editing and updating page-related information more convenient and flexible.

[0186] This application significantly optimizes the header and footer editing functions and has a greater advantage in user interface (UI) interaction (cursor update, selection update), laying a solid foundation for more advanced header and footer editing in the future, thus increasing the likelihood of attracting new users and activating existing users.

[0187] To better implement the above methods, this application also provides a document processing device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0188] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the document processing device specifically integrated into an electronic device as an example.

[0189] For example, such as Figure 3 As shown, the document processing device may include a document acquisition unit 301, a target determination unit 302, an original determination unit 303, a copy update unit 304, and a document update unit 305, as follows:

[0190] (I) Document Acquisition Unit 301.

[0191] The document acquisition unit 301 is used to acquire a target document. The target document includes at least one document content module. Each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0192] (II) Target Determination Unit 302.

[0193] The target determination unit 302 is used to determine the target dependent element from the dependent data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page when an editing event for the page dependent information of the target document page is detected. The target document page is any document page of the target document.

[0194] (III) Original determination unit 303.

[0195] The original determination unit 303 is used to determine the original subordinate element corresponding to the target subordinate element in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, so as to perform element update processing on the original subordinate element and obtain the updated original subordinate element.

[0196] In some embodiments, the original determination unit includes an edit determination subunit and an original update subunit:

[0197] The edit determination sub-unit is used to determine the element editing information for the target subordinate element based on the edit attribute information of the edit event;

[0198] The original update subunit is used to update the original subordinate elements corresponding to the target subordinate element according to the element editing information, so as to obtain the updated original subordinate element.

[0199] In some embodiments, the apparatus further includes a change determination unit and an editing management unit:

[0200] The change determination unit is used to determine the element change information corresponding to the edit event based on the updated original attached elements;

[0201] The editing management unit is used to add the editing operations corresponding to the editing events and element change information to the historical editing record, so as to manage the editing operations through the historical editing record.

[0202] (iv) Copy update unit 304.

[0203] The copy update unit 304 is used to update the subsidiary data copies of each document page in the target document content module based on the updated original subsidiary elements, so as to obtain the updated subsidiary data copies of each document page in the target document content module.

[0204] (V) Document Update Unit 305.

[0205] The document update unit 305 is used to update the page attachment information of the document pages in the target document content module based on the updated attachment data copy, so as to obtain the updated target document.

[0206] In some embodiments, the document update unit includes a typesetting parameter acquisition subunit and a document update subunit:

[0207] The layout parameter acquisition sub-unit is used to obtain the reference content layout parameters of the target document page's supplementary information after the edit event;

[0208] The document update subunit is used to update the page information of the document pages in the target document content module based on the layout parameters of the reference content and the updated attached data copy, so as to obtain the updated target document.

[0209] In some embodiments, the apparatus further includes a current layout unit, a copy acquisition unit, an element layout unit, and a page display unit:

[0210] The current layout unit is used to determine the current layout page of the target document;

[0211] The copy acquisition unit is used to acquire a copy of the current subordinate data of the current layout page during the layout process of the current layout page;

[0212] The element layout unit is used to layout the subordinate elements in the current subordinate data copy into the current layout page according to the content layout parameters of the current layout page, so as to obtain the page subordinate information of the current layout page;

[0213] The page display unit is used to display the current layout page after the current layout page has been completed.

[0214] In some embodiments, the element layout unit is further configured to display the current layout page after the current layout page has been laid out if a copy of the current subordinate data of the current layout page is not obtained.

[0215] In some embodiments, if a copy of the current supplementary data of the current layout page is not obtained, after the current layout page is completed and displayed, the device further includes a copy creation unit, a copy matching unit, and a structural model creation unit:

[0216] The copy creation unit is used to create a new copy of the attached data based on the attached elements in the attached information of the current layout page when the addition of page attachment information is detected to be added to the current layout page.

[0217] The copy matching unit is used to identify matching subsidiary data copies that are similar to the new subsidiary data copy from the subsidiary data copies of each document page of the target document;

[0218] The structural model creation unit is used to create the original auxiliary data structural model of the document content module corresponding to the current layout page based on the matching auxiliary data copy.

[0219] In some embodiments, the structural model creation unit is used to determine the correspondence between the original subsidiary data structural model corresponding to the matching subsidiary data copy and the new subsidiary data copy when a matching subsidiary data copy exists; and to create the original subsidiary data structural model of the document content module corresponding to the current layout page when no matching subsidiary data copy exists.

[0220] In some embodiments, the device further includes a relative position acquisition unit, a cursor position determination unit, and a cursor display unit:

[0221] The relative position acquisition unit is used to obtain the relative position between the cursor and the subordinate elements in the page information of the target document page based on the editing event;

[0222] The cursor position determination unit is used to determine the cursor position in the updated target document based on the correspondence between the element layout position and the subordinate elements, as well as the relative position, provided by the content layout parameters of the target document page.

[0223] The cursor display unit is used to display the cursor at the cursor position in the updated target document.

[0224] In some embodiments, the original subsidiary data structure model includes dynamic subsidiary elements, which correspond to dynamic change conditions. The dynamic copy elements corresponding to the dynamic subsidiary elements in the subsidiary data copy generated by the original subsidiary data structure model are generated under the control of the dynamic change conditions.

[0225] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0226] As can be seen from the above, the document processing device in this embodiment obtains a target document by a document acquisition unit. The target document includes at least one document content module, and each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs. When an editing event targeting the page auxiliary information of the target document page is detected, the target determination unit determines the target auxiliary element from the auxiliary data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document is any page of the target document. The original determining unit determines the original subordinate element corresponding to the target subordinate element in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, and performs element update processing on the original subordinate element to obtain the updated original subordinate element. The copy updating unit updates the subordinate data copies of each document page in the target document content module based on the updated original subordinate element to obtain the updated subordinate data copies of each document page in the target document content module. The document updating unit updates the page subordinate information of the document page in the target document content module based on the updated subordinate data copies to obtain the updated target document.

[0227] Therefore, the embodiments of this application can quickly and accurately update the page-related information of document pages in the target document content module without involving complex global adjustments. This improves document processing efficiency.

[0228] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.

[0229] In some embodiments, the document processing apparatus may also be integrated into multiple electronic devices, such as multiple servers, with the multiple servers implementing the xx method of this application.

[0230] In this embodiment, a server will be used as an example for detailed description. For example, ... Figure 4 As shown, it illustrates a schematic diagram of the server structure involved in an embodiment of this application. Specifically:

[0231] The server may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will understand that... Figure 4 The server architecture shown does not constitute a limitation on the server and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein:

[0232] The processor 401 is the control center of the server, connecting various parts of the server via various interfaces and lines. It performs various server functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 401.

[0233] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0234] The server also includes a power supply 403 that supplies power to the various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0235] The server may also include an input module 404, which can be used to receive input numeric or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0236] The server may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module, through which the server can perform short-range wireless transmission, thereby providing users with wireless broadband internet access. For example, the communication module 405 can be used to help users send and receive emails, browse web pages, and access streaming media.

[0237] Although not shown, the server may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the server loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402, thereby implementing the steps in the methods of the various embodiments of this application.

[0238] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0239] As shown above, this method enables the rapid and accurate updating of page-related information within the target document's content module, without requiring complex global adjustments. This improves document processing efficiency, making the editing and updating of page-related information more convenient and flexible.

[0240] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0241] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the document processing methods provided in embodiments of this application. For example, the instructions can execute the following steps:

[0242] Obtain the target document, which includes at least one document content module. Each document content module includes at least one document page. The auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs.

[0243] When an edit event for page-related information of the target document page is detected, the target related element is determined from the related data copy of the target document page based on the edit attribute information of the edit event and the content layout parameters of the target document page. The target document page can be any document page of the target document.

[0244] In the original subordinate data structure model corresponding to the target document content module of the target document page, determine the original subordinate element corresponding to the target subordinate element, and perform element update processing on the original subordinate element to obtain the updated original subordinate element;

[0245] Based on the updated original subordinate elements, the subordinate data copies of each document page in the target document content module are updated to obtain the updated subordinate data copies of each document page in the target document content module.

[0246] Based on the updated supplementary data copy, the page supplementary information of the document pages in the target document content module is updated to obtain the updated target document.

[0247] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0248] According to one aspect of this application, a computer program product or computer program is provided, comprising a computer program / instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instructions from the computer-readable storage medium and executes the computer program / instructions, causing the electronic device to perform the methods provided in various optional implementations of the document processing aspects described in the above embodiments.

[0249] Since the instructions stored in the storage medium can execute the steps of any of the document processing methods provided in the embodiments of this application, the beneficial effects that any of the document processing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0250] The foregoing has provided a detailed description of a document processing method, apparatus, electronic device, storage medium, and program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A document processing method, characterized in that, include: Obtain a target document, which includes at least one document content module, each document content module including at least one document page, and the auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page. The auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs. When an editing event for page-related information of a target document page is detected, the target related element is determined from the related data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page. The target document page can be any document page of the target document. In the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, the original subordinate element corresponding to the target subordinate element is determined, and the original subordinate element is updated to obtain the updated original subordinate element. Based on the updated original subordinate elements, the subordinate data copies of each document page in the target document content module are updated to obtain the updated subordinate data copies of each document page in the target document content module. Based on the updated ancillary data copy, the page ancillary information of the document pages in the target document content module is updated to obtain the updated target document.

2. The document processing method as described in claim 1, characterized in that, The step of updating the original dependent elements to obtain the updated original dependent elements includes: Based on the editing attribute information of the editing event, determine the element editing information of the target subordinate element; According to the element editing information, the original subordinate element corresponding to the target subordinate element is updated to obtain the updated original subordinate element.

3. The document processing method as described in claim 1, characterized in that, In the original subordinate data structure model corresponding to the target document content module of the target document page, the original subordinate element corresponding to the target subordinate element is determined, and the original subordinate element is updated. After obtaining the updated original subordinate element, the process further includes: Based on the updated original attached elements, determine the element change information corresponding to the edit event; The editing operation corresponding to the editing event and the element change information are added to the historical editing record so as to manage the editing operation through the historical editing record.

4. The document processing method as described in claim 1, characterized in that, The step of updating the page attachment information of the document page in the target document content module based on the updated attachment data copy to obtain the updated target document includes: Obtain the page-related information of the target document page, including reference content layout parameters after the edit event; Based on the reference content layout parameters and the updated supplementary data copy, the page supplementary information of the document page in the target document content module is updated to obtain the updated target document.

5. The document processing method as described in claim 1, characterized in that, Also includes: Determine the current layout page of the target document; During the layout process of the current layout page, obtain a copy of the current supplementary data of the current layout page; According to the content layout parameters of the current layout page, the subordinate elements in the current subordinate data copy are arranged in the current layout page to obtain the page subordinate information of the current layout page; Once the current layout page has been laid out, the current layout page will be displayed.

6. The document processing method as described in claim 5, characterized in that, Also includes: If a copy of the current subordinate data of the current layout page is not obtained, the current layout page will be displayed after the current layout page is completed.

7. The document processing method as described in claim 6, characterized in that, If a copy of the current supplementary data for the current layout page is not obtained, after the current layout page is completed and displayed, the method further includes: When it is detected that additional page information is added to the current layout page, a new copy of the additional data is created based on the additional elements in the additional page information of the current layout page; Identify matching subsidiary data copies that are similar to the new subsidiary data copy from the subsidiary data copies of each document page of the target document; Based on the matched auxiliary data copy, create the original auxiliary data structure model of the document content module corresponding to the current layout page.

8. The document processing method as described in claim 7, characterized in that, The step of creating the original auxiliary data structure model of the document content module corresponding to the current layout page based on the matched auxiliary data copy includes: When the matching subsidiary data copy exists, determine the correspondence between the original subsidiary data structure model corresponding to the matching subsidiary data copy and the new subsidiary data copy; When no matching subsidiary data copy exists, the original subsidiary data structure model of the document content module corresponding to the current layout page is created.

9. The document processing method as described in claim 1, characterized in that, Also includes: Based on the editing event, obtain the relative position between the cursor and the subordinate elements in the page subordinate information of the target document page; Based on the correspondence between the element layout positions and subordinate elements provided by the content layout parameters of the target document page, and the relative positions, the cursor position of the cursor in the updated target document is determined; The cursor is displayed at the cursor position in the updated target document.

10. The document processing method as described in claim 1, characterized in that, The original auxiliary data structure model includes dynamic auxiliary elements, which correspond to dynamic change conditions. The dynamic copy elements in the auxiliary data copies generated by the original auxiliary data structure model that correspond to the dynamic auxiliary elements are generated under the control of the dynamic change conditions.

11. A document processing apparatus, characterized in that, include: A document acquisition unit is used to acquire a target document, the target document including at least one document content module, each document content module including at least one document page, the auxiliary elements in the page auxiliary information of each document page are controlled by the auxiliary data copy of each document page, and the auxiliary data copy of the document page is generated by the original auxiliary data structure model of the document content module to which the document page belongs; The target determination unit is used to determine the target dependent element from the dependent data copy of the target document page based on the editing attribute information of the editing event and the content layout parameters of the target document page when an editing event for page dependent information of the target document page is detected, wherein the target document page is any document page of the target document; The original determination unit is used to determine the original subordinate element corresponding to the target subordinate element in the original subordinate data structure model corresponding to the target document content module to which the target document page belongs, so as to perform element update processing on the original subordinate element to obtain the updated original subordinate element; The copy update unit is used to update the auxiliary data copies of each document page in the target document content module based on the updated original auxiliary elements, so as to obtain the updated auxiliary data copies of each document page in the target document content module. The document update unit is used to update the page attachment information of the document page in the target document content module based on the updated attachment data copy, so as to obtain the updated target document.

12. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the document processing method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the document processing method according to any one of claims 1 to 10.

14. A computer program product comprising multiple instructions, characterized in that, When the instructions are executed by the processor, they implement the steps of the document processing method according to any one of claims 1 to 10.