Text rendering result determination method and device, storage medium, and electronic device

By storing the rendering representation data of multiple characters in the target rendering area and deriving the index identifier based on the offset for color processing, the problem of the number of rendering times of multi-color text increasing linearly with the number of color segments is solved. This decouples the number of rendering times from the number of color segments, significantly reduces rendering overhead, and improves rendering performance.

CN122491202APending Publication Date: 2026-07-31HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
Filing Date
2026-05-07
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In complex interactive scenarios, the number of times multi-colored text is rendered increases linearly with the number of color segments, resulting in excessive rendering overhead and affecting rendering performance.

Method used

The rendering representation data of multiple characters of the text to be rendered is stored in the target rendering area. Based on the offset of the rendering representation data in the rendering area to be colored, the index identifiers of multiple characters are derived. The rendering area to be colored is colored using the index identifiers to form a colored rendering area. The colored rendering area is then rendered, and the same rendering area is used for rendering processing.

Benefits of technology

It effectively reduces the number of rendering iterations, decouples the number of rendering iterations from the number of color segments, significantly reduces rendering overhead, and improves rendering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491202A_ABST
    Figure CN122491202A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, storage medium, and electronic device for determining text rendering results. The method includes: storing rendering representation data of multiple characters in the text to be rendered into a target rendering area to obtain a coloring rendering area; and deriving index identifiers of multiple characters based on the offsets of the rendering representation data in the coloring rendering area. After completing the coloring processing of the coloring rendering area, only the coloring rendering area needs to be rendered to obtain the text rendering result. That is, the coloring rendering area is treated as an indivisible whole during the rendering process. Thus, only one rendering is needed for the coloring rendering area, reducing the number of rendering iterations and decoupling the number of rendering iterations from the number of color segments, significantly reducing rendering overhead. Therefore, it can solve the problem of excessive rendering overhead and poor rendering performance in related technologies when determining text rendering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of rendering technology, and more specifically, to a method and apparatus for determining text rendering results, a storage medium, and an electronic device. Background Technology

[0002] With the development of rendering technology, the implementation of multi-color text generally adopts the architecture of "color segmentation - independent rendering area creation". Specifically, the text to be rendered is usually divided into K independent segments according to the number of color segments, and each segment corresponds to one independent rendering area. During rendering, the rendering command is submitted on a unit of each segment to expand the rendering of the independent rendering area, and the number of rendering times corresponds to the number of color segments.

[0003] However, in complex interactive scenarios such as games and apps, the text to be rendered often contains dozens or even hundreds of color segments (such as gradient text, dynamic highlighting, and special effects titles), which causes the number of rendering times to increase linearly with the number of color segments, resulting in excessive rendering overhead and seriously affecting rendering performance. Summary of the Invention

[0004] This application provides a method, apparatus, storage medium, and electronic device for determining text rendering results, in order to at least solve the problem in the related art where the number of rendering times of the text to be rendered increases linearly with the number of color segments, resulting in excessive rendering overhead and poor rendering performance when determining the text rendering results.

[0005] According to one embodiment of this application, a method for determining a text rendering result is provided, comprising: determining rendering representation data corresponding to each of the multiple characters included in the text to be rendered;

[0006] Multiple rendering representation data are stored in a target rendering area to obtain a rendering area to be colored; based on the offset of the multiple rendering representation data in the rendering area to be colored, the index identifiers corresponding to the multiple characters are determined; the rendering area to be colored is colored based on the multiple index identifiers to obtain a colored rendering area, and the colored rendering area is rendered to obtain the text rendering result of the text to be rendered.

[0007] According to another embodiment of this application, a device for determining a text rendering result is provided, comprising: a first determining module, configured to determine rendering representation data corresponding to a plurality of characters included in the text to be rendered; a storage module, configured to store the plurality of rendering representation data in a target rendering area to obtain a rendering area to be colored; a second determining module, configured to determine index identifiers corresponding to the plurality of characters based on the offsets of the plurality of rendering representation data in the rendering area to be colored; and a rendering module, configured to perform coloring processing on the rendering area to be colored based on the plurality of index identifiers to obtain a colored rendering area, and render the colored rendering area to obtain a text rendering result of the text to be rendered.

[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0009] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0010] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0011] According to this application, by storing the rendering representation data of multiple characters in the text to be rendered into a target rendering area, a rendering area to be colored is obtained. Based on the offset of the rendering representation data within the rendering area to be colored, the index identifiers of multiple characters are derived. Then, the rendering area to be colored can be colored based on these multiple index identifiers. After completing the coloring of the rendering area to be colored, only the colored rendering area needs to be rendered to obtain the text rendering result. All character rendering representation data share the same rendering area. During the rendering process, the colored rendering area is treated as an indivisible whole. Thus, only one rendering operation is needed for the colored rendering area, effectively reducing the number of rendering iterations and decoupling the number of rendering iterations from the number of color segments, significantly reducing rendering overhead. Therefore, this solves the problem in related technologies where the number of rendering iterations of the text to be rendered increases linearly with the number of color segments, resulting in excessive rendering overhead and poor rendering performance when determining the text rendering result. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0014] Figure 1 This is a hardware structure block diagram of a computer device for a method of determining text rendering results according to an embodiment of this application.

[0015] Figure 2 This is a flowchart of a method for determining text rendering results according to an embodiment of this application;

[0016] Figure 3 This is a flowchart of a system for determining text rendering results according to an embodiment of this application;

[0017] Figure 4 This is a vertex data structure diagram of a method for determining text rendering results according to an embodiment of this application;

[0018] Figure 5 This is a comparative schematic diagram of text rendering results according to an embodiment of this application;

[0019] Figure 6 This is a structural block diagram of a device for determining text rendering results according to an embodiment of this application. Detailed Implementation

[0020] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0022] The methods and embodiments provided in this application can be executed in a computer device or similar computing device. Taking running on a computer device as an example, Figure 1 This is a hardware structure block diagram of a computer device for a method of determining text rendering results according to an embodiment of this application. For example... Figure 1 As shown, a computer device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor or programmable logic device) and a memory 104 for storing data are also shown. The computer device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1The structure shown is for illustrative purposes only and does not limit the structure of the computer device described above. For example, the computer device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0023] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the method for determining text rendering results in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to computer devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer equipment. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0025] This embodiment provides a method for determining text rendering results, which is applied to the aforementioned computer equipment and is suitable for cloud-native environments, edge computing environments, and multi-protocol hybrid network environments. Figure 2 This is a flowchart of a method for determining text rendering results according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0026] Step S202: Determine the rendering representation data corresponding to the multiple characters in the text to be rendered;

[0027] It should be noted that rendering representation data refers to a standardized data structure that can be read by the rendering engine and used for rasterization rendering.

[0028] In some embodiments, in the character split rendering mode, the text to be rendered can be split into independent rendering units at the character level, that is, split into multiple characters. Based on obtaining multiple characters, the rendering representation data of each character is further determined and structured to form a data block of fixed length and uniform type.

[0029] Optionally, each character can be composed of four vertices, and each vertex contains five attribute values. Therefore, the total length of the rendering representation data for each character can be 20 units of data (i.e., 4 vertices × 5 dimensions = 20). Each unit of data is an unsigned integer or floating-point type, depending on the underlying vertex format definition of the engine.

[0030] In an exemplary embodiment, determining the rendering representation data corresponding to the multiple characters in the text to be rendered includes: performing contour recognition on the multiple characters to determine N vertices corresponding to the multiple characters, where N is a positive integer; determining the vertex dimension data corresponding to the N vertices; and determining the rendering representation data corresponding to the multiple characters based on the vertex dimension data corresponding to the N vertices.

[0031] Specifically, when performing contour recognition on multiple characters, a glyph analysis module (such as a built-in glyph engine) can be invoked to perform independent contour analysis on each character. This analysis process can triangulate or rectangularize the contour curves of the characters (composed of Bézier curves and straight line segments), ultimately generating a closed polygon for screen rendering. In character split rendering mode, to achieve efficient rendering, this polygon can be uniformly converted into a rectangular patch composed of four vertices, meaning each character corresponds to a rectangular grid composed of the four vertices: the lower left, lower right, upper left, and upper right corners.

[0032] Furthermore, for each vertex, all the attribute information necessary for its rendering pipeline is calculated and recorded, forming a complete dataset containing multiple dimensions. Specifically, the dimensional data of each vertex includes: the vertex's spatial coordinates (x, y) in the screen-normalized device coordinate system, used to determine the vertex's geometric distribution on the screen; texture coordinates (u, v): used to sample the glyph texture corresponding to the character from the font texture map to ensure correct glyph mapping; C: color representation data, which is a predefined format color component used to specify the vertex's shading color, a key attribute for implementing multi-color text. The above five-dimensional data (x, y, u, v, C) are the components of the vertex.

[0033] Finally, the five-dimensional data of the N vertices corresponding to each character are concatenated in a fixed order (bottom left, bottom right, top left, top right) to form a rendering representation data of length N×5. When N=4, the rendering representation data for each character consists of 20 data units, forming a structured data block that can be directly written to the target rendering area (such as a VBO (Vertex Buffer Object)). This data block contains all the geometric and color information of the character, providing the smallest atomic unit for subsequent unified storage, indexing, and color overlay.

[0034] In the above embodiments, by performing contour recognition on multiple characters, N vertices are determined, and the rendering representation data of multiple characters is determined based on the vertex dimension data corresponding to the N vertices. This makes it possible to integrate the rendering representation data into the target rendering area, providing a basis for unified rendering area reuse. At the same time, since the data structure of each character is completely consistent, its data length is fixed and its offset can be calculated, laying the foundation for accurate determination of the index identifier in the future.

[0035] Step S204: Store multiple rendering representation data in the target rendering area to obtain the rendering area to be shaded;

[0036] It is understandable that when storing multiple rendering representation data into the target rendering area, the writing order of the multiple rendering representation data can be set, and the multiple rendering representation data can be written continuously and without gaps into a pre-allocated, unified target rendering area, thereby forming a complete, continuous set of vertex data that can be accessed by the graphics engine at one time. This set is the rendering area to be shaded. The rendering area to be shaded is a global, unified buffer, and the rendering representation data of all characters are arranged sequentially according to the character sequence number, forming a linear and continuous memory area. When determining the writing order, it can be determined according to the order of the characters corresponding to the rendering representation data in the text string, or it can be randomly specified. This embodiment of the application does not impose any restrictions here.

[0037] Step S206: Based on the offsets of multiple rendering representation data in the rendering area to be colored, determine the index identifiers corresponding to the multiple characters respectively;

[0038] The offset is a definite, calculable integer value. The offset of the rendering representation data of the Kth character in the rendering area to be shaded is calculated by moving K data units backward from the starting address of the rendering area to reach the starting position of the vertex data corresponding to that character.

[0039] Specifically, based on the storage location of the rendering representation data of each character in the rendering area to be colored, the index identifier corresponding to each character and used to locate its vertex color attribute can be accurately derived. The index identifier is a set of offset addresses accurate to the byte that can be directly used for memory write operations, which is used to achieve accurate assignment of color to any vertex of any character.

[0040] In an exemplary embodiment, determining the index identifiers corresponding to multiple characters based on the offsets of multiple rendering representation data in the rendering area to be shaded includes: determining the offset intervals of the vertex dimension data of N vertices of multiple characters in the rendering area to be shaded based on the offsets of the rendering representation data of multiple characters in the rendering area to be shaded; determining the color offset of the color representation data of any vertex in the rendering area to be shaded based on the offset interval of any vertex among the N vertices of any character; wherein, the vertex dimension data includes: color representation data; and determining the index identifiers corresponding to multiple characters based on the color offsets corresponding to the N vertices of multiple characters.

[0041] It should be noted that the rendering representation data for any character includes the vertex dimension data corresponding to each of the N vertices of that character. For any character among multiple characters, the memory range occupied by the rendering representation data of that character in the rendering area to be shaded is the offset range of all vertex dimension data of that rendering representation data. For example, if the rendering representation data includes the vertex dimension data corresponding to 4 vertices, the offset range of the bottom left vertex can be units 0 to 4, units 5 to 9 for the bottom right vertex, units 10 to 14 for the top left vertex, and units 15 to 19 for the top right vertex. Therefore, the offset range of the vertex dimension data corresponding to each vertex in the VBO is definite and derivable.

[0042] In one embodiment, the vertex dimension data includes color representation data. The color representation data can be located at any position in the vertex data segment of the vertex dimension data; optionally, the color representation data is located at the 5th position, and the color offset is determined based on the number of positions of the color representation data in the vertex data segment. For example, for the character A, the offset range of its lower left vertex can be from unit 0 to 4; if the color representation data is located at the 5th position, the color offset is determined to be 4.

[0043] Optionally, after determining the color offset, the index identifier can be determined directly based on the color offset; alternatively, the color offset can be combined with character attributes, such as character length and character position, to jointly determine the index identifier. This embodiment of the application does not impose any limitations on this.

[0044] In the above embodiments, by determining the offset range of the vertex dimension data of N vertices of multiple characters in the rendering area to be shaded, the color offset of the color representation data of any vertex in the rendering area to be shaded can be accurately calculated. Subsequently, in the shading process, shading can be directly expanded based on the index identifier, and different color representation data can be expanded and assigned values ​​in a unified shading rendering area without any state switching or data rearrangement, which effectively improves the shading efficiency.

[0045] In an exemplary embodiment, determining the index identifiers corresponding to multiple characters based on the color offsets corresponding to the N vertices of multiple characters includes: determining the character attribute parameters corresponding to multiple characters; determining the color index identifiers corresponding to the N vertices of any character based on the color offsets corresponding to the N vertices of any character and the character attribute parameters of any character; and determining the index identifiers corresponding to multiple characters based on the color index identifiers corresponding to the N vertices of multiple characters.

[0046] Among them, character attribute parameters refer to a set of attribute information associated with each character in the text rendering process, in addition to its geometric shape, to control its character performance. Character attribute parameters include, but are not limited to: color priority indicator, character length, and the order of characters in the text to be rendered.

[0047] For each of a set of characters, based on its character attribute parameters and the color offsets of its four vertices, the color index identifiers corresponding to its four vertices can be determined. Specifically, when determining the color index identifiers of the four vertices of any character 'A', the following formula can be used:

[0048] Color index identifier of the bottom left vertex: ;

[0049] Color index identifier of the bottom right vertex: ;

[0050] Top-left vertex color index identifier: ;

[0051] Top right vertex color index identifier: ;

[0052] in, It is determined by the character attribute parameters of the character. , The length of character A. It can refer to the character order of character A among all characters, and 4, 9, 14, and 19 are the color offsets.

[0053] In the above embodiments, by combining character attribute parameters with vertex color offsets, color index identifiers can be accurately determined. Subsequently, during the shading process, shading can be directly carried out based on the color index identifiers. Different color representation data can be assigned values ​​separately within a unified shading rendering area without any state switching or data rearrangement, effectively improving shading efficiency.

[0054] Step S208: Based on multiple index identifiers, the area to be colored is colored to obtain the colored area, and the colored area is rendered to obtain the text rendering result of the text to be rendered.

[0055] In an exemplary embodiment, coloring a rendering area to be colored based on multiple index identifiers to obtain a colored rendering area includes: traversing multiple characters in response to a coloring instruction; determining the color index identifiers of N vertices of any character in the rendering area to be colored during the traversal of multiple characters; and coloring the N vertices of any character based on the coloring parameters carried by the coloring instruction and the color index identifiers of the N vertices of any character to obtain a colored rendering area.

[0056] The index identifiers can include the color index identifiers of the N vertices of any character. Given that the character vertex data is uniformly stored in a single vertex buffer object (VBO) forming the rendering area to be shaded, when an external device (such as game logic, UI scripts, or user interaction modules) issues a shading instruction, it iterates through all characters in the text and, combined with the color index identifiers corresponding to each character, directly performs a native write operation on the vertex color fields within the unified VBO. This completes the refined shading of multi-color text without relying on shaders, rebuilding buffers, or increasing rendering batches, thus forming the final shaded rendering area.

[0057] Optionally, the shading instruction is triggered by the upper-level application. Its content includes a set of shading parameters, such as specifying the 1st to 3rd characters as red, the 4th to 6th characters as blue, the bottom-left vertex of the first character as yellow, and the remaining characters inheriting the default color. Upon receiving this instruction, the traversal process begins, accessing each character sequentially according to the order of the characters in the text to be rendered (i.e., character index k from 0 to m-1). This eliminates the need for pre-classification of color segments, the creation of a color segment mapping table, and the reconstruction of vertex structures; it only requires sequential access based on the character sequence, significantly reducing the complexity of the control logic.

[0058] It should be noted that when traversing to the k-th character, the color assignment logic can be unfolded based on the color index identifiers of the N vertices of the k-th character, which have been determined previously. For example, it first determines whether the character has an explicitly assigned vertex-specific color; if not, it determines whether a unified character color is configured; if still not, it inherits the default color. Based on this priority determination result, the calculated final color value (e.g., 0xFFFF0000) is directly written to the color representation data corresponding to the four vertices of the character. The write operation is completed through the vertex data update interface at the bottom layer of the graphics engine. Its essence is a direct assignment to a specified offset position in the video memory, completely bypassing the shader program, without triggering vertex shader recompilation, without introducing texture sampling, and without relying on any dynamic branches.

[0059] After all characters have completed the above traversal and writing operations, the vertex color fields within the entire unified VBO have been updated to the final values ​​conforming to the shading instructions. At this point, the VBO is the shading rendering area. This area no longer contains default or undefined colors; its content fully carries the visual expression of multi-colored text, and all data maintains a continuous, compact, and structurally unified original layout, which can be directly used by the graphics engine for the next rendering schedule.

[0060] In the above embodiments, full coloring of multi-color text is achieved in a single rendering batch. In traditional solutions, each color segment requires an independent rendering command, resulting in strong coupling between the coloring operation and the rendering command. However, this application embodiment completely separates the coloring logic from the rendering pipeline through a "write first, render later" decoupling architecture. Regardless of whether the text contains 10, 100, or 1000 color segments, the coloring process is a single sequential write, ultimately triggering only one rendering operation, thus completely decoupling the number of color segments from the number of rendering operations.

[0061] In an exemplary embodiment, based on the shading parameters carried by the shading instruction and the color index identifiers of the N vertices of any character, the N vertices of any character are shading processed to obtain a shading rendering area, including: extracting the color value matching any character from the shading parameters; extracting the target color value from the color value matching any character based on a predefined color selection strategy and determining it as the vertex color value corresponding to the N vertices of any character; and assigning values ​​to the color representation data of the N vertices of any character based on the vertex color values ​​of the N vertices of any character and the color index identifiers of the N vertices of any character to obtain the shading rendering area.

[0062] When an externally received shading instruction is received, this instruction encapsulates color configuration information for specific characters or character ranges within the text. This information is structured into a set of shading parameters, which may include vertex-specific color settings for individual characters, uniform color settings for the entire character, and default color settings inherited by characters for which no color is explicitly specified. Color values ​​may include at least one of the following: vertex-specified color values, character color values, and default color values. Different color values ​​have a semantic hierarchy. In practical applications, these three can exist independently, be used in combination, or be partially absent, thereby supporting various visual needs from the simplest monochrome rendering to complex gradients, segmentations, and blended shading.

[0063] When coloring any character, the system first retrieves the set of color values ​​that match the character from the coloring parameters based on the character's index in the text. This matching process does not rely on traversing the entire coloring instruction; instead, it directly locates the associated configuration through character index or character range identifier, ensuring constant-time efficiency. If the character has explicitly specified vertex color values, it means that its four vertices can be assigned different colors, and the independent color values ​​of these four vertices will be extracted. If the character has not been configured with vertex-specific colors but has been assigned a character color value, it means that all vertices of the character will use the same color. If neither is set, the default color value is automatically enabled, ensuring that all characters have at least one valid color source and avoiding rendering anomalies.

[0064] After obtaining all candidate color values ​​matching the character, the uniqueness of the target color value is determined according to a predefined color selection strategy. This strategy is a fixed, unambiguous, and verifiable priority rule: vertex-specific color values ​​take precedence over character color values, and character color values ​​take precedence over default color values. That is, if a character is configured with both a vertex-specific color and a uniform color, the uniform color will be ignored, and only the vertex-specific color will be adopted; if only the uniform color is configured, the default color will be ignored; if none of the three are configured, the system will report an error or use the lowest safe color preset by the engine (such as pure white or transparent) as a fallback.

[0065] After determining the target color value, the final shading assignment operation is performed based on the previously generated color index identifiers, i.e., the precise offset address of each vertex color in the unified vertex buffer. For the four vertices of the character, their corresponding color index identifiers are read, and the previously determined target color value (monochrome or four-color) is directly written to the color representation data field at the corresponding position in the VBO. Since the color representation data of each vertex occupies a fixed position in the VBO (e.g., the 4th, 9th, 14th, and 19th units), and this offset relationship is strictly defined by a formula, this write operation is an absolute address write, requiring no intermediate conversion, no type mapping, and no buffer reordering. This process is implemented through the engine's underlying native API, directly modifying the video memory content without going through any programmable stage of the rendering pipeline, achieving zero-latency control of "shading is writing, and writing is effective immediately".

[0066] After the above four write operations are completed, the color representation data of the four vertices of the character has been accurately updated, and its visual representation in the unified VBO has been completely reconstructed according to the shading instructions. As all characters are traversed and processed in sequence, the vertex color data of the entire text is updated character by character and vertex by vertex, ultimately forming a complete, consistent, and color-accurate shading rendering area.

[0067] In the above embodiment, it condenses the complex logic originally scattered across rendering segments into a pure data operation flow based on priority rules, completely independent of the graphics pipeline. It does not rely on any shader code, does not modify the engine core, does not add rendering instructions, and does not introduce additional memory overhead, effectively improving rendering performance.

[0068] In an exemplary embodiment, rendering the colored rendering area to obtain the text rendering result of the text to be rendered includes: updating the status flag bit of the colored rendering area to obtain an updated status flag; if the updated status flag is the target status flag, triggering a rendering command based on the target status flag; and sending the rendering command to the rendering engine to obtain the text rendering result of the text to be rendered.

[0069] Understandably, the target status flag is used to indicate that the shaded rendering area is in a waiting-to-be-rendered state. Once the color values ​​of all characters are written to a unified VBO according to the shading instructions and color index identifiers, forming a shaded rendering area, the status flag associated with that VBO is immediately updated. This status flag is an internal flag field used by the graphics engine to track whether the buffer needs to be re-rendered. It is typically a Boolean or enumerated variable, with an initial value of "not dirty" or "normal," indicating that the buffer content has not changed and rendering is not required. In this embodiment, after the color representation data of all vertices is assigned a value, the status flag of the VBO is actively updated from "not dirty" to "dirty," i.e., the "target status flag." The target status flag has a clear semantic meaning: it indicates that the shaded rendering area needs to be submitted to the graphics pipeline for drawing.

[0070] Updating the status flag is a lightweight memory operation, requiring only the modification of a single byte or bit field. It does not involve data copying, does not trigger GPU synchronization, and does not affect other rendering objects. Its design is fully compatible with the existing dirty flag mechanism of mainstream graphics engines, requiring no extension of the engine API or modification of the engine source code, thus possessing natural compatibility and integrability.

[0071] Once the target status flag is set, a rendering command is automatically triggered. This command instructs the rendering engine to render the shading area. The rendering command is triggered based on changes in the status flag and is essentially an implicit command to render the VBO, containing necessary parameters such as buffer references, vertex format, drawing type (e.g., triangles), number of vertices, and index range. Since the vertex data of all characters in this embodiment is integrated into a single VBO, and the color information is fully written, this rendering command only needs to be executed once to completely draw text content containing any number of color segments and characters.

[0072] Furthermore, the rendering instruction is submitted to the graphics engine's rendering pipeline. Based on the instruction, the engine takes the vertex data from the shaded rendering area as input and performs rasterization using the native vertex and fragment shaders. Since the color data has already been written, the shaders do not need to perform color interpolation, texture sampling, or conditional checks; they only perform standard coordinate transformations and pixel filling, thus achieving high-speed, low-load final rendering. After rendering is complete, the output is the text rendering result of the text to be rendered, i.e., a complete, accurate, and color-correct multi-color text image on the screen.

[0073] In the above embodiments, a collaborative mechanism of status flag update—engine automatic triggering—single rendering submission is used to achieve precise, low-overhead, and natively compatible final rendering control of multi-color text content within a unified VBO. This mechanism does not rely on additional plugins, does not modify the engine core, and does not introduce new programming models. It achieves the performance goal of reducing rendering costs simply by making reasonable use of the engine's existing dirty marking mechanism.

[0074] Based on the above steps, by storing the rendering representation data of multiple characters in the text to be rendered into the target rendering area, a rendering area to be colored is obtained. The index identifiers of multiple characters are derived based on the offsets of the rendering representation data within the rendering area to be colored. Then, the rendering area to be colored can be colored based on these multiple index identifiers. After the coloring of the rendering area to be colored is completed, only the colored rendering area needs to be rendered to obtain the text rendering result. All character rendering representation data share the same rendering area, and the rendering area is treated as an indivisible whole during the rendering process. Thus, only the colored rendering area needs to be rendered once, effectively reducing the number of rendering iterations and completely decoupling the number of rendering iterations from the number of color segments, significantly reducing rendering overhead. Therefore, this solves the problem in related technologies where the number of rendering iterations of the text to be rendered increases linearly with the number of color segments, resulting in excessive rendering overhead and poor rendering performance when determining the text rendering result.

[0075] To better understand the process of determining the above-mentioned text rendering result, the implementation flow of the above-mentioned text rendering result determination method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.

[0076] In traditional multi-color text rendering architectures, the overhead of draw calls (DC) is linearly bound to the number of color segments, n. In multi-color scenarios, the DC overhead is too high, leading to a rendering performance bottleneck.

[0077] To address the aforementioned issues, this application provides a multi-color text rendering system based on characters, vertices, a unified rendering area, vertex shading, and single-batch DC submission. Through in-depth exploration and reconstruction of the underlying architecture of the char (character) mode, it breaks through the limitation of traditional multi-color text color segmentation equaling the number of DCs, achieving a dual breakthrough of refined shading and low DC overhead. The core principles and quantization formulas are as follows:

[0078] (1) Differences in underlying architecture between char mode and traditional multicolor rendering: The core technical feature of char mode is the physical splitting and storage of characters, and its vertex buffer distribution satisfies the formula:

[0079] ;

[0080] Where m is the total number of text characters. This represents an independent vertex data segment for the i-th character. In traditional multi-color text rendering architectures, the vertex buffer consists of multiple independently distributed segments, satisfying the formula: ;

[0081] Where n is the number of color segments, For each independent VBO segment of the j-th color, each independent VBO corresponds to one DC submission; however, this application, based on the char mode, innovatively achieves unified VBO reuse, that is, integrating the vertex data segments of all characters into the same VBO, satisfying the formula: ;

[0082] All character vertex data segments are stored sequentially and continuously within a unified VBO, with different characters distinguished only by vertex indexes. This innovation reconstructs the VBO management logic for multi-color text and is a core prerequisite for achieving single DC commit.

[0083] (2) Character vertex data distribution pattern: Based on the physical storage characteristics of the char mode and the unified VBO reuse requirement, it is first clarified that the vertex data of a single character follows the "4-vertex" rule. The "5-dimensional" fixed distribution rule is quantified by a mathematical formula as follows: .in Five-dimensional data for a single vertex. Represents the vertex spatial coordinates. Represents texture coordinates, This represents the color value; from this, the formula for the total length of the vertex data of a single character can be derived: (Unit: unsigned integer / uint). Twenty uint data points for a single character are stored contiguously within a unified VBO, with the specific physical distribution as follows:

[0084] Index [0,4]: Bottom left vertex ( );

[0085] Index [5,9]: Bottom right vertex ( );

[0086] Index [10,14]: Top left vertex ( );

[0087] Index [15,19]: Top right vertex ( );

[0088] (3) Precise calculation of character vertex index: based on the formula for the total length of a single character vertex data The formula for calculating the starting index of the vertex data of the k-th character is derived as follows: Based on this formula, the four vertex color fields can be further derived with greater precision. The index identifier provides a quantitative basis for the accurate coloring of multi-color text:

[0089] Color index of bottom left vertex: ;

[0090] Color index of bottom right vertex: ;

[0091] Top-left vertex color index: ;

[0092] Top-right vertex color index: ;

[0093] (4) Shader-free native vertex shading principle: This application abandons the existing technology's dependence on shaders and directly manipulates the native color fields within the unified VBO. This achieves fine-grained coloring of multi-color text, simplifying the coloring logic at the underlying level while improving compatibility with the engine. Color assignment follows a three-level priority rule, and the quantization formula is as follows:

[0094]

[0095] in, The priority value is a non-empty value, which means that the vertex-specific color is used first, the character uniform color is used if none is available, and the default color is used if neither is available. It can flexibly adapt to various scenarios such as single color, multi-color gradient, and mixed coloring, and is especially suitable for multi-color text rendering with n colors.

[0096] (5) Single DC rendering mechanism for unified VBO reuse: Based on the core of unified VBO reuse, this application designs a single batch DC submission rendering mechanism, which completely breaks through the limitation of "number of color segments = number of DCs" in traditional multi-color text. Its DC overhead satisfies the formula: (This is unrelated to the number of color segments n and the total number of characters m).

[0097] Compared to traditional multi-color rendering architecture The DC reduction quantization formula of this application can be derived as follows: .

[0098] The core logic of this mechanism is as follows: all characters share the same unified VBO. After assigning values ​​to characters of n colors precisely through vertex index within the unified VBO, it is only necessary to mark "the entire unified VBO as dirty". The graphics engine submits the rendering instructions of the VBO in a single rendering batch, realizing the single DC submission of multi-color text. When n≥2, the DC reduction is ≥50%. The larger n is, the more significant the reduction is (when n→∞, the DC reduction approaches 100%), which greatly reduces the rendering overhead of multi-color text.

[0099] refer to Figure 3The diagram shown is a flowchart illustrating the method for determining rendered text in an embodiment of this application.

[0100] The core of this application is to implement a technical system of "precise character-vertex data mapping + unified VBO reuse + native vertex shading + single-batch DC submission", without the need for additional plugin development or modification of engine source code. The specific implementation steps are as follows:

[0101] (1) Character Splitting: Enable text char rendering mode in the target graphics engine, so that the text to be rendered is split into characters. The rules are broken down into independent character units;

[0102] (2) Rendering Area: Create a unified vertex buffer (VBO), and integrate the vertex data segments of all characters into this unified VBO in sequence to achieve unified VBO reuse. Reference Figure 4 The image shows a schematic diagram of the physical distribution of 20 uint data for a single character. Figure 4 The text labels the five-dimensional data composition of the four vertices of the character, highlighting the precise position of the color field C of each vertex. Specifically, the color offset of the lower left vertex is 4, the color offset of the lower right vertex is 9, the color offset of the upper left vertex is 14, and the color offset of the upper right vertex is 19, which intuitively demonstrates the precise coloring logic of multi-color text.

[0103] (3) Index identifier calculation: Determine the color index identifier of each vertex corresponding to the character.

[0104] (4) Coloring Parameter Processing: Receives externally input coloring instructions, which include a coloring type identifier and color parameters (n different color values, corresponding to characters in n color segments). Based on the coloring instructions, ... Based on the priority rules, the final color values ​​of the four vertices of each color segment character are calculated, and the color values ​​are precisely assigned to the corresponding vertex color fields within the unified VBO using color index identifiers. Complete the character coloring using n colors.

[0105] (5) Dirty mark: After the coloring is completed, only the rendering state of the entire unified VBO is marked as "dirty", triggering the rendering scheduling mechanism of the graphics engine.

[0106] (6) Rendering: The graphics engine recognizes the dirty state of the unified VBO and submits the rendering instructions for the unified VBO only in a single rendering batch. This completes the rendering of multi-colored text.

[0107] (7) Dirty removal: After rendering is completed, immediately remove the "dirty" status marker of the unified VBO, release procedural resources such as vertex index calculation and temporary storage of color values, and ensure engine running efficiency.

[0108] In a specific application, fine-grained rendering is achieved for multi-color text containing m characters and n colors. The specific implementation process is as follows:

[0109] First, in char mode, the text is split into m independent characters. A unified VBO is created, and the vertex data segments of the m characters are sequentially integrated into this unified VBO, satisfying the following:

[0110] ;

[0111] For a unified VBO, input multi-color shading parameters: n different color values, each corresponding to a character in one of the n color segments; based on Calculate the vertex starting index of each character (the first character). ...the mth Furthermore, by combining the color offset of the vertex color field C, the color index identifier is determined;

[0112] Furthermore, combining color index identifiers, the corresponding colors are assigned to the color fields of the corresponding vertices of the characters in the n color segments according to priority rules. After the assignment is completed, the unified VBO is marked as "dirty," and a DC instruction is submitted once through the graphics engine to complete the rendering of all n colors and m characters of multi-color text. After rendering is completed, the "dirty" mark of the unified VBO is cleared, releasing temporary computing resources. If the character colors of some color segments in the multi-color text are subsequently modified, this application only needs to modify the vertex color fields of the corresponding characters in the unified VBO, re-mark the unified VBO as "dirty," and still only submit one DC instruction. In contrast, traditional multi-color rendering schemes require submitting n DC instructions based on the number of modified color segments n, fully demonstrating the low DC overhead advantage of this application.

[0113] Based on the method for determining the text rendering result provided in this application, the following can be achieved: (1) Performance breakthrough, completely solving the DC bottleneck of multi-color text: Based on the unified VBO reuse and single DC submission mechanism, the DC overhead is greatly reduced, such as DC overhead being reduced by more than 80%, and the overall rendering efficiency is improved in complex multi-color text rendering scenarios; (2) Establishing a precise mathematical mapping rule of "character-vertex-color" in char mode, determining the color index identifier, and realizing single-batch coloring of multi-color text based on the color index identifier in unified VBO reuse, breaking through the technical limitation of "number of color segments = number of DCs" in traditional multi-color text, and filling the industry gap of low-overhead rendering of multi-color text; (3) High compatibility, reducing development costs: No need to modify graphics The engine's native source code directly manipulates the engine's vertex buffer native data, is compatible with the rendering pipeline of mainstream graphics engines, avoids the extra costs of shader development and engine source code modification, and reduces development and maintenance costs; (4) Strong scalability, adaptable to multiple scene requirements: the vertex shading logic is completely decoupled from the character type and color quantity, and can seamlessly adapt to the multi-color fine rendering requirements of various characters such as multilingual characters, irregular characters, and artistic characters, and is suitable for multi-color text visualization projects in various scenes such as games and various APPs; (5) Strong practicality and easy to implement: no need to develop additional plugins or rely on third-party tools, it can be implemented based on the graphics engine's native char mode, the integration process is simple, and it can quickly adapt to the multi-color text rendering requirements of various projects.

[0114] parameter Figure 5 As shown, this is a comparison diagram of rendering effects. The left side shows the effect diagram of the text rendering result determination method based on this application, which is obtained by expanding the rendering and the four-vertex gradient rendering effect respectively. The number of DC (Draw Call) is only 2. The right side shows the text rendering result of the traditional component. There is no gradient effect on the right side, and the number of DC is 7. That is, under the same amount of text, the DC value of this application is significantly reduced compared with that of the traditional component, and this application has a gradient rendering effect.

[0115] Based on the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0116] This embodiment also provides a device for determining text rendering results. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated for details already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0117] Figure 6 This is a structural block diagram of a device for determining text rendering results according to embodiments of this application, such as... Figure 6 As shown, the device includes:

[0118] The first determining module 62 is used to determine the rendering representation data corresponding to the multiple characters included in the text to be rendered;

[0119] Storage module 64 is used to store multiple rendering representation data into the target rendering area to obtain the rendering area to be colored;

[0120] The second determining module 66 is used to determine the index identifiers corresponding to the plurality of characters based on the offsets of the plurality of rendering representation data in the rendering area to be colored.

[0121] The rendering module 68 is used to perform coloring processing on the rendering area to be colored based on multiple index identifiers to obtain a colored rendering area, and to render the colored rendering area to obtain the text rendering result of the text to be rendered.

[0122] According to the aforementioned apparatus, by storing the rendering representation data of multiple characters in the text to be rendered into a target rendering area, a rendering area to be colored is obtained. Based on the offset of the rendering representation data within the rendering area to be colored, the index identifiers of multiple characters are derived. Then, the rendering area to be colored can be colored based on these multiple index identifiers. After the coloring of the rendering area to be colored is completed, only the colored rendering area needs to be rendered to obtain the text rendering result. All character rendering representation data share the same rendering area, and during the rendering process, the rendering area is treated as an indivisible whole. Thus, only one rendering operation is needed on the colored rendering area, effectively reducing the number of rendering iterations and completely decoupling the number of rendering iterations from the number of color segments, significantly reducing rendering overhead. Therefore, this solves the problem in related technologies where the number of rendering iterations of the text to be rendered increases linearly with the number of color segments, resulting in excessive rendering overhead and poor rendering performance when determining the text rendering result.

[0123] In an exemplary embodiment, the first determining module 62 is further configured to perform contour recognition on the plurality of characters, determine N vertices corresponding to the plurality of characters respectively, where N is a positive integer; determine vertex dimension data corresponding to the N vertices respectively; and determine rendering representation data corresponding to the plurality of characters respectively based on the vertex dimension data corresponding to the N vertices respectively.

[0124] In one exemplary embodiment, the second determining module 62 is further configured to: determine the offset intervals of the vertex dimension data of the N vertices of the plurality of characters in the rendering area to be colored, based on the offsets of the rendering representation data of the plurality of characters in the rendering area to be colored; determine the color offset of the color representation data of any vertex in the rendering area to be colored, based on the offset interval of any vertex among the N vertices of any character; and determine the index identifiers corresponding to the plurality of characters, based on the color offsets corresponding to the N vertices of the plurality of characters.

[0125] In an exemplary embodiment, the second determining module 62 is further configured to determine the character attribute parameters corresponding to the plurality of characters respectively; determine the color index identifiers corresponding to the N vertices of any character based on the color offsets corresponding to the N vertices of any character and the character attribute parameters of any character respectively; and determine the index identifiers corresponding to the plurality of characters based on the color index identifiers corresponding to the N vertices of the plurality of characters respectively.

[0126] In an exemplary embodiment, the rendering module 68 is further configured to, in response to a shading instruction, traverse the plurality of characters; during the traversal of the plurality of characters, determine the color index identifiers of the N vertices of any character in the rendering area to be shaded; and, based on the shading parameters carried by the shading instruction and the color index identifiers of the N vertices of any character, perform shading processing on the N vertices of any character to obtain a shaded rendering area.

[0127] In an exemplary embodiment, the rendering module 68 is further configured to extract a color value matching any character from the shading parameters; based on a predefined color selection strategy, extract a target color value from the color value matching any character and determine it as the vertex color value corresponding to the N vertices of any character; and assign values ​​to the color representation data of the N vertices of any character based on the vertex color values ​​of the N vertices of any character and the color index identifiers of the N vertices of any character to obtain a shading rendering area.

[0128] In an exemplary embodiment, the rendering module 68 is further configured to update the status flag of the colored rendering area to obtain an updated status flag; if the updated status flag is a target status flag, trigger a rendering instruction based on the target status flag; and send the rendering instruction to the rendering engine to obtain the text rendering result of the text to be rendered.

[0129] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0130] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0131] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0132] S1, determine the rendering representation data corresponding to the multiple characters in the text to be rendered;

[0133] S2, store the multiple rendering representation data into the target rendering area to obtain the rendering area to be colored;

[0134] S3, based on the offset of the multiple rendering representation data in the rendering area to be colored, determine the index identifiers corresponding to the multiple characters respectively;

[0135] S4, the coloring process is performed on the area to be colored based on the multiple index identifiers to obtain the colored rendering area, and the colored rendering area is rendered to obtain the text rendering result of the text to be rendered.

[0136] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0137] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0138] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0139] Optionally, in this embodiment, the processor may be configured to perform the following steps according to a computer program:

[0140] S1, determine the rendering representation data corresponding to the multiple characters in the text to be rendered;

[0141] S2, store the multiple rendering representation data into the target rendering area to obtain the rendering area to be colored;

[0142] S3, based on the offset of the multiple rendering representation data in the rendering area to be colored, determine the index identifiers corresponding to the multiple characters respectively;

[0143] S4, the coloring process is performed on the area to be colored based on the multiple index identifiers to obtain the colored rendering area, and the colored rendering area is rendered to obtain the text rendering result of the text to be rendered.

[0144] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0145] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0146] Embodiments of this application also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.

[0147] Optionally, in this embodiment, the processor may be configured to perform the following steps according to a computer program:

[0148] S1, determine the rendering representation data corresponding to the multiple characters in the text to be rendered;

[0149] S2, store the multiple rendering representation data into the target rendering area to obtain the rendering area to be colored;

[0150] S3, based on the offset of the multiple rendering representation data in the rendering area to be colored, determine the index identifiers corresponding to the multiple characters respectively;

[0151] S4, the coloring process is performed on the area to be colored based on the multiple index identifiers to obtain the colored rendering area, and the colored rendering area is rendered to obtain the text rendering result of the text to be rendered.

[0152] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0153] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0154] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for determining a text rendering result, characterized in that, include: Determine the rendering representation data corresponding to each of the multiple characters in the text to be rendered; The multiple rendering representation data are stored in the target rendering area to obtain the rendering area to be colored; Based on the offset of the multiple rendering representation data in the rendering area to be colored, the index identifiers corresponding to the multiple characters are determined respectively; The coloring process is performed on the area to be colored based on multiple index identifiers to obtain a colored rendering area, and the colored rendering area is rendered to obtain the text rendering result of the text to be rendered.

2. The method according to claim 1, characterized in that, Determine the rendering representation data corresponding to each of the multiple characters in the text to be rendered, including: Perform contour recognition on the multiple characters to determine N vertices corresponding to each of the multiple characters, where N is a positive integer; Determine the vertex dimension data corresponding to each of the N vertices; The rendering representation data corresponding to each of the multiple characters is determined based on the vertex dimension data corresponding to the N vertices.

3. The method according to claim 1, characterized in that, Based on the offsets of the multiple rendering representation data in the rendering area to be colored, the index identifiers corresponding to the multiple characters are determined, including: Based on the offset of the rendering representation data of the multiple characters in the rendering area to be shaded, the offset intervals of the vertex dimension data of the N vertices of the multiple characters in the rendering area to be shaded are determined respectively. Based on the offset range of any vertex among the N vertices of any character, determine the color offset of the color representation data of the vertex in the rendering area to be colored; The index identifiers corresponding to the multiple characters are determined based on the color offsets corresponding to the N vertices of the multiple characters.

4. The method according to claim 3, characterized in that, The index identifiers corresponding to the multiple characters are determined based on the color offsets corresponding to the N vertices of the multiple characters, including: Determine the character attribute parameters corresponding to each of the multiple characters; Based on the color offsets corresponding to the N vertices of any character and the character attribute parameters of any character, determine the color index identifiers corresponding to the N vertices of any character. The index identifiers corresponding to the N vertices of the multiple characters are determined based on the color index identifiers corresponding to the N vertices of the multiple characters.

5. The method according to claim 1, characterized in that, The area to be colored is colored based on multiple index identifiers to obtain a colored rendering area, including: In response to the coloring instruction, traverse the multiple characters; During the traversal of the multiple characters, the color index identifiers of the N vertices of any character in the rendering area to be colored are determined. Based on the shading parameters carried by the shading instruction and the color index identifiers of the N vertices of any character, the N vertices of any character are shading processed to obtain the shading rendering area.

6. The method according to claim 5, characterized in that, Based on the shading parameters carried by the shading instruction and the color index identifiers of the N vertices of any character, the N vertices of any character are shading processed to obtain a shading rendering area, including: Extract the color value that matches any of the characters from the coloring parameters; Based on a predefined color selection strategy, the target color value is extracted from the color value that matches any character and determined as the vertex color value corresponding to the N vertices of any character; Based on the vertex color values ​​of N vertices of any given character and the color index identifiers of N vertices of any given character, the color representation data of the N vertices of any given character is assigned to obtain the shading rendering area.

7. The method according to claim 1, characterized in that, Rendering the already colored rendering area to obtain the text rendering result of the text to be rendered includes: Update the status flag of the colored rendering area to obtain the updated status flag; If the updated status identifier is the target status identifier, a rendering instruction is triggered based on the target status identifier; The rendering command is sent to the rendering engine to obtain the text rendering result of the text to be rendered.

8. A device for determining text rendering results, characterized in that, include: The first determining module is used to determine the rendering representation data corresponding to the multiple characters in the text to be rendered. The storage module is used to store multiple rendering representation data into the target rendering area to obtain the rendering area to be colored; The second determining module is used to determine the index identifiers corresponding to the plurality of characters based on the offsets of the plurality of rendering representation data in the rendering area to be colored. The rendering module is used to perform coloring processing on the area to be colored based on multiple index identifiers to obtain a colored rendering area, and to render the colored rendering area to obtain the text rendering result of the text to be rendered.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to perform the method according to any one of claims 1 to 7.