Method and apparatus for aligning text, device, medium, and program product

By receiving cursor hover and responding to clicks on the computing device to achieve text alignment, the problem of low efficiency in manual alignment in traditional text viewing software is solved, improving the efficiency and aesthetics of text alignment and saving storage resources.

WO2026044655A1PCT designated stage Publication Date: 2026-03-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/115736
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-05

AI Technical Summary

Technical Problem

Traditional text viewing software requires users to manually scroll through documents to align content when comparing historical versions with current versions, and it cannot align automatically, affecting efficiency and aesthetics, and wasting storage resources.

Method used

It displays original and modified text on a computing device, receives cursor hover and highlights the corresponding line, responds to click operations to achieve text alignment, and supports synchronous or asynchronous scrolling control.

Benefits of technology

It improves the efficiency of text alignment, enhances the user experience, saves users' manual operation time, and improves the aesthetics and storage utilization of text alignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024115736_05032026_PF_FP_ABST
    Figure CN2024115736_05032026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method and apparatus for aligning text, a device, a medium, and a program product. The method comprises displaying original text and modified text for the original text. The method further comprises receiving a cursor hovering over a first line in one of the original text and the modified text. The method further comprises: on the basis of the cursor hovering over the first line, highlighting the first line and a second line that corresponds to the first line in the other of the original text and the modified text. The method further comprises: in response to receiving a click operation for the cursor, aligning the first line with the second line to implement text alignment. By means of the method, when text is viewed, an operation can be performed on either the original text or the modified text to implement a text alignment operation, and the corresponding text can be highlighted, thereby improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, media, and programs for aligning text. Technical Field

[0001] The embodiments of this disclosure generally relate to the field of text processing, and more specifically to methods, apparatuses, devices, media, and program products for aligning text. Background Technology

[0002] Currently, text viewing has become an indispensable part of people's daily lives, both at work and in their personal lives. Especially at work, when a document needs to be modified multiple times, it is inevitable to review previous versions or multiple versions of the document to determine the differences between the current version and previous versions, i.e., the additions or deletions.

[0003] With the rapid development of text processing technology, different text viewing and / or text editing software can be used to view different versions of a document. This allows users to view different versions of the document simultaneously on the same interface, make modifications as needed, and highlight the changes in a pre-defined manner to remind the user. Furthermore, to meet the evolving needs of text processing technology, various text viewing and / or text editing software applications and functions are becoming increasingly diverse.

[0004] Summary of the Invention

[0005] Embodiments of this disclosure provide a method, apparatus, device, medium, and program product for aligning text.

[0006] According to a first aspect of this disclosure, a method for aligning text is provided. The method includes displaying original text and modified text for the original text. The method further includes receiving a cursor hover over a first line in one of the original text and the modified text. The method also includes highlighting, based on the cursor hover over the first line, the first line and a second line in another text corresponding to the first line. The method further includes aligning the first line and the second line in response to receiving a click operation on the cursor to achieve text alignment.

[0007] In a second aspect of this disclosure, an apparatus for aligning text is provided. The apparatus includes an original text and modified text display module configured to display the original text and the modified text for the original text; a cursor hover receiving module configured to receive cursor hovering over a first line in one of the original text and the modified text; a highlighting module configured to highlight the first line and a second line in another text corresponding to the first line based on the cursor hovering over the first line; and a text alignment module configured to align the first line and the second line in response to receiving a click operation on the cursor to achieve text alignment.

[0008] In a third aspect of this disclosure, an electronic device is provided, including at least one processor; and a storage device for storing at least one program, which, when executed by the at least one processor, causes the at least one processor to implement the method according to the first aspect of this disclosure.

[0009] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method according to a first aspect of this disclosure.

[0010] In a fifth aspect of this disclosure, a computer program product is provided. This computer program product includes a computer program that, when executed by a processor, implements the method according to a first aspect of this disclosure.

[0011] It should be understood that the content described in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.

[0013] Figure 1 illustrates a schematic diagram of an example environment in which some embodiments of the present disclosure may be implemented;

[0014] Figure 2 illustrates a schematic diagram of an example method for aligning text according to some embodiments of the present disclosure;

[0015] Figure 3 illustrates a schematic diagram of an example of text alignment according to some embodiments of the present disclosure;

[0016] Figure 4 illustrates another example of text alignment according to some embodiments of the present disclosure;

[0017] Figure 5 illustrates a schematic diagram of yet another example of text alignment according to some embodiments of the present disclosure;

[0018] Figure 6 illustrates a schematic diagram of examples of synchronous scrolling and asynchronous scrolling of text according to some embodiments of the present disclosure;

[0019] Figure 7 illustrates a schematic diagram of an example of a navigation bar partition for text according to some embodiments of the present disclosure;

[0020] Figure 8 illustrates a schematic diagram of an example of displaying the number of modifications on a navigation bar sub-area of ​​text according to some embodiments of the present disclosure;

[0021] Figure 9 illustrates a schematic diagram of an example of an enlarged modification mark on a navigation bar sub-region according to some embodiments of the present disclosure;

[0022] Figure 10 illustrates a schematic diagram of an example of automatic jump to a modified location in text according to some embodiments of the present disclosure.

[0023] Figure 11 illustrates a schematic block diagram of a means for aligning text according to some embodiments of the present disclosure;

[0024] Figure 12 illustrates a schematic block diagram of an example device suitable for implementing embodiments of the present disclosure.

[0025] In the various figures, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0026] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and provisions. Upon receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media performing the operations of this disclosed technical solution, based on the prompt message.

[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0028] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0029] There are still many problems to be solved in the process of aligning text. For example, in traditional solutions, when users want to view historical and current versions of a document, they usually use text viewing and / or text editing software to open the document and then use the software to display the historical and current versions separately. In this way, users can view both historical and current versions of the document on the same display interface.

[0030] In this traditional approach, when comparing multiple documents, users typically need to scroll through each individual document before moving to another document to ensure that the content of the previous and current versions is roughly aligned for easy comparison. Furthermore, existing text viewing and / or editing software often uses empty fields as placeholders in other text areas to align identical content, affecting the overall aesthetics of the aligned text, hindering user recall, and wasting storage resources. Moreover, historical and current versions cannot be automatically aligned; users must manually scroll to the corresponding text, which is time-consuming and laborious, reducing the efficiency of text alignment.

[0031] To address at least the aforementioned and other potential problems, embodiments of this disclosure propose a method for aligning text. In this method, original text and modified text are first displayed on a computing device. For example, the original and modified text can be displayed separately in left and right columns with a gap in between. Then, the computing device receives a cursor hover over the first line of one of the original or modified texts. Next, based on the cursor hovering over the first line, the computing device highlights the first line and a corresponding second line of another text in the original or modified text. Finally, upon receiving a click operation on the cursor, the computing device aligns the first and second lines to achieve text alignment. This method allows for text alignment operations to be performed on either the original or modified text while viewing the text, improving the efficiency of text viewing and enhancing the user experience. Furthermore, further improvements can be made to control whether the two texts scroll synchronously and to intelligently divide the navigation bar, highlighting added and deleted sections.

[0032] Embodiments of the present disclosure will now be described in further detail with reference to the accompanying drawings. Figure 1 illustrates an example environment in which the devices and / or methods of the embodiments of the present disclosure may be implemented. In environment 100, computing device 104 first displays original text 106 and modified text 108 for the original text 106. For example, the original text 106 and modified text 108 are displayed separately in two columns with a dividing gap in between. Then, computing device 104 receives a cursor hover 102 on the first line of one of the texts, the original text 106 and the modified text 108. After receiving the cursor hover 102, computing device 104 highlights the first line 110 and the second line 112 of the other text, the original text 106 and the modified text 108, corresponding to the first line, based on the cursor hover on the first line 114. Finally, after receiving a click operation 116 on the cursor, computing device 104 aligns the first line 110 with the second line 112 to achieve text alignment 118.

[0033] Examples of computing device 104 include, but are not limited to, personal computers, server computers, handheld or laptop devices, mobile devices (such as mobile phones, personal digital assistants (PDAs), media players, etc.), multiprocessor systems, consumer electronics, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0034] As shown in Figure 1, computing device 104 first displays original text 106 and modified text 108 for the original text 106. In one example, the original text 106 and the modified text 108 for the original text 106 are obtained directly by computing device 104 from local storage or received from other computing devices. In another example, the original text 106 and the modified text 108 for the original text 106 are obtained by computing device 104 from a server. For example, computing device 104 can directly obtain previously stored original text 106 and modified text 108 for the original text 106 from a local server. Computing device 104 can also obtain original text 106 and modified text 108 for the original text 106 previously stored on a remote server via the Internet.

[0035] In this case, the original text 106 and the modified text 108 corresponding to the original text 106 are mutually exclusive, and the original text 106 and the modified text 108 should at least contain some overlapping content. Additionally, when the original text 106 and the modified text 108 are completely different, the computing device 104 will provide a prompt on its display screen, for example, displaying "The original text has been completely modified, and the existing modified text has no consistency with the original text."

[0036] Subsequently, the computing device 104 can receive a cursor hover 102 on the first line 110 of either the original text 106 or the modified text 108. The duration of the cursor hover 102 is recorded by the computing device 104. In one example, the first line 110 can be any line from any segment of text in the original text 106. In another example, the first line 110 can be any line from any segment of text in the modified text 108. These examples are merely illustrative of this disclosure and are not intended to limit its scope.

[0037] Then, after receiving the cursor hover 102, the computing device 104, based on the cursor hovering over the first line 110, highlights 114 the second line 112, which corresponds to the first line 110, in another text between the first line 110 and the original text 106 and the modified text 108. This highlight 114 can be any prominent prompt; for example, it can be highlighted with any color, or it can be highlighted by framing the first line 110 and the second line 112 with any form of outline. Additionally, the first line 110 can originate from the modified text 108, and the second line can originate from the original text 106. The above examples are merely for describing this disclosure and are not intended to limit the scope of this disclosure.

[0038] In some embodiments, the computing device 104 may highlight an entire line of the first row 110 and the second row 112. In other embodiments, the computing device 104 may highlight the text portions of the first row 110 and the second row 112, while not highlighting the blank portions.

[0039] In some embodiments, the text alignment hint function is activated only when the computing device 104 detects that the cursor is within the text area.

[0040] Finally, after receiving a click operation 116 on the cursor, the computing device 104 aligns the first line 110 with the second line 112 to achieve text alignment 118. In some embodiments, after receiving the click operation 116, the computing device 104 can scroll the text corresponding to the second line 112 to align the original text 106 and the modified text 108. In other embodiments, after receiving the click operation 116, the computing device 104 can scroll the original text 106 corresponding to the first line 110 to align the original text 106 and the modified text 108.

[0041] This method allows for text alignment operations to be performed on either the original or modified text when viewing text, improving the efficiency of text viewing and enhancing the user experience.

[0042] The foregoing, with reference to FIG1, illustrates an example environment in which some embodiments of the present disclosure's devices and / or methods may be implemented. The following, with reference to FIG2, illustrates an example method 200 for aligning text according to some embodiments of the present disclosure. This method can be applied to the example environment in FIG1 or any suitable environment, and can be executed by computing device 104 or any suitable computing device.

[0043] As shown in Figure 2, in example method 200, at box 202, computing device 104 displays original text 106 and modified text 108 for the original text 106. In one example, the original text is an initial, unmodified version, and the modified text is the adjusted version. In another example, the original text is a previously modified version, and the modified text is a version that further modifies the already modified version. The above examples are merely for describing this disclosure and are not intended to specifically limit this disclosure.

[0044] In some embodiments, the original text 106 and the modified text 108 are displayed separately in two columns, with a separator in between. In one example, the original text 106 is in the left column and the modified text 108 is in the right column. In another example, the modified text 108 is in the left column and the original text 106 is in the right column.

[0045] In some embodiments, the computing device 104 may also display navigation bars corresponding to the original text 106 and the modified text 108 on the display screen. The navigation bars may be displayed above, below, to the left, or to the right of the original text 106 and the modified text 108.

[0046] In some embodiments, the navigation bar for the original text 106 and the navigation bar for the modified text 108 may both be above the corresponding text. In other embodiments, the navigation bar for the original text 106 and the navigation bar for the modified text 108 may be above the original text 106 and below the modified text 108, respectively. This example is merely a description of the present disclosure and is not intended to limit the scope of the disclosure.

[0047] In some embodiments, the computing device 104 may also receive a drag operation on the cursor to change the position of the original text 106 or modify the position of the navigation bar in the text 108. For example, the computing device 104 receives a drag operation on the cursor to drag the navigation bar located above the original text 106 to the left side of the original text 106.

[0048] In some embodiments, the computing device 104 also identifies deleted portions in the original text 106 and added portions in the modified text 108. After identifying the deleted and added portions, they are highlighted.

[0049] In some embodiments, the highlighting can be a highlighting of any color, and can highlight the entire line containing the added or deleted portion. In other embodiments, the highlighting can highlight only the text portion of the line containing the added or deleted portion.

[0050] In some embodiments, the computing device 104 can also scroll the original text 106 and the modified text 108. In one example, the computing device 104 also displays two scrolling controls for the original text 106 and the modified text 108 on a corresponding display screen. One control can be used to scroll the original text 106 and the modified text 108 simultaneously, and the other control can be used to scroll the original text 106 and the modified text 108 separately. When one of the two controls is selected, the corresponding function is executed. In another example, the computing device 104 also displays a scrolling mode control for the original text 106 and the modified text 108 on a corresponding display screen. This scrolling mode control includes two modes: synchronous scrolling mode and asynchronous scrolling mode, where the asynchronous scrolling mode can also be referred to as asynchronous scrolling mode.

[0051] In some embodiments, when the computing device 104 receives a click operation that selects a control for synchronous scrolling or a synchronous scrolling mode, it will synchronously scroll the modified text 108 upon receiving a first scroll operation on the original text 106. Additionally, when a control for synchronous scrolling is selected or in synchronous scrolling mode, the original text 106 will synchronously scroll upon receiving a first scroll operation on the modified text 108.

[0052] In some embodiments, when the computing device 104 receives a click operation indicating that the cursor is selected for individual scrolling or asynchronous scrolling mode, upon receiving a second scroll operation for the original text 106, only the original text 106 is scrolled, and the modified text 108 is not scrolled. Additionally, upon receiving a second scroll operation for the modified text 108, only the modified text 108 is scrolled, and the original text 106 is not scrolled.

[0053] Subsequently, at box 204, computing device 104 receives cursor hover 102 on the first line 110 of one of the original text 106 and modified text 108. The duration of cursor hover 102 is recorded by computing device 104. In one example, the first line 110 can be any line from any segment of text in the original text 106. In another example, the first line 110 can be any line from any segment of text in the modified text 108. These examples are merely for describing this disclosure and are not intended to limit the scope of this disclosure.

[0054] In some embodiments, computing device 104 receives cursor hovering over the first line 110, wherein the cursor can hover over any part of the first line. In other embodiments, computing device 104 does not receive cursor hovering when the cursor hovers over a blank area of ​​the first line 110, and only receives cursor hovering 102 when the cursor hovers over a text portion of the first line 110.

[0055] Next, at box 206, computing device 104, based on cursor hovering over first line 110, highlights 114 the second line 112, which corresponds to the first line, in another text between the first line 110 and the original text 106 and modified text 108. This highlight 114 can be any prominent prompt; for example, it can be highlighted with any color, or it can be highlighted by framing the first line 110 and the second line 112 with any form of line. Additionally, the first line 110 can originate from modified text 108, and the second line can originate from the original text 106; or the first line can originate from the original text 106, and the second line from modified text 108. The above examples are merely for describing this disclosure and are not intended to limit the scope of this disclosure.

[0056] In some embodiments, after the computing device 104 records that the duration of the cursor hovering over the first line 110 reaches or exceeds a predetermined duration, for example, when the duration of the cursor hovering reaches 1 second, the computing device 104 determines the second line 112 corresponding to the first line 110 in the modified text 108, and then highlights the first line 110 and the second line 112.

[0057] In some embodiments, after highlighting the first line 110 and the second line 112, the computing device 104 also forms a connecting line between the first line 110 and the second line 112, which runs through the gap between the original text 106 and the modified text 108. In one example, the connecting line can be a solid line. In another example, the connecting line can be a dashed line. In yet another example, the connecting line can be any of a straight line or a curve.

[0058] Finally, at box 208, in response to receiving a click operation 116 on the cursor, computing device 104 aligns the first line 110 with the second line 112 to achieve text alignment 118.

[0059] In some embodiments, when the computing device 104 receives a click operation on the first line 110 of the original text 106, it scrolls and modifies the text 108 so that the second line 112 is at the same horizontal position as the first line, thereby achieving text alignment. Additionally, the connecting line between the first line 110 and the second line 112 should also be horizontal and perpendicular to the gap between the original text 106 and the modified text 108.

[0060] This method allows users to perform text alignment operations on either the original or modified text while viewing the text. It also controls whether the two texts scroll synchronously, intelligently divides the navigation bar, and highlights added or deleted sections, thus improving the efficiency of text viewing and enhancing the user experience.

[0061] The above description, with reference to FIG2, illustrates an example method 200 for aligning text according to an embodiment of the present disclosure. The following description, with reference to FIG3, illustrates an embodiment for aligning text according to some embodiments of the present disclosure.

[0062] In Example 300, the display screen of computing device 104 includes a prompt box 302 for deleting a portion, a prompt box 304 for adding a portion, a synchronous scrolling mode control 320, an asynchronous scrolling mode control 322, an original text message box 306, a modified text message box 308, a gap 310, a highlight 318 for the first line, a connector 314, a prompt box 316 for alignment operations, and a highlight 312 for the second line.

[0063] Box 302 shows four deletions in the original text, and box 304 shows six additions in the modified text. This display can automatically change based on modifications to the original and modified texts. For example, if one more deletion is made to the original text, box 304 will change from "4 deletions" to "5 deletions".

[0064] When the computing device 104 receives a cursor hovering over the first line, it highlights the entire first line 318. At this time, a connecting line 314 appears, connecting the first line to the second line and simultaneously highlighting the second line 312. This highlighting 312 is done in the same way as highlighting 318.

[0065] In one example, a tooltip 316 is displayed when the cursor hovers over the first line, displaying the message "Click to Align". In another example, when the cursor is received hovering over the second line for a predetermined duration, such as one second, the computing device 104 displays tooltip 316, displaying the message "Click to Align". Additionally, the content of this tooltip can be customized according to the user's needs. The following description, in conjunction with Figure 4, continues the explanation of the subsequent operations.

[0066] In Example 400, in conjunction with the preceding Example 300, computing device 104 can display a prompt message box 316 with the message "Click to Align". Subsequently, upon receiving a click operation on the cursor, computing device 104 performs a text alignment operation, automatically scrolling the second line of the original text to the same horizontal position as the first line of the modified text.

[0067] In some embodiments, the scroll bar 402 corresponding to the original text and the scroll bar 404 corresponding to the modified text are also located at the same horizontal position. Additionally, when the lengths of the original text and the modified text are inconsistent, the lengths of the scroll bar 402 and the scroll bar 404 will also be inconsistent, in which case the centers of the scroll bar 402 and the scroll bar 404 are located at the same horizontal position.

[0068] In some embodiments, after the text alignment operation is completed, the computing device sets the positions of the first and second lines to the beginning of the text. In other embodiments, after the text alignment operation is completed, the computing device sets the positions of the first and second lines to the exact center of the text.

[0069] In some embodiments, after the text alignment operation is completed, the computing device changes the connection line 314 to a horizontal connection line. Additionally, after the text alignment operation is completed, the computing device may delete the connection line 314.

[0070] In some embodiments, after the text alignment operation is completed, the computing device will continue to highlight 312 and highlight 318 for a predetermined duration, for example, 1.5 seconds, to facilitate text confirmation by the user.

[0071] When viewing text, you can perform text alignment operations on either the original or modified text, and highlight the number of additions and deletions. These features improve the efficiency of text viewing and enhance the user experience.

[0072] The above description, with reference to FIG4, illustrates schematic diagrams of embodiments for aligning text according to some embodiments of the present disclosure. The following description, with reference to FIG5, illustrates schematic diagrams of yet another embodiment for aligning text according to some embodiments of the present disclosure.

[0073] In Example 500, in conjunction with Examples 300 and 400 above, after the text alignment operation is completed, the computing device will continue to highlight 312 and highlight 318 for a predetermined duration, for example, 1.5 seconds, to facilitate text confirmation by the user.

[0074] In some embodiments, the highlighting of the first row 502 and the second row disappears after a predetermined period of time. Additionally, a pop-up window 506 appears in the computing device 104. The content of this pop-up window is "Enable synchronized scrolling mode?".

[0075] In some embodiments, when "Yes" is selected for a click operation on the cursor, the computing device directly changes the scrolling mode to synchronous scrolling mode. Additionally, when scrolling the original text or modifying any one of the texts, the other text will scroll synchronously.

[0076] In some embodiments, when "No" is selected for a click operation on the cursor, the computing device directly switches the scrolling mode to asynchronous scrolling mode. Additionally, when scrolling the original text or modifying any text within the text, the other text remains at its current position and does not scroll.

[0077] The above illustration, with reference to FIG. 5, depicts a schematic diagram of yet another embodiment of text alignment according to embodiments of the present disclosure. The following illustration, with reference to FIG. 6, depicts schematic diagrams of embodiments of synchronous and asynchronous text scrolling according to embodiments of the present disclosure.

[0078] In Example 600, there are synchronous scrolling controls 602 and asynchronous scrolling controls 604. Combining with the aforementioned Examples 300, 400, and 500, after the text alignment operation is completed, when the user clicks the synchronous scrolling control 602, the computing device determines that the current mode is synchronous scrolling. When scrolling the original text or modifying any one of the texts, the other text will scroll synchronously.

[0079] When the user clicks the asynchronous scrolling control 604, the computing device determines that the current mode is asynchronous scrolling. When scrolling the original text or modifying any one of the texts, the other text remains in its current position and does not scroll.

[0080] In some embodiments, the computing device stores the scrolling mode from the previous text viewing, and the current text viewing will default to using the scrolling mode from the previous viewing. In one example, the previous text viewing used a synchronous scrolling mode, and the current text viewing will also use a synchronous scrolling mode. Additionally, whether to use the previous scrolling mode can be set by the user according to their own habits or needs.

[0081] Furthermore, in traditional text navigation, scrolling navigation typically lacks segmentation, resulting in overly dense distribution of modification markers within the navigation bar. This makes it difficult for users to accurately locate the target text, and the lack of differentiation makes it difficult for users to determine which part of the document the modified content appears in (e.g., the introduction, main body, etc.). To further address these issues, this disclosure further adjusts the navigation bar. The following is a schematic diagram of an embodiment of text navigation bar segmentation according to an embodiment of this disclosure, illustrated in Figure 7.

[0082] In Example 700, the original text and the modified text have the same overall structure, including identical chapters and paragraphs. The navigation bar of the original text consists of multiple sub-regions, including sub-regions 702, 704, 706, and 708. The navigation bar of the modified text also consists of multiple sub-regions. The number of sub-regions in the navigation bars of the original and modified texts corresponds to the number of paragraphs in the original and modified texts, respectively. Alternatively, the original and modified texts may have different overall structures, such as having different numbers of paragraphs; in this case, the number of sub-regions in the navigation bars of the original and modified texts will also differ. Additionally, the length of the sub-regions in the navigation bar corresponds to the length of the paragraphs in the text. Longer paragraphs correspond to longer sub-regions, and shorter paragraphs correspond to shorter sub-regions.

[0083] In some embodiments, the navigation bar can be above, below, to the left, or to the right of the original text or the modified text. In one example, the navigation bar is above the original text, and the navigation bar is below the modified text.

[0084] In some embodiments, the computing device may receive a drag operation on a cursor to drag the navigation bar. For example, the navigation bar may be dragged from above to any position below, to the left, or to the right.

[0085] In some embodiments, the computing device may also receive a double-click or triple-click operation on the cursor to hide the navigation bar. In one example, the navigation bar for the original text or the navigation bar for the modified text may be hidden separately. In another example, the navigation bars for the original text and the navigation bar for the modified text may be hidden simultaneously. This example is for illustrative purposes only and is not intended to limit the scope of this disclosure.

[0086] The above description, with reference to FIG. 7, illustrates an example of a navigation bar partition for text according to some embodiments of the present disclosure. The following description, with reference to FIG. 8, illustrates an example of displaying a modification number on a navigation bar sub-region of text according to some embodiments of the present disclosure.

[0087] In Example 800, in conjunction with the aforementioned Example 700, when the computing device receives a hovering of the cursor over a sub-region 804 of the navigation bar of the original text, or when the hovering lasts for or exceeds a first predetermined duration, such as 1 second, it displays a prompt message 802 indicating the number of modifications made to that sub-region, such as "3 modifications".

[0088] In some embodiments, when the computing device receives a prompt message after a second predetermined duration has been reached or exceeded, for example, after 5 seconds, the prompt message 802 is hidden.

[0089] In some embodiments, when the computing device detects that the cursor is in the sub-region, it continuously displays a prompt message 802 indicating the number of modifications made to the sub-region until it detects that the cursor has left the sub-region, at which point the prompt message 802 is hidden.

[0090] Furthermore, after the computing device receives a click operation on the sub-region for the cursor, the original text is scrolled to the location in the sub-region where the text has been modified. Additionally, when the text content of the sub-region exceeds the display area, the original text is scrolled to the first location in the sub-region where the text has been modified.

[0091] The above illustration, with reference to FIG8, depicts an example of displaying the number of modifications on a navigation bar sub-region of text according to an embodiment of the present disclosure. The following illustration, with reference to FIG9, depicts an example of an enlarged modification marker on a navigation bar sub-region according to an embodiment of the present disclosure.

[0092] In Example 900, in conjunction with the aforementioned Examples 700 and 800, there is a modification mark 902 in a sub-region on the navigation bar for text modifications in the text.

[0093] In some embodiments, when the computing device receives a cursor hovering over the modification mark or the hovering time reaches or exceeds a predetermined duration, such as 1 second, the modification mark 902 is made bold and displayed as modification mark 904. Additionally, after modification mark 902 is bolded and displayed as modification mark 904, the modification mark remains in the state of modification mark 904 until the cursor moves outside the display range of the bolded modification mark 904, at which point the modification mark reverts to its original state of modification mark 902.

[0094] In some embodiments, after receiving a click operation on the cursor on the modification mark 904, the computing device scrolls the original text to the part corresponding to the modification mark 904.

[0095] The above illustration, with reference to FIG9, depicts an example of enlarging and modifying a mark on a navigation bar sub-region according to an embodiment of the present disclosure. The following illustration, with reference to FIG10, depicts an embodiment of an automatic jump to the modified position for text alignment according to an embodiment of the present disclosure.

[0096] In Example 1000, in conjunction with Examples 700 to 900 above, after receiving a click operation on the cursor on the modification mark 904, the computing device scrolls the original text to the content corresponding to the modification mark 904.

[0097] In some embodiments, when the original text automatically jumps to the part corresponding to the modification mark or after the text is modified, the modified text 1002 is highlighted in the center of the original text. Additionally, when the original text automatically jumps to the sub-region corresponding to the modification mark, the modified text 1002 is highlighted at the beginning of the original text.

[0098] In some embodiments, after the original text is automatically redirected, the computing device detects the context of the modified text. If the modified text has the same context as the modified text, it automatically scrolls and redirects the modified text as well, so that the modified text and the original text are in the same position, making it convenient to compare the original text and the modified text.

[0099] For example, if the previous text at position 1002 in the original text contains identical text in the modified text, the modified text will be scrolled to align that text with the original text.

[0100] In some embodiments, if the modified text does not have the same context as the modified text, an automatic jump is performed only in the original text, and no operation is performed on the modified text. Alternatively, the modified text can be automatically jumped to the first line of the sub-region corresponding to text modification 1002.

[0101] As shown in Figure 11, the device 1100 includes an original text and modified text display module 1110, configured to display original text and modified text for the original text; a cursor hover receiving module 1120, configured to receive cursor hovering over the first line of one of the original text and modified text; a highlighting module 1130, configured to highlight the first line and a second line corresponding to the first line in another text of the original text and modified text based on the cursor hovering over the first line; and a text alignment module 1140, configured to align the first line and the second line in response to receiving a click operation on the cursor to achieve text alignment.

[0102] In some embodiments, the highlighting module 1130 further includes: a duration determination module configured to determine the duration for which the cursor hovers over the first line; a second line determination module configured to determine a second line in another text corresponding to the first line in response to the duration exceeding a predetermined duration; and a highlighting module configured to highlight the first line and the second line.

[0103] In some embodiments, the highlighting module further includes: a connection line display module configured to display a connection line for connecting the first row and the second row; and a prompt information display module configured to display prompt information for the alignment operation.

[0104] In some embodiments, the connecting line is located in the gap between the original text and the modified text.

[0105] In some embodiments, the text alignment module 1140 further includes: another text scrolling module configured to scroll another text in response to receiving a click operation on the cursor; and a text alignment module configured to stop scrolling to align the second line with the first line in response to the second line in the other text being at the same horizontal position as the first line.

[0106] In some embodiments, the apparatus 1100 further includes: a synchronous scrolling control and asynchronous scrolling control display module, configured to display synchronous scrolling control and asynchronous scrolling control for scrolling operations; a first scrolling operation receiving module, configured to receive a first scrolling operation on the original text or modified text in response to the selection of the synchronous scrolling control; and a synchronous scrolling module, configured to synchronously scroll the original text and modified text based on the first scrolling operation.

[0107] In some embodiments, the apparatus 1100 further includes: a second scrolling operation receiving module configured to receive a second scrolling operation on the original text or modified text in response to the selection of an asynchronous scrolling control; and a scrolling module configured to scroll the original text or modified text based on the second scrolling operation.

[0108] In some embodiments, the apparatus 1100 further includes: an added and deleted portion determination module configured to determine the added and deleted portions based on the original text and the modified text; a highlighting module configured to highlight the added portion in the modified text; and a highlighting module configured to highlight the deleted portion in the original text.

[0109] In some embodiments, the apparatus 1100 further includes: a sub-region number determination module configured to determine the number of a set of sub-regions in a navigation bar associated with a text based on the number of a set of paragraphs in a text; a second length determination module configured to determine a second length of a first sub-region corresponding to a paragraph in a set of sub-regions based on a first length of a paragraph in a set of paragraphs; and a navigation bar display module configured to display the navigation bar based on the number of a set of sub-regions and the second length.

[0110] In some embodiments, the device 1100 further includes: a hover receiving module configured to receive cursor hovering over a second sub-region of a set of sub-regions; and a modification number display module configured to display, based on cursor hovering over the second sub-region, a set of modification numbers in a set of paragraphs corresponding to the second sub-region.

[0111] In some embodiments, the second sub-region includes a set of modification markers corresponding to a set of modifications; and the device 1100 further includes: a hover receiving module configured to receive cursor hovering over a target modification marker in the set of modification markers; a magnification module configured to magnify the target modification marker; a jump module configured to jump to a modified portion of a text corresponding to the target modification marker in response to receiving a click operation on the magnified target modification marker; and a modification portion highlighting for a predetermined duration module configured to highlight the modification portion for a predetermined duration.

[0112] In some embodiments, the device 1100 further includes a navigation bar display module configured to display the navigation bar in one of the following locations: above, below, to the left, or to the right of a text.

[0113] In some embodiments, the apparatus 1100 further includes: an original text display module configured to display original text in one of the left and right columns; and a modified text display module configured to display modified text in the other of the left and right columns.

[0114] Figure 12 shows a schematic block diagram of an example device 1200 that can be used to implement embodiments of the present disclosure. The computing device 104 in Figure 1 can be implemented using device 1200. As shown, device 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 1202 or loaded from storage unit 1208 into random access memory (RAM) 1203. Various programs and data required for the operation of device 1200 may also be stored in RAM 1203. CPU 1201, ROM 1202, and RAM 1203 are interconnected to each other via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.

[0115] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage page 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0116] The various processes and handling described above, such as method 200, can be executed by processing unit 1201. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by CPU 1201, one or more actions of method 200 described above can be performed.

[0117] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0118] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0119] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0120] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0121] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0122] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0125] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for aligning text, comprising: Display the original text and the modified text for the original text; Receive cursor hover over the first line of one of the original text and the modified text; Based on the cursor hovering over the first line, the second line corresponding to the first line and another line in the original text and the modified text is highlighted; as well as In response to receiving a click operation on the cursor, the first line and the second line are aligned to achieve text alignment.

2. The method of claim 1, wherein highlighting the second line corresponding to the first line in another text of the original text and the modified text comprises: Determine the duration for which the cursor hovers over the first line; In response to the duration exceeding a predetermined duration, the second line in the other text that corresponds to the first line is determined; as well as Highlight the first and second rows.

3. The method of claim 2, wherein highlighting the first line and the second line corresponding to the first line in another text of the original text and the modified text further comprises at least one of the following: Display the connecting line used to connect the first row and the second row; or Displays a prompt message for the alignment operation.

4. The method of claim 3, wherein the connecting line is located in the gap between the original text and the modified text.

5. The method of claim 1, wherein aligning the first line with the second line to achieve text alignment comprises: In response to receiving a click operation on the cursor, scroll the other text; as well as In response to the second line in the other text being at the same horizontal position as the first line, the scrolling is stopped to align the second line with the first line.

6. The method according to claim 1, further comprising: Displays synchronous and asynchronous scroll controls for scrolling operations; In response to the selection of the synchronous scrolling control, a first scrolling operation is received on the original text or the modified text; as well as Based on the first scrolling operation, the original text and the modified text are scrolled synchronously.

7. The method according to claim 6, further comprising: In response to the selection of the asynchronous scrolling control, a second scrolling operation is received on the original text or the modified text; as well as Based on the second scrolling operation, the original text or the modified text is scrolled.

8. The method according to claim 1, further comprising: Based on the original text and the modified text, determine the added and deleted parts; The added portion is highlighted in the modified text; as well as The deleted portion is highlighted in the original text.

9. The method according to claim 1, further comprising: Based on the number of a group of paragraphs in the text, determine the number of a group of sub-regions in the navigation bar associated with the text; Based on the first length of the paragraphs in the set of paragraphs, determine the second length of the first sub-region corresponding to the paragraph in the set of sub-regions; as well as The navigation bar is displayed based on the number of the set of sub-regions and the second length.

10. The method of claim 9, further comprising: Receive the cursor hovering over the second sub-region of the set of sub-regions; as well as Based on the cursor hovering over the second sub-region, the number of modifications in a group of paragraphs corresponding to the second sub-region is displayed.

11. The method of claim 10, wherein the second sub-region includes a set of modification markers corresponding to the set of modifications; the method further includes: Receive the cursor hovering over the target modification mark in the set of modification marks; The target modification marker is enlarged; In response to receiving a click operation on the magnified target modification mark, jump to the modified part of the text corresponding to the target modification mark; as well as The modified portion is highlighted for a predetermined duration.

12. The method of claim 11, further comprising: The navigation bar may be displayed in one of the following locations: above, below, to the left, or to the right of the text.

13. The method of claim 11, further comprising: Display the original text in one of the left and right sidebars; as well as The modified text is displayed in another column in the left and right sidebars.

14. A device for aligning text, comprising: The original text and modified text display module is configured to display the original text and the modified text for the original text; A cursor hover receiving module is configured to receive cursor hovering over the first line of one of the original text and the modified text; The highlighting module is configured to highlight the first line and a second line in another text in the original text and the modified text that corresponds to the first line, based on the cursor hovering over the first line; as well as The text alignment module is configured to align the first line and the second line in response to receiving a click operation on the cursor to achieve text alignment.

15. An electronic device comprising: At least one processor; as well as A storage device for storing at least one program, which, when executed by the at least one processor, causes the at least one processor to implement the method according to any one of claims 1-13.

16. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the method according to any one of claims 1-13 when executed by a processor.

17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Document processing method and device, server and storage medium

    CN111753505A

  • Text processing method and device, equipment and storage medium

    CN112966506A

  • Word alignment method and device based on translation scene, equipment and medium

    CN116956943A

  • Text Wrap Modification Using Variable Inset

    US20230259690A1