A method and apparatus for displaying target difference information in a document
By dividing the document display page into content display and result display areas and using highlighting technology, the problem of repeatedly switching between different document display areas is solved, enabling fast and intuitive document proofreading and improving document proofreading efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BAIRONG RUIBO TECH CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, displaying document differences requires repeatedly switching between two document pages, making it difficult to quickly and intuitively focus on the differences in the same location, resulting in low document proofreading efficiency.
The display page is divided into a content display area and a results display area. The content display area shows the target document and the proofreading document side by side, while the results display area shows the difference information. By monitoring the difference information selected by the user, the position information of the target document and the proofreading document is obtained, and the difference information is controlled to be displayed in a highlighted manner, so as to realize the synchronous visual comparison of the two documents.
It enables quick and intuitive location and display of document discrepancies, reduces user complexity, and significantly improves document proofreading efficiency.
Smart Images

Figure CN122133635A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for displaying target difference information in a document. Background Technology
[0002] In digital office scenarios, documents have become an important medium for file transfer and collaboration due to their format stability and cross-platform compatibility. In daily work, users often need to proofread different versions of the same document (such as the revised version and the original version) or two documents on similar topics to identify differences. This need is widespread in scenarios such as contract review, academic research, and legal document proofreading.
[0003] In existing technologies, traditional document difference display usually requires clicking on the index results of two documents separately, repeatedly searching for different differences at the same location in the two documents with marked differences, and then displaying them. This method of repeatedly switching between two document pages to check the differences makes it difficult to quickly and intuitively focus on the differences at the same location, resulting in low document proofreading efficiency and failing to meet the needs of efficient document proofreading.
[0004] Therefore, there is an urgent need for a new method to display target difference information in documents. Summary of the Invention
[0005] This application provides a method and apparatus for displaying target difference information in a document. Its purpose is to avoid repeatedly switching between two document pages to check the difference content when determining target difference information. It can quickly and intuitively focus on the difference information in the same position, realize synchronous visual comparison of two documents, reduce the complexity of user operation, and improve document proofreading efficiency.
[0006] To address the aforementioned technical problems, this application provides the following technical solutions: Firstly, this application provides a method for displaying target difference information in a document, the method comprising: Based on the received documents to be proofread, analyze the differences between the target document and the proofread document; When the number of discrepancies exceeds a threshold, the display page is divided into a content display area and a result display area. The content display area is used to display the target document and the proofread document simultaneously, and the result display area is used to display the discrepancies. Monitor the target difference information selected by the user in the results display area; Obtain the location information of the target difference information in the target document and the proofreading document; Based on the location information, the target difference information is controlled to be displayed in the content display area in a first display mode for the target document and the proofreading document, wherein information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
[0007] Secondly, this application provides a display device for target difference information in a document, the device comprising: The analysis unit is used to analyze the differences between the target document and the proofreading document based on the received document to be proofread; A partitioning unit is used to divide the display page into a content display area and a result display area when the number of difference information exceeds a threshold. The content display area is used to display the target document and the proofreading document at the same time, and the result display area is used to display the difference information. The monitoring unit is used to monitor the target difference information selected by the user in the result display area of the segmentation unit; A location unit is defined to obtain the location information corresponding to the target difference information of the monitoring unit in the target document and the proofreading document; The display unit is used to acquire the location information of the target difference information in the target document and the proofreading document. The display unit is configured to control the target difference information to be displayed in the content display area in a first display mode according to the location information, wherein information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
[0008] Thirdly, this application provides a storage medium for storing a computer program, wherein the computer program, when running, controls the device where the storage medium is located to execute a method for displaying target difference information in a document.
[0009] The fourth aspect of this application discloses an electronic device, which includes a processor and a memory, wherein the processor is configured to invoke program instructions in the memory to execute the method for displaying target difference information in a document.
[0010] The fifth aspect of this application discloses a computer program product, the computer product comprising a computer program that is executed by a processor to display the method for displaying target difference information in a document.
[0011] Compared to existing technologies, this application provides a method for displaying target difference information in documents. This method overcomes the limitations of traditional manual search for difference information and improves proofreading efficiency through intelligent interaction. After receiving the document to be proofread, the system accurately analyzes the difference information between the target document and the proofreading document. When the number of differences exceeds a set threshold, the display page is scientifically divided into two main areas: content display and result display. The content display area presents the full view of both documents side by side, while the result display area categorizes and aggregates the difference information to form a clear navigation directory. When the user selects any target difference information in the result display area, the system immediately obtains its corresponding position in both documents and synchronously controls the content display area to accurately locate and display the difference content in a highlighted manner. This technology significantly reduces the complexity of user operations through automated difference location and visual presentation, avoiding the tediousness of repeatedly searching through lengthy documents. Whether processing large amounts of text with dense differences or regular document proofreading, users can quickly focus on key content, greatly improving document proofreading efficiency and providing an efficient solution for document processing in digital office scenarios. Attached Figure Description
[0012] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein: Figure 1 A flowchart illustrating a method for displaying target difference information in a document, as proposed in an embodiment of this application, is shown schematically. Figure 2(a) schematically illustrates a method for displaying target difference information in a document according to an embodiment of this application; Figure 2(b) schematically illustrates another way of displaying target difference information in a document according to an embodiment of this application; Figure 2(c) schematically illustrates a display method of a jump identifier proposed in an embodiment of this application; Figure 3 A flowchart illustrating another method for displaying target difference information in a document, as proposed in an embodiment of this application, is shown schematically. Figure 4 The illustration shows a schematic diagram of the result of a display device for target difference information in a document according to an embodiment of this application; Figure 5 A schematic diagram of a display device for target difference information in a document, according to an embodiment of this application, is shown. Detailed Implementation
[0013] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0014] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0015] In digital office scenarios, documents, due to their format stability and cross-platform compatibility, have become an important medium for file transfer and collaboration. In daily work, users often need to proofread different versions of the same document (such as a revised version and the original version) or two documents on similar topics to identify discrepancies. This need is widespread in scenarios such as contract review, academic research, and legal document proofreading. Current technology typically requires clicking on the index results of two documents separately, repeatedly searching for and displaying the differences at the same location in both documents. This method of repeatedly switching between two document pages to check differences makes it difficult to quickly and intuitively focus on the differences at the same location, resulting in low document proofreading efficiency and failing to meet the need for efficient document proofreading.
[0016] To address this issue, the applicant of this application proposes a method for displaying target difference information in a document. This method analyzes the difference information between the target document and the proofreading document based on the received document to be proofread. When the number of difference information points exceeds a threshold, the display page is divided into a content display area and a result display area. The content display area simultaneously displays the target document and the proofreading document, while the result display area categorizes and displays the difference information. The method monitors the target difference information selected by the user in the result display area; obtains the location information corresponding to the target difference information in the target document and the proofreading document; and controls the display content of the target document and the proofreading document in the content display area based on the location information, so that the target difference information is highlighted in the target document and the proofreading document in the content display area. This solves the problem of traditional methods requiring repeated switching of document views and manual scrolling to find difference points. Specifically, in one embodiment of this application, a document difference display system or electronic device processor executes the above-mentioned method for displaying target difference information in a document, with the following specific steps: Figure 1 As shown, it includes: Step 101: Based on the received document to be proofread, analyze the differences between the target document and the proofread document.
[0017] In some embodiments, the document type can be PDF, WORD, WPS, TXT, XML, images, etc., and this application embodiment does not impose any particular limitation. In this step, the document to be proofread refers to two document versions that need to be compared for differences, including the target document and the proofread document. Before the system executes the method for displaying the target difference information in the document, the document to be proofread can be uploaded by the user. The difference information refers to the differences between the target document and the proofread document in terms of text content, format, or layout. The difference information can be text modifications, format changes, image replacements, image annotations, etc. Specifically, it can be implemented using text comparison algorithms or image difference technology. This feature is used to accurately identify the change points between documents to support the display of differences. When the difference information is determined, the proofread document is traversed page by page and line by line in the document page number order to obtain the difference information.
[0018] It is worth noting that after the target document and proofreading document are rendered, they also need to be displayed side-by-side in the content display area. This can be achieved by: obtaining the available display area size information of the content display area; and determining the viewport size information of the target document and proofreading document pages based on a preset scaling rule. Specifically, the available display area size information can be obtained in real-time through graphics rendering interfaces (such as Windows API's GetClientRect or a web browser's window.innerWidth / innerHeight), including parameters such as horizontal width and vertical height. For example, in a JavaFX scene, the physical screen boundaries can be obtained using Screen.getPrimary().getVisualBounds(), and the available area after deducting the title bar can be calculated using Stage.getWidth() and Stage.getHeight(). If the user manually adjusts the window size, the system updates the available area size information in real-time by listening for changes in Scene.widthProperty() and Scene.heightProperty(). Based on this, by dynamically obtaining the final usable area size and combining it with preset scaling rules, the system intelligently adapts to different devices, allowing dual documents to be displayed side-by-side, either horizontally or vertically, preventing content from exceeding screen boundaries. This technology solves the content truncation problem caused by traditional fixed-ratio scaling, allowing users to obtain the best comparison experience on any device without manually adjusting the scaling ratio.
[0019] After obtaining the available display area size information, the viewport size information of the target document and proofreading document pages is determined based on preset scaling rules. This includes: calculating the horizontal bisector width of the available display area, where the horizontal bisector width is the width reference value of the document viewport; calculating the height reference value of the document viewport based on the width reference value of the document viewport and the aspect ratio of the document page, where the document page is the proofreading document or target document display page, and the obtained viewport width reference value and height reference value are the display page size information of the proofreading document or target document. The preset scaling rules can be horizontal bisector and / or aspect ratio adaptation logic, boundary verification mechanisms, and can also preset scaling ratios. Some specific implementations include: obtaining the horizontal bisector width of the available display area by obtaining the horizontal width of the display area, deducting the horizontal pixel values of the display area's border and operation bar, and then dividing by 2; determining the height reference value of the proofreading document or target document based on the aspect ratio of the document page; and determining the display page height information of the proofreading document and target document by combining the height reference value and the document viewport width reference value. In other embodiments, the width of the display interfaces for the proofreading document and the target document can also be determined according to a preset scaling ratio. For example, the width of the document viewport can be obtained, the ratio of the document viewport width reference value to the document viewport width can be determined, and it can be determined whether the ratio is within a preset scaling ratio range. If it is within the range, the size of the document viewport in the display interface meets the requirements and is easy to view. The preset scaling ratio range can be 0.5-2. The above steps, by calculating the height reference value of the document viewport, enable the proofreading document and the target document to be dynamically scaled proportionally with the available display area size, avoiding stretching and distortion, ensuring that the document data is consistent with the original data, laying the foundation for subsequent document comparison, and presenting a dynamic visual effect adapted to the display area.
[0020] In some embodiments, if the display area consists of a target document and a proofreading document displayed side-by-side, the viewport size information of the target document and proofreading document pages is determined by bisecting the vertical width of the display area. This vertically bisected width is then used as the reference height value for the document viewport. Based on the reference height value and the aspect ratio of the document page, the reference width value of the document viewport is calculated. Since the document page is either the proofreading document or the target document display page, the obtained reference width value and reference height value are the display interface size information for the proofreading document or the target document. In other embodiments, the height of the display page interface for the proofreading document and the target document can also be determined according to a preset scaling ratio. For example, the height of the document viewport is obtained, the ratio of the reference height value of the document viewport to the document viewport height is determined, and it is determined whether the ratio is within a preset scaling ratio range. If it is within the range, the size of the document viewport in the display interface meets the requirements and is easy to view. The preset scaling ratio range can be 0.5-2, consistent with the horizontal scaling ratio range, to ensure the consistency of the scaling experience under different horizontal and vertical display layouts, and to avoid affecting the user's viewing experience due to inconsistent scaling ratio standards caused by layout switching. At the same time, this scaling range can meet users' needs for zooming in to view the details of the document, and can also adapt to the scenario of browsing the document as a whole after zooming out. It takes into account the usage scenarios of detailed proofreading and overall preview, and further ensures visual adaptability and ease of operation in the document comparison process.
[0021] Step 102: When the number of discrepancies exceeds a threshold, the display page is divided into a content display area and a result display area. The content display area is used to display the target document and the proofreading document simultaneously, and the result display area is used to display the discrepancies.
[0022] In this step, the threshold refers to the critical value for the number of differences that trigger page layout adjustments. This can be a preset value or a percentage of the difference information on the current page relative to the total number of words on that page. Using the threshold comparison, the allocation of display resources can be dynamically optimized based on the actual scale of the difference information. The content display area and result display area refer to the parallel visual blocks divided on the page, such as left-right or top-bottom visual blocks. These can be implemented using CSS grid layout or the Flexbox model. Left-right visual blocks use a spatial separation strategy to simultaneously present document content and difference summaries to improve information retrieval and display efficiency.
[0023] After analyzing the differences between the target document and the proofreading document in step 101, this step, based on the analyzed information, determines the number of differences and whether it exceeds a threshold. If so, the system divides the display page into a content display area and a result display area, as shown in Figure 2(a).
[0024] Here's an example with a threshold set to 30 discrepancies. When the number of discrepancies exceeds 30, the system will divide the display page into a content display area and a results display area. The content display area is located on the left side of the page, used to display the target document and the proofreading document side-by-side. The results display area is located on the right side of the page, used to display the discrepancy information in a list format. Of course, the content display area can also be on the right side of the page, and the results display area on the left side; the specific location can be set according to the actual situation. The width ratio of the content display area and the results display area can be 9:1, 8:2, 7:3, or 6:4. There are no strict limitations on the width here, as long as the displayed content can be clearly viewed.
[0025] The system, after acquiring the discrepancy information, further determines whether the discrepancies are identical. If they are identical, the discrepancies are categorized, and one discrepancy from that category is displayed as a representative in the results display area, along with a categorization marker. Users can click the categorization marker to view the specific discrepancy. This design streamlines the display of repetitive information, avoids overwhelming users with excessive content, and significantly improves information viewing efficiency.
[0026] Step 103: Monitor the target difference information selected by the user in the results display area.
[0027] After the difference information is displayed in the results display area in step 102, the system continuously monitors the user's actions in the results display area. When the user selects a target difference information, the system obtains the location information of that difference information in the target document and the proofreading document. When the user selects difference information with a categorization label, the system obtains the location information of all similar difference information under that categorization label in the target document and the proofreading document; if the user does not click on a categorization label, it means that the user has selected representative information, and the system can obtain the location information of that difference information in the target document and the proofreading document.
[0028] Step 104: Obtain the location information of the target difference information in the target document and the proofreading document.
[0029] In this step, the location information refers to the position of the target difference information within the target document and within the proofreading document. The location information can be a specific line on a specific page in the target or proofreading document, or it can be all the Y-values of the line containing the target difference information on a specific page. The Y-values can include the maximum and minimum Y-values, or the information of the paragraph containing the page number of the target difference information. There are no specific limitations on the location information; it can be chosen according to the actual situation. The Y-value is the ordinate of the first location information. The coordinate system can be a two-dimensional plane coordinate system with the top-left corner of the document page area as the origin, where the vertex is the starting reference point within the user's visible range after the document page is rendered, excluding page margins, headers, footers, and invisible cropped areas. The positive direction of the horizontal axis (X-axis) is to the right, and the positive direction of the vertical axis (Y-axis) is downward. This coordinate system can accurately describe the specific position of the target difference information within the document page. Of course, the coordinate system can also be established with the top right / bottom right / bottom left corner of the document page area as the origin. The process of establishing the coordinate system is the same as that of establishing the coordinate system with the top left corner of the document page area as the origin, so it will not be described in detail here.
[0030] Step 105: Based on the location information, control the target difference information to be displayed in the content display area in the target document and the proofreading document in a first display mode, wherein the information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
[0031] In this step, the system first locates the target document and the proofreading document to the page containing the target difference information based on the location information. In some embodiments, the target difference information is displayed using a first display method, i.e., highlighted; while other information in the target document and proofreading document besides the target difference information is displayed normally using a second display method. Highlighting refers to visually enhancing the specified difference content, which can be achieved using CSS background color overlay or SVG overlay animation. This feature reduces the cognitive load on users locating differences in side-by-side documents through a focus guidance mechanism. The highlighted target difference information can be displayed in any position within the target document and proofreading document in the content display area, without limitation. It is worth noting that the system controls the target document and proofreading document to display the target difference information simultaneously at the same location.
[0032] Specifically, the system locates the target document and the proofreading document to the page containing the target difference information based on location information, and highlights the target difference information in the content display area, which can be any part of the content display area. Highlighting methods can include changing the text background color, adding borders, adding underlines, etc., to highlight the differences.
[0033] In summary, this application divides the display page into a content display area and a results display area. Based on the user's selection of target difference information in the results display area, the system automatically locates and highlights the corresponding content in the content display area. This avoids the tedious process of manually switching and scrolling between two documents, allowing users to quickly find and view the target difference content. This achieves rapid location and intuitive comparison of document difference information. Furthermore, the categorized display of difference information helps users quickly grasp the overall structure of document differences, while the automatic synchronization and highlighting function makes the target difference information visually striking, comprehensively improving document proofreading efficiency and fully meeting the needs of efficient document processing in digital office scenarios.
[0034] To provide a more detailed explanation of the above embodiments, this application also provides another method for displaying target difference information in a document, such as... Figure 3 As shown, the following specific steps are provided in this embodiment of the application: Step 301: Based on the received document to be proofread, analyze the differences between the target document and the proofread document.
[0035] In this step, the documents to be proofread are the target document and the proofreading document. In practice, the target document can usually be the original version or a document used as a reference standard. The proofreading document is another document whose content is compared with the target document; it is generally a revised version or a document that needs to be compared with the target document to find differences. The proofreading document and the target document can be of the same type. Alternatively, the versions of the proofreading document and the target document can be different. Or, the target document and the proofreading document can be of the same type, either both PDF or both WORD.
[0036] In practical applications, the efficiency of document proofreading is limited by the latency of the rendering process. When the document is large or complex, the traditional single-threaded rendering method can easily lead to slow loading of the content display area, requiring users to wait a long time for the document content to be presented, affecting the continuity of the proofreading operation. When displaying the target document and the proofreading document in the content display interface, this application further proposes an improved rendering scheme: traversing the target document and the proofreading document based on the document page numbers to obtain the target document rendering task and the proofreading document rendering task, allocating the target document rendering task and the proofreading document rendering task to different rendering threads based on an asynchronous task scheduling mechanism, rendering the target document rendering task and the proofreading document rendering task in the corresponding rendering thread based on preset rendering rules, and then pushing the rendering results to the content display area for display.
[0037] The implementation scheme for document page number traversal is as follows: pagination information is extracted by parsing the document metadata, and an independent rendering task is created for each page number. That is, the system reads the content of each page of the target document and the proofreading document in the order of page number and creates a corresponding rendering task for each page.
[0038] The asynchronous task scheduling mechanism employs a thread pool management model, dynamically allocating idle thread resources based on task priority. For example, the system can create multiple independent rendering threads, with some dedicated to rendering the target document and others to rendering the proofread document. This asynchronous processing method fully utilizes the parallel computing capabilities of multi-core processors.
[0039] The preset rendering rules include font mapping strategies and graphics drawing protocols. This is to ensure that the layout, style, and data information of the content display area are completely consistent with the original document after the target document and the proofreading document are rendered in different rendering threads, eliminating cross-thread rendering differences. The font mapping strategy is the rendering rule for text in the document, which adopts a "multi-dimensional hierarchical matching" mechanism: first, the rendering priority is determined based on the font size; then, the font is filtered according to whether it needs specific font attributes (such as whether to bold and / or black, and / or bolding degree, and / or color settings); finally, the font form (such as serif and sans-serif) is processed. For example, when rendering a paragraph of text, the rendering priority is first determined based on the font size, which by default follows the principle of "the larger the font size, the higher the priority" (the priority order can also be customized), and the text paragraphs corresponding to high-priority font sizes are locked first. Next, it determines whether the high-priority text requires specific character attributes (such as regular, bold, italic, font, etc.): If not, it directly enters the font style filtering, and matches the corresponding serif or sans-serif font to complete the rendering according to the document settings (such as using sans-serif font for body text and serif font for headings); if specific character attributes are required, it filters the font library to find fonts that simultaneously meet the "target font size priority" and "specified character attributes". If there is a unique match for the font style, it is rendered directly; if there are multiple matches for the font style, they are rendered one by one. Example: A promotional document contains three parts: "Main Title (36pt), Subtitle (24pt), and Body Text (14pt)". The main title is bold, the body text is sans-serif, the subtitle is serif, and the entire text is SimSun. During rendering, the 36pt main title (highest priority) is locked first. It is determined whether it requires specific font attributes. Based on the above, it is known that "SimSun, bold" attributes are required. The "bold" version is matched from the font library and rendered. Since the main title has no font style requirements, the rendering of the main title is complete. Next, the subtitle, being 24pt, is rendered with SimSun and a serif font. Finally, the body text, being 14pt, is rendered with SimSun and a sans-serif font.
[0040] Specifically, during document page number traversal, the system transforms each page number of both the target document and the proofreading document into an independent rendering task unit. An asynchronous task scheduling mechanism allocates the rendering tasks of the two types of documents to different threads, utilizing multi-core processors to execute rendering operations in parallel. Within the rendering thread, preset rendering rules drive the graphics engine to generate page bitmap data according to a standardized process. The rendered page data is pushed to the content display area via a message queue, where the display controller performs coordinate alignment and synchronous refresh. This process eliminates waiting time between rendering tasks through parallel processing, enabling the content display area to quickly load document content displayed side-by-side, shortening the user's waiting period. Therefore, through the above technical solution, this application achieves efficient parallel rendering of the target document and the proofreading document, significantly improving document loading and display speed and reducing user waiting time. Furthermore, the asynchronous rendering mechanism avoids main thread blocking, ensuring smooth user interface response. Simultaneously, preset rendering rules ensure consistency and comparability of different documents in the display area, providing users with a better comparison experience.
[0041] To ensure accurate element coordinate calculation during rendering and avoid affecting the layout of document content in the display area, this application proposes a method based on preset rendering rules. After rendering the target document rendering task and the proofreading document rendering task in the corresponding rendering thread, the rendering results are pushed to the content display area for display. This includes: obtaining the page element structure in the target document or proofreading document rendering task and generating the corresponding document model tree; traversing the document object model tree and calculating the coordinate position and size information of each element according to the page layout rules; and calling the graphics interface to draw the page content layer by layer based on the coordinate position and size information to generate the rendering result of the target document or proofreading document. The document model tree is generated by parsing the hierarchical relationship of page elements, creating a tree-like data structure. This model tree contains node information of text paragraphs, table cells, or image components. For example, by parsing the tag structure of an HTML document, a tree-like data structure is constructed, reflecting the hierarchical relationship and nested structure of the document. When calculating the coordinate position of each element, a fluid layout algorithm is used to arrange sibling elements horizontally or vertically, automatically wrapping lines according to element size, and relatively positioning nested elements according to the size of the parent container. When calling the graphics interface to draw page content, rendering is performed layer by layer from the root node to the leaf node according to the hierarchical order of the model tree. The rendering result of each layer serves as the basis for the drawing of the next layer. Specifically, the implementation of "drawing page content layer by layer based on coordinate position and size information to generate the rendering result of the target document or correction document" is as follows: The page element structure in the target document or correction document rendering task is obtained, and the corresponding document model tree is generated; the document object model tree is traversed, and the coordinate position and size information of each element are calculated according to the page layout rules; based on the coordinate position and size information, the system integrates the font mapping strategy in the preset rendering rules with the graphics drawing protocol to perform rendering. For text elements, according to the font mapping strategy, the original font of the document is matched first. If the font is missing, a substitute font is selected according to the hierarchical order of font size, bold attribute, and font style. Combined with the text area parameters in the coordinate position and size information, the text content is accurately rendered. For graphic elements (including vector graphics, table borders, etc.), the SVG standard of the graphics drawing protocol is followed, and standardized drawing is performed based on the calculated element coordinates and size according to parameters such as coordinate system, line thickness, and color mode. Two rules ensure consistency between the rendered layout and the target document or temperature correction through "parameter binding during rendering": when rendering text, font attributes are linked to coordinate dimensions to avoid text overflow or misalignment; when drawing graphics, standardized parameters are strictly matched with element coordinates to prevent graphic distortion. This approach of "precise coordinate calculation + dynamic rule fusion" provides a standardized and consistent rendering foundation for subsequent layer-by-layer drawing.
[0042] Specifically, after the page element structure is converted into a Document Object Model (DOM) tree, traversing this tree structure identifies the type of each element and its parent-child relationships. A depth-first traversal is performed on the tree structure, and CSS box models and layout algorithms are applied to each node to determine the precise position and size of each element on the page. For example, the position of a table cell needs to be calculated based on its row and column index, combined with cell merging properties. Size information includes width and height values, which are dynamically adjusted using margin parameters and element content length in the page layout rules. The graphics interface fills the text content into a rectangular area based on coordinate positions, or scales image components according to size information. That is, using a graphics library API, text, images, and other content are drawn onto a virtual canvas according to the calculated position and size information, ultimately synthesizing a complete page image. This process, through a layered rendering mechanism, ensures that page elements are displayed in the correct order, avoiding element occlusion or misalignment, and ultimately achieving accurate presentation of the target document in the content display area. Through the above technical solution, this application achieves an efficient and accurate document rendering process. The use of a DOM tree structure makes the relationships between elements clearly visible, facilitating subsequent layout calculations and rendering operations. By precisely calculating the position and size of elements, the accuracy of the rendering results is ensured. The layer-by-layer rendering method guarantees the correct presentation of complex page structures. This rendering method not only improves rendering efficiency but also enhances the consistency between the rendered results and the original target document or proofread document content, providing users with a better document viewing experience.
[0043] In other embodiments, based on the location information, the target difference information is controlled to be displayed in a first display mode in the content display area along with the target document and the proofreading document. Information in the target document and the proofreading document other than the target difference information is displayed in a second display mode. The first display mode differs from the second display mode. After obtaining the difference information, the system determines the number of difference information points. When the number of difference information points exceeds a threshold, the first display mode is used. The first display mode includes dividing the display page into a content display area and a result display area. When the number of difference information points is less than or equal to the threshold, the first display mode displays the content display area directly on the display page. The content display area is used to display the target document and the proofreading document side-by-side, and the result display area is used to categorize and display the difference information. In this embodiment, the user can select the target difference information through the content display area and the result display area respectively.
[0044] In this embodiment, when the display page is divided into a content display area and a result display area, it is also determined whether there are identical difference information among the difference information. If so, the identical difference information is determined to be of the same type. The first difference information of the same type is displayed in the result display area. Specifically, determining whether there are identical difference information can be done by comparing any features such as the content, type, and position of the difference information. For example, a string matching algorithm can be used to compare the text content of the difference information, or to compare whether the start and end positions of the difference information are completely consistent. Determining whether the difference information is identical can be based on a string matching algorithm or hash value comparison. When determining the same type of difference information, difference items with the same semantics or character content are grouped into the same category, and a unique identifier is assigned to each type of the same type of difference information. For the categorized set of difference information, any difference item can be extracted as a representative item for display, such as the first difference information. The interface layout of the result display area adopts a collapsible design, and users can click to expand the complete list of the same type of difference information. Specifically, after detecting difference information, the system scans the differences between the target document and the proofreading document line by line, extracts the difference text content, and calculates its hash value. For differences with identical hash values, they are marked as similar differences. In the results display area, any one instance of similar differences (e.g., the first instance) is displayed as a representative item, while the remaining similar items are hidden in the collapsed area. When the user selects the representative item, the corresponding difference location in the target document and the proofreading document is simultaneously highlighted in the content display area. Similarly, when the user selects any difference information in the collapsed area, the corresponding difference location in the target document and the proofreading document is simultaneously highlighted in the content display area. Categorizing and collapsing similar differences through hash value comparison and other methods reduces redundant information in the results area and saves interface space. Selecting a representative item or a collapsed item simultaneously highlights the corresponding difference, simplifying the operation process and allowing users to quickly locate differences, effectively improving document proofreading efficiency.
[0045] This application enables the effective categorization and concise display of a large amount of discrepancy information. Users can quickly identify the main discrepancy types in a document, avoiding the interference of repetitive information. By displaying any one of the discrepancies within the same category, the amount of information in the results display area is reduced, effectively improving user reading efficiency. Furthermore, by reducing the number of duplicate discrepancies displayed on the interface, visual clutter is minimized while retaining the ability to quickly locate similar discrepancies. For example, in a contract document where formatting errors appear multiple times, the system displays the first instance of the error, allowing users to correct it and then process similar errors in batches simultaneously.
[0046] Specifically, after a user corrects the first error instance, the system immediately pops up a suggestion box offering two options: "Batch Synchronize Correction" and "Currently Only Correction". If the user chooses batch synchronization, the system will automatically identify all errors of the same type based on unique identifiers of similar differences and apply the correction to other similar errors. For example, in a financial statement document, if there are multiple similar formula calculation errors, after the user corrects the first error and selects batch synchronization, the system will iterate through all similar formula errors and automatically adjust the formula parameters according to the correction logic. Similarly, in a technical patent document, if there are multiple similar formatting errors, after the user corrects and batch synchronizes, the system can automatically and uniformly adjust the font, paragraphs, numbering, and other formatting. This solution, through automated batch processing, avoids repetitive user operations, significantly improving error correction efficiency, especially suitable for large-scale proofreading scenarios involving long documents. Furthermore, through standardized synchronization correction logic, it ensures consistency in correcting similar errors, reducing the risk of oversights caused by manual operation, thus optimizing the document proofreading experience from both efficiency and accuracy perspectives.
[0047] Step 302: Monitor the differences in the target selected by the user.
[0048] When the display page has a content display area and a results display area: Users select target difference information through the results display area, which displays the target difference information in the form of a list. The difference information can be multiple categories of difference information (multiple difference information of the same type), multiple categories of difference information, and difference information that does not need to be categorized. The display order of the difference information can be to first display the difference information that is categorized, and then display the difference information that does not need to be categorized. If the results display area cannot display all the difference information, a scroll bar is set in the results display area to display all the difference information.
[0049] When the display page has a content display area: Check if the number of discrepancy information entries is greater than 1. If not, highlight the target discrepancy information in both the target document and the proofreading document within the content display area. If the number of discrepancy information entries is greater than 1, monitor whether the user selects the target discrepancy information from the jump icon. The jump icon records the target information in descending order of the number of target discrepancy information entries in a single page document; if there is no target discrepancy information in a single page document, the jump icon is not displayed.
[0050] When the display page is divided into content display areas, the location information of the target difference information in the target document and the proofreading document is obtained. It is determined whether there are at least two target difference information pieces that are simultaneously on the same page number in both the target document and the proofreading document. If so, the target with more target difference information pieces on the same page number is displayed first. When the user wants to select other target difference information, they can select the target difference information based on the jump indicator on the last character of the last target difference information piece on the current page, as shown in Figure 2(C). In Figure 2, the jump indicator is an arrow, which is only for illustration, and this embodiment does not limit the specific form of the jump indicator. In addition, the jump indicator can be after the last character of the target difference information, between the target difference information pieces, or before the first character. The specific position of the jump indicator is not limited. The jump indicator records the target information in descending order of the number of target difference information pieces on a single page document. However, if there is no target difference information on a single page document, it will not be displayed in the jump indicator. A search function bar is included in the jump indicator to ensure that the user can search for target difference information according to the actual situation.
[0051] When the display page is a content display area, if at least two target difference information entries do not exist on the same page in the target document, the display content of the target document and the proofreading document in the content display area is controlled according to the location information. This is to highlight the first target difference information entry in the target document and the proofreading document in the content display area. This indicates that the target difference information entries are distributed across different page numbers. In this case, unless otherwise specified by the user, the display content of the target document and the proofreading document in the content display area is controlled according to the location information of the first target difference information, so that the first target difference information entry is displayed in the first display mode, i.e., highlighted in the target document and the proofreading document in the content display area. To facilitate users in finding other target difference information entries, a jump marker is inserted after the last character of the target difference information entry; the target difference information is then searched within the jump marker.
[0052] Step 303: Obtain the location information corresponding to the target difference information in the target document and the proofreading document, and control the display content of the target document and the proofreading document in the content display area according to the location information, so that the target difference information is highlighted in the target document and the proofreading document in the content display area.
[0053] When the amount of the difference information data is less than or equal to a threshold, and the display page is a content display area, the location information of the target difference information in the target document and the proofreading document is obtained. Based on the location information, the target difference information is highlighted in the content display area. Specifically: the location information of the target difference information in the target document and the proofreading document is obtained; based on the location information and the page number distribution characteristics of the target difference information in the target document, the display content of the target document and the proofreading document in the content display area is controlled so that the corresponding target difference information is highlighted in the target document and the proofreading document in the content display area; wherein, the page number distribution characteristics include whether there are at least two target difference information pieces located on the same page in the target document.
[0054] Scenario 1: When at least two target difference information are on the same page of the target document and the at least two target difference information are on the same page of the proofreading document, the display content of the target document and the proofreading document in the content display area is controlled according to the position information, so that the target difference information is highlighted in the target document and the proofreading document in the content display area.
[0055] In this scenario, the system prioritizes displaying the target difference information from pages with more target differences within the same page. Based on the page number information, it controls the display content of the target document and proofreading document in the content display area, highlighting the target difference information within them. If the user wants to browse other target difference information, they can use the jump marker after the last character of the last target difference information. This jump marker is used to select other target difference information besides the current one. In response to the user's triggering of the jump marker, the system synchronously controls the display content of the target document and proofreading document, ensuring that the current target difference information is highlighted within them. In this step, the highlighting methods for different discrepancies at the same location within the same page number differ. In the target document, page 5 contains two discrepancies, A1 and A2; in the proofreading document, page 5 contains two discrepancies, B1 and B2. A1 and B1 represent different discrepancies at the same location, as do A2 and B2. In this case, A1 and B1 are highlighted with the same pattern, and A2 and B2 are highlighted with the same pattern. This technology prioritizes displaying pages with dense discrepancies, combining page number information with precise highlighting, making it easier for users to focus on key areas. Jump indicators allow users to quickly switch between browsing other discrepancies, improving operational continuity. Different highlighting patterns are used for discrepancies at different locations, while the pattern is consistent for discrepancies at the same location, helping users intuitively distinguish discrepancy types and their corresponding relationships, reducing information confusion, and improving document proofreading efficiency and accuracy.
[0056] Scenario 2: If at least two target difference information entries do not exist on the same page in the target document, the display content of the target document and the proofreading document in the content display area is controlled according to the location information, so that the first target difference information entry is highlighted in the target document and the proofreading document in the content display area. If the user wants to display other target difference information in this case, they can do so through the following steps: A jump marker is inserted after the last character of the target difference information. This marker is used to select other target difference information besides the first one. In response to the user's triggering of the jump marker, the display content of the target document and the proofreading document is synchronously controlled so that other target difference information besides the currently displayed target difference information is highlighted in the content display area of the target document and the proofreading document. The jump marker is configured as an interactive graphic element, and its triggering operation includes click or touch events. The positioning of other target difference information depends on the order of the difference information in the document. The process of synchronously controlling the display content needs to match the page layout parameters of the target document and the proofreading document to ensure that the highlighted areas remain vertically aligned when displayed side-by-side.
[0057] For example, when a specific target difference information is currently displayed, users can use the jump icon to navigate to any other target difference information before or after it. The jump icon can be placed anywhere within the currently displayed target difference information, allowing users to jump to any other target difference information. This feature enables users to find any other target difference information via jump icons, eliminating sequential restrictions and greatly improving the flexibility and efficiency of difference retrieval. It also optimizes the document difference proofreading process, allowing users to complete document proofreading tasks more efficiently.
[0058] For example, the jump indicator could be a small arrow icon or a "Next" button. When a user triggers the jump indicator, the system responds to the trigger. Specifically, the system first obtains the position of the currently highlighted target difference information in the document. Then, the system searches for the next adjacent target difference information in both the target document and the proofreading document. After finding the next target difference information, the system synchronously controls the display content of the target document and the proofreading document. This includes simultaneously positioning or scrolling both documents to the location of the new target difference information and highlighting that difference in both documents. Highlighting can be achieved by changing the text background color or adding borders, so that users can intuitively see the difference. At the same time, the system will also update the positioning or scrolling position of the two documents in the content display area to ensure that the new target difference information is within the visible range. When the page number differences in the target document are scattered, this technology prioritizes highlighting the first difference, making it easy for users to quickly locate the starting point. The jump indicator allows users to easily switch to view subsequent differences, and the operation is smooth. Simultaneous control of dual document display ensures intuitive comparison of differences, improves proofreading continuity and efficiency, effectively avoids the tediousness of manual searching for users, and optimizes the document proofreading experience.
[0059] When the amount of difference information data exceeds the threshold, and the display page is a content display area and a result display area, the location information of the target difference information in the target document and the proofreading document is obtained, and the target difference information is highlighted in the content display area according to the location information.
[0060] Scenario 1: When a user selects similar difference information in the results display area, the location information of the first difference information representing that difference information is obtained in the target document and proofreading document. Based on this location information, the display content of the target document and proofreading document in the content display area is controlled so that the target difference information is highlighted in the target document and proofreading document in the content display area. If the user needs to display other target difference information in the similar difference information, the target difference information is selected from the complete list of similar difference information in the folded design of the results display area. At this time, based on the location information of the target difference information, the display content of the target document and proofreading document in the content display area is controlled so that the target difference information is highlighted in the target document and proofreading document in the content display area.
[0061] Scenario 2: When a user selects discrepancy information that does not require categorization in the results display area, i.e., when there is no identical discrepancy information, the user can directly select the target discrepancy information in the results display area, or search for the target discrepancy information in the search bar of the results display area. The search method can determine the target discrepancy information by searching in the order of discrepancies in the results display area. Based on the location information of the target discrepancy information, the display content of the target document and the proofreading document in the content display area is controlled so that the target discrepancy information is highlighted in the target document and the proofreading document in the content display area.
[0062] It is worth noting that, in order to reduce the distance the user's eyes need to move and to facilitate observation, this application also limits the position of the target difference information highlighted in the target document and proofreading document in the content display area, displaying it in the center of the target document and proofreading document in the content display area, as follows: Obtain first position information, which is the position information of the target difference information in the target document; determine the vertical center point Y value of the first position based on the minimum Y value and maximum Y value in the first position information, where the Y value is the vertical coordinate of the first position information; obtain the top offset of the target document page in the content display area and the height value of the content display area; determine the scroll amount of the target difference information based on the top offset, half of the height value, and the vertical center point Y value of the first position, so that the target difference information is highlighted in the target document in the content display area; Obtain second position information, which is the position information of the target difference information in the proofreading document; determine the vertical center point Y value of the second position based on the minimum Y value and the maximum Y value in the second position information; obtain the top offset of the proofreading document page in the content display area and the height value of the content display area; based on the top offset, half of the height value, and the vertical center point Y value of the second position, determine the scroll amount of the target difference information in the proofreading document so that the target difference information is highlighted in the proofreading document in the content display area.
[0063] The vertical center point Y-value of the first position is (minimum Y-value + maximum Y-value in the first position information) / 2. After determining the amount of target difference information, the operation to scroll the target difference information to the target position is as follows: Set the scrollTop property of the scroll container (viewerContainerEl) to scroll to the target position. Use Math.max(0, targetScrollTop) to ensure that the scroll position is not negative (to avoid the container scrolling upwards beyond the content area). For example, const targetScrollTop (target difference information scroll amount) = targetPageWrapper.offsetTop (top offset of the target document page in the content display area) + centerY (vertical center point Y-value of the first position) - containerHeight / 2 (half the height value), then scrolling to the target position is: viewerContainerEl.scrollTop = Math.max(0, targetScrollTop).
[0064] In summary, by using formulas such as scroll amount = top offset + vertical center point Y value - height value / 2, the target difference information is accurately calculated and highlighted in the center of the document, effectively shortening the distance the user's eyes move, improving observation convenience, and significantly enhancing the efficiency and comfort of document proofreading.
[0065] This embodiment also includes: after the target difference information is highlighted in the target document and proofreading document in the content display area, in response to the user's modification request, a modification display area is created, in which the target difference information in the current target document and proofreading document is displayed; if a change in the target difference information in the modification display area is detected, the corresponding content in the target document and proofreading document in the content display area is modified synchronously. In some examples, the synchronous modification of the corresponding content in the target document and proofreading document in the content display area can specifically be as follows: when creating the modification display area, a two-way data binding relationship is established between the area and the document in the content display area; when a change in the target difference information in the modification display area is detected, a data synchronization mechanism is triggered to update the changed content in real time to the corresponding positions in the target document and proofreading document in the content display area, ensuring that the content at both ends is consistent, thereby achieving synchronous presentation of modifications.
[0066] Specifically, after the target difference information is highlighted, in response to the user's modification request, a modification display area is created, independent of the content display area and the result display area, as shown in Figure 2(b). This modification display area is directly above or below the result display area, and its width is the same as the result display area. This modification display area can also float on the content display area without obscuring the target difference information. An event listening mechanism is used to monitor changes in the target difference information, capturing input events or attribute change events of text nodes within the modification display area in real time. The content is modified synchronously by updating the data of the corresponding nodes in the document object model tree and triggering a partial redrawing process in the content display area to maintain data consistency between the two areas. The modification display area supports the integration of text editing controls, formatting controls, and version comparison controls. It is evident that by creating an independent modification display area, focusing on the target difference facilitates modification operations. The event listening mechanism captures information changes in real time, ensuring that the modified content is updated synchronously with the original document area, avoiding data contradictions. The integration of multiple editing controls expands modification functions, simplifies the operation process, and effectively improves the efficiency and accuracy of document proofreading and modification.
[0067] Furthermore, as a response to the above Figure 1 , Figure 3 To implement the method shown, this application embodiment provides a device for displaying target difference information in a document. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the aforementioned method embodiment. Specifically, as shown... Figure 4 As shown, the device includes: Analysis unit 41 is used to analyze the difference information between the target document and the proofreading document based on the received document to be proofread; The partitioning unit 42 is used to divide the display page into a content display area and a result display area when the number of difference information is greater than a threshold. The content display area is used to display the target document and the proofreading document at the same time, and the result display area is used to display the difference information. Monitoring unit 43 is used to monitor the target difference information selected by the user in the division unit result display area; The location unit 44 is used to obtain the location information corresponding to the target difference information of the monitoring unit 43 in the target document and the proofreading document; Display unit 45 is used to acquire the location information of the target difference information in the target document and the proofreading document. The display unit 45 is configured to control the target difference information to be displayed in the content display area in a first display mode according to the location information, wherein the information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
[0068] Furthermore, such as Figure 5 As shown, the device further includes a rendering unit 46, which includes: Traversal module 461 is used to traverse the target document and the proofreading document based on the document page number in order to obtain the target document rendering task and the proofreading document rendering task; The allocation module 462 is used to allocate the target document rendering task and the proofreading document rendering task of the traversal module 461 to different rendering threads based on an asynchronous task scheduling mechanism. The rendering module 463 is used to render the target document rendering task and the proofreading document rendering task in the rendering thread corresponding to the allocation module 462 based on preset rendering rules, and then push the rendering results to the content display area for display.
[0069] Furthermore, such as Figure 5 As shown, the rendering module 463 includes: The model tree acquisition submodule 4631 is used to obtain the page element structure in the target document rendering task and generate the corresponding document model tree. The tree traversal submodule 4632 is used to traverse the document object model tree of the model tree acquisition submodule 4631 and calculate the coordinate position and size information of each element according to the page layout rules. The result generation submodule 4633 is used to call the graphics interface to draw the page content layer by layer based on the coordinate position and size information, so as to generate the rendering result of the target document.
[0070] Furthermore, such as Figure 5 As shown, when the amount of difference information data is less than a threshold, the display page is a content display area, and the display unit 45 further includes: The location acquisition module 451 is used to acquire the location information corresponding to the target difference information in the target document and the proofreading document; The display module 452 is used to control the display content of the target document and the proofreading document in the content display area according to the position information of the position acquisition module 451 when at least two target difference information are in the same page of the target document and the at least two target difference information are in the same page of the proofreading document, so that the target difference information is highlighted in the target document and the proofreading document in the content display area. The display module 452 is used to control the display content of the target document and the proofreading document in the content display area according to the position information obtained by the position acquisition module 451 when there are no at least two target difference information in the target document on the same page, so that the first target difference information is highlighted in the target document and the proofreading document in the content display area.
[0071] Furthermore, such as Figure 5 As shown, the display unit 45 further includes: Insertion module 453 is used to insert a jump guide identifier after the last character of the target difference information, the jump identifier being used to select any target difference information; The response module 454 is used to respond to the user's trigger operation on the jump identifier of the insertion module 453, and synchronously control the display content of the target document and the proofreading document, so that other target difference information besides the currently displayed target difference information is highlighted in the target document and the proofreading document in the content display area.
[0072] Furthermore, such as Figure 5 As shown, the dividing unit 42 includes: The judgment module 421 is used to determine whether there is any identical difference information among the difference information; The determination module 422 is used to determine that if the judgment module 421 determines that the same difference information exists, the same difference information is classified as the same type of difference information. The determining module 422 is used to display the first difference information among similar difference information in the result display area.
[0073] Furthermore, such as Figure 5 As shown, when the target difference information is the first difference information among similar difference information, the display unit 45 further includes: The corresponding location acquisition module 455 is used to acquire the location information corresponding to the first difference information in the target document and the proofreading document; The display module 456 determines the display content of the target document and the proofreading document in the content display area based on the location information obtained by the corresponding location module 455, so that the target difference information is highlighted in the target document and the proofreading document in the content display area.
[0074] Furthermore, such as Figure 5 As shown, the device further includes a modification unit 47, which includes: The creation area module 471 is used to respond to the user's modification request after the target difference information is highlighted in the target document and the proofreading document in the content display area, and to create a modification display area, wherein the target difference information in the current target document and the proofreading document is displayed in the modification display area; The monitoring and modification module 472 is used to monitor whether the target difference information within the modified display area by the creation area module 471 has changed. The monitoring and modification module 472 is used to synchronously modify the corresponding content in the target document and the proofreading document in the content display area if a change is determined.
[0075] Furthermore, such as Figure 5 As shown, the display unit 45 further includes: The information acquisition module 457 is used to acquire first location information, which is the location information of the target difference information in the target document; The information acquisition module 457 is used to determine the vertical center point Y value of the first position based on the minimum Y value and the maximum Y value in the first position information, wherein the Y value is the ordinate of the first position information; The information acquisition module 457 is used to acquire the top offset of the target document page in the content display area and the height value of the content display area; The area display module 458 is used to determine the scrolling amount of the target difference information based on the top offset, the height value, and the Y value of the vertical center point of the first position of the information acquisition module 457, so that the target difference information is highlighted in the target document of the content display area.
[0076] Furthermore, embodiments of the present invention also provide a computing device, the computing device comprising: at least one processor and a memory, wherein the memory stores instructions executable by the processor, the instructions being executed by the processor, thereby enabling the processor to perform the above-described operations. Figure 1 , Figure 3 The method for displaying target difference information in the document described herein.
[0077] Furthermore, the present invention also provides a readable storage medium for storing a computer program, wherein the computer program, when running, controls the device where the storage medium is located to perform the above-described steps 1. Figure 3 The method for displaying target difference information in the document described herein.
[0078] Furthermore, the present invention also provides a computer program product, the computer product comprising a computer program, which is executed by a processor as described above. Figure 1 , Figure 3 The method for displaying target difference information in the document described herein.
[0079] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0080] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.
[0081] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0082] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0083] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will 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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0088] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0089] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0090] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0091] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0092] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The above descriptions are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for displaying target difference information in a document, characterized in that, include: Based on the received documents to be proofread, analyze the differences between the target document and the proofread document; When the number of discrepancies exceeds a threshold, the display page is divided into a content display area and a result display area. The content display area is used to display the target document and the proofread document simultaneously, and the result display area is used to display the discrepancies. Monitor the target difference information selected by the user in the results display area; Obtain the location information of the target difference information in the target document and the proofreading document; Based on the location information, the target difference information is controlled to be displayed in the content display area in a first display mode for the target document and the proofreading document, wherein information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
2. The method according to claim 1, characterized in that, When the amount of the difference information data is less than or equal to the threshold, the display page is a content display area, and the method further includes: Obtain the location information of the target difference information in the target document and the proofreading document; When at least two target difference information are on the same page of the target document and the at least two target difference information are on the same page of the proofreading document, the display content of the target document and the proofreading document in the content display area is controlled according to the position information, so that the target difference information is highlighted in the target document and the proofreading document in the content display area; If there are no at least two target difference information entries on the same page in the target document, the display content of the target document and the proofreading document in the content display area is controlled according to the location information, so that the first target difference information entry is highlighted in the target document and the proofreading document in the content display area.
3. The method according to claim 2, characterized in that, The method further includes ensuring that at least two target difference information items do not exist on the same page in the target document, and controlling the display content of the target document and the proofreading document in the content display area based on the position information, so that the first target difference information item is highlighted in the target document and the proofreading document in the content display area, and also includes: A jump identifier is inserted after the last character of the target difference information, and the jump identifier is used to select any target difference information; In response to the user's triggering operation on the jump identifier, the display content of the target document and the proofreading document is controlled synchronously so that other target difference information besides the currently displayed target difference information is highlighted in the target document and proofreading document in the content display area.
4. The method according to claim 1, characterized in that, When the number of discrepancies exceeds a threshold, the display page is divided into a content display area and a result display area. The content display area is used to display the target document and the proofreading document side-by-side, and the result display area is used to categorize and display the discrepancies, including: If there are identical differences among the differences, the identical differences are identified as the same type of differences. The first difference in the same category of difference information is displayed in the results display area.
5. The method according to claim 1, characterized in that, The method further includes: After the target difference information is highlighted in the target document and proofreading document in the content display area, a modification display area is created in response to the user's modification request. The modification display area displays the target difference information in the current target document and proofreading document. If a change in target difference information is detected within the modified display area, the corresponding content in the target document and the proofreading document in the content display area will be modified simultaneously.
6. The method according to any one of claims 1-5, characterized in that, The step of controlling the display content of the target document and the proofreading document in the content display area according to the location information, so that the target difference information is highlighted in the target document and the proofreading document in the content display area, includes: Obtain first location information, which is the location information of the target difference information in the target document; Based on the minimum and maximum Y values in the first position information, determine the Y value of the vertical center point of the first position, where the Y value is the ordinate of the first position information; Obtain the top offset of the target document page within the content display area and the height of the content display area; Based on the top offset, half of the height value, and the Y value of the vertical center point of the first position, the scrolling amount of the target difference information is determined so that the target difference information is highlighted in the target document in the content display area.
7. A device for displaying target difference information in a document, characterized in that, include: The analysis unit is used to analyze the differences between the target document and the proofreading document based on the received document to be proofread; A partitioning unit is used to divide the display page into a content display area and a result display area when the number of difference information exceeds a threshold. The content display area is used to display the target document and the proofreading document at the same time, and the result display area is used to display the difference information. The monitoring unit is used to monitor the target difference information selected by the user in the result display area of the segmentation unit; A location unit is defined to obtain the location information corresponding to the target difference information of the monitoring unit in the target document and the proofreading document; The display unit is used to acquire the location information of the target difference information in the target document and the proofreading document. The display unit is configured to control the target difference information to be displayed in the content display area in a first display mode according to the location information, wherein information in the target document and the proofreading document other than the target difference information is displayed in a second display mode, and the first display mode and the second display mode are different.
8. A storage medium, characterized in that, The storage medium is used to store a computer program, wherein when the computer program is executed, it controls the device where the storage medium is located to perform the method for displaying target difference information in the document according to any one of claims 1-6.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being used to call program instructions in the memory to execute the method for displaying target difference information in a document as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer product includes a computer program that is executed by a processor using the method for displaying target difference information in a document as described in any one of claims 1-6.