Document processing method and apparatus, electronic device, storage medium, and program product
By determining the reference relationships and location range of target content blocks in cloud documents, the problem of adjusting the reference area boundaries in multi-person collaboration mode is solved, improving the flexibility and scalability of document references.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2022-10-31
- Publication Date
- 2026-07-14
Smart Images

Figure CN115544981B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a document processing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] Cloud documents can meet users' needs for flexible sharing and multi-person document collaboration. Cloud documents often reference content from other documents. For example, when editing a host document, parts of the content from the source document can be referenced in the host document.
[0003] When part of the content of the source document is referenced in the host document, the referenced area containing that part of the content is locked, and the boundaries of the referenced area cannot be adjusted. Summary of the Invention
[0004] In view of this, the purpose of this disclosure is to provide a document processing method, apparatus, electronic device, storage medium, and program product.
[0005] For the purposes described above, this disclosure provides a document processing method, including:
[0006] In the target document, a target content block is identified, and the target content block has a reference relationship with a related content block in the associated document;
[0007] Obtain the first position range of the target content block in the target document;
[0008] In response to receiving a boundary range adjustment operation for the target content block, the second position range of the target content block in the target document after boundary range adjustment is obtained;
[0009] Based on the second location range, the target content block with adjusted boundary range is displayed in the target document.
[0010] This disclosure also provides a document processing apparatus, including:
[0011] The determination module is configured to: determine a target content block in the target document, wherein the target content block has a reference relationship with a related content block in the associated document;
[0012] The first acquisition module is configured to: acquire the first position range of the target content block in the target document;
[0013] The second acquisition module is configured to: in response to receiving a boundary range adjustment operation for the target content block, acquire the second position range of the target content block in the target document after the boundary range adjustment;
[0014] The display module is configured to display the target content block with adjusted boundary range in the target document based on the second position range.
[0015] This disclosure also provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any of the preceding descriptions.
[0016] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, characterized in that the computer instructions are used to cause the computer to perform the method described in any one of the above-described methods.
[0017] This disclosure also provides a computer program product, including computer program instructions that, when run on a computer, cause the computer to perform any of the methods described above.
[0018] As can be seen from the above, the document processing method, apparatus, electronic device, storage medium, and program product provided in this disclosure, when adjusting the boundary range of a target content block, determines the second position range of the target content block in the target document after boundary range adjustment based on its original first position range and boundary range in the target document, and then displays the target content block in the target document based on the second position range of the target content block in the target document, thereby realizing the adjustment and display of the boundary range of the target content block and improving the flexibility and scalability of document referencing. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the document access architecture according to an embodiment of this disclosure;
[0021] Figure 2 This is a schematic diagram of the hardware structure of an exemplary electronic device provided in the embodiments of this disclosure;
[0022] Figure 3 This is a schematic diagram of the source document or host document for an embodiment of this disclosure;
[0023] Figure 4 A flowchart illustrating a document processing method according to an embodiment of this disclosure;
[0024] Figure 5 This is a schematic diagram of an exemplary page according to an embodiment of the present disclosure;
[0025] Figure 6 This is a flowchart of the method for obtaining a first position range as described in an embodiment of this disclosure;
[0026] Figure 7 This is a flowchart of the method for obtaining a second position range as described in an embodiment of this disclosure;
[0027] Figure 8a This is a schematic diagram of the structure of the target content block described in an embodiment of this disclosure;
[0028] Figure 8b This is another structural diagram of the target content block described in an embodiment of this disclosure;
[0029] Figure 8c This is another structural diagram of the target content block described in an embodiment of this disclosure;
[0030] Figure 8d This is another structural diagram of the target content block described in an embodiment of this disclosure;
[0031] Figure 9 This is another flowchart of the method for obtaining a second position range according to an embodiment of this disclosure;
[0032] Figure 10 This is a schematic diagram of the document processing apparatus described in an embodiment of the present disclosure. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0034] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0035] Currently, in multi-user collaboration modes for cloud documents, there are often scenarios where documents reference each other. Different parts of a source document may be referenced by one or more different documents. The referenced content is stored as a referenced block in the source document, and the same content referenced in the host document is also stored as a referenced block. Furthermore, there are overlapping references between source documents. For example, in source document a, blocks 1-5 might be referenced by user Xiaohua in document b, and then blocks 3-4 might be referenced in document c.
[0036] However, in models involving overlapping references and multi-person collaboration, existing technologies cannot adjust the upper and lower boundaries of the reference region, resulting in poor flexibility and low scalability of the reference region.
[0037] Therefore, embodiments of this disclosure provide a document processing method, apparatus, electronic device, storage medium, and program product. The method includes: determining a target content block in a target document, the target content block having a reference relationship with a related content block in an associated document; obtaining a first position range of the target content block in the target document; in response to receiving a boundary range adjustment operation on the target content block, obtaining a second position range of the target content block in the target document after boundary range adjustment; and displaying the target content block in the target document based on the second position range. In this embodiment, when the boundary range of a target content block is adjusted, the second position range of the target content block in the target document after boundary range adjustment is determined based on its original first position range in the target document and the boundary range adjustment, thereby displaying the target content block in the target document based on the second position range of the target content block in the target document. This achieves boundary range adjustment and display of the target content block, improving the flexibility and scalability of document referencing.
[0038] Figure 1 A schematic diagram of a document access architecture according to an embodiment of this disclosure is shown. (Reference) Figure 1 The document access architecture 100 may include a server 110, a terminal 120, and a network 130 providing a communication link. The server 110 and the terminal 120 can be connected via a wired or wireless network 130. The server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, and middleware services.
[0039] Terminal 120 can be implemented in hardware or software. For example, when terminal 120 is implemented in hardware, it can be various electronic devices with a display screen and support page display, including but not limited to smartphones, tablets, e-book readers, laptops, and desktop computers. When terminal 120 is implemented in software, it can be installed in the electronic devices listed above; it can be implemented as multiple software programs or software modules (e.g., software programs or software modules used to provide distributed services) or as a single software program or software module, without specific limitations.
[0040] It should be noted that the document processing method provided in this application embodiment can be executed by the terminal 120 or by the server 110. It should be understood that... Figure 1 The number of terminals, networks, and servers shown is for illustrative purposes only and is not intended to be a limitation. Any number of terminals, networks, and servers can be used depending on implementation needs.
[0041] Figure 2 A schematic diagram of the hardware structure of an exemplary electronic device 200 provided in an embodiment of this disclosure is shown. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the methods described in any of the preceding embodiments.
[0042] like Figure 2 As shown, the electronic device 200 may include: a processor 202, a memory 204, a network module 206, a peripheral interface 208, and a bus 210. The processor 202, memory 204, network module 206, and peripheral interface 208 are interconnected within the electronic device 200 via the bus 210.
[0043] Processor 202 may be a central processing unit (CPU), image processor, neural network processor (NPU), microcontroller (MCU), programmable logic device, digital signal processor (DSP), application-specific integrated circuit (ASIC), or one or more integrated circuits. Processor 202 can be used to perform functions related to the techniques described in this disclosure. In some embodiments, processor 202 may also include multiple processors integrated as a single logic component. For example, such as... Figure 2 As shown, processor 202 may include multiple processors 202a, 202b and 202c.
[0044] Memory 204 can be configured to store data (e.g., instructions, computer code, etc.). Figure 2As shown, the data stored in memory 204 may include program instructions (e.g., program instructions for implementing a document access method according to embodiments of this disclosure) and data to be processed (e.g., the memory may store configuration files of other modules, etc.). Processor 202 may also access the program instructions and data stored in memory 204 and execute the program instructions to operate on the data to be processed. Memory 204 may include volatile or non-volatile storage devices. In some embodiments, memory 204 may include random access memory (RAM), read-only memory (ROM), optical disk, magnetic disk, hard disk, solid-state drive (SSD), flash memory, memory stick, etc.
[0045] Network module 206 can be configured to provide communication with other external devices to electronic device 200 via a network. This network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, Near Field Communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the specific examples described above. In some embodiments, network module 306 may include any combination of any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc.
[0046] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to enable information input and output. For example, peripheral devices may include input devices such as keyboards, mice, touchpads, touch screens, microphones, and various sensors, as well as output devices such as displays, speakers, vibrators, and indicator lights.
[0047] Bus 210 can be configured to transfer information between various components of electronic device 200 (e.g., processor 202, memory 204, network module 206, and peripheral interface 208), such as internal buses (e.g., processor-memory bus), external buses (USB port, PCI-E bus), etc.
[0048] It should be noted that although the architecture of the above-described electronic device 200 only shows the processor 202, memory 204, network module 206, peripheral interface 208, and bus 210, in specific implementations, the architecture of the electronic device 200 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the architecture of the above-described electronic device 200 may only include the components necessary for implementing the embodiments of this disclosure, and does not necessarily include all the components shown in the figures.
[0049] User A can upload the source document documentA to the cloud, and user A becomes the document owner of documentA. The document owner, userA, can set access permissions for visitors to the source document documentA. For example, access permissions can include read permissions or edit permissions. Read permissions mean that a user can access and read the content of the source document documentA, but cannot perform any operations on the source document documentA, such as editing or commenting. Edit permissions mean that a user can access and read the content of the source document documentA, and can also perform editing operations on the content of the source document documentA, such as modifying, adding, or removing content. It should be understood that the document owner, userA, can directly set access permissions for individual users, for example, directly setting the access permissions for a specific user to read or edit permissions; or they can set access permissions for a group of users in batches, for example, setting the access permissions for a group of users (such as a group, department, etc.) to read or edit permissions, then all collaborators within that group will have read or edit permissions.
[0050] See Figure 3 , Figure 3 A schematic diagram of a source document or host document according to an embodiment of this disclosure is shown. When Figure 3 When the source document is shown, documentA includes content blocks Block 301, Block 302, Block 303, Block 304, ..., where content blocks Block 302 and Block 303 are referenced by another host document, documentB. When the access permissions set by the host document, documentB, include permission to edit the source document, the edits to content blocks Block 302 and Block 303 in the source document, documentA, will be updated in the host document, documentB. Figure 3 When the host document is shown, the host document documentA includes content blocks Block301, Block302, Block303, Block304, ..., where content blocks Block302 and Block303 reference other source documents documentB. When the access permissions set in the source document documentB include permission to edit the host document, the edits to content blocks Block302 and Block303 in the host document documentA will be updated in the source document documentB.
[0051] Figure 4 A flowchart illustrating a document processing method according to an embodiment of this disclosure is shown. Figure 4 As shown, the document processing method includes:
[0052] Step S101: Determine the target content block in the target document, wherein the target content block has a reference relationship with the related content block in the associated document.
[0053] In this embodiment, after the author constructs the host document documentB, if it wants to reference the content of a source document documentA, it can use all or part of the content of the source document as the reference content, divide it into one or more reference blocks and reference it to the host document. In this way, the host document documentB and the source document documentA establish a reference relationship.
[0054] In the source document documentA, the content can be divided into multiple blocks. When the host document documentB references a content block, it can select one or more of these blocks as the referenced content.
[0055] In this embodiment, the user can perform mouse hover, click, or other operations on the location of the target content block Block 302 in the target document documentA. In response to this operation, the content block Block 302 can be highlighted (e.g., shown) and identified as the target content block.
[0056] In this embodiment, when the target document is the source document documentA and the associated document is the host document documentB, the associated content block (i.e., content block Block 302') references the target content block (i.e., content block Block 302) in the target document (i.e., the source document documentA). Alternatively, when the target document is the host document documentB and the associated document is the source document documentA, the target content block (i.e., content block Block 302') references the associated content block (i.e., content block Block 302) in the associated document (i.e., the source document documentA). This embodiment does not impose any restrictions on this.
[0057] To facilitate understanding of the technical solutions of this disclosure, the embodiments of this disclosure use the source document documentA as the target document, the host document documentB as the associated document, the content block Block302 in the source document documentA as the target content block, and the content formed after the content block Block302 references the host document documentB as the associated content block Block302', to illustrate the technical solutions of this disclosure.
[0058] Step S102: Obtain the first position range of the target content block in the target document.
[0059] In some embodiments, when creating the content included in the target content block in the target document, the location range of the target content block stored in the target document can be directly generated. For example, the horizontal or vertical coordinate range of the target content block in the target document (e.g., when text, images, etc. in the target document are stored and displayed vertically) can be recorded as the first location range of the target content block in the target document; or, the node position of the target content block in the target document can be recorded as the first location range of the target content block in the target document. This embodiment does not limit this.
[0060] Step S103: In response to receiving a boundary range adjustment operation for the target content block, obtain the second position range of the target content block in the target document after the boundary range adjustment.
[0061] In this embodiment, when the boundary range of the target content block is adjusted, such as increasing or decreasing the reference range of the target content block, a second position range of the target content block in the target document after the boundary range adjustment is obtained based on the first position range of the target content block before the boundary range adjustment and the boundary range adjustment situation. For example, when increasing the reference range of the target content block, the horizontal coordinate range or the vertical coordinate range of the target content block in the target document can be increased.
[0062] Step S104: Based on the second position range, display the target content block with adjusted boundary range in the target document.
[0063] Once the second position range of the target content block in the target document after boundary range adjustment is determined, the data within the reference range where the target content block is located can be rendered, thereby displaying the target content block after boundary range adjustment on the target document.
[0064] The document processing method described in this disclosure, when adjusting the boundary range of a target content block, determines the second position range of the target content block in the target document after boundary range adjustment based on its original first position range in the target document and the boundary range adjustment method. Thus, the target content block is displayed in the target document based on the second position range of the target content block in the target document, thereby realizing the adjustment and display of the boundary range of the target content block and improving the flexibility and scalability of document referencing.
[0065] In some embodiments, the target document further includes a reference identifier corresponding to the target content block; the method further includes: in response to receiving a trigger operation on the reference identifier, displaying a first window in the target document, the first window including user reference information referencing the target content block.
[0066] like Figure 5 As shown, the target document documentA includes content blocks Block 301, Block 302, Block 303, Block 304, ..., wherein target content blocks Block 302 and Block 303 are referenced by other documents. In some embodiments, a first reference identifier 305 is displayed in the associated area of the target content block Block 302, and a second reference identifier 306 is displayed in the associated area of the target content block Block 303. The first reference identifier 305 or the second reference identifier 306 can indicate that the corresponding target content block Block 302 or Block 303 is referenced. In some embodiments, when a user performs a trigger operation (e.g., mouse hover, click, etc.) on the target content block Block 302, in response to the trigger operation, a first window 400 can be displayed in the target document documentA, wherein the first window 400 includes user reference information 410, 420 that references the target content block Block 302.
[0067] In some embodiments, such as Figure 5 As shown, the user citation information 410 includes the citing user name 412, citation time 413, and link information 411 of the associated document. Through this user citation information, one can know the name of the citing user who referenced this target content block, the citation time of the target content block, and the link information of the associated document that referenced the target content block. Optionally, the link information of the associated document includes the title information of the associated document.
[0068] In some embodiments, the first window 400 includes at least one category label. After displaying the first window in the target document, the method further includes: in response to receiving a trigger operation on a target category label among the at least one category label, displaying a sub-window page corresponding to the target category label in the first window, the sub-window page displaying user reference information corresponding to the target category label.
[0069] In this embodiment, the category label includes at least one of the following: all user reference information, current user reference information, and other user reference information. For example... Figure 5As shown, all user citation information can be displayed as "All Citations" in the first window 400. When the "All Citations" category label is triggered, all user citation information will be displayed in the first window 400. Current user citation information can be displayed as "My Citations" in the first window 400. When the "My Citations" category label is triggered, the current user's citation information will be displayed in the first window 400. The current user citation information refers to the citation information of the user to whom the target document belongs. Other user citation information can be displayed as "Others Citations" in the first window 400. When the "Others Citations" category label is triggered, the citation information of other users will be displayed in the first window 400.
[0070] In some embodiments, the method further includes: determining whether the current user is the owner of the target content block; the owner is a user with management or editing permissions for the target content block. In response to the current user being the owner of the target content block, the boundary range of the target content block is adjusted based on a boundary range adjustment operation; in response to the current user not being the owner of the target content block, the boundary range adjustment of the target content block is rejected.
[0071] In this embodiment, before adjusting the boundary range of the target content block, it is necessary to determine whether the current user has management or editing permissions for the target content block. Only the user who owns the target content block can manage or edit it. If the current user is the owner of the target content block, the boundary range of the target content block can be adjusted based on the boundary range adjustment operation; otherwise, if the current user is not the owner of the target content block, the boundary range of the target content block cannot be adjusted.
[0072] In some embodiments, the first window 400 further includes a first control 414. When the boundary range of the target content block is adjusted, if the first control 414 is in a triggered state, the boundary range of the associated content block in the associated document is adjusted accordingly.
[0073] In this embodiment, a first control 414 can be set in the first window 400. The first control 414 is used to control whether the boundary range adjustment of the target content block is synchronized to the associated content block in the associated document. When the first control 414 is in the triggered state, the boundary range adjustment of the target content block will also be synchronized to the associated content block in the associated document, that is, the associated content block in the associated document will also be adjusted along with the boundary range adjustment of the target content block; when the first control 414 is not in the triggered state, the boundary range adjustment of the target content block will not be synchronized to the associated content block in the associated document, that is, the associated content block in the associated document will not be adjusted along with the boundary range adjustment of the target content block.
[0074] Optionally, it can also be configured such that when adjusting the boundary range of the target content block, even if the first control 414 is not in a triggered state, when the first control 414 is subsequently in a triggered state, the boundary range adjustment of the target content block before the first control 414 was triggered can be synchronized to the associated content block in the associated document. Alternatively, it can also be configured such that when adjusting the boundary range of the target content block, even if the first control 414 is not in a triggered state, when the first control 414 is subsequently in a triggered state, the boundary range adjustment of the target content block before the first control 414 was triggered will not be synchronized to the associated content block in the associated document. This embodiment does not impose any restrictions on this.
[0075] In some embodiments, such as Figure 5 As shown, the first control 414 is set in a one-to-one correspondence with each user reference information, that is, each user reference information is set with a first control 414. In this way, the user can individually control whether the adjustment of the boundary range of the target content block is synchronized to each different user reference information, increasing the flexibility of user settings. Alternatively, only one first control 414 can be set in the first window 400, and all user reference information in the first window 400 can be controlled through this first control 414. This embodiment does not limit this.
[0076] In some embodiments, when a trigger operation is received on the first control 414, the reference identifier remains in a highlighted state. That is, in this embodiment, if a trigger operation is performed on the first control 414, it indicates that the boundary range of the target content block where the first control 414 is located needs to be adjusted. At this time, the reference identifier is continuously set to a highlighted state, so that the user knows that the boundary range adjustment of the target content block will be synchronized to the associated documents.
[0077] In some embodiments, the target content block includes at least one sub-block, each sub-block including a row or a column in the target content block; the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block; the adjustment of the boundary range of the target content block includes: inserting or deleting sub-blocks in the target content block.
[0078] In this embodiment, the target content block includes an upper boundary sub-block and a lower boundary sub-block, with the upper boundary sub-block serving as the upper boundary (start) of the target content block and the lower boundary sub-block serving as the lower boundary (end) of the target content block. The target content block may also include zero (i.e., the upper boundary sub-block and the lower boundary sub-block are adjacent) or several (one or more) internal sub-blocks located between the upper boundary sub-block and the lower boundary sub-block, or there may be intermediate sub-blocks and / or blank lines between the upper boundary sub-block and the lower boundary sub-block, or the upper boundary sub-block and the lower boundary sub-block may be the same sub-block. This embodiment does not impose any restrictions on this.
[0079] In some embodiments, inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: using the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
[0080] In this embodiment, a non-adjacent sub-block is inserted before the upper boundary sub-block or after the lower boundary sub-block. That is, a sub-block is inserted at a position at least one line apart before the upper boundary sub-block or after the lower boundary sub-block. This method of inserting sub-blocks does not affect the first parent node of the target content block and the respective boundary ranges of the upper and lower boundary sub-blocks. Therefore, the boundary range of the target content block remains unchanged. The first position range of the target content block in the target document can be used as the second position range of the target content block in the target document after the boundary range adjustment.
[0081] In some embodiments, inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after adding the sub-block.
[0082] In this embodiment, when a sub-block is inserted between the upper boundary sub-block and the lower boundary sub-block, the boundary range of the upper boundary sub-block remains unchanged. Therefore, the boundary range of the upper boundary sub-block can be directly used as the boundary range of the upper boundary sub-block of the target content block after boundary range adjustment. Since a sub-block is inserted (taking one sub-block as an example), the lower boundary sub-block is adjusted down one row after boundary range adjustment. Therefore, the second position range can be determined based on the boundary position of the lower boundary sub-block after adding the sub-block.
[0083] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an unchangeable boundary; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after adding the sub-block.
[0084] In this embodiment, an adjacent sub-block is inserted before the upper boundary sub-block, meaning a sub-block is inserted directly at a position without a line break before the upper boundary sub-block. When the boundary is declared to be immutable, adding this sub-block will not affect the boundary of the target content block; therefore, the content of the upper and lower boundary sub-blocks remains unchanged. However, since the inserted sub-block is adjacent to the upper boundary sub-block, the boundary positions of the upper and lower boundary sub-blocks can be adjusted based on the number of inserted sub-blocks. Thus, the second position range can be determined based on the boundary positions of the upper and lower boundary sub-blocks after the addition of the sub-blocks.
[0085] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the inserted sub-block and the boundary position of the lower boundary sub-block after the insertion of the sub-block.
[0086] In this embodiment, an adjacent sub-block is inserted before the upper boundary sub-block, meaning a sub-block is directly inserted at a position without a line break before the upper boundary sub-block. When a changeable boundary is declared, adding this sub-block will affect the boundary of the target content block. Therefore, the inserted sub-block becomes the new upper boundary sub-block of the target content block, and the second position range can be determined based on the boundary position of this inserted sub-block. Meanwhile, the content of the lower boundary sub-block itself remains unchanged. However, since the inserted sub-block and the upper boundary sub-block are adjacent, the second position range can be determined based on the boundary position of the lower boundary sub-block after the insertion of the sub-block.
[0087] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an unchangeable boundary; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block.
[0088] In this embodiment, an adjacent sub-block is inserted after the lower boundary sub-block, that is, a sub-block is inserted directly at a position before the lower boundary sub-block without any line spacing. When the boundary is declared to be unchangeable, that is, adding this sub-block will not affect the boundary of the target content block, so the content of the upper boundary sub-block and the lower boundary sub-block themselves remains unchanged.
[0089] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the insertion of the sub-block.
[0090] In this embodiment, an adjacent sub-block is inserted after the lower boundary sub-block, that is, a sub-block is directly inserted at a position without a line gap before the lower boundary sub-block. When a changeable boundary is declared, that is, adding this sub-block will affect the boundary of the target content block, the upper boundary sub-block remains unchanged, and the inserted sub-block serves as the new lower boundary sub-block. The second position range can be determined based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the insertion of the sub-block.
[0091] In some embodiments, deleting a sub-block from the target content block includes: deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: using the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
[0092] In this embodiment, deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block does not affect the upper and lower boundary sub-blocks of the target content block. Therefore, the upper and lower boundary sub-blocks of the target content block remain unchanged.
[0093] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after deleting the sub-block.
[0094] In this embodiment, a sub-block is deleted before the upper boundary sub-block or between the lower boundary sub-block. This method of deleting sub-blocks does not affect the upper and lower boundary sub-blocks of the target content block. Since the deleted sub-block is after the upper boundary, the boundary position of the upper boundary sub-block remains unchanged. However, since the sub-block before the lower boundary sub-block is deleted, the boundary position of the lower boundary sub-block changes. Therefore, the second position range can be determined based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the deletion of the sub-block.
[0095] In some embodiments, deleting a sub-block in the target content block includes: deleting the upper boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the internal sub-block adjacent to the upper boundary sub-block and the boundary position of the lower boundary sub-block; or, determining the second position range based on the boundary position of the lower boundary sub-block; or, the target content block is empty.
[0096] In this embodiment, when the target content block includes an upper boundary sub-block, a lower boundary sub-block, and at least one internal sub-block located between the upper boundary sub-block and the lower boundary sub-block, after deleting the upper boundary sub-block, the internal sub-block immediately adjacent to the upper boundary sub-block can be identified as the new upper boundary sub-block. At this time, the adjacent internal sub-block is the boundary range of the new upper boundary sub-block. When the target content block only includes an upper boundary sub-block and a lower boundary sub-block, after deleting the upper boundary sub-block, the lower boundary sub-block can be identified as the new upper boundary sub-block. That is, the boundary range of the lower boundary sub-block is also the boundary range of the new upper boundary sub-block. When the upper boundary sub-block and the lower boundary sub-block of the target content block are the same sub-block, after deleting the upper boundary sub-block, the target content block is empty, that is, the target content block has been deleted.
[0097] In some embodiments, deleting a sub-block in the target content block includes: deleting the lower boundary sub-block; obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the internal sub-block adjacent to the lower boundary sub-block; or, determining the second position range based on the boundary position of the upper boundary sub-block; or, the target content block is empty.
[0098] In this embodiment, when the target content block includes an upper boundary sub-block, a lower boundary sub-block, and at least one internal sub-block located between the upper boundary sub-block and the lower boundary sub-block, after deleting the lower boundary sub-block, the internal sub-block immediately adjacent to the lower boundary sub-block can be identified as the new lower boundary sub-block. At this time, the boundary range of the adjacent internal sub-block is the boundary range of the new lower boundary sub-block. When the target content block only includes an upper boundary sub-block and a lower boundary sub-block, after deleting the lower boundary sub-block, the upper boundary sub-block can be identified as the new upper boundary sub-block. That is, the boundary range of the upper boundary sub-block is also the boundary range of the new lower boundary sub-block after the boundary range is adjusted. When the upper boundary sub-block and the lower boundary sub-block of the target content block are the same sub-block, after deleting the lower boundary sub-block, the target content block is empty, that is, the target content block has been deleted.
[0099] In some embodiments, such as Figure 6 As shown, step S103, obtaining the first position range of the target content block in the target document, includes:
[0100] Step S201: Obtain the first parent node of the target content block in the target document.
[0101] In this embodiment, the content of the target document can be stored in a document tree format, with each content block serving as a node in the document tree. For example, multiple content blocks arranged side-by-side can be edited into the document tree as sibling nodes; if a content block includes child content blocks, then the child content blocks are treated as child nodes of that content block; the order of the content blocks can be set to the traversal order when traversing the document tree of the target document, with nodes traversed earlier appearing before nodes traversed later, and nodes traversed later appearing after nodes traversed earlier.
[0102] In this way, the first parent node parent_id of the target content block in the target document can be obtained based on the document tree structure of the target document.
[0103] Step S203: Obtain the coordinates of the first child node of the target content block under the first parent node.
[0104] In this embodiment, coordinates can be used to mark the position of the boundary of the target content block, such as the coordinates of the first child node (start, end). The coordinates of the first child node are the coordinates under the first parent node.
[0105] Step S205: Determine the first location range based on the coordinates of the first parent node and the first child node.
[0106] In this embodiment, the first position range of the target content block in the target document can be determined based on the first parent node parent_id and the coordinates (start, end) of the first child node.
[0107] In some embodiments, the target content block includes at least one sub-block. When the text, images, and other content in the target document are displayed horizontally, each sub-block includes a row of the target content block; when the text, images, and other content in the target document are displayed vertically, each sub-block includes a column of the target content block. This embodiment uses a row of the target content block as an example to illustrate the technical solution described in this disclosure.
[0108] The boundary of the target content block is the sub-block located at the edge of the target content block.
[0109] In some embodiments, adjusting the boundary of the target content block includes inserting or deleting sub-blocks within the target content block. For example... Figure 7 As shown, in step S105, obtaining the second position range of the target content block in the target document after boundary range adjustment includes:
[0110] Step S301: An instruction to insert or delete sub-blocks on the target content block is detected, and the new boundary of the target content block is determined.
[0111] In this embodiment, the target document needs to be monitored. During monitoring, when a change to the target document is detected—that is, when operations such as inserting or deleting sub-blocks are performed on the target content block—the system can detect the insertion or deletion instructions. At this point, the system monitors the change process of the target content block and directly adjusts the local target document based on this change. Specifically, the boundary of the target content block after the insertion or deletion of sub-blocks can be used as the new boundary. It should be noted that in this embodiment, the new boundary can be the same as or different from the boundary of the target content block before the insertion or deletion; this embodiment does not impose any restrictions on this.
[0112] When inserting or deleting sub-blocks is performed on the target content block, the boundary of the target content block may change, thus generating a new boundary. For example, inserting a sub-block outside the boundary or deleting a sub-block belonging to a certain boundary will cause the boundary of the target content block to change, thus generating a new boundary; or, even if the content of the boundary remains unchanged, the coordinates of the first child node of the boundary may change.
[0113] Step S303: Based on the position of the new boundary of the target content block within the target content block, determine the coordinates of the second child node of the new boundary of the target content block under the first parent node.
[0114] Step S305: Determine the second location range based on the coordinates of the first parent node and the second child node.
[0115] In this embodiment, after inserting or deleting a sub-block on the target content block, the coordinates of the second child node under the first parent node are determined based on the position of the new boundary of the target content block in the target content block. Finally, the second position range can be determined based on the coordinates of the first parent node and the second child node.
[0116] In some embodiments, the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block, with the upper boundary sub-block serving as the upper boundary (start) of the target content block and the lower boundary sub-block serving as the lower boundary (end) of the target content block. The sub-blocks of the target content block may also include zero (i.e., the upper boundary sub-block and the lower boundary sub-block are adjacent) or several (one or more) internal sub-blocks located between the upper boundary sub-block and the lower boundary sub-block, or there may be intermediate sub-blocks and / or blank lines between the upper boundary sub-block and the lower boundary sub-block, or the upper boundary sub-block and the lower boundary sub-block may be the same sub-block; this embodiment does not impose any limitations on this.
[0117] like Figure 8a As shown, the target content block may include an upper boundary sub-block, a lower boundary sub-block, and one or more internal sub-blocks positioned between the upper boundary sub-block and the lower boundary sub-block; for example... Figure 8b As shown, the target content block can include an upper boundary sub-block, a lower boundary sub-block, and internal sub-blocks set between the upper and lower boundary sub-blocks. It can also include elements such as spaces; for example... Figure 8c As shown, the target content block can include only the upper and lower boundary sub-blocks, without any internal sub-blocks; for example... Figure 8d As shown, the target content block may consist of only one sub-block, which is both the upper boundary sub-block and the lower boundary sub-block. Furthermore, the target content block can also have other structures; this embodiment does not impose any restrictions on this.
[0118] In some embodiments, inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the second child node coordinates of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, includes: keeping the upper boundary sub-block and the lower boundary sub-block unchanged, and using the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block as the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment, respectively.
[0119] In this embodiment, a non-adjacent sub-block is inserted before the upper boundary sub-block or after the lower boundary sub-block. That is, a sub-block is inserted at a position at least one row apart before the upper boundary sub-block or after the lower boundary sub-block. This method of inserting sub-blocks does not affect the coordinates of the first parent node of the target content block and the first child node of each of the upper and lower boundary sub-blocks. Therefore, the first parent node of the target content block remains unchanged, and the coordinates of the first child node of each of the upper and lower boundary sub-blocks remain unchanged. The coordinates of the first child node of each of the upper and lower boundary sub-blocks can be directly used as the coordinates of the second child node of each of the upper and lower boundary sub-blocks after the boundary range adjustment.
[0120] In some embodiments, inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the second child node coordinates of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: keeping the upper boundary sub-block and the lower boundary sub-block unchanged, using the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, and adding the first child node coordinates of the lower boundary sub-block based on the inserted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
[0121] In this embodiment, when a sub-block is inserted between the upper and lower boundary sub-blocks, the parent node of this sub-block is the same as that of both the upper and lower boundary sub-blocks. The content and coordinates of the upper boundary sub-block remain unchanged. The coordinates of the first child node of the upper boundary sub-block can be directly used as the coordinates of the second child node of the upper boundary sub-block of the target content block after the boundary range adjustment. Since a sub-block has been inserted (taking one sub-block as an example), the lower boundary sub-block is adjusted down one row after the boundary range adjustment. Therefore, the coordinates of the lower boundary sub-block increase (i.e., end+1), thereby determining the coordinates of the second child node of the lower boundary sub-block.
[0122] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an immutable boundary; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the second child node coordinates of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, includes: keeping the upper boundary sub-block unchanged, and adding the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block respectively based on the inserted sub-block to generate the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment.
[0123] In this embodiment, an adjacent sub-block is inserted before the upper boundary sub-block, meaning a sub-block is inserted directly before the upper boundary sub-block without any line breaks. When the boundary is declared to be immutable, adding this sub-block will not affect the boundary of the target content block, so the content of the upper and lower boundary sub-blocks themselves remains unchanged. However, since the inserted sub-block is adjacent to the upper boundary sub-block, that is, a node adjacent to the node containing the upper boundary sub-block is inserted in the document tree (taking the insertion of a single node as an example), the positions of the upper and lower boundary sub-blocks under their respective parent nodes change. For example, the upper boundary sub-block was originally the first child node under its parent node, but because another child node was inserted before it, the child node to which the upper boundary sub-block belongs becomes the second child node under its parent node. Therefore, the coordinates of the first child node of the upper and lower boundary sub-blocks can be increased by (start+1, end+1) based on the number of inserted sub-blocks, and the increased first child node coordinates are used as the second child node coordinates of the upper and lower boundary sub-blocks.
[0124] In some embodiments, inserting a sub-block into the target content block includes: in response to inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the second child node coordinates of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: taking the inserted sub-block as the new upper boundary sub-block of the target content block, determining the second child node coordinates of the new upper boundary sub-block based on the position of the inserted sub-block in the target content block, and adding the first child node coordinates of the lower boundary sub-block based on the inserted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
[0125] In this embodiment, an adjacent sub-block is inserted before the upper boundary sub-block, meaning a sub-block is inserted directly at a position without a line break before the upper boundary sub-block. When a changeable boundary is declared, adding this sub-block will affect the boundary of the target content block. Therefore, the inserted sub-block becomes the new upper boundary sub-block of the target content block, and the coordinates of the first child node of the original upper boundary sub-block become the coordinates of the second child node of the new upper boundary sub-block. Meanwhile, the content of the lower boundary sub-block itself remains unchanged. However, since the inserted sub-block is adjacent to the upper boundary sub-block (i.e., inserting a node adjacent to the node containing the upper boundary sub-block in the document tree, taking the insertion of a single node as an example), the position of the lower boundary sub-block under its parent node changes. For example, if the lower boundary sub-block was originally the third child node under its parent node, the insertion of another child node before it makes the lower boundary sub-block the fourth child node under its parent node. Therefore, the coordinates of the first child node of the lower boundary sub-block (end+1) can be increased based on the number of inserted sub-blocks, and the increased first child node coordinates are used as the coordinates of the second child node of the lower boundary sub-block.
[0126] In some embodiments, inserting a sub-block into the target content block includes: in response to inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an immutable boundary; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the second child node coordinates of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: using the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block as the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment, respectively.
[0127] In this embodiment, an adjacent sub-block is inserted after the lower boundary sub-block, that is, a sub-block is directly inserted at a position without a line gap before the lower boundary sub-block. When the boundary is declared to be unchangeable, that is, adding this sub-block will not affect the boundary of the target content block. Therefore, the content of the upper boundary sub-block and the lower boundary sub-block themselves remains unchanged, and the coordinates of the upper boundary sub-block and the lower boundary sub-block also remain unchanged. Therefore, the coordinates of the first child node of the upper boundary sub-block and the lower boundary sub-block can be directly used as the coordinates of the second child node of the upper boundary sub-block and the lower boundary sub-block after the boundary range is adjusted.
[0128] In some embodiments, inserting a sub-block into the target content block includes: in response to inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary; after performing the sub-block insertion operation on the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: using the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, using the inserted sub-block as the new lower boundary sub-block of the target content block, and determining the second child node coordinates of the new lower boundary sub-block based on the position of the inserted sub-block in the target content block.
[0129] In this embodiment, an adjacent sub-block is inserted after the lower boundary sub-block, that is, a sub-block is directly inserted at a position without a line gap before the lower boundary sub-block. When a changeable boundary is declared, that is, adding this sub-block will affect the boundary of the target content block, the upper boundary sub-block remains unchanged, and the inserted sub-block is used as the new lower boundary sub-block. Taking the insertion of a sub-block as an example, the coordinates of the new lower boundary sub-block are the coordinates of the original lower boundary sub-block + 1 (end + 1), thereby determining the coordinates of the second child node of the lower boundary sub-block after the boundary range is adjusted.
[0130] In some embodiments, deleting a sub-block in the target content block includes: deleting the sub-block before the upper boundary sub-block or after the lower boundary sub-block; after inserting a sub-block into the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, includes: the upper boundary sub-block and the lower boundary sub-block remain unchanged, and calculating the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment based on the deleted sub-block and the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block, respectively.
[0131] In this embodiment, deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block does not affect the upper and lower boundary sub-blocks of the target content block; therefore, the upper and lower boundary sub-blocks of the target content block remain unchanged. When deleting a sub-block after the lower boundary sub-block, the coordinates of the first child nodes of both the upper and lower boundary sub-blocks remain unchanged, and the coordinates of the first child nodes of the upper and lower boundary sub-blocks are directly used as the coordinates of the second child nodes of the adjusted upper and lower boundary sub-blocks. When deleting a child block before the upper boundary child block, if the deleted child block is not under the first parent node, the coordinates of the first child nodes of the upper and lower boundary child blocks remain unchanged, and the coordinates of the first child nodes of the upper and lower boundary child blocks are directly used as the coordinates of the second child nodes of the upper and lower boundary child blocks after the boundary range is adjusted; if the deleted child block is under the first parent node (taking the deletion of one child block as an example), the coordinates of the first child nodes of the upper and lower boundary child blocks are reduced by (start-1, end-1) and then used as the coordinates of the second child nodes of the upper and lower boundary child blocks.
[0132] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block; after inserting a sub-block into the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: keeping the upper boundary sub-block and the lower boundary sub-block unchanged, using the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, and reducing the first child node coordinates of the lower boundary sub-block based on the deleted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
[0133] In this embodiment, a sub-block is deleted before the upper boundary sub-block or between the lower boundary sub-block. This method of deleting sub-blocks does not affect the upper and lower boundary sub-blocks of the target content block. Since the deleted sub-block is after the upper boundary, the coordinates of the first child node of the upper boundary sub-block remain unchanged. Therefore, the coordinates of the first child node of the upper boundary sub-block can be used as the coordinates of the second child node of the upper boundary sub-block after the boundary range is adjusted. Since the sub-block before the lower boundary sub-block is deleted (taking the deletion of one sub-block as an example), the coordinates of the first child node of the lower boundary sub-block are reduced by (end-1), thereby obtaining the coordinates of the second child node of the lower boundary sub-block after the boundary range is adjusted.
[0134] In some embodiments, deleting a sub-block in the target content block includes: deleting the upper boundary sub-block; after inserting a sub-block into the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: identifying the internal sub-block or lower boundary sub-block adjacent to the upper boundary sub-block as the new upper boundary sub-block, and using the coordinates of the first child node of the internal sub-block or lower boundary sub-block adjacent to the upper boundary sub-block as the coordinates of the second child node of the new upper boundary sub-block after boundary range adjustment; or the target content block is empty.
[0135] In this embodiment, when the target content block includes an upper boundary sub-block, a lower boundary sub-block, and at least one internal sub-block located between the upper boundary sub-block and the lower boundary sub-block, after deleting the upper boundary sub-block, the internal sub-block immediately adjacent to the upper boundary sub-block can be identified as the new upper boundary sub-block. At this time, the coordinates of the second child node of the new upper boundary sub-block are the coordinates of the first child node of the original upper boundary sub-block. When the target content block only includes an upper boundary sub-block and a lower boundary sub-block, after deleting the upper boundary sub-block, the lower boundary sub-block can be identified as the new upper boundary sub-block. At this time, the coordinates of the second child node of the new upper boundary sub-block and the lower boundary sub-block are both the coordinates of the first child node of the original upper boundary sub-block. When the upper boundary sub-block and the lower boundary sub-block of the target content block are the same sub-block, after deleting the upper boundary sub-block, the target content block is empty, that is, the target content block has been deleted.
[0136] In some embodiments, deleting a sub-block in the target content block includes: deleting the lower boundary sub-block; after inserting a sub-block into the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, including: identifying the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the new lower boundary sub-block, and using the coordinates of the first child node of the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the coordinates of the second child node of the new lower boundary sub-block after boundary range adjustment; or the target content block is empty.
[0137] In this embodiment, when the target content block includes an upper boundary sub-block, a lower boundary sub-block, and at least one internal sub-block located between the upper and lower boundary sub-blocks, deleting the lower boundary sub-block allows the internal sub-block immediately adjacent to the lower boundary sub-block to be identified as the new lower boundary sub-block. In this case, the coordinates of the second child node of the new lower boundary sub-block are the coordinates of the first child node of the adjacent internal sub-block. When the target content block only includes an upper boundary sub-block and a lower boundary sub-block, deleting the lower boundary sub-block allows the upper boundary sub-block to be identified as the new upper boundary sub-block. That is, the target content block only includes one sub-block. In this case, the coordinates of the first child node of the upper boundary sub-block are simultaneously the coordinates of the second child node of both the upper boundary sub-block after boundary range adjustment and the new lower boundary sub-block. When the upper boundary sub-block and the lower boundary sub-block of the target content block are the same sub-block, deleting the lower boundary sub-block results in an empty target content block, meaning the target content block has been deleted.
[0138] In other embodiments, such as Figure 9 As shown, step S105, which involves obtaining the second position range of the target content block in the target document after boundary range adjustment, further includes:
[0139] Step S401: Obtain the second parent node of the target content block in the target document after the boundary range adjustment.
[0140] Step S403: Obtain the first child block of the target content block under the second parent node after the boundary range adjustment as the new upper boundary child block, and obtain the coordinates of the third child node of the new upper boundary child block.
[0141] Step S405: Obtain the last child block of the target content block under the second parent node after the boundary range adjustment as the new lower boundary child block, and obtain the coordinates of the third child node of the new lower boundary child block.
[0142] Step S407: Determine the second position range based on the coordinates of the third child nodes of the second parent node, the new upper boundary child block, and the new lower boundary child block.
[0143] In this embodiment, when it is impossible to monitor changes to the target document in real time, or when the target content block after boundary range adjustment is empty during real-time monitoring of the target document, it is impossible to adjust the target document displayed on the front-end page based on real-time monitoring of changes to the target document. In this case, the reference range of the target content block after boundary range adjustment is stored in the back-end database, and then the latest reference range is pushed to the target document on the front-end page through the target content block's mailbox, so that the target document displays the target content block after boundary range adjustment.
[0144] In some embodiments, after obtaining the second position range of the target content block in the target document after boundary range adjustment in step S105, the method further includes: sending the second position range to the associated document so that the associated document redisplays the associated content block in the associated document based on the second position range.
[0145] In this embodiment, after adjusting the boundary range of the target content block in the target document, the second position range is sent to the associated document, thereby rendering the display content of the associated document so that the corresponding document block in the associated document is the same as the target content block in the target document after the boundary range is adjusted.
[0146] Optionally, in this embodiment, update permissions can be set in the associated document to restrict whether the updated content in the target content block in the target document is updated to the associated document. When the update is allowed, the display content of the associated document is rendered based on the second position range; otherwise, the display content of the associated document is not changed.
[0147] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0148] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0149] Based on the same inventive concept, corresponding to any of the methods in the above embodiments, this disclosure also provides a document processing apparatus. For example... Figure 10 As shown, the device includes:
[0150] The determination module 11 is configured to: determine a target content block in the target document, wherein the target content block has a reference relationship with an associated content block in the associated document;
[0151] The first acquisition module 13 is configured to: acquire the first position range of the target content block in the target document;
[0152] The second acquisition module 15 is configured to: in response to the boundary range adjustment of the target content block, acquire the second position range of the target content block in the target document after the boundary range adjustment;
[0153] Display module 17 is configured to display the target content block with adjusted boundary range in the target document based on the second position range.
[0154] In some embodiments, the target document further includes a reference identifier corresponding to the target content block; the apparatus is further configured to: in response to receiving a trigger operation on the reference identifier, display a first window in the target document, the first window including user reference information referencing the target content block.
[0155] In some embodiments, the user citation information includes the citing user name, citation time, and links to associated documents.
[0156] In some embodiments, the first window includes at least one category label; after the first window is displayed in the target document, the apparatus is further configured to: in response to receiving a trigger operation on a target category label among the at least one category label, display a sub-window page corresponding to the target category label in the first window, the sub-window page displaying user reference information corresponding to the target category label; wherein, the category label includes at least one of all user reference information, current user reference information, and other user reference information; the current user reference information is the reference information of the user to whom the target document belongs.
[0157] In some embodiments, the apparatus is further configured to: determine whether the current user is the owner of the target content block; the owner is a user with management or editing permissions for the target content block; in response to the current user being the owner of the target content block, adjust the boundary range of the target content block based on a boundary range adjustment operation; and in response to the current user not being the owner of the target content block, refuse to adjust the boundary range of the target content block.
[0158] In some embodiments, the first window further includes a first control; the device is further configured to: when the boundary range of the target content block is adjusted, if the first control is in a triggered state, adjust the boundary range of the associated content block in the associated document accordingly.
[0159] In some embodiments, the first control is set to correspond one-to-one with the user reference information.
[0160] In some embodiments, the apparatus is further configured to: in response to receiving a trigger operation on the first control, the reference identifier remains in a highlighted state.
[0161] In some embodiments, the target content block includes at least one sub-block, each sub-block including a row or a column in the target content block; the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block;
[0162] The second acquisition module 15 is further configured to insert or delete sub-blocks in the target content block.
[0163] In some embodiments, inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block;
[0164] The second acquisition module 15 is further configured to: use the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
[0165] In some embodiments, inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block;
[0166] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after adding the sub-block.
[0167] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an unchangeable boundary;
[0168] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the addition of the sub-block.
[0169] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary;
[0170] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the inserted sub-block and the boundary position of the lower boundary sub-block after the insertion of the sub-block.
[0171] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an immutable boundary;
[0172] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block.
[0173] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary;
[0174] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the sub-block is inserted.
[0175] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block;
[0176] The second acquisition module 15 is further configured to: use the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
[0177] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block;
[0178] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after deleting the sub-block.
[0179] In some embodiments, deleting a sub-block in the target content block includes: deleting the upper boundary sub-block;
[0180] The second acquisition module 15 is further configured to: determine the second position range based on the boundary position of the internal sub-block adjacent to the upper boundary sub-block and the boundary position of the lower boundary sub-block; or, determine the second position range based on the boundary position of the lower boundary sub-block; or, the target content block is empty.
[0181] In some embodiments, deleting a sub-block in the target content block includes: deleting the lower boundary sub-block;
[0182] The second acquisition module 15 is further configured to: determine the second location range based on the boundary position of the upper boundary sub-block and the boundary position of the internal sub-block adjacent to the lower boundary sub-block; or, determine the second location range based on the boundary position of the upper boundary sub-block; or, the target content block is empty.
[0183] In some embodiments, the first acquisition module 13 is further configured to: acquire the first parent node of the target content block in the target document; acquire the coordinates of the first child node of the boundary of the target content block under the first parent node; and determine the first location range based on the coordinates of the first parent node and the first child node.
[0184] In some embodiments, the target content block includes at least one sub-block, each sub-block including a row or a column in the target content block; the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block;
[0185] The second acquisition module 15 is further configured to: insert or delete sub-blocks in the target content block;
[0186] The second acquisition module 15 is further configured to: detect an instruction to insert or delete a sub-block on the target content block, and determine the new boundary of the target content block; based on the position of the new boundary of the target content block in the target content block, determine the coordinates of the second child node of the new boundary of the target content block under the first parent node; and determine the second position range based on the coordinates of the first parent node and the second child node.
[0187] In some embodiments, inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block;
[0188] The second acquisition module 15 is further configured to: keep the upper boundary sub-block and the lower boundary sub-block unchanged, and use the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block as the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after the boundary range adjustment.
[0189] In some embodiments, inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block;
[0190] The second acquisition module 15 is further configured to: keep the upper boundary sub-block and the lower boundary sub-block unchanged, use the first child node coordinate of the upper boundary sub-block as the second child node coordinate of the upper boundary sub-block after boundary range adjustment, and add the first child node coordinate of the lower boundary sub-block based on the inserted sub-block to generate the second child node coordinate of the lower boundary sub-block after boundary range adjustment.
[0191] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an unchangeable boundary;
[0192] The second acquisition module 15 is further configured to: keep the upper boundary sub-block unchanged, and add the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block respectively based on the inserted sub-block, so as to generate the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after the boundary range is adjusted.
[0193] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary;
[0194] The second acquisition module 15 is further configured to: take the inserted sub-block as the new upper boundary sub-block of the target content block, determine the second child node coordinates of the new upper boundary sub-block based on the position of the inserted sub-block in the target content block, and add the first child node coordinates of the lower boundary sub-block based on the inserted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
[0195] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an immutable boundary;
[0196] The second acquisition module 15 is further configured to: use the coordinates of the first child nodes of the upper boundary sub-block and the lower boundary sub-block as the coordinates of the second child nodes of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment.
[0197] In some embodiments, inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary;
[0198] The second acquisition module 15 is further configured to: use the coordinates of the first child node of the upper boundary sub-block as the coordinates of the second child node of the upper boundary sub-block after boundary range adjustment, use the inserted sub-block as the new lower boundary sub-block of the target content block, and determine the coordinates of the second child node of the new lower boundary sub-block based on the position of the inserted sub-block in the target content block.
[0199] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block;
[0200] The second acquisition module 15 is further configured to: keep the upper boundary sub-block and the lower boundary sub-block unchanged, and calculate the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment based on the deleted sub-block and the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block respectively.
[0201] In some embodiments, deleting a sub-block in the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block;
[0202] The second acquisition module 15 is further configured to: keep the upper boundary sub-block and the lower boundary sub-block unchanged, use the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, and reduce the first child node coordinates of the lower boundary sub-block based on the deleted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
[0203] In some embodiments, deleting a sub-block in the target content block includes: deleting the upper boundary sub-block;
[0204] The second acquisition module 15 is further configured to: identify the internal sub-block or lower boundary sub-block adjacent to the upper boundary sub-block as the new upper boundary sub-block, and calculate the second sub-node coordinates of the new upper boundary sub-block after boundary range adjustment based on the first sub-node coordinates of the internal sub-block or lower boundary sub-block adjacent to the upper boundary sub-block; or the target content block is empty.
[0205] In some embodiments, deleting a sub-block in the target content block includes: deleting the lower boundary sub-block;
[0206] The second acquisition module 15 is further configured to: identify the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the new lower boundary sub-block, and use the coordinates of the first child node of the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the coordinates of the second child node of the new lower boundary sub-block after boundary range adjustment; or the target content block is empty.
[0207] In some embodiments, the second acquisition module 15 is further configured to: acquire the second parent node of the target content block after boundary range adjustment in the target document; acquire the first child block of the target content block after boundary range adjustment under the second parent node as the new upper boundary child block, and acquire the coordinates of the third child node of the new upper boundary child block; acquire the last child block of the target content block after boundary range adjustment under the second parent node as the new lower boundary child block, and acquire the coordinates of the third child node of the new lower boundary child block; and determine the second position range based on the second parent node and the coordinates of the third child node of the new upper boundary child block and the new lower boundary child block.
[0208] In some embodiments, the target content block has a reference relationship with a related content block in an associated document, including:
[0209] The associated content block references the target content block in the target document; or...
[0210] The target content block references the associated content block in the associated document.
[0211] In some embodiments, after obtaining the second position range of the target content block in the target document after boundary range adjustment, the method further includes: sending the second position range to the associated document so that the associated document redisplays the associated content block in the associated document based on the second position range.
[0212] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0213] The apparatus of the above embodiments is used to implement the corresponding service orchestration method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0214] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to perform the methods described in any of the above embodiments.
[0215] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0216] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to perform the methods described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0217] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors to cause the processors to perform the method. Corresponding to the execution entity for each step in each embodiment of the method, the processor performing the corresponding step may belong to the corresponding execution entity.
[0218] The computer program products of the above embodiments are used to cause a processor to execute the methods described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0219] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0220] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0221] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0222] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A document processing method, characterized in that, include: In the target document, a target content block is identified, and the target content block has a reference relationship with a related content block in the associated document; Obtain the first position range of the target content block in the target document; In response to receiving a boundary range adjustment operation for the target content block, the second position range of the target content block in the target document after the boundary range adjustment is obtained, and the second position range is sent to the associated document so that the associated document redisplays the associated content block in the associated document based on the second position range; Based on the second location range, the target content block with adjusted boundary range is displayed in the target document.
2. The method according to claim 1, characterized in that, The target document also includes a reference identifier corresponding to the target content block; the method further includes: In response to receiving a trigger operation on the reference identifier, a first window is displayed in the target document, the first window including user reference information that references the target content block.
3. The method according to claim 2, characterized in that, The user citation information includes the citing user's name, citation time, and links to related documents.
4. The method according to claim 2, characterized in that, The first window includes at least one category label; after displaying the first window in the target document, the method further includes: In response to receiving a trigger operation on a target category label in at least one category label, a sub-window page corresponding to the target category label is displayed in the first window, and the sub-window page displays user reference information corresponding to the target category label; The category labels include at least one of all user citation information, current user citation information, and other user citation information; the current user citation information is the citation information of the user to whom the target document belongs.
5. The method according to claim 1, characterized in that, Also includes: Determine whether the current user is the user who owns the target content block; The user to which the content belongs is a user who has management or editing permissions for the target content block; In response to the fact that the current user is the user to which the target content block belongs, the boundary range of the target content block is adjusted based on the boundary range adjustment operation of the target content block; If the current user is not the owner of the target content block, the boundary adjustment of the target content block is refused.
6. The method according to claim 2, characterized in that, The first window also includes a first control; the method further includes: When the boundary range of the target content block is adjusted, if the first control is in a triggered state, the boundary range of the associated content block in the associated document is adjusted accordingly.
7. The method according to claim 6, characterized in that, The first control is set to correspond one-to-one with the user reference information.
8. The method according to claim 6, characterized in that, Also includes: In response to receiving a trigger operation on the first control, the reference identifier remains in a highlighted state.
9. The method according to claim 1, characterized in that, The target content block includes at least one sub-block, and each sub-block includes a row or a column in the target content block; the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block; The adjustment of the boundary range of the target content block includes: inserting or deleting sub-blocks within the target content block.
10. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: using the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
11. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block; The process of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after adding sub-blocks.
12. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an immutable boundary; The process of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after adding sub-blocks.
13. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the inserted sub-block and the boundary position of the lower boundary sub-block after the insertion of the sub-block.
14. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an immutable boundary; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block.
15. The method according to claim 9, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after the sub-block is inserted.
16. The method according to claim 9, characterized in that, Deleting a sub-block from the target content block includes: deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: using the first position range of the target content block in the target document as the second position range of the target content block in the target document after boundary range adjustment.
17. The method according to claim 9, characterized in that, Deleting a sub-block from the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the lower boundary sub-block after deleting the sub-block.
18. The method according to claim 9, characterized in that, Deleting a sub-block from the target content block includes: deleting the upper boundary sub-block; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the internal sub-block adjacent to the upper boundary sub-block and the boundary position of the lower boundary sub-block; or, determining the second position range based on the boundary position of the lower boundary sub-block; or, the target content block is empty.
19. The method according to claim 9, characterized in that, Deleting a sub-block from the target content block includes: deleting the lower boundary sub-block; The step of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: determining the second position range based on the boundary position of the upper boundary sub-block and the boundary position of the internal sub-block adjacent to the lower boundary sub-block; or, determining the second position range based on the boundary position of the upper boundary sub-block; or, the target content block is empty.
20. The method according to claim 1, characterized in that, The step of obtaining the first position range of the target content block in the target document includes: Obtain the first parent node of the target content block in the target document; Obtain the coordinates of the first child node under the first parent node of the boundary of the target content block; The first location range is determined based on the coordinates of the first parent node and the first child node.
21. The method according to claim 20, characterized in that, The target content block includes at least one sub-block, and each sub-block includes a row or a column in the target content block; the sub-blocks of the target content block include an upper boundary sub-block and a lower boundary sub-block; The adjustment of the boundary range of the target content block includes: inserting or deleting sub-blocks within the target content block; The process of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: Upon detecting an instruction to insert or delete a sub-block within the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block within the target content block, determine the coordinates of the second child node of the new boundary of the target content block under the first parent node; The second location range is determined based on the coordinates of the first parent node and the second child node.
22. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting a non-adjacent sub-block before the upper boundary sub-block or after the lower boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined, including: the upper boundary sub-block and the lower boundary sub-block remain unchanged, and the coordinates of the first child nodes of the upper boundary sub-block and the lower boundary sub-block are respectively used as the coordinates of the second child nodes of the upper boundary sub-block and the lower boundary sub-block after the boundary range is adjusted.
23. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting a sub-block between the upper boundary sub-block and the lower boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined. This includes: keeping the upper boundary sub-block and the lower boundary sub-block unchanged, using the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, and adding the first child node coordinates of the lower boundary sub-block based on the inserted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
24. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as an immutable boundary; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined. This includes: keeping the upper boundary sub-block unchanged, and adding the coordinates of the first child node of each of the upper boundary sub-block and the lower boundary sub-block based on the inserted sub-block, so as to generate the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after the boundary range is adjusted.
25. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block before the upper boundary sub-block and declaring it as a changeable boundary; After inserting a sub-block into the target content block, determining the new boundary of the target content block, and determining the coordinates of the second child node of the new boundary of the target content block under the first parent node based on the position of the new boundary of the target content block in the target content block, includes: taking the inserted sub-block as the new upper boundary sub-block of the target content block, determining the coordinates of the second child node of the new upper boundary sub-block based on the position of the inserted sub-block in the target content block, and adding the coordinates of the first child node of the lower boundary sub-block based on the inserted sub-block to generate the coordinates of the second child node of the lower boundary sub-block after boundary range adjustment.
26. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as an immutable boundary; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined, including: using the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block as the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment, respectively.
27. The method according to claim 21, characterized in that, Inserting a sub-block into the target content block includes: inserting an adjacent sub-block after the lower boundary sub-block and declaring it as a changeable boundary; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined, including: taking the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, taking the inserted sub-block as the new lower boundary sub-block of the target content block, and determining the second child node coordinates of the new lower boundary sub-block based on the position of the inserted sub-block in the target content block.
28. The method according to claim 21, characterized in that, Deleting a sub-block from the target content block includes: deleting a sub-block before the upper boundary sub-block or after the lower boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined. This includes: the upper boundary sub-block and the lower boundary sub-block remain unchanged, and the second child node coordinates of the upper boundary sub-block and the lower boundary sub-block after boundary range adjustment are calculated based on the deleted sub-block and the first child node coordinates of the upper boundary sub-block and the lower boundary sub-block, respectively.
29. The method according to claim 21, characterized in that, Deleting a sub-block from the target content block includes: deleting a sub-block between the upper boundary sub-block and the lower boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined. This includes: keeping the upper boundary sub-block and the lower boundary sub-block unchanged, using the first child node coordinates of the upper boundary sub-block as the second child node coordinates of the upper boundary sub-block after boundary range adjustment, and reducing the first child node coordinates of the lower boundary sub-block based on the deleted sub-block to generate the second child node coordinates of the lower boundary sub-block after boundary range adjustment.
30. The method according to claim 21, characterized in that, Deleting a sub-block from the target content block includes: deleting the upper boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined, including: identifying the internal sub-block or the lower boundary sub-block adjacent to the upper boundary sub-block as the new upper boundary sub-block, and calculating the second child node coordinates of the new upper boundary sub-block after boundary range adjustment based on the first child node coordinates of the internal sub-block or the lower boundary sub-block adjacent to the upper boundary sub-block; or the target content block is empty.
31. The method according to claim 21, characterized in that, Deleting a sub-block from the target content block includes: deleting the lower boundary sub-block; After inserting a sub-block into the target content block, the new boundary of the target content block is determined. Based on the position of the new boundary of the target content block in the target content block, the coordinates of the second child node of the new boundary of the target content block under the first parent node are determined, including: identifying the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the new lower boundary sub-block, and using the coordinates of the first child node of the internal sub-block or the upper boundary sub-block adjacent to the lower boundary sub-block as the coordinates of the second child node of the new lower boundary sub-block after boundary range adjustment; or the target content block is empty.
32. The method according to claim 20, characterized in that, The process of obtaining the second position range of the target content block in the target document after boundary range adjustment includes: Obtain the second parent node of the target content block in the target document after boundary range adjustment; The first child block of the target content block after boundary range adjustment under the second parent node is obtained as the new upper boundary child block, and the coordinates of the third child node of the new upper boundary child block are obtained. The last child block of the target content block after boundary range adjustment under the second parent node is obtained as the new lower boundary child block, and the coordinates of the third child node of the new lower boundary child block are obtained. The second position range is determined based on the coordinates of the third child nodes of the second parent node, the new upper boundary child block, and the new lower boundary child block.
33. The method according to any one of claims 1-32, characterized in that, The target content block has a reference relationship with related content blocks in the associated document, including: The associated content block references the target content block in the target document; or... The target content block references the associated content block in the associated document.
34. A document processing apparatus, characterized in that, include: The determination module is configured to: determine a target content block in the target document, wherein the target content block has a reference relationship with a related content block in the associated document; The first acquisition module is configured to: acquire the first position range of the target content block in the target document; The second acquisition module is configured to: in response to receiving a boundary range adjustment operation for the target content block, acquire the second position range of the target content block in the target document after the boundary range adjustment, and send the second position range to the associated document, so that the associated document redisplays the associated content block in the associated document based on the second position range; The display module is configured to display the target content block with adjusted boundary range in the target document based on the second position range.
35. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 33.
36. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 33.
37. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed on a computer, the computer causes the computer to perform the method according to any one of claims 1 to 33.