A method, system, and device for text segmentation and highlighting based on speech character position mapping
By using character-level position mapping and multi-layer scroll-driven calculation modules, the synchronization and resource consumption issues of text scrolling and highlighting in the teleprompter are solved, achieving high-precision text synchronization display with low computing power, and supporting multi-mode adaptation and seamless integration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHANGZHOU SEETEC OPTOELECTRONICS TECH CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-30
AI Technical Summary
Existing teleprompter text scrolling and highlighting technologies suffer from problems such as insufficient voice synchronization accuracy, high resource consumption, inability to adapt to multiple modes, high access costs, and poor synchronization.
By establishing character-level position mapping and building a multi-layer adaptive scroll-driven calculation module, the system achieves precise matching between the highlighted area and the reading position, filters non-viewport content, decouples the highlighting module from the prompting engine, realizes synchronous display with low computational overhead, and is compatible with the Qt/QML rendering framework.
It improves voice tracking accuracy, reduces computing power consumption, achieves smooth scrolling over long periods, supports continuous scrolling and chapter jump modes, can be adapted without modifying the underlying logic, reduces access costs, and ensures the synchronization of highlighted displays.
Smart Images

Figure CN122309020A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, system, and device for highlighting text segments based on speech character position mapping. Background Technology
[0002] Currently, teleprompter text scrolling and highlighting technologies mainly rely on overall text rendering and simple progress matching, which have significant shortcomings in terms of voice synchronization, segmented following, scrolling accuracy, and rendering adaptation. The text and the highlighted text do not have a character-level position mapping relationship. They are only roughly divided by paragraph or line. The highlighted area deviates greatly from the actual reading position, resulting in insufficient accuracy in speech tracking.
[0003] The scroll-driven calculation does not perform viewport filtering and feature modulation. Non-display area content participates in rendering and calculation, resulting in high resource consumption and easy stuttering and frame drops during long-term scrolling.
[0004] The highlighting module is deeply coupled with the prompting engine. Modifying the highlighting logic requires modifying the underlying engine. It cannot adapt to both continuous scrolling and chapter jumping modes, and the synchronous calibration mechanism is missing.
[0005] The highlight output does not match the rendering input dimension, and coordinates, ranges, and sizes need to be converted multiple times, resulting in high integration costs and difficulty in seamlessly integrating with rendering frameworks such as Qt / QML.
[0006] The lack of a unified timing benchmark means that highlight updates and text scrolling are not synchronized, which can easily lead to jumps, delays, and misalignments, failing to meet the requirements of low computing power and high stability in prompting display. Summary of the Invention
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A text segmentation highlighting method based on speech character position mapping includes: preprocessing the text content, scrolling sequence, scrolling speed, and font layout features, uniformly converting them into a format specified by the prompting rendering character coordinates and progress percentage; extracting fixed-structure text character indices and highlighting interval vectors through position mapping calculation and segment boundary detection to generate position preprocessing and highlighting reference information adapted for prompting display; building a multi-layer adaptive scrolling-driven calculation module, copying the scrolling progress vector along the text time axis, modulating the text display features layer by layer through the scrolling parameter layer to suppress non-viewport components, restoring it to the original screen pixel dimension through the rendering projection layer, and completing scrolling synchronization calibration by combining visual alignment error, generating segmented modulation fusion and restoration information with highlighting following capability. The highlight extraction module is directly cascaded with the feature domain of the fixed logic word-prompting control engine. All logic of the fixed control engine ensures that updates flow only in the front-end mapping layer. The target highlight segment is obtained by inputting the scrolling sequence and text content. According to the word-prompting architecture, progress deviation calibration is selected for continuous scrolling mode and segment matching calibration is selected for chapter jump mode, generating synchronous feedback and parameter optimization information that only updates the front end. The output dimension of the highlight segment is aligned with the input dimension of word-prompting rendering, generating pixel coordinate matching and lightweight parameter adjustable plug-and-play adaptation information that adapts to the target rendering framework. Relying on the task consistency collaborative calibration mechanism of the fixed word-prompting engine, the word-prompting control engine is used as a static timing discriminator to generate scrolling text synchronous display and highlight segment information with low computational overhead and high following accuracy.
[0008] A text segmentation highlighting system based on speech character position mapping is disclosed. The system includes: a text feature preprocessing module, used to preprocess text content, scrolling sequence, scrolling speed, and font layout features, uniformly converting them into character coordinates and progress percentage format specified for prompting rendering; extracting fixed-structure text character indices and highlighting interval vectors through position mapping calculation and segment boundary detection to generate position preprocessing and highlighting reference information adapted for prompting display; a multi-layer adaptive scrolling driving module, used to build a multi-layer adaptive scrolling driving calculation module, copying the scrolling progress vector along the text time axis and modulating the text display features layer by layer through a scrolling parameter layer, suppressing non-viewport components, restoring it to the original screen pixel dimension through a rendering projection layer, and completing scrolling synchronization calibration by combining visual alignment errors to generate segmented modulation fusion and restoration information with highlighting following capability; and a highlighting index module. The direct-connect cascade module connects the highlight extraction module directly to the feature domain of the fixed-logic word-prompting control engine. All logic of the fixed control engine ensures updates flow only through the front-end mapping layer. Inputting the scrolling sequence and text content yields the target highlighted segments. Based on the word-prompting architecture, it selects progress deviation calibration for continuous scrolling mode and segment matching calibration for chapter jump mode, generating synchronous feedback and parameter optimization information that only updates the front end. The rendering dimension alignment and adaptation module aligns the highlighted segment output dimension with the word-prompting rendering input dimension, generating pixel coordinate matching and lightweight parameter-adjustable plug-and-play adaptation information to adapt to the target rendering framework. The low-computing-power synchronous display module, relying on the task consistency collaborative calibration mechanism of the fixed word-prompting engine, uses the word-prompting control engine as a static timing discriminator to generate low-computing-power, high-accuracy scrolling text synchronous display and highlighted segment information.
[0009] An electronic device includes: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the above-described text segmentation highlighting method based on voice character position mapping by executing the executable instructions.
[0010] A computing device includes a memory for storing computer program instructions and a second processor for executing the computer program instructions, wherein when the computer program instructions are executed by the second processor, the device is triggered to execute the above-described text segmentation highlighting method based on speech character position mapping.
[0011] Its beneficial effects are as follows: First, the text, scrolling parameters, and font layout are preprocessed and uniformly converted into character coordinates and progress percentage formats. Character indices and highlight interval baseline information are generated through position mapping and segment detection. A multi-layer adaptive scrolling-driven calculation module is built to modulate text features and filter non-viewport content. The highlighting effect is formed through pixel restoration and synchronous calibration. The highlighting module is directly cascaded with the teleprompter control engine, and the synchronous calibration of continuous scrolling and chapter jumps is only completed in the front-end mapping layer. The highlighting output is seamlessly adapted to the Qt / QML rendering framework through dimension alignment. The teleprompter engine is used as a static temporal discriminator. Relying on the task consistency collaborative calibration mechanism, a complete technical solution for teleprompter text synchronization and segmented highlighting with low computational overhead, high following accuracy, and pluggable access is finally formed.
[0012] This application aims to establish a character-level position mapping, accurately matching the highlighted area with the reading position, significantly improving the accuracy of voice tracking; filtering non-viewport content and optimizing rendering logic reduces computational power consumption, ensuring smooth scrolling without lag or frame drops over extended periods; the highlighting module is decoupled from the prompting engine, allowing adaptation to continuous scrolling and chapter jump modes without modifying the underlying logic. The output dimension is aligned with the rendering input, enabling non-intrusive and pluggable integration into Qt / QML frameworks with low adaptation costs; highlight updates are driven by a unified timing benchmark, ensuring good synchronization between scrolling and highlighting without jumps, lags, or misalignments. Attached Figure Description
[0013] Figure 1 A flowchart illustrating a text segmentation and highlighting method based on voice character position mapping provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a text segmentation and highlighting system based on voice character position mapping, provided in an embodiment of the present invention. Detailed Implementation
[0014] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention. In one embodiment, this application also proposes a method for text segmentation and highlighting based on speech character position mapping.
[0015] In this application embodiment, a method for highlighting text segments based on speech character position mapping is provided, such as... Figure 1 As shown: S101 performs feature preprocessing on text content, scrolling sequence, scrolling speed, and font layout, and converts them into a unified format of character coordinates and progress percentage specified for prompting rendering. Through position mapping calculation and segment boundary detection, it extracts fixed-structure text character indexes and highlight interval vectors to generate position preprocessing and highlighting reference information adapted for prompting display.
[0016] In one implementation, combining the continuous scrolling and highlighting requirements of the teleprompter with the text character position mapping logic, a text segmentation rule and screen coordinate mapping mechanism are introduced to preprocess the input text content, scrolling speed, font size, and layout parameters. Taking the speech manuscript as the processing object, a text segmentation rule is established based on the separation characteristics of the natural paragraphs in the manuscript. This rule uses blank lines between paragraphs and line breaks at the end of paragraphs as identification criteria, splitting the continuous text stream into multiple independent text segments according to paragraph boundaries. Each segment is assigned an independent segment number, and the characters within each segment are assigned consecutive and unique character sequences, making the text form structured data that can be accurately located, independently rendered, and independently highlighted.
[0017] Based on the device screen resolution and the actual size of the teleprompter display area, a method for converting text character positions to screen pixels is established. This method converts relative values such as the horizontal and vertical positions of the text, line spacing, and paragraph spacing into absolute pixel coordinates according to the width and height of the display area, ensuring that each character, each line of text, and each paragraph corresponds to a fixed screen drawing position. The complete document content, scrolling speed settings, font size settings, horizontal margin settings, and vertical margin settings are all uniformly incorporated into the teleprompter display preprocessing workflow.
[0018] A parameter normalization method is used to uniformly transform all parameters, converting parameters of different units and dimensions into standard values in pixels, enabling all types of parameters to directly participate in coordinate calculations. Based on the standardized parameters, preliminary coordinate calculations are performed: the pixel width of a single character and the pixel height of a single line of text are calculated based on the font size; the starting coordinates of the top of the text are calculated based on the vertical margin and the single-line height; the starting coordinates of the left side of the text are calculated based on the horizontal margin; the maximum number of text lines that the visible area can accommodate are calculated based on the display area height and the single-line height; and the pixel interval between paragraphs is calculated based on the paragraph spacing.
[0019] Through the above paragraph division, coordinate conversion, parameter normalization and prior coordinate calculation, basic data with uniform format and stable values are generated, providing stable, consistent and reusable input conditions for subsequent text segmentation display, character position mapping, highlight interval determination and scrolling progress synchronization, ensuring that the teleprompter display and scrolling process does not have any offset, misalignment or lag.
[0020] Here's an example of a text paragraph division rule: A document containing three paragraphs is divided into three independent paragraphs by blank lines, labeled Paragraph 1, Paragraph 2, and Paragraph 3 respectively. The first character in Paragraph 1 is labeled as Character 1, the second character as Character 2, and so on, forming a character index system that allows for direct location.
[0021] Here's an example of how to convert text characters to screen pixels: With a screen resolution of 1920×1080, a display area height of 960 pixels, and a font size of 64 points, the height of a single line of text is 64 pixels. The vertical starting coordinate of the text = the vertical margin in pixels; the vertical coordinate of the text line = the vertical starting coordinate + the line number × the single-line height; ensuring that each line of text is accurately displayed in the preset position.
[0022] Here is an example of a parameter normalization method: the scroll speed percentage is converted to the number of pixels moved per frame; the font size points are converted to the character pixel height; the margin percentage is converted to the screen white space pixel value; all parameters are unified to pixel units to ensure consistency in subsequent calculations.
[0023] Here's an example of calculating the front coordinates: if the font size is 64 points, then the single-line height is 64 pixels; if the vertical margin is 80 pixels, then the top coordinate of the first line is 80, the second line is 144, and the third line is 208; the maximum number of lines that the display area can accommodate = display area height ÷ single-line height; this result is used to determine whether the text exceeds the display area, and to automatically hide the excess part.
[0024] The text content is segmented according to paragraphs and character indices, reconstructing the continuous text stream into segmented character sequences with positional indices, thus completing the structured reorganization of text display features. The continuously input speech manuscript is segmented according to natural paragraph separators, using blank lines or paragraph end marks as the dividing criteria to break the continuous text stream into multiple independent text paragraph units. Each segment is assigned an independent and unique paragraph number to distinguish different paragraphs and enable rapid paragraph location. Within each paragraph, each character is assigned a globally unique character index according to the display order of the text characters; this index remains continuous and non-repeating throughout the entire manuscript. The combination of paragraph numbers and character indices forms an overall ordered segmented character sequence, allowing any paragraph and any character to be accurately located using these methods. This transforms the originally unstructured, unformatted text into structured data with hierarchical relationships, positional relationships, and rendering attributes, providing a unified and readable data foundation for subsequent character coordinate mapping, scrolling progress calculation, and highlight interval determination.
[0025] Using consecutive blank lines and line breaks as paragraph boundaries, the system traverses the entire document and identifies the boundary positions, dividing the continuous text between the boundaries into independent paragraphs. If a document contains two blank lines, the entire document is automatically divided into three independent paragraphs, labeled Paragraph 1, Paragraph 2, and Paragraph 3. Starting from the first character of the entire document, each character is assigned a continuously increasing numerical index in the order of display from left to right and top to bottom. All paragraphs share the same index sequence, without repetition or interruption. For example, if Paragraph 1 contains 50 characters, the index is 1 to 50; if Paragraph 2 contains 60 characters, the index is 51 to 110; and if Paragraph 3 contains 70 characters, the index is 111 to 180, forming a globally unique index system.
[0026] The five pieces of information—paragraph number, character index, character content, paragraph start index, and paragraph end index—are combined into a fixed structure to form a data format that can be directly read by the rendering module. For example, if the start index of paragraph 2 is 51 and the end index is 110, the system records the corresponding indices 51 to 110 for paragraph 2, achieving a one-to-one binding of "paragraph—index—character," facilitating quick location of the paragraph and character corresponding to the current position during scrolling. The paragraph number is used for paragraph navigation, paragraph switching, and paragraph statistics; the character index is used to calculate scroll position, highlight range, and coordinate offset. These two identifiers together constitute the core data basis for the teleprompter's display and control.
[0027] By calculating coordinates, the scrolling progress is projected onto the screen's visible coordinate space, achieving a precise mapping between character positions and highlighted areas. This generates position preprocessing and highlighting baseline information adapted for teleprompter display, completing the front-end feature extraction for text segmentation highlighting in the teleprompter. The pixel coordinates of the currently displayed character on the screen are calculated based on the scrolling progress percentage, font size, and line height. The scrolling progress value is converted into a specific display position within the visible area, establishing a correspondence between scrolling progress and character coordinates. The highlight center interval is determined based on the prompt line position, marking read and unread intervals. Complete baseline information, including character index, pixel coordinates, display status, and highlighted intervals, is generated for the rendering module to directly call, completing all front-end feature extraction required for highlighting display.
[0028] S102, build a multi-layer adaptive scrolling drive calculation module, copy the scrolling progress vector along the text time axis, modulate the text display features layer by layer through the scrolling parameter layer, suppress non-viewport components, restore it to the original screen pixel dimension through the rendering projection layer, and complete the scrolling synchronization calibration by combining the visual alignment error, and generate segmented modulation fusion and restoration information with high brightness following capability.
[0029] In one implementation, the teleprompter scrolling control module is parameter-configured, defining the algorithm execution environment for scrolling speed, highlighting switch, and prompt line position. Based on the actual operating scenario of the teleprompter and user operation requirements, the scrolling control module is parameter-configured. According to the user-set scrolling speed level, the upward scrolling displacement rate of the text on the interface is determined, and the speed percentage value is converted into a fixed pixel step size for the text to move upwards each frame refresh, ensuring a smooth and uniform scrolling process. By enabling the highlighting function, differentiated display logic for read and unread text is activated, using different colors or transparency to distinguish between the text already played above the prompt line and the text to be played below the prompt line. A fixed pixel position for the prompt line is set in the vertical direction of the screen, using the line where the prompt line is located as the central reference benchmark for highlight determination. The character position where the prompt line is located is the current reading position, used to divide the read and unread intervals. After configuring the three parameters—scrolling speed, highlight enable, and vertical position of the prompt line—a unified and stable word prompting algorithm operating environment is established. This ensures that subsequent processes such as character coordinate calculation, highlight interval determination, scroll displacement update, and interface rendering are all executed using the same parameters, avoiding display misalignment, stuttering, or highlight offset due to inconsistent parameters.
[0030] The scrolling speed parameter uses a percentage mapping method, converting the user-set speed value into a text movement pixel value per frame. For example, if the user sets the scrolling speed to 100%, the system converts it to an upward movement of 4 pixels per frame based on the screen refresh rate, ensuring smooth and controllable scrolling. The highlight switch is an enable control item; when enabled, it triggers segmented highlighting logic; when disabled, it does not highlight and only keeps the text scrolling. The vertical position of the prompt line is calculated in pixel coordinates starting from the top of the screen. For example, setting the prompt line 480 pixels from the top, the line at that position is the current reading center; text above the prompt line is read, and text below the prompt line is unread. All parameters remain unchanged throughout the entire runtime, providing a unified standard for character positioning, interval determination, and rendering output, ensuring stable execution of the prompting process.
[0031] In the text rendering process, character indices and segmentation intervals are loaded to obtain initial highlighting and scrolling display results. The global character index data and segmentation boundary interval data generated in the preprocessing stage are completely passed into the rendering execution process as the basis for text display and highlighting. The rendering process arranges the text content in ascending order of the global character index, ensuring that the character display order is consistent with the original document order. Simultaneously, based on the starting and ending character positions recorded in the segmentation boundary intervals, continuous text is divided into paragraphs, allowing the text to be presented in the interface as paragraph units. The system determines the vertical display starting point of the text in the interface based on the initial scrolling position, and, combined with the vertical coordinate position of the tooltip, initially determines the start and end range of the text to be displayed in the current interface, while marking the character area corresponding to the tooltip position as the initial highlighting interval. After completing the above arrangement and marking, the original display screen without viewport filtering and synchronization calibration is output, providing basic screen data for subsequent filtering, calibration, and rendering.
[0032] Based on the globally unique character indexes generated during preprocessing, characters are arranged sequentially in ascending order of index to ensure the text order is correct. The character indices are 1, 2, 3...180, and during rendering, they are arranged character by character in this order to form a complete sentence. According to the start and end indices of the segments recorded in the segment intervals, paragraphs are separated at the corresponding character positions to form independently displayed paragraphs. Paragraph 1 corresponds to indices 1–50, and paragraph 2 corresponds to indices 51–110; during rendering, a paragraph separation is performed between indices 50 and 51. Using the initial scroll position as the starting point for the interface display, and combining the height of a single line of text and the height of the visible area, the maximum number of lines of text and the character range that can be displayed are calculated. If the initial scroll position is 0, and the interface can display 10 lines of text, then the first 10 lines of content are rendered as the initial display range.
[0033] Using the vertical coordinates of the tooltip as a reference, the characters in the line containing the tooltip are marked as the highlight center, initially defining the start and end positions of the highlight. Since the tooltip is located in the vertical center of the screen, corresponding to the 5th line of text, the characters in the 5th line are used as the initial highlight area. Only text sorting, paragraph division, range extraction, and highlight marking are performed; content outside the visible area is not removed, and synchronization calibration is not performed. The original image is output directly.
[0034] Extract text paragraph boundary and screen visible area data to establish a rule base for filtering text exceeding the viewport. Traverse all preprocessed text paragraphs, reading and recording the global start index of the first character and the global end index of the last character of each paragraph. Combine these indexes to form complete paragraph boundary data. Based on the current device's screen resolution and the width and height of the prompting interface display area, combined with the set font size, text line height, vertical margins, and paragraph spacing, calculate the maximum number of text lines that can be fully displayed vertically at a time, and the total number of characters within that range. This defines the visible area of the rendered interface. Based on the paragraph boundary indices and the visible area, establish text filtering rules. These rules use character indices and vertical coordinates as the basis for determining whether each line of text and each paragraph falls within the visible area, providing a unified basis for subsequent removal of content exceeding the screen.
[0035] The system records the start and end character indices for each paragraph to accurately locate the paragraph's start and end positions. Paragraph 1 has a start index of 1 and an end index of 50; Paragraph 2 has a start index of 51 and an end index of 110; Paragraph 3 has a start index of 111 and an end index of 180, forming a set of paragraph boundary data. Using the display area height, vertical margins, and single-line text height as parameters, the number of displayable lines is calculated. The formula is: Number of displayable lines = (Display area height) / (Vertical margins / Vertical margins). (Top and bottom vertical margins) ÷ Single line text height; Display area height 960 pixels, vertical margins 80 pixels each, single line height 64 pixels, number of lines that can be displayed = (960) 160) ÷ 64 = 12 lines, meaning the visible area can hold a maximum of 12 lines of text.
[0036] The character index corresponding to the current scroll position is compared with the paragraph boundary index and the start and end indices of the visible area. The judgment rule is as follows: if the character index is within the range of the start and end indices of the visible area, it is determined to be valid content; if the character index is outside the range of the start and end indices of the visible area, it is determined to be invalid content. The index range corresponding to the visible area is 1 to 120, so indices 1 to 120 are valid content, and indices 121 and above are invalid content. The filtering rule provides a unified standard for subsequent processes, retaining only the text visible on the screen and not rendering content outside the screen, reducing calculation and rendering overhead, and improving the smoothness of the teleprompter scrolling.
[0037] Based on the scroll progress mapping mechanism, the initial display result is compared with the viewport filtering rules to remove invalid text content outside the screen. The scroll progress value is mapped to the vertical offset of the text to determine the actual position of the current text on the screen. Each line of text and each paragraph is compared with the visible area to determine whether it completely exceeds the display boundary. Text content exceeding the range is masked and no longer participates in the subsequent rendering process; only valid content within the visible area is retained. Specifically, a linear scaling method is used to convert the scroll progress percentage into a vertical pixel offset. Calculation formula: Text vertical offset = Total document pixel height × Scroll progress percentage. Example: If the total document height is 3000 pixels and the scroll progress is 40%, then the vertical offset = 3000 × 0.4 = 1200 pixels, and the text is shifted upwards by 1200 pixels.
[0038] The text line comparison rules calculate the vertical coordinates of each text line and compare them with the upper and lower boundaries of the visible area: if the bottom coordinate of the text line is less than the upper boundary of the visible area, it completely exceeds the visible area and needs to be hidden; if the top coordinate of the text line is greater than the lower boundary of the visible area, it completely exceeds the visible area and needs to be hidden; otherwise, it is displayed. If the upper boundary of the visible area is 80 pixels and the lower boundary is 1040 pixels, and the bottom coordinate of a certain line is 60 pixels, then the line completely exceeds the upper boundary and is hidden.
[0039] The paragraph-wide comparison rule compares the coordinates of the paragraph's starting and ending characters with the entire visible area: if the entire paragraph is above the visible area, it is completely hidden; if the entire paragraph is below the visible area, it is completely hidden; if a portion of the paragraph is within the visible area, it is preserved and rendered normally. This hiding method prevents vertex data submission, layer composition, and the entry into the rendering queue for text exceeding the boundaries, thereby reducing GPU computation and improving scrolling smoothness.
[0040] The calibrated highlight segmentation results are validated for progress matching, and the synchronization logic between scrolling position and highlighting intervals is optimized to generate segmented highlighting and scrolling synchronization information adapted for GPU rendering. The character index corresponding to the current scrolling progress is compared and validated character by character with the start and end character indices of the highlighting segment, identifying and correcting positional deviations between scrolling offset and highlighting intervals. Based on the validation results, the scrolling offset pixel value of the text and the starting character position of the highlighting interval are adjusted to ensure that the vertical position of the prompt line accurately corresponds to the center character position of the current reading paragraph. The timing logic for the highlighting interval to update with the scrolling progress is optimized to ensure that the switching of the highlighting area is synchronized with the text scrolling displacement, avoiding highlight jumps or delays. Finally, standardized rendering data containing character pixel coordinates, text display color, content transparency, and interface rendering level is generated and directly supplied to GPU hardware acceleration rendering, achieving a smooth and lag-free segmented highlighting display and scrolling synchronization effect for the teleprompter.
[0041] Using the character position corresponding to the vertical coordinate of the prompt line as a reference, the character index at that position is compared one by one with the start and end indices of the highlighted segment. If the character index corresponding to the prompt line is 60 and the highlighted segment range is 51 to 110, then the position is considered to match; if the highlighted segment range is 1 to 50, then a positional deviation is considered and correction is initiated. The required scroll offset pixels and the starting position of the highlight are calculated based on the index difference, using the following formula: Offset correction = (Target character index) / (Target character index) The offset is calculated as (current highlight starting index) × single-line pixel height. Specifically, the target index 60 differs from the current highlight starting index 51 by 9 characters, and the single-line height is 64 pixels. Therefore, the offset correction is 9 × 64 = 576 pixels. The text is then corrected downwards by 576 pixels to align the tooltip with the paragraph center. The highlight update timing is synchronized with the scroll frame refresh. The highlight interval is updated immediately after each frame of scroll displacement, ensuring that scrolling and highlighting are executed in sync. With a screen refresh rate of 60 frames per second, the text moves upwards by 4 pixels per frame, and the highlight interval is updated synchronously every frame for smooth following.
[0042] The final standardized rendering data output contains four fixed structures: character drawing coordinates, text display color, content transparency, and interface rendering layer. Character drawing coordinates represent the horizontal and vertical pixel positions of each character on the screen; text display color distinguishes between the read area above the tooltip and the unread area below; content transparency represents the overall transparency of the text; and the interface rendering layer sets the rendering order of the text layer, tooltip layer, and SVG overlay. All of this rendering data is organized and generated according to the standard format for Qt / QML and GPU hardware acceleration, allowing direct input to the GPU rendering pipeline for drawing operations without format conversion or data reconstruction. This effectively reduces intermediate processing steps and improves the overall rendering efficiency and scrolling smoothness of the teleprompter.
[0043] S103 directly connects the highlight extraction module to the feature domain of the fixed logic word prompting control engine. All logic of the fixed control engine ensures that updates only flow in the front-end mapping layer. Input scrolling sequence and text content to obtain target highlight segments. According to the word prompting architecture, progress deviation calibration is selected for continuous scrolling mode and segment matching calibration is selected for chapter jump mode. Synchronous feedback and parameter optimization information that only update the front end are generated.
[0044] In one implementation, to meet the direct connection and adaptation requirements between the teleprompter highlight extraction module and the teleprompter control engine, character position mapping rules and a scrolling progress synchronization mechanism are introduced to determine standardized processing schemes for text content, segment boundaries, scrolling parameters, and highlight on / off switches. Based on the overall teleprompter architecture design, character position mapping rules are established between text characters and interface coordinates, binding the logical position of each character in the document to pixel coordinates within the screen display area to form a stable positional correspondence. A scrolling progress synchronization mechanism is constructed to link the scrolling progress value with the vertical display position of the text on the interface in real time, ensuring that changes in scrolling progress are synchronized with text displacement. Simultaneously, the text content reading and loading methods are clarified, segment boundary division standards based on paragraphs are determined, the numerical range of scrolling speed and the control logic of scrolling direction are defined, and the conditions for enabling and disabling the highlighting function are set. Through the unified setting of the above rules and parameters, a standardized and reusable processing flow and execution specification are formed, providing a unified execution basis for data interaction and module integration between the highlight extraction module and the teleprompter control engine.
[0045] Based on the pre-processed global character index, and combined with parameters such as font size, line height, horizontal margin, and vertical margin, the character index is converted into precise pixel coordinates on the screen. For example, a character index of 60, a font size of 64 pixels, and a vertical margin of 80 pixels correspond to screen vertical coordinates of 80 + 64 × the corresponding line number, achieving a precise mapping from index to pixel.
[0046] A linear synchronization algorithm is used to map the scrolling progress from 0% to 100% to the vertical offset of the text proportionally to the total pixel height of the document. Each time the scrolling progress changes, the text position is updated synchronously. With a total document height of 3000 pixels, a 40% scrolling progress corresponds to a 1200-pixel upward text offset, ensuring that the scrolling progress and position remain consistent in real time.
[0047] The system uses blank lines and paragraph break characters as the basis for segmentation, dividing continuous text into independent paragraphs. Each paragraph records the start and end character indices. If there are two line breaks in the document, it is automatically divided into three paragraphs, and the start and end indices of each paragraph are recorded.
[0048] The scrolling speed is set as a percentage, corresponding to the number of pixels the text moves per frame when the interface refreshes. The scrolling direction is fixed to upward scrolling, and the start / stop state can be controlled by pausing and resuming. A speed of 100% corresponds to moving upwards by 4 pixels per frame, and a speed of 50% corresponds to moving upwards by 2 pixels per frame, achieving uniform and controllable scrolling.
[0049] When the highlight switch is on, the line containing the prompt line is marked as highlighted, with text above the prompt line indicating it has been read and text below it indicating it has not. When the switch is off, highlighting is not applied, and the text continues to scroll. When highlighting is on, the current line is displayed in the highlighted color; when it is off, it reverts to a uniform color.
[0050] The format of text character indexes, segment intervals, scroll position percentages, and highlighting enable parameters are standardized and uniformly converted into a progress and interval format recognizable by the prompting control engine. Following a unified formatting rule throughout the text, the global index corresponding to each character is organized into a continuously increasing, uninterrupted numerical sequence starting from a starting value, ensuring that any character can be accurately located using a unique number. The start and end positions of each paragraph are standardized into a fixed expression format of start and end indices, providing a clear and stable definition of paragraph ranges. The scroll position of text in the interface is converted into a percentage value within the range of zero to one hundred, using standardized proportions to represent scroll progress. The enabled and disabled states of the highlighting function are defined as fixed Boolean type identifiers, with two opposing states corresponding to function on and function off, respectively. By standardizing the above methods, all parameters are uniformly converted into a data format that the word prompting control engine can directly parse, read, and call, eliminating data differences between modules and ensuring accurate data transmission between the highlight extraction module and the word prompting control engine.
[0051] Starting from the first character of the document, sequentially increasing numbers are assigned according to the display order, without repetition, skipping, or gaps. The first paragraph contains 50 characters, with indices from 1 to 50; the second paragraph follows immediately, with indices from 51 to 110, forming a continuous sequence. Each paragraph records two fixed values: the index of the first character and the index of the last character, serving as unique identifiers for the paragraph range. Since the second paragraph starts at index 51 and ends at index 110, it is uniformly represented as a fixed range from 51 to 110.
[0052] Using the total text height as the total range, the current scroll displacement as a percentage of the total height is converted into a value between 0 and 100, with the scroll start position at 0 and the scroll end position at 100. For example, if the total text height is 3000 pixels and the current scroll displacement is 1200 pixels, the scroll position is converted to 40%. A fixed Boolean type identifier is used to represent the highlight function status: true for enabled and false for disabled. The engine can directly recognize these two states. When the user enables the highlight function, the system assigns a true value; when the user disables the highlight function, the system assigns a false value. All parameters are converted to a format natively supported by the engine, eliminating the need for intermediate conversions and enabling direct interaction between modules, avoiding data parsing errors, stuttering, or offsets.
[0053] A highlight extraction module is built, consisting of scroll progress parsing, character position matching, segment attribution determination, and highlight status generation, with a fixed segment index and highlight output structure. Within the module, a scroll progress parsing unit receives and reads the standardized scroll progress percentage value, converting it into a valid progress parameter that can be used in coordinate calculations. A character position matching unit queries and locates the screen character position corresponding to the current scroll progress based on the mapping relationship between the progress parameter and the character index. A segment attribution determination unit determines the segment interval to which the character belongs based on the comparison result between the character position and the segment boundary index. A highlight status generation unit marks characters above the tooltip as read and characters below the tooltip as unread, using the tooltip position as a reference, and outputs the corresponding highlight markers. The module outputs data in a fixed format, including segment index, highlight start position, and highlight end position, ensuring a stable and consistent output structure that can be directly used in subsequent rendering processes.
[0054] The system reads the input percentage value from 0 to 100 and converts it into a displacement ratio corresponding to the total text height. An input scroll progress of 40% is interpreted as an upward offset of 40% of the total text height, used for subsequent character positioning calculations. Based on the offset ratio and the height of a single line of text, the system calculates the character index corresponding to the current screen center. With a total text height of 3000 pixels and a single line height of 64 pixels, an offset of 1200 pixels corresponds to character index 60, which is directly output as index 60. The character index is then compared sequentially with the start and end indices of each paragraph to determine the paragraph number to which the character belongs. Character index 60 falls within the index range of 51 to 110 in paragraph 2, thus belonging to paragraph 2.
[0055] Using the prompt line as a boundary, characters above the line are marked as read, and characters below the line are marked as unread, and the highlighted interval is output. The prompt line corresponds to index 60, generating a highlight start position of 51 and a highlight end position of 110, marking the current reading segment. Three fixed pieces of content are output: segment index 2, highlight start position 51, and highlight end position 110, with the structure remaining unchanged for easy reading by the engine.
[0056] The standardized text data and scrolling progress parameters are input into the highlight extraction module. After progress parsing, position matching, segmentation determination, and status marking, the target highlighted segment data is output. The standardized text character information and segmentation interval information are completely input into the highlight extraction module, along with the current real-time scrolling progress parameters. After the module starts its calculation process, the scrolling progress parsing unit first reads the scrolling progress percentage value and converts it into the vertical offset of the entire text, obtaining a valid progress value that can be used for positioning. Next, the character position matching unit retrieves and determines the character coordinate position on the screen corresponding to the current progress based on the mapping relationship between the valid progress value and the character index. Subsequently, the segmentation attribution determination unit compares the obtained character coordinates with the paragraph boundary data to confirm the paragraph number and paragraph interval to which the character belongs. Finally, the highlight status generation unit marks characters above the prompt line as read and characters below the prompt line as unread, using the prompt line position as the boundary. After the above complete calculation process, the module outputs highlighted segment data containing the target paragraph number, highlight start position, and highlight end position, providing an accurate basis for the subsequent rendering process.
[0057] Input three types of fixed data into the highlight extraction module: globally unique character index, paragraph start and end index, and scroll progress percentage from 0 to 100. Input character indexes from 1 to 180, paragraph ranges from 1 to 50, 51 to 110, and 111 to 180, with a scroll progress of 40%. Convert the scroll progress percentage into a vertical text offset in pixels. The calculation formula is: text offset = total document height in pixels × scroll progress percentage. With a total document height of 3000 pixels, a 40% scroll progress corresponds to an offset of 1200 pixels.
[0058] Based on the text offset and line height, the corresponding character index is calculated using the formula: corresponding index = offset ÷ line height. With an offset of 1200 pixels and a line height of 64 pixels, the corresponding index is approximately 60. The character index is then compared sequentially with the start and end indices of each paragraph to determine the paragraph. Since index 60 falls within the range of 51–110, it is determined to belong to the second paragraph, with a paragraph number of 2.
[0059] Centered on the index corresponding to the prompt line, the start and end points of this segment define the highlighted range. The area above the prompt line indicates read content, and the area below indicates unread content. The prompt line corresponds to index 60. The second segment's range is 51–110, generating a highlight start point of 51 and a highlight end point of 110. The output is fixed with three items: segment number 2, highlight start point 51, and highlight end point 110. The structure is consistent and can be directly rendered.
[0060] The system extracts and generates read / unread highlighted segments that are perfectly aligned with the scrolling process from the scrolling sequence and text position mapping results. Based on the execution order of the text scrolling sequence and the correspondence between character indices and screen pixel coordinates established by the character position mapping, it compares the current scrolling position with the actual text display position line by line and segment by segment according to the text line order and paragraph boundaries, ensuring that the scrolling displacement and text display position are consistent. During the comparison process, the text character corresponding to the vertical position of the tooltip on the screen is extracted, and the position of this character is used as the center reference for highlighting. Using the tooltip as a boundary, the text content that has been scrolled over above the tooltip is marked as read, and the text content that has not yet been scrolled over below the tooltip is marked as unread. Based on the real-time changes in the scrolling progress, the boundary positions of the read and unread areas are updated synchronously, continuously generating highlighted segment information that is completely synchronized with the scrolling rhythm, allowing the highlighted areas to switch smoothly with the text scrolling without offset, jumps, or misalignments.
[0061] The highlight extraction module is directly cascaded with the text prompting control engine. The original engine logic is fixed, allowing only the front-end mapping layer to be updated. Synchronous feedback and parameter calibration are performed in continuous scrolling and chapter jump modes respectively, generating synchronous optimization information that only applies to the front-end mapping. The output port of the highlight extraction module is directly cascaded with the input port of the text prompting control engine. The original operating logic, parameter rules, and control flow of the text prompting control engine are not modified; only the front-end display mapping layer is opened as the sole channel for data updates and parameter adjustments. In continuous scrolling mode, the system collects scrolling speed and text vertical offset data in real time. The scrolling speed is converted into the update frequency of the highlight interval, and the offset is converted into the correction value for the highlight starting position. A real-time feedback mechanism calibrates the synchronization relationship between highlighting and scrolling, ensuring that the highlight switching rhythm matches the text movement speed. In chapter jump mode, the system quickly locates the starting character index and vertical coordinates of the corresponding paragraph based on the target paragraph number, directly calibrates the highlight starting position, and refreshes the display interval, achieving precise alignment of the highlight area after the jump. Through the above processing method, the final result is a synchronization optimization information that only applies to the front-end display mapping relationship, which improves the positioning accuracy and display smoothness of the highlight following the scroll without changing the underlying engine logic.
[0062] The highlight extraction module and the prompting control engine use a direct data connection, and the engine's original scrolling control, frame rate management, and keyboard response logic remain unchanged. The engine's original logic, such as pausing with the space bar and adjusting speed with the arrow keys, is also fully retained. Only the highlight data is passed in through the input port, without interfering with the original control flow.
[0063] Only three types of front-end interfaces are available: character coordinate mapping, highlight interval update, and tooltip position adjustment. These interfaces do not touch the engine's core computational logic. The highlight start index, display color, and transparency can be adjusted, but underlying parameters such as scroll step, frame rate, and caching mechanism cannot be modified. The continuous scrolling mode synchronization calibration rule is as follows: highlight update frequency = scrolling speed × unit frame rate offset pixels. The highlight center position is corrected in real time based on the offset to ensure that the highlight moves synchronously as scrolling continues. With the scrolling speed set to 100% and an offset of 4 pixels per frame, the highlight interval is updated synchronously once per frame, with no delay or jumps.
[0064] Based on the target paragraph number, the system directly reads the starting character index of that paragraph and switches the highlight range to the corresponding paragraph range in one go. Jumping to paragraph 2, whose starting index is 51, the system directly sets the highlight start position to 51, without needing to calculate line by line. The optimization information only includes the paragraph number, highlight start index, highlight end index, and coordinate offset, without containing control commands. The generated optimization information is "Paragraph 2, Highlight 51–110, Vertical Offset 0", which directly affects the front-end rendering and does not affect engine operation.
[0065] S104 aligns the highlighted segment output dimension with the prompting rendering input dimension, generating pixel coordinate matching and lightweight parameter-adjustable pluggable adaptation information to adapt to the target rendering framework.
[0066] In one implementation, combining the requirements for matching the teleprompter's segmented highlight output with the interface rendering dimensions and the Qt / QML rendering specifications, a character coordinate normalization mechanism and segment interval size alignment logic are introduced to determine the core calculation rules of the rendering adaptation layer. A character coordinate normalization mechanism is established based on the display area size and the standard rendering coordinate system. This mechanism uniformly converts the character positions under different font sizes, line heights, and margin settings to the same standard coordinate system, eliminating positional offsets caused by differences in font styles and layout parameters. Simultaneously, segment interval size alignment logic is constructed, proportionally adapting the length of the highlighted interval corresponding to each segment according to the width and height ratio of the display area, ensuring that the highlighted display range matches the visible area of the interface. Based on the character coordinate normalization mechanism and the segmented interval size alignment logic, the core calculation methods such as coordinate calculation, interval adjustment, and range clipping of the rendering adaptation layer are determined to ensure that the highlighted interval position, character drawing coordinates are fully adapted to the Qt / QML rendering input requirements, and to ensure accurate rendering output.
[0067] The character coordinate normalization mechanism performs a unified conversion according to the teleprompter display area and the standard coordinate system of Qt / QML rendering. First, using the top-left corner of the visible area as the origin, the actual display position of all characters in the text is converted into relative coordinate values. Then, combined with the current screen resolution and display size, the relative coordinates are restored to pixel coordinates that can be directly used for drawing. Through this conversion method, regardless of font size, horizontal margins, or vertical margins, all characters can be mapped to the same coordinate system, and there will be no positional shift due to parameter changes. For example, in an interface with a display area width of 1920 pixels, if the normalized relative horizontal coordinate of a character is 0.25, then regardless of whether the font is enlarged or reduced, the final horizontal pixel coordinate of the drawn character will be 480 pixels, maintaining a stable and consistent position.
[0068] The segmented interval size alignment logic proportionally constrains the highlighted intervals according to the overall proportion of the display area, ensuring that the highlighted display length of each paragraph maintains a fixed proportional relationship with the display area. This prevents changes in the display proportion of the highlighted interval due to variations in paragraph length or font size. During rendering calculations, the system first determines a baseline proportion based on the display area size, then scales and adjusts the start and end positions of the highlighted areas for each paragraph according to this proportion, maintaining a consistent size ratio for the highlighted areas. For example, if the display area width is 1920 pixels and the highlighted interval width is set to 10%, the width of the highlighted interval will always remain 192 pixels regardless of changes in the number of characters within a paragraph, ensuring a neat and uniform display effect.
[0069] The rendering adaptation layer performs calculations based on the normalized coordinates and size alignment results mentioned above. It first reads the normalized coordinates of the characters and the proportional parameters of the paragraph highlight area. Then, combining the coordinate rules, layer order, and drawing format of the Qt / QML rendering framework, it converts these parameters into pixel coordinates, ranges, and display attributes that the rendering can directly recognize. The entire process does not modify the underlying rendering logic; it only outputs standard-compliant rendering data. For example, with a normalized vertical coordinate of 0.5 and a display area height of 1080 pixels, the vertical pixel coordinate is directly calculated to be 540 pixels. This coordinate is then combined with the highlight range to form standard rendering data, which is directly passed to Qt / QML for drawing, achieving precise adaptation between the highlight area and the character position.
[0070] Extract the character index, start and end offsets, and paragraph boundary information from the highlighted segment output. Bind the visible area range according to rendering specifications, construct a segment adaptation sequence corresponding to the text lines, and define the rendering alignment interval. From the completed highlighted segment results, extract the globally unique index corresponding to each character in the full text, the start and end offset positions of the current highlighted area, and the start and end character boundaries of each paragraph. Bind and associate the above three types of information—character index, highlight offset, and paragraph boundary—with the range of the screen's visible area to establish a correspondence between text position and display position. Then, according to the actual line distribution order of the text in the interface from top to bottom, construct corresponding segment adaptation entries for each line of text, combining them to form a complete segment adaptation sequence. Based on this sequence, determine the effective start and end ranges of each line of text participating in interface rendering, excluding parts that exceed the visible area and are not involved in drawing, and finally complete the overall definition of the rendering alignment interval.
[0071] After completing the highlight segmentation calculation, the system assigns a fixed and unique index to each character in the document, and records the starting and ending characters of the highlighted area, as well as the starting and ending characters of each paragraph. This data is combined with information such as the width, height, and margins of the visible area to determine which content needs to be actually displayed on the interface. For example, in a document containing three paragraphs, the first paragraph corresponds to character indices 1 to 50, the second paragraph to indices 51 to 110, and the third paragraph to indices 111 to 180. When the highlighted area is in the second paragraph, the starting offset position is 51, and the ending offset position is 110. The system binds this index information to a visible area with a resolution of 1920×1080 and a display area height of 960 pixels, and then generates corresponding adaptation entries for each line according to the order in which the text is displayed line by line.
[0072] When generating the segmented adaptation sequence, the system divides the character range corresponding to each line according to the number of characters that a single line of text can hold. For example, if a single line can hold 20 characters, the first line corresponds to indices 1 to 20, the second line to indices 21 to 40, the third line to indices 41 to 60, and so on, forming a segmented adaptation sequence corresponding to the line numbers. When defining the rendering alignment interval, the system filters out the lines within the screen range based on the number of lines that can be displayed in the current visible area, and uses the character range corresponding to these lines as the valid rendering interval. For example, if the current interface can display 12 lines of text, only the index range corresponding to the first 12 lines is considered as the valid interval, and the excess is not included in the rendering process, ensuring that the rendered content accurately matches the visible area and avoiding invalid drawing and display misalignment.
[0073] Based on the length of the segmented adaptation sequence, a one-dimensional coordinate adaptation vector is defined to match the rendering input, clearly defining the mapping relationship between the character position, segment interval, and pixel size for each element. A one-dimensional coordinate adaptation vector with the same length as the total number of lines in the segmented adaptation sequence is created, with the vector length completely corresponding to the number of lines in the sequence. Each element in the vector is assigned a fixed and explicit data meaning: each element records the character display position of the corresponding text line, the highlighted segment interval to which the line belongs, and the actual pixel width and height occupied by the line on the screen. The text line number, character index, highlighted interval, and pixel size are bound one-to-one, establishing a stable and unchanging mapping relationship. This allows the generated coordinate adaptation vector to be directly recognized and read by the Qt / QML rendering module without additional parsing or conversion.
[0074] The length of the one-dimensional coordinate adaptation vector is determined by the total number of lines in the segmented adaptation sequence. The vector length corresponds to the number of lines of text, ensuring that each line has an independent vector element. For example, if the segmented adaptation sequence contains 12 lines of text, a one-dimensional coordinate adaptation vector of length 12 is created, with the first element corresponding to the first line, the second element to the second line, and so on. Each vector element contains three fixed sets of data: the first set is the starting coordinates of the displayed text line, the second set is the highlighted segment range to which the line belongs, and the third set is the actual pixel width and height of the line. For example, the vector element corresponding to the 5th line of text is recorded as: starting coordinates (480, 320), highlighted segment 51–110, and pixel size 1920×64. The data structure is fixed and uniform.
[0075] During the mapping process, the system directly maps text line numbers to vector indices, converts character display positions to screen pixel coordinates, directly uses the paragraph start and end indices for highlighted segments, and calculates pixel dimensions based on font size and line height. All data is organized according to the Qt / QML rendering standard format. This fixed mapping allows the rendering module to directly read vector data and complete the drawing, improving display efficiency and synchronization accuracy.
[0076] By combining constraints on font size, line height, horizontal margins, and vertical spacing, three types of adaptation rules—range scaling, position offset, and viewport clipping—are set to limit the coordinate alignment calculation range. Based on four user-defined display parameters—font size, text line height, left and right horizontal margins, and top and bottom vertical spacing—three adaptation rules are formulated for range scaling, position offset, and viewport clipping. The range scaling rule dynamically adjusts the horizontal length of the highlighted area according to the current character width, ensuring the highlighted area matches the actual display width of the text, avoiding excessively long or short highlighted areas. The position offset rule corrects the overall coordinates of the text according to the set values of horizontal margins and vertical spacing, ensuring the text maintains a suitable distance from the display area boundary, preventing content from touching the edge or overflowing. The viewport clipping rule judges and removes text lines and paragraphs that exceed the visible area, retaining only valid content within the screen's range. By using these three rules to constrain the coordinate calculation range, it ensures that text segmentation, highlighting, and scrolling positions are all within the normal display range, avoiding display anomalies such as misalignment, truncation, and exceeding boundaries.
[0077] The system uses the font size, line height, horizontal margin, and vertical spacing set by the user in the teleprompter interface as basic parameters to generate three fixed adaptation rules. When the user sets the font size to 64pt, the horizontal margin to 20%, and the vertical margin to 15%, the system directly calculates the corresponding pixel dimensions and generates the rules based on these values. The interval scaling rule matches the highlight length according to the actual pixel width of the character; the wider the character, the longer the highlight interval, and the narrower the character, the shorter the highlight interval. For example, in a display area with a width of 1920 pixels, if the character width is 32 pixels and 20 characters can be displayed in a line, the highlight interval will automatically scale to the total width of the corresponding characters, ensuring that the highlight exactly covers the entire line of text.
[0078] The position offset rule indents the entire text inwards according to a percentage of the margin, preventing content from touching the screen edge. For example, if the display area width is 1920 pixels and the horizontal margin is 20%, the text will be offset 384 pixels to the left and right, and 144 pixels to the top and bottom if the vertical margin is 15%, ensuring the text is centered and not touching the edge. The viewport clipping rule determines whether the text exceeds the visible area; any excess content is not rendered. For example, if the visible area can only display 12 lines of text, the 13th line and beyond will be directly discarded and not drawn, avoiding invalid rendering and display anomalies. These three rules work together to uniformly limit the effective range of coordinate calculations, ensuring that highlight length, text position, and display range all conform to display specifications, guaranteeing a stable, neat, and error-free teleprompter interface.
[0079] Based on the dimension alignment mapping method, the highlighted segment intervals and character layout parameters are substituted into the adaptation rules for segment-by-segment calculation, completing the standardization update of the rendering coordinate vector and generating pixel coordinate alignment and lightweight adaptation information that fully matches the Qt / QML rendering input and can be directly plugged in and used. Using the dimension alignment mapping calculation method, the paragraph start and end interval data determined by the highlighted segments, along with the currently set font size, text line height, horizontal margin, vertical spacing, and other layout parameters, are substituted into the pre-defined three types of adaptation rules for unified calculation: interval scaling, position offset, and viewport clipping. Following the text display order from top to bottom, coordinate conversion and interval correction are performed line by line and paragraph by paragraph, updating the coordinates, highlight range, and size information of each line to a state conforming to the Qt / QML rendering standard. The final result is complete rendering data containing standardized pixel coordinates, fixed-format highlight start and end intervals, and interface drawing levels. This data can be directly integrated into the Qt / QML rendering framework, enabling plug-and-play calls without modifying the original engine and interface, ensuring smooth and stable text scrolling, segmented highlighting, and interface display throughout the entire process.
[0080] When performing dimensional alignment mapping, the system uses the paragraph range and character index of the highlighted segment output as basic data, combined with parameters such as font, line height, and margins set by the user in the interface, and processes them sequentially according to three adaptation rules. For example, if the current highlighted paragraph is indexed 51 to 110, with a font size of 64pt, line height of 167%, horizontal margin of 20%, and vertical margin of 15%, the system substitutes these values into the rules, first matching the highlighted length to the character width using the range scaling rule, then indenting the entire text using the position offset rule, and finally removing content outside the screen using the viewport clipping rule.
[0081] When calculating line by line and segment by segment, the system starts from the first line of text and calculates the horizontal coordinates, vertical coordinates, and whether the line is in the highlighted range for each line in turn, and fills the results into a one-dimensional coordinate adaptation vector. For example, the 5th line corresponds to indices 41 to 60, which is within the highlighted range of 51 to 110, so the line is marked as highlighted and its precise pixel coordinates are calculated.
[0082] After all calculations are complete, the system outputs standardized data, including the pixel coordinates of each line, the start and end positions of the highlight, and the drawing order of the text layer and the tooltip layer. This data format is completely consistent with the Qt / QML rendering input, and the rendering module can directly read and draw it without additional parsing, conversion, or code modification, achieving a plug-and-play interface that is non-intrusive, cost-free, and latency-free.
[0083] S105, relying on the task consistency collaborative calibration mechanism of the fixed prompting engine, uses the prompting control engine as a static timing discriminator to generate scrolling text synchronous display and highlighted segment information with low computing power and high following accuracy.
[0084] In one implementation, based on a single-process synchronous task consistency collaborative calibration mechanism and the text scrolling highlighting requirements of the teleprompter, a fixed-logic teleprompter control engine is used as a static timing discriminator to generate timing reference information adapted to the text segmentation highlighting module. A task consistency collaborative calibration mechanism is established based on the synchronous logic of the teleprompter's single continuous scrolling and the text segmentation highlighting requirements. The teleprompter control engine, whose operating logic, control parameters, and refresh timing remain fixed, serves as the timing judgment benchmark for the entire system, continuously outputting scrolling timing signals at a fixed frame rate. Using the inherent scrolling rhythm, progress update frequency, and interface refresh cycle of the teleprompter control engine as a unified standard, timing reference information that can be directly read and used by the text segmentation highlighting module is generated, providing a globally unified and stable time reference for highlight interval following, position calibration, and smooth switching.
[0085] The task consistency and collaborative calibration mechanism uses the prompting control engine as the sole timing benchmark, without introducing an external clock or relying on additional calculations, ensuring that scrolling and highlighting are always synchronized. During operation, the prompting control engine maintains fixed parameters such as scrolling speed, refresh rate, and pixel increment, for example, running at a refresh rate of 60 frames per second and a fixed rhythm of moving upwards by 4 pixels per frame, using this as the global timing benchmark.
[0086] During operation, the highlighting module does not determine its update timing independently. Instead, it follows the timing signals output by the engine, updating the highlight position each time a timing signal is received. For example, every time the engine outputs a refresh signal, the highlighting module synchronously updates the highlight center and highlight range, ensuring that the highlight moves in sync with the scrolling, without being premature or delayed. Through this mechanism, the rhythm, frequency, and timing of the highlight display are perfectly synchronized with the teleprompter's scrolling rhythm, avoiding issues such as highlight jumps, misalignments, and delays caused by timing asynchrony. This achieves high-precision scrolling and highlight synchronization with low computational overhead.
[0087] Based on the design goals of low computational overhead and high synchronization accuracy, the output results of collaborative calibration are optimized through scrolling. The alignment requirements between highlighted segments and the prompting engine's scrolling rules are clarified, and temporal adaptation rule information for text display features is generated. With the aim of reducing system computational resource consumption and improving the synchronization accuracy of text scrolling and highlighted segments, the scrolling rhythm of the time-series results of task-consistent collaborative calibration output is optimized. During the optimization process, it is explicitly stipulated that the update timing of highlighted segments must be completely consistent with the scrolling speed, scrolling direction, and progress step value of the prompting control engine. Based on this alignment requirement, temporal adaptation rules are formulated, binding the switching trigger, position refresh, and interval update of highlighted intervals with text scrolling displacement and progress changes one by one. This ensures that the highlighted segment switching action and text scrolling displacement are completely synchronized and matched, ultimately forming a stable, unified, and directly executable time-series control basis for text display features.
[0088] The core objective of scrolling rhythm optimization is to ensure that highlighting and scrolling are strictly synchronized without increasing computational load. The system uses the prompting control engine's operating parameters as the sole standard, without adding timers, sampling, or redundant calculations, directly reusing existing timing signals from the engine to reduce CPU and GPU resource consumption. The timing adaptation rule adopts a "one-step-one-update" synchronization method: every time the engine scrolls forward one step or the progress increases by one step value, the highlighting module synchronously updates the highlight center and highlighting range. For example, if the engine is set to scroll upwards by 4 pixels per frame and the progress increases by 1 unit, the highlighting module synchronously updates the highlight position every frame, ensuring that the scrolling distance and highlight switching correspond perfectly.
[0089] When the scrolling speed is adjusted, the highlight update frequency changes proportionally. A faster scrolling speed results in faster highlight updates, and a slower scrolling speed results in slower highlight updates, always maintaining consistency between speed and frequency. For example, if the scrolling speed increases from 50% to 100%, the highlight update frequency doubles synchronously, preventing highlight lag or lead. When the scrolling direction changes, is paused, resumed, or a chapter jump occurs, the highlight module immediately executes a synchronous response, without delay or stuttering, ensuring perfect alignment between scrolling and highlighting in any scenario. This timing adaptation rule forms a fixed, reliable, and low-overhead timing control basis, ensuring that the highlight display always stably follows the text scrolling.
[0090] Leveraging the direct-connection, pluggable architecture, non-intrusive access rules were established for the highlighting module to adapt to the Qt / QML rendering framework. This ensures seamless integration with the prompting interface using the same input format during the rendering stage without any additional adaptation overhead. Utilizing the direct-connection and pluggable architecture between the highlighting module and the prompting control engine, non-intrusive access rules were developed for the highlighting module to adapt to the Qt / QML rendering framework. These rules explicitly require that the final output rendering data structure, field meanings, numerical types, and coordinate system of the highlighting module must be completely consistent with the original input format of the Qt / QML rendering framework, without modifying the original rendering process, adding additional data parsing logic, or consuming additional computing resources. Through format unification and direct connection, seamless integration between the highlighting module and the prompting display interface is achieved, ensuring that the entire process of text rendering, segmented highlighting, and scrolling display requires no modification, has no latency response, and no additional performance overhead, maintaining the prompter's high efficiency and stability.
[0091] The core of the non-intrusive access rule is to allow the highlighting module to output standard data that is "out of the box," completely aligned with the native format of the Qt / QML rendering layer, requiring no conversion or adaptation. The highlighting module output consistently includes six items: character pixel coordinates, highlight start index, highlight end index, text color, transparency, and drawing level. These are completely consistent with the attribute names, data types, and value ranges of Qt / QML interface elements. For example, if the rendering framework requires text coordinates to be integer pixel values, the highlighting module will directly output integer coordinates; if the framework requires colors to be in ARGB format, the module will directly output ARGB values; if the framework requires a drawing level of 0–10, the module will output according to that range, achieving a one-to-one correspondence.
[0092] During the integration process, the highlighting module directly passes data to the rendering layer via Qt's native signal and slot mechanism, without inserting middleware, performing format conversions, or encapsulating data, thus reducing one data copy and parsing overhead. For example, after the highlighting module completes its calculations, it directly assigns the "paragraph index, highlight start point, highlight end point, XY coordinates, color, and transparency" to elements such as Text, Rectangle, and Canvas on the interface, allowing the interface to be drawn immediately without waiting or processing. This integration method does not modify the original teleprompter's scrolling logic, interface layout, or rendering pipeline, and does not increase the CPU and GPU load. It can maintain smooth 60 frames per second operation even on low-configuration devices, truly achieving a pluggable effect with no modification, no latency, and no additional overhead.
[0093] The system integrates and processes timing benchmark information, timing adaptation rules, and non-intrusive access rules to generate low-computing-cost, high-accuracy scrolling text synchronization and segmented highlighting information, including discrimination benchmarks, scroll alignment, and quick access. It unifies and integrates the timing benchmark information generated by task consistency collaborative calibration, the timing adaptation rules formed by scroll rhythm optimization, and the non-intrusive access rules under a pluggable architecture to form a complete collaborative control system. The timing benchmark output by the prompting control engine serves as the global time judgment basis, ensuring that highlight updates and scroll refreshes are synchronized from the same source; the timing adaptation rules ensure complete alignment between highlight interval switching and text scroll displacement and progress steps, avoiding offsets and jumps; and the non-intrusive access rules ensure direct interface between the highlighting module and the Qt / QML rendering framework, requiring no modification or parsing. Through the collaborative work of these three components, a complete information set including timing determination, synchronization alignment, and rendering access is ultimately formed. This significantly reduces the consumption of CPU and GPU computing resources while greatly improving the positioning accuracy and response speed of highlighting that follows scrolling. It stably supports the smooth and reliable operation of core functions such as continuous text scrolling, chapter jumping, and segmented highlighting in the teleprompter.
[0094] This integration combines three rules—timing benchmark, timing adaptation, and non-intrusive access—into a unified whole, forming a collaborative mechanism that requires no additional computation, has low overhead, and is highly synchronized. The timing benchmark is directly provided by the word prompting control engine, using a fixed frame rate, fixed pixel step size, and fixed refresh cycle as the sole time standard, such as 60 frames per second and 4 pixels scrolling per frame. The highlighting module relies entirely on this, without building its own clock or performing additional sampling, thus reducing computational power consumption from the source.
[0095] The timing adaptation rules stipulate that: for every step the engine scrolls, the highlight is updated; as the speed changes, the highlight frequency changes synchronously; when jumping between chapters, the highlight is immediately positioned, ensuring that scrolling and highlighting are always synchronized. For example, if the scrolling speed increases from 50% to 100%, the highlight update frequency doubles synchronously, without lag or lead. The non-intrusive access rules ensure that the coordinates, colors, ranges, and levels of the highlight output data are completely consistent with the Qt / QML rendering interface, directly assigning values to interface elements via signals and slots, without requiring format conversion or data encapsulation, achieving zero-overhead access.
[0096] After integrating the three rules, the system does not need to perform repeated calculations, multi-threaded synchronization, or data caching. It achieves higher precision highlighting with lower computing power, ensuring that the teleprompter maintains stable, smooth, and error-free segmented highlighting in scenarios such as long-term continuous scrolling and rapid chapter jumps.
[0097] In one implementation, such as Figure 2 As shown, this application also provides a text segmentation and highlighting system based on speech character position mapping, the system comprising: The text feature preprocessing module 201 is used to perform feature preprocessing on text content, scrolling sequence, scrolling speed and font layout, and uniformly convert them into the character coordinates and progress percentage format specified by the prompting rendering. After position mapping calculation and segment boundary detection, the fixed structure text character index and highlight interval vector are extracted to generate position preprocessing and highlighting reference information adapted to prompting display. The multi-layer adaptive scrolling drive module 202 is used to build a multi-layer adaptive scrolling drive calculation module. After copying the scrolling progress vector along the text time axis, the text display features are modulated layer by layer through the scrolling parameter layer to suppress non-viewport components. The vector is then restored to the original screen pixel dimension through the rendering projection layer. Combined with the visual alignment error, scrolling synchronization calibration is completed, and segmented modulation fusion and restoration information with high brightness following capability is generated. The highlight engine direct connection cascade module 203 is used to directly connect the highlight extraction module and the feature domain of the fixed logic word prompting control engine. All logic of the fixed control engine makes the update flow only in the front-end mapping layer. The target highlight segment is obtained by inputting the scrolling sequence and text content. According to the word prompting architecture, progress deviation calibration is selected for continuous scrolling mode and segment matching calibration is selected for chapter jump mode. Synchronous feedback and parameter optimization information that only update the front end are generated. The rendering dimension alignment and adaptation module 204 is used to align the highlight segment output dimension with the text prompting rendering input dimension, and generate pixel coordinate matching and lightweight parameter adjustable plug-and-play adaptation information to adapt to the target rendering framework. The low-computing-power synchronous display module 205 is used to generate low-computing-power, high-following-accuracy scrolling text synchronous display and highlighted segment information by relying on the task consistency collaborative calibration mechanism of the fixed word-prompting engine and using the word-prompting control engine as a static timing discriminator.
[0098] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of the text segmentation highlighting method, system, electronic device, electronic device, and readable storage medium based on speech character position mapping are basically similar to the above-described embodiments of the text segmentation highlighting method based on speech character position mapping, and therefore are described simply. Relevant parts can be referred to in the descriptions of the above-described embodiments of the text segmentation highlighting method based on speech character position mapping.
[0099] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application.
Claims
1. A method for highlighting text segments based on speech character position mapping, characterized in that, include: The text content, scrolling sequence, scrolling speed and font layout are preprocessed to convert them into the specified character coordinates and progress percentage format for prompting rendering. The fixed-structure text character index and highlight interval vector are extracted through position mapping calculation and segment boundary detection to generate position preprocessing and highlighting reference information adapted to prompting display. A multi-layer adaptive scrolling-driven calculation module is built. The scrolling progress vector is copied along the text time axis and then modulated layer by layer through the scrolling parameter layer to modulate the text display features and suppress non-viewport components. It is then restored to the original screen pixel dimension through the rendering projection layer. Combined with visual alignment error, scrolling synchronization calibration is completed to generate segmented modulation fusion and restoration information with high brightness following capability. The highlight extraction module is directly cascaded with the feature domain of the fixed logic word prompting control engine. All logic of the fixed control engine ensures that updates only flow in the front-end mapping layer. Input scrolling sequence and text content to obtain target highlight segments. According to the word prompting architecture, progress deviation calibration is selected for continuous scrolling mode and segment matching calibration is selected for chapter jump mode. Synchronous feedback and parameter optimization information that only update the front end are generated. Align the highlighted segment output dimension with the prompting rendering input dimension to generate pixel coordinate matching and lightweight parameter adjustable pluggable adaptation information that adapts to the target rendering framework. Based on the task consistency collaborative calibration mechanism of the fixed prompting engine, the prompting control engine is used as a static time sequence discriminator to generate scrolling text synchronous display and highlighted segment information with low computing power and high following accuracy.
2. The text segmentation and highlighting method based on speech character position mapping according to claim 1, characterized in that, The text content, scrolling sequence, scrolling speed, and font layout are preprocessed to uniformly convert them into a format that specifies the character coordinates and progress percentage for the prompting rendering. Fixed-structure text character indices and highlight interval vectors are extracted through position mapping calculation and segment boundary detection to generate position preprocessing and highlighting baseline information adapted for prompting display, including: Combining the requirements of continuous scrolling highlight display of the teleprompter with the logic of text character position mapping, text segmentation rules and screen coordinate mapping mechanism are introduced to perform teleprompter algorithm preprocessing on input text content, scrolling speed, font size and layout parameters; The text content is segmented according to paragraph and character indexes, and the continuous text stream is reconstructed into segmented character sequences with position indexes, thus completing the structured reorganization of text display features; By calculating coordinates, the scrolling progress is projected onto the coordinate space of the visible area of the screen, achieving a precise mapping and conversion between character positions and highlighted areas. This generates position preprocessing and highlighting baseline information adapted for teleprompter display, completing the front-end feature extraction for text segmentation highlighting in the teleprompter.
3. The text segmentation and highlighting method based on speech character position mapping according to claim 1, characterized in that, A multi-layer adaptive scrolling-driven calculation module is constructed. The scrolling progress vector is copied along the text timeline and then modulated layer by layer through a scrolling parameter layer to modulate text display features and suppress non-viewport components. Finally, it is restored to the original screen pixel dimension through a rendering projection layer. Combined with visual alignment errors, scrolling synchronization calibration is completed, generating segmented modulation fusion and restoration information with highlight following capabilities, including: Configure the parameters of the teleprompter scrolling control module, and define the algorithm execution environment for scrolling speed, highlight switch, and prompt line position; In the text rendering process, load the character index and segmentation range to obtain the initial highlighting and scrolling display results; Extract text paragraph boundaries and screen visible area data to establish a rule base for filtering text outside the viewport. Based on the scroll progress mapping mechanism, the initial display result is compared with the viewport filtering rules to remove invalid text content outside the screen; The progress matching verification is performed on the calibrated highlight segment results, the synchronization logic between scroll position and highlight interval is optimized, and segment highlight and scroll synchronization information adapted to GPU rendering is generated.
4. The text segmentation and highlighting method based on speech character position mapping according to claim 1, characterized in that, The highlight extraction module is directly cascaded with the feature domain of the fixed logic word-prompting control engine. All logic of the fixed control engine ensures that updates flow only through the front-end mapping layer. Inputting the scrolling sequence and text content yields the target highlighted segments. Based on the word-prompting architecture, progress deviation calibration is selected for continuous scrolling mode, and segment matching calibration is selected for chapter jump mode. Synchronous feedback and parameter optimization information are generated that only updates the front end, including: In order to meet the direct connection and adaptation requirements of the teleprompter highlight extraction module and the teleprompter control engine, character position mapping rules and scrolling progress synchronization mechanism are introduced to determine the standardized processing schemes for text content, segment boundaries, scrolling parameters and highlight switches. Standardize the format of text character index, segment interval, scroll position percentage and highlight enable parameters, and convert them into a progress and interval format that can be recognized by the prompting control engine; A highlight extraction module consisting of scroll progress parsing, character position matching, segment ownership determination, and highlight status generation is built, and a fixed segment index and highlight output structure are set. The standardized text data and scrolling progress parameters are input into the highlight extraction module. After progress parsing, position matching, segmentation judgment and status marking, the target highlight segment data is output. Extract read / unread highlighted segment information that is perfectly aligned with scrolling from the scrolling time sequence and text position mapping results; The highlight extraction module is directly cascaded with the word prompting control engine. The original logic of the fixed engine is only open for front-end mapping layer updates. Synchronous feedback and parameter calibration are completed according to continuous scrolling and chapter jump modes, respectively, generating synchronous optimization information that only applies to the front-end mapping.
5. The text segmentation and highlighting method based on speech character position mapping according to claim 1, characterized in that, Align the highlighted segmented output dimension with the text prompting rendering input dimension to generate pixel coordinate matching and lightweight parameter-adjustable pluggable adaptation information adapted to the target rendering framework, including: Combining the requirements of teleprompter highlight segmented output and interface rendering dimension matching with Qt / QML rendering specifications, a character coordinate normalization mechanism and segment interval size alignment logic are introduced to determine the core calculation rules of the rendering adaptation layer. Extract the character index, start and end offset and paragraph boundary information of the highlighted segmented output, bind the visible area range according to the rendering specification, construct the segmented adaptation sequence corresponding to the text line, and define the rendering alignment interval; Based on the length of the segmented adaptation sequence, a one-dimensional coordinate adaptation vector for matching rendering input is defined, clarifying the mapping relationship between the character position, segment interval and pixel size of each element; By combining constraints on font size, line height, horizontal margin and vertical spacing parameters, three types of adaptation rules are set for interval scaling, position offset and viewport clipping, and the calculation range of coordinate alignment is limited. Based on the dimension alignment mapping method, the highlight segment intervals and character layout parameters are substituted into the adaptation rules for segment-by-segment calculation, and the rendering coordinate vector is standardized and updated. This generates pixel coordinate alignment and lightweight adaptation information that is completely matched with the Qt / QML rendering input and can be directly plugged in and used.
6. The text segmentation and highlighting method based on speech character position mapping according to claim 5, characterized in that, Based on the task consistency collaborative calibration mechanism of the fixed word-prompting engine, the word-prompting control engine is used as a static time-series discriminator to generate low-computational-cost, high-accuracy scrolling text synchronization display and highlighted segment information, including: Based on the single-process synchronous task consistency collaborative calibration mechanism and the requirements of teleprompter text scrolling highlight display, the fixed logic teleprompter control engine is used as a static timing discriminator to generate timing reference information adapted to the text segmentation highlighting module. Based on the design goals of low computational overhead and high synchronization accuracy, the output results of collaborative calibration are optimized by scrolling, the alignment requirements of highlight segmentation and word prompting engine scrolling rules are clarified, and the temporal adaptation rule information of text display features is generated. By combining the features of the direct-connect pluggable architecture, non-intrusive access rules are set for the highlighting module to adapt to the Qt / QML rendering framework, ensuring that the rendering stage can be seamlessly connected to the prompting interface with the same input format without any additional adaptation overhead. The timing reference information, timing adaptation rule information, and non-intrusive access rules are integrated and processed to generate scrolling text synchronization display and segmented highlighting information with low computing power overhead and high following accuracy, including discrimination benchmark, scroll alignment, and quick access.
7. A text segmentation and highlighting system based on speech character position mapping, characterized in that, The system includes: The text feature preprocessing module is used to preprocess the text content, scrolling sequence, scrolling speed and font layout features, and convert them into the character coordinates and progress percentage format specified by the prompting rendering. Through position mapping calculation and segment boundary detection, the fixed structure text character index and highlight interval vector are extracted to generate position preprocessing and highlighting reference information adapted to the prompting display. The multi-layer adaptive scrolling drive module is used to build a multi-layer adaptive scrolling drive calculation module. After copying the scrolling progress vector along the text time axis, the text display features are modulated layer by layer through the scrolling parameter layer to suppress non-viewport components. The result is restored to the original screen pixel dimension through the rendering projection layer. Combined with visual alignment error, scrolling synchronization calibration is completed to generate segmented modulation fusion and restoration information with high brightness following capability. The highlight engine direct connection cascade module is used to directly connect the highlight extraction module with the feature domain of the fixed logic word prompting control engine. All logic of the fixed control engine ensures that updates only flow in the front-end mapping layer. Input scrolling sequence and text content to obtain target highlight segments. According to the word prompting architecture, progress deviation calibration is selected for continuous scrolling mode and segment matching calibration is selected for chapter jump mode. Synchronous feedback and parameter optimization information that only update the front end are generated. The rendering dimension alignment and adaptation module is used to align the highlight segment output dimension with the text prompting rendering input dimension, and generate pixel coordinate matching and lightweight parameter adjustable pluggable adaptation information to adapt to the target rendering framework. The low-computing-power synchronous display module is used to generate low-computing-power, high-following-accuracy scrolling text synchronous display and highlighted segment information by relying on the task consistency collaborative calibration mechanism of the fixed word-prompting engine and using the word-prompting control engine as a static timing discriminator.
8. An electronic device, characterized in that, include: First processor; and memory for storing executable instructions of the first processor; The first processor is configured to execute the text segmentation and highlighting method based on speech character position mapping as described in any one of claims 1 to 6 by executing the executable instructions.
9. A computing device, the device comprising a memory for storing computer program instructions and a second processor for executing the computer program instructions, wherein, When the computer program instructions are executed by the second processor, the device is triggered to execute the text segmentation and highlighting method based on the voice character position mapping as described in any one of claims 1 to 6.