Display interface optimization method and system based on image rendering

By separating the dominant and background components of the display interface rendering data, calculating the visual saliency weight and spatial distribution density, and generating a layered rendering strategy, the problem of uneven resource allocation in existing technologies is solved, thereby improving the rendering efficiency and user experience of the display interface.

CN121764468APending Publication Date: 2026-03-31GUIZHOU INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing display interface rendering technologies do not fully consider the functional attributes of different visual elements and the differences in user attention levels, resulting in insufficient rendering resources for key interactive areas and wasted resources for non-critical decorative areas. Furthermore, traditional optimization methods are difficult to dynamically adapt to the actual display needs of interface content, affecting the user's interactive experience.

Method used

By acquiring the interface rendering data of the current rendering cycle of the display, analyzing the rendering instruction sequence and resource call records of visual elements, separating the dominant component and background component, calculating the visual saliency weight and spatial distribution density, generating a layered rendering strategy, adjusting rendering parameters and resource allocation, and optimizing the rendering engine to redraw the interface.

Benefits of technology

It enables differentiated identification and optimization of different visual elements, ensuring that interactive elements receive sufficient rendering resources, avoiding excessive system resource consumption by decorative elements, improving rendering efficiency and visual effects, and enhancing the user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764468A_ABST
    Figure CN121764468A_ABST
Patent Text Reader

Abstract

The invention provides a display interface optimization method and system based on image rendering, and the method comprises the steps: obtaining interface rendering data in a current rendering period of a display, carrying out the visual component analysis, separating to obtain a dominant component set and a background component set in interface visual components, and carrying out the rendering gravity center calibration according to the dominant component set and the background component set. Generating a layered rendering strategy containing layer priority ranking and a rendering resource distribution proportion, executing component fusion rendering on the dominant component set and the background component set according to the layered rendering strategy, generating an optimized rendering parameter set containing color space conversion parameters and a pixel mixing mode, and driving a rendering engine of the display to perform interface redrawing operation. And outputting an optimized display interface by applying color space conversion parameters in an optimized rendering parameter set to a pixel rendering pipeline and performing frame buffer integration on redrawn interface pixel data according to a pixel mixing mode. According to the invention, the interface interaction experience and the overall use feeling of the user are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more specifically, to a method and system for optimizing display interfaces based on image rendering. Background Technology

[0002] With the development of display technology, display interface rendering optimization technology has emerged. This technology improves the display effect and user interaction experience by adjusting rendering parameters and optimizing resource allocation, and is widely used in the interface presentation scenarios of various display devices. Currently, common display interface rendering optimization technologies usually allocate rendering resources based on a fixed layer order, or achieve overall image quality optimization by globally adjusting color space parameters and pixel blending modes. Some technologies also use preloading image resources and simplifying drawing instructions to improve rendering efficiency. However, existing technologies often fail to fully consider the functional attributes and differences in user attention levels of different visual elements when processing interface rendering. This leads to the use of the same rendering strategy for core interactive elements and static decorative elements, which can easily result in insufficient rendering resources in key interactive areas and wasted resources in non-critical decorative areas. At the same time, traditional optimization methods often adjust rendering parameters based on experience presets or single-dimensional image quality indicators, making it difficult to dynamically adapt to the actual display needs of the interface content. This may cause an imbalance between the overall rendering efficiency and visual effect of the interface, affecting the user's actual interaction experience. Summary of the Invention

[0003] This invention provides a display interface optimization method and system based on image rendering.

[0004] In a first aspect, embodiments of the present invention provide a display interface optimization method based on image rendering. The method includes: acquiring interface rendering data within the current rendering cycle of the display, wherein the interface rendering data includes a rendering instruction sequence of visual elements and corresponding resource call records, the rendering instruction sequence consisting of rendering operation instructions arranged in execution order, and the resource call records including image resource identifiers called during the rendering process and corresponding loading path information; performing visual component analysis based on the interface rendering data, and separating a dominant component set and a background component set in the interface visual components by analyzing the layer drawing order in the rendering instruction sequence and the image resource attributes in the resource call records, wherein the dominant component set includes rendering data units corresponding to visual elements with interactive functions, and the background component set includes rendering data units corresponding to static visual elements used for interface decoration. Based on the unit; the rendering center of gravity is calibrated according to the dominant component set and the background component set. By calculating the visual saliency weight of each rendering data unit in the dominant component set and the spatial distribution density of the background component set, a layered rendering strategy including layer priority sorting and rendering resource allocation ratio is generated. Component fusion rendering is performed on the dominant component set and the background component set according to the layered rendering strategy. By adjusting the rendering channel parameters and resource loading priority of different layers, an optimized rendering parameter set including color space conversion parameters and pixel blending modes is generated. The display rendering engine is driven to perform interface redrawing operations based on the optimized rendering parameter set. By applying the color space conversion parameters in the optimized rendering parameter set to the pixel rendering pipeline, and integrating the redrawn interface pixel data into a frame buffer according to the pixel blending mode, the optimized display interface is output.

[0005] Secondly, embodiments of the present invention provide a computer system, including: a memory storing a computer program; and a processor for loading the computer program to implement the image rendering-based display interface optimization method as described above.

[0006] This invention acquires interface rendering data within the current rendering cycle of the display, comprehensively capturing the rendering instruction sequence and resource call records of visual elements. This provides a complete data foundation for subsequent optimization, avoiding one-sided optimization due to missing data. By analyzing the layer drawing order in the rendering instruction sequence and the image resource attributes in the resource call records, a set of dominant components and a set of background components are separated, enabling differentiated identification of the interface's visual content. This clearly distinguishes core interactive elements from static decorative elements, laying the foundation for targeted optimization. Rendering center calibration is performed based on the dominant and background components. By calculating visual saliency weights and spatial distribution density, a layered rendering strategy is generated, dynamically adjusting the rendering priority and resource allocation ratio of different components. This ensures that interactive elements of interest to the user receive sufficient rendering resources while preventing non-critical decorative elements from consuming excessive system resources, effectively improving the utilization efficiency of rendering resources. Component fusion rendering is performed according to the layered rendering strategy, adjusting rendering channel parameters and resource loading priorities to generate an optimized rendering parameter set. This achieves fine-grained control over the rendering methods of different types of components, ensuring both the display clarity and responsiveness of interactive elements while also considering the visual harmony of background elements. The interface redrawing operation is driven by the rendering engine based on the optimized rendering parameter set. By applying color space conversion parameters and pixel blending modes, the optimization strategy is directly applied to the pixel rendering pipeline and frame buffer integration process, ensuring that the optimization parameters are accurately implemented at the hardware rendering level. The final output optimized interface has significantly improved visual effects and rendering efficiency, enhancing the user's interface interaction experience and overall user experience. Attached Figure Description

[0007] Figure 1 This is a flowchart of a display interface optimization method based on image rendering provided in an embodiment of the present invention.

[0008] Figure 2 This is a schematic diagram of the composition of a computer system provided in an embodiment of the present invention. Detailed Implementation

[0009] Please see Figure 1 This is a flowchart of a display interface optimization method based on image rendering provided by an embodiment of the present invention. The method can be executed by a computer system, such as a personal computer, tablet computer, game terminal, etc. The method may include the following steps: Step S100: Obtain the interface rendering data within the current rendering cycle of the display. The interface rendering data includes the rendering instruction sequence of visual elements and the corresponding resource call records. The rendering instruction sequence consists of rendering operation instructions arranged in the execution order. The resource call records include the image resource identifiers called during the rendering process and the corresponding loading path information.

[0010] Interface rendering data refers to the data used for interface rendering within the current rendering cycle of the display. The rendering instruction sequence for visual elements is a series of rendering operation instructions arranged in execution order. These instructions guide the rendering engine on how to render various visual elements, such as drawing graphics, adding colors, and setting transparency. Each rendering operation instruction has its corresponding function and execution order; executing the instructions in this order ensures that the visual elements are correctly presented on the display. The corresponding resource call record records the identifiers of the image resources called during the rendering process and their corresponding loading path information. The image resource identifier is used to uniquely identify each image resource, such as a filename or a specific number, allowing for accurate location of the required image resource. The loading path information indicates the specific location of the image resource in the storage system, allowing the rendering engine to load the corresponding image resource based on this path. In practical applications, such as developing a game interface, it's necessary to obtain the rendering instruction sequences for various visual elements (such as characters, props, and backgrounds) within the current rendering cycle. These instructions might include drawing character outlines, filling prop colors, and setting background transparency. Simultaneously, it's also necessary to obtain the identifiers and loading path information of the image resources used by these visual elements, such as the filenames and storage paths of character texture images, prop icon images, and background images, so that the rendering engine can correctly load and render these image resources. This can be achieved by writing a dedicated data acquisition program that reads the relevant rendering instruction sequences and resource call records from the system's memory or storage devices when the display enters the current rendering cycle.

[0011] Step S200: Perform visual component analysis based on interface rendering data. By analyzing the layer drawing order in the rendering instruction sequence and the image resource attributes in the resource call record, separate the dominant component set and the background component set in the interface visual components. The dominant component set contains the rendering data units corresponding to visual elements with interactive functions, and the background component set contains the rendering data units corresponding to static visual elements used for interface decoration.

[0012] In one embodiment, step S200 may specifically include the following steps S210 to S260: Step S210: Decompose the rendering instruction sequence, extract the layer identification information and drawing order index from each rendering operation instruction, and generate a layer drawing order list. The layer drawing order list contains the layer identification and the corresponding drawing area coordinates arranged in the execution order. The drawing area coordinates are obtained by parsing the vertex parameters in the instruction.

[0013] Decomposing the rendering instruction sequence involves breaking it down into individual rendering operation instructions for detailed analysis. Each rendering operation instruction contains layer identification information and a drawing order index. The layer identification information uniquely identifies each layer, distinguishing different layers. The drawing order index indicates the order in which the layer is drawn during the entire rendering process. By extracting this information, a layer drawing order list can be generated. This list contains layer identifiers arranged in execution order and their corresponding drawing area coordinates. The drawing area coordinates are obtained by parsing the vertex parameters in the instruction. Vertex parameters define the specific position and extent of the layer on the interface, thus determining the layer's drawing area.

[0014] In one embodiment, step S210 may specifically include the following steps S211 to S216: Step S211: Perform syntax parsing on each rendering operation instruction in the rendering instruction sequence, identify the layer operation type and associated parameters in the instruction, and generate an instruction syntax tree structure. The instruction syntax tree structure contains the hierarchical relationship between operation nodes and parameter nodes. Operation nodes represent the drawing action type, and parameter nodes contain coordinate and color attribute values.

[0015] Parsing rendering operation instructions is crucial for understanding their specific meaning and structure. This process involves identifying the layer operation types and associated parameters within the instructions. Layer operation types include drawing shapes (such as rectangles and circles), setting colors, and adding transparency; these operation types determine how the rendering engine processes the layers. Associated parameters are the specific parameters related to these operation types, such as the coordinates of the drawn shape and the color attribute values. Parsing rendering operation instructions generates an instruction syntax tree structure. This tree structure contains hierarchical relationships between operation nodes and parameter nodes. Operation nodes represent the drawing action type, are located at higher levels of the tree, and instruct the rendering engine to perform the specific operation. Parameter nodes contain specific parameters such as coordinates and color attribute values; they are child nodes of operation nodes and provide necessary parameter information to the operation nodes.

[0016] Step S212: Extract the layer identifier field and timing stamp information from the parameter nodes of the instruction syntax tree structure.

[0017] In one embodiment, step S212 may specifically include the following steps S2121 to S2126: Step S2121: Traverse the parameter node levels of the instruction syntax tree structure, identify the target parameter node containing the layer identifier keyword. The layer identifier keyword includes a preset layer naming prefix and a unique identifier combination. Locate the parameter node where the keyword is located using a string matching algorithm.

[0018] Layer identifier keywords are specific string combinations used to identify layers, including a preset layer naming prefix and a unique identifier. The preset layer naming prefix can be predefined according to business requirements, such as "LAYER_", while the unique identifier is a unique number assigned to each layer, such as "001" or "002". By combining these two, a unique layer identifier keyword can be formed, such as "LAYER_001" or "LAYER_002". In the parameter node hierarchy of the instruction syntax tree structure, there may be many parameter nodes. A string matching algorithm is needed to locate the target parameter node containing the layer identifier keyword. Common string matching algorithms can be used, such as the KMP algorithm or the BM algorithm. For example, starting from the root node of the instruction syntax tree structure, the parameter nodes are traversed layer by layer. The text content of each node is matched using a string matching algorithm. When a matching keyword is found, the node is identified as the target parameter node.

[0019] Step S2122: Perform regular expression matching on the text content of the target parameter node to extract the layer identifier field that conforms to the preset format. The layer identifier field includes the application domain identifier, layer type code and instance number of the preset length. The length of each part is preset through the system configuration file.

[0020] The layer identifier field has a specific format, containing a preset-length application domain identifier, layer type code, and instance number. The application domain identifier distinguishes different application domains; for example, "GAME" indicates a game application, and "OFFICE" indicates an office application. The layer type code indicates the specific type of the layer; for example, "BG" indicates a background layer, and "BTN" indicates a button layer. The instance number is a unique number assigned to each layer instance. The length of each part is preset through a system configuration file, ensuring the uniformity and standardization of the layer identifier field format. Regular expression matching of the target parameter node's text content involves using regular expressions to match the target parameter node's text content according to the preset layer identifier field format, thereby extracting layer identifier fields that conform to the format. For example, a regular expression library in a programming language can be used to apply preset regular expressions to the target parameter node's text content; when a match is successful, the corresponding layer identifier field is extracted.

[0021] Step S2123: Locate the time parameter node in the instruction syntax tree structure that has a parent-child relationship with the target parameter node, extract the timestamp value from the time parameter node. The time parameter node is identified by time-related keywords in the node name, and the timestamp value contains complete time record information.

[0022] A time parameter node is a node with a parent-child relationship to a target parameter node. It contains the execution time information of the rendering operation instructions, i.e., the timestamp value. Time parameter nodes can be identified by time-related keywords in their node names, such as "timestamp" or "time". The timestamp value contains complete time record information, such as year, month, day, hour, minute, and second, accurately representing the execution time of the rendering operation instructions. When searching for a time parameter node in the instruction syntax tree structure, the search must begin from the target parameter node and proceed according to the parent-child relationships between nodes. For example, one can start from the target parameter node and traverse its parent and child nodes upwards or downwards, matching against time-related keywords in the node names. When a matching node is found, its timestamp value is extracted.

[0023] Step S2124: Establish a mapping relationship between the layer identifier field and the timestamp value. Each mapping relationship contains a layer identifier field and a corresponding timestamp value.

[0024] Establishing a mapping between layer identifier fields and timestamp values ​​is to associate the identifier information of each layer with its execution time information. Each mapping pair contains a layer identifier field and a corresponding timestamp value. Through this mapping relationship, the drawing order of each layer can be clearly understood. For example, a dictionary or hash table data structure in a programming language can be used to establish the mapping pair, with the layer identifier field as the key and the timestamp value as the value.

[0025] Step S2125: Sort all mapping pairs in ascending order of timestamp values ​​to generate a mapping table between layer identifiers and execution times. The mapping table also contains the original instruction position index of each mapping pair in the rendering instruction sequence. The original instruction position index reflects the relative position of the instruction in the sequence.

[0026] Sort all mapping pairs in ascending order of timestamp values ​​to determine the rendering order of layers. After sorting by timestamp values, the layers corresponding to the earlier mapping pairs will be rendered first. The generated mapping table between layer identifiers and execution times includes not only the layer identifier and execution time (timestamp value), but also the original instruction position index of each mapping pair in the rendering instruction sequence. The original instruction position index reflects the relative position of the instruction in the rendering instruction sequence and can be used to determine the order and position of instructions in subsequent processing. For example, a sorting algorithm (such as quicksort, mergesort, etc.) can be used to sort the mapping pairs in ascending order of timestamp values, and then the sorted mapping pairs and their corresponding original instruction position indices can be organized into a mapping table.

[0027] Step S2126: Perform duplicate checks on the mapping pairs in the corresponding relationship table. When the same layer identifier field appears multiple times under the same timestamp value, retain the mapping pair with the smallest original instruction position index and record the conflict log.

[0028] In the mapping table, the same layer identifier field may appear multiple times with the same timestamp value. This could be due to data errors or duplicate operations. To ensure data accuracy and consistency, duplicate checks are needed for mapping pairs in the table. When duplicates are found, the mapping pair with the smallest original instruction position index is retained, as this usually indicates that the instruction appeared earliest and is likely more correct. Simultaneously, a conflict log is recorded for subsequent analysis and processing. For example, the mapping table can be traversed, comparing the layer identifier field and timestamp value of each mapping pair. When duplicates are found, the pair is filtered based on the original instruction position index, retaining the mapping pair with the smallest index, and the conflict information is recorded in the log file.

[0029] Step S213: Sort the time stamp information in the corresponding relationship table in ascending order to generate a layer execution sequence arranged in chronological order of execution time. Each element in the layer execution sequence contains a layer identifier and a corresponding execution timestamp. The execution timestamp is obtained by parsing the time parameter node in the instruction.

[0030] Sort the time stamp information in the correspondence table in ascending order to further clarify the execution order of the layers. After sorting, the generated layer execution sequence is arranged according to the execution time, with each element containing a layer identifier and its corresponding execution timestamp. The execution timestamp is obtained by parsing the time parameter node in the instruction, accurately representing the execution time of each layer. For example, the time stamp information in the correspondence table can be sorted in ascending order again using a sorting algorithm, and the sorted layer identifiers and execution timestamps can be combined to form the layer execution sequence.

[0031] Step S214: Assign a unique drawing order index to each layer identifier in the layer execution sequence. The drawing order index increases sequentially from the starting value according to the order of execution timestamps. The starting value and step size are determined by the system preset rules.

[0032] To more clearly represent the drawing order of layers, a unique drawing order index needs to be assigned to each layer identifier in the layer execution sequence. The drawing order index increases sequentially from the starting value based on the execution timestamps, meaning that layers executed earlier have smaller drawing order indices. The starting value and step size are determined by system preset rules. For example, the starting value can be set to 1, and the step size to 1, so the drawing order index of the first layer is 1, the drawing order index of the second layer is 2, and so on. For instance, the layer execution sequence can be traversed, and drawing order indices can be assigned to each layer identifier sequentially, starting from the system preset starting value and according to the step size, based on the execution timestamp order.

[0033] Step S215: Based on the layer identifier, execution timestamp and drawing order index in the layer execution sequence, construct a layer drawing order list containing the drawing area coordinates. The drawing area coordinates are obtained by parsing the coordinate parameter node in the rendering operation instruction. The coordinate parameter node contains the two-dimensional coordinate values ​​of the four vertices.

[0034] Based on the layer identifier, execution timestamp, and drawing order index in the layer execution sequence, a layer drawing order list can be constructed. In addition to this information, the list also needs to include the drawing area coordinates. The drawing area coordinates are obtained by parsing the coordinate parameter nodes in the rendering operation instructions. Each coordinate parameter node contains the two-dimensional coordinate values ​​of four vertices, which determine the specific position and extent of the layer on the interface. For example, the layer execution sequence can be traversed, and for each layer, the corresponding coordinate parameter node can be found from the rendering operation instructions. The two-dimensional coordinate values ​​of the four vertices can be extracted, and the layer identifier, execution timestamp, drawing order index, and drawing area coordinates can be organized into a layer drawing order list.

[0035] Step S216: Verify the validity of the drawing area coordinates in the layer drawing order list. Check whether the coordinate values ​​are within the range of the monitor's physical resolution. If the coordinate values ​​are outside the range, mark them as abnormal coordinates and record the abnormality type.

[0036] Validating the drawing area coordinates in the layer drawing order list ensures that layers are displayed correctly on the monitor. It's necessary to check if the coordinate values ​​are within the monitor's physical resolution range, which determines the size of the displayable area. When coordinate values ​​exceed this range, they are marked as abnormal coordinates, and the exception type is recorded for subsequent processing. For example, the layer drawing order list can be iterated through, and for each layer's drawing area coordinates, the 2D coordinate values ​​of its four vertices can be checked against the monitor's physical resolution range. If they exceed the range, they are marked as abnormal coordinates, and the exception type is recorded in a log file.

[0037] Step S220: Extract attributes from the image resource attributes in the resource call record, identify the interactive function markers and static display features of each image resource, and generate an image resource attribute feature set. The image resource attribute feature set includes the resource interaction type and visual complexity descriptor. The visual complexity descriptor is calculated by the correlation between the number of pixels contained in the resource and the proportion of the transparency channel.

[0038] Extracting attributes from image resources in resource call records is crucial for gaining a deeper understanding of the characteristics of each image resource. This process requires identifying the interactive function markers and static display features of each image resource. Interactive function markers indicate whether the image resource has interactive functions, such as whether it can be clicked or dragged. Static display features indicate whether the image resource is statically displayed, i.e., whether it remains unchanged on the interface. Extracting these attributes generates an image resource attribute feature set. This feature set includes the resource interaction type and a visual complexity descriptor. The resource interaction type is determined based on the interactive function markers, such as "interactive" or "non-interactive." The visual complexity descriptor is calculated by correlating the number of pixels in the resource with the percentage of transparency channels, reflecting the complexity of the image resource. For example, each image resource in the resource call record can be analyzed to identify its interactive function markers and static display features. By counting the number of pixels and calculating the percentage of transparency channels, a visual complexity descriptor is obtained according to a preset correlation calculation method. This information is then organized into an image resource attribute feature set.

[0039] Step S230: Associate and match the layer drawing order list with the image resource attribute feature set, establish a mapping relationship between drawing order and resource attributes based on the layer identifier, and generate a layer resource association table. The layer resource association table contains the correspondence between layer identifier, drawing order index, resource interaction type and visual complexity descriptor.

[0040] Associating the layer drawing order list with the image resource attribute feature set aims to combine the layer drawing order information with the image resource attribute information. A mapping relationship between drawing order and resource attributes is established based on layer identifiers. This mapping relationship clearly reveals the attributes of the image resources used by each layer and their drawing order. The generated layer resource association table contains the correspondence between layer identifiers, drawing order indexes, resource interaction types, and visual complexity descriptors. For example, the layer drawing order list can be traversed. For each layer identifier, the corresponding resource attribute information is searched in the image resource attribute feature set. The layer identifier, drawing order index, resource interaction type, and visual complexity descriptor are combined into a record and added to the layer resource association table.

[0041] Step S240: Based on the interactive function tags in the layer resource association table, filter out the rendering data units corresponding to the layers with interactive function tags as candidate dominant components. The interactive function tags are determined by identifying the event response function pointers in the resource attributes.

[0042] Filtering based on interactive feature markers in the layer resource association table is to identify layers with interactive functionality. Interactive feature markers are determined by identifying event response function pointers in resource attributes. These pointers point to functions that handle user interaction events; their presence indicates that the layer has interactive functionality. The rendering data units corresponding to layers with interactive feature markers are then used as candidate dominant components. These rendering data units contain various instructions and resource information required to draw the interactive layers. For example, the layer resource association table can be traversed, and for each layer's resource attributes, the existence of event response function pointers can be checked. If a pointer exists, the corresponding rendering data unit for that layer is added to the candidate dominant component set.

[0043] Step S250: Calculate the visual saliency score of the candidate dominant components based on the drawing order index and visual complexity descriptor in the layer resource association table. The visual saliency score is determined by multiplying the reverse weighted value of the drawing order index with the visual complexity descriptor. The candidate dominant components whose visual saliency scores meet the preset conditions are grouped into a dominant component set, and the remaining rendering data units are grouped into a background component set.

[0044] The visual saliency score of candidate dominant components is calculated based on the drawing order index and visual complexity descriptor in the layer resource association table. The reverse weighted value of the drawing order index is obtained by reversing the drawing order index and multiplying it by a weight coefficient, which can be adjusted according to actual needs. The visual saliency score is determined by multiplying the reverse weighted value of the drawing order index by the visual complexity descriptor, meaning that layers drawn earlier and with higher visual complexity have higher visual saliency scores. Candidate dominant components whose visual saliency scores meet the preset conditions are grouped into a dominant component set. These layers are usually layers that are more easily noticed by users on the interface and have important interactive functions. The remaining rendering data units form a background component set, which mainly serves to decorate the interface. For example, the candidate dominant component set is traversed. For each candidate dominant component, the visual saliency score is calculated according to its drawing order index and visual complexity descriptor in the layer resource association table, using the above calculation method. Candidate dominant components whose scores meet the preset conditions are added to the dominant component set, and the rest are added to the background component set.

[0045] Step S260: Perform integrity verification on the rendering data units in the dominant component set and the background component set, and calculate the ratio of the number of rendering data units contained in each set to the total number of original layers. The verification is completed when the sum of the ratios equals the integrity ratio.

[0046] The integrity check of rendering data units in the dominant component set and the background component set is to ensure that all rendering data units are correctly classified into their respective sets. The ratio of the number of rendering data units in each set to the total number of original layers is calculated. The total number of original layers refers to the total number of all layers included in the initially acquired interface rendering data. When the sum of these ratios equals the integrity ratio (usually 100%), it indicates that all rendering data units have been correctly classified, and the check is complete. For example, the number of rendering data units in the dominant component set and the background component set are counted separately, and their ratios to the total number of original layers are calculated. The two ratios are then added together; when the sum equals the integrity ratio, the check is considered successful.

[0047] Step S300: Perform rendering center calibration based on the dominant component set and the background component set. By calculating the visual saliency weight of each rendering data unit in the dominant component set and the spatial distribution density of the background component set, generate a layered rendering strategy that includes layer priority sorting and rendering resource allocation ratio.

[0048] Rendering center-of-gravity calibration aims to rationally allocate rendering resources and determine the rendering order of layers based on the characteristics of the dominant component set and the background component set. This process requires calculating the visual salience weight of each rendering data unit in the dominant component set and the spatial distribution density of the background component set. The visual salience weight reflects the importance of each dominant component in the interface and is calculated based on the visual characteristics of each rendering data unit. The spatial distribution density of the background component set reflects the distribution of background components on the interface; calculating this density reveals the space occupied by background components. Based on these calculations, a layered rendering strategy is generated, including layer priority ranking and rendering resource allocation ratios. Layer priority ranking determines the rendering order of each layer, while the rendering resource allocation ratio determines the amount of resources allocated to each layer during the rendering process.

[0049] In one embodiment, step S300 may specifically include the following steps S310 to S360: Step S310: Perform visual feature extraction on each rendering data unit in the dominant component set to obtain the color contrast feature, edge sharpness feature and dynamic change frequency feature of each rendering data unit. The color contrast feature is calculated by the degree of dispersion of the difference between gray values ​​of adjacent pixels, the edge sharpness feature is calculated by the central tendency of the edge gradient magnitude, and the dynamic change frequency feature is calculated by the proportion of the region where the pixel value changes per unit time.

[0050] In one embodiment, step S310 may specifically include the following steps S311 to S316: Step S311: Perform color space conversion on the pixel data of the rendering data unit, converting the red-green-blue color space into a hue-saturation-brightness color space, and separating the hue channel, saturation channel and brightness channel.

[0051] Color space conversion of pixel data in rendering data units facilitates subsequent visual feature extraction. The RGB color space is converted to the HSV color space. RGB represents colors based on combinations of the three primary colors: red, green, and blue. The HSV color space, however, better aligns with human color perception, dividing colors into three independent channels: hue, saturation, and lightness. This conversion separates the hue, saturation, and lightness channels, each containing distinct color information. For example, common color space conversion formulas can be used to convert RGB color values ​​to HSV color values, and then the hue, saturation, and lightness channel data can be extracted separately.

[0052] Step S312: Calculate the gray value difference between adjacent pixels in the brightness channel, calculate the gradient magnitude in the horizontal and vertical directions using the gradient operator, and use the central tendency of the gradient magnitude as the color contrast feature. The gradient operator uses a convolution kernel of a preset size.

[0053] Calculating the difference in grayscale values ​​between adjacent pixels in the luminance channel is used to evaluate color contrast. By calculating the difference in grayscale values ​​between adjacent pixels, we can understand the brightness variations in different areas of the image. Gradient operators are used to calculate the horizontal and vertical gradient magnitudes, which represent the degree of change in pixel grayscale values. The central tendency of these gradient magnitudes is used as a color contrast feature; the stronger the central tendency, the higher the color contrast. The gradient operator uses a convolution kernel of a preset size, such as a 3×3 kernel. Through convolution operations, the horizontal and vertical gradient magnitudes of each pixel can be calculated. For example, each pixel in the luminance channel is iterated through, a convolution operation is performed using a kernel of a preset size, the horizontal and vertical gradient magnitudes are calculated, and then the central tendency of these gradient magnitudes is statistically analyzed and used as a color contrast feature.

[0054] Step S313: Perform edge detection on the pixel data of the rendering data unit, extract the edge contour, and calculate the average gradient value of the edge contour as the edge sharpness feature. The average gradient value is obtained by dividing the sum of the gradient magnitudes of all pixels on the edge contour by the number of pixels.

[0055] Edge detection on pixel data of a rendered data unit aims to identify edge contours in an image. Edge contours are regions in an image where grayscale values ​​change abruptly, and they are crucial for image recognition and analysis. Extracting edge contours allows for a better understanding of the image's structure and shape. The average gradient value of the edge contour is calculated as an edge sharpness feature; the average gradient value reflects the sharpness of the edge, with a larger gradient value indicating a sharper edge. The average gradient value is obtained by summing the gradient magnitudes of all pixels on the edge contour and dividing by the number of pixels.

[0056] In one embodiment, step S313 may specifically include the following steps S3131 to S3136: Step S3131: Apply Gaussian blur to the pixel data of the rendering data unit and smooth the pixel data using a Gaussian kernel function of a preset size.

[0057] Gaussian blurring of pixel data in rendering data units reduces noise interference in the image, making it smoother. A Gaussian kernel function of a preset size is used to smooth the pixel data, with the weight distribution conforming to a Gaussian distribution, where pixels closer to the center have a higher weight. Applying the Gaussian kernel function to the pixel data through a convolution operation allows for a weighted average of pixel values, thus achieving the smoothing effect. For example, a convolution operation is performed between the preset-size Gaussian kernel function and the pixel data. Each pixel is iterated over, and a weighted average of adjacent pixels is calculated based on the weights of the Gaussian kernel function, updating the pixel value and completing the smoothing filter.

[0058] Step S3132: Apply a first-order partial derivative operator to the smoothed pixel data to calculate the gradient components in the horizontal and vertical directions, and generate the gradient intensity matrix and gradient direction matrix. The first-order partial derivative operator uses a convolution kernel with a preset structure.

[0059] Applying a first-order partial derivative operator to the smoothed pixel data is to calculate the gradient components of the pixel data in the horizontal and vertical directions. The gradient components represent the rate of change of the pixel's grayscale value in these two directions. By calculating the gradient components, we can obtain the gradient intensity matrix and the gradient direction matrix. The gradient intensity matrix represents the gradient intensity of each pixel, and the gradient direction matrix represents the gradient direction of each pixel. The first-order partial derivative operator uses a convolution kernel with a pre-defined structure, such as the Sobel convolution kernel, to efficiently calculate the gradient components of the pixels.

[0060] Step S3133: Perform non-maximum suppression on the gradient intensity matrix, retain local maxima points in the gradient direction, and generate a refined set of edge candidate points. Non-maximum suppression is achieved by comparing the gradient intensity of the current pixel with that of adjacent pixels along the gradient direction.

[0061] Non-maximum suppression (NMS) of the gradient intensity matrix is ​​used to refine edges by retaining only local maxima along the gradient direction. The gradient intensity matrix may contain some wide edge regions; NMS can refine these regions into single-pixel-wide edges. NMS is achieved by comparing the gradient intensity of the current pixel with its neighboring pixels along the gradient direction. If the gradient intensity of the current pixel is not a local maximum, it is suppressed to zero, retaining only the local maxima and generating a refined set of candidate edge points. For example, each pixel in the gradient intensity matrix is ​​traversed, its neighboring pixels are found according to their gradient direction, their gradient intensities are compared, and the gradient intensities of non-local maxima points are set to zero, ultimately resulting in the refined set of candidate edge points.

[0062] Step S3134: Apply dual thresholds to the set of edge candidate points, set a preset high threshold and a preset low threshold, mark points above the preset high threshold as strong edge points, and mark points between the preset high threshold and the preset low threshold that are connected to strong edge points as weak edge points. The dual thresholds are determined by statistical analysis of historical edge detection data.

[0063] Applying dual thresholds to the set of candidate edge points is to further filter out true edge points. Preset high and low thresholds are set. Points above the preset high threshold are marked as strong edge points; these points are likely to be true edges. Points between the preset high and low thresholds and connected to strong edge points are marked as weak edge points; these points may be part of an edge, but their connectivity with strong edge points needs to be verified. The dual thresholds are determined statistically from historical edge detection data. Based on a large amount of historical data, suitable high and low thresholds can be found to improve the accuracy of edge detection.

[0064] Step S3135: Combine strong edge points and weak edge points to obtain a complete edge contour, calculate the average gradient value of the edge contour as the edge sharpness feature, and obtain the average gradient value by dividing the sum of the gradient magnitudes of all pixels on the edge contour by the number of pixels.

[0065] Combining strong and weak edge points yields a complete edge contour. Strong edge points are definitive edge points, while weak edge points are also identified as part of the edge through their connectivity with strong edge points. The average gradient value of the edge contour is calculated as the edge sharpness feature, reflecting the sharpness of the edge. The average gradient value is obtained by summing the gradient magnitudes of all pixels on the edge contour and dividing by the number of pixels. For example, strong and weak edge points are iterated through and combined to form the edge contour. The gradient magnitude of each pixel on the edge contour is calculated, all magnitudes are summed, and divided by the number of pixels to obtain the edge sharpness feature.

[0066] Step S3136: Perform outlier detection on the edge sharpness feature, and use statistical methods to identify outliers. When the edge sharpness feature value exceeds the set range determined by the statistical law, replace the outlier value with the statistical mean.

[0067] Outlier detection for edge sharpness features ensures their accuracy and reliability. Statistical methods are used to identify outliers, such as using the mean and standard deviation. The mean and standard deviation of the edge sharpness feature are calculated, and a predetermined range is determined based on statistical rules. Edge sharpness feature values ​​exceeding this range are considered outliers. When an outlier is detected, it is replaced with the statistical mean to ensure data stability. For example, the mean and standard deviation of the edge sharpness feature are first calculated, and the outlier range is determined according to the established rules. Then, the edge sharpness feature values ​​are iterated through, and when a value exceeding the range is found, it is replaced with the statistical mean.

[0068] Step S314: Monitor the pixel change area of ​​the rendering data unit in the continuous rendering cycle, count the area ratio of the region where the pixel value changes per unit time, use the area ratio as the dynamic change frequency feature, set the unit time to the duration of the current rendering cycle, and detect the change area by the inter-frame difference method.

[0069] Monitoring pixel change regions within rendering data units across consecutive rendering cycles is crucial for calculating dynamic change frequency characteristics. The percentage of areas where pixel values ​​change per unit of time is calculated, with the unit of time set to the duration of the current rendering cycle. Change regions are detected using inter-frame differencing, which compares pixel data from two adjacent rendering cycles to identify areas where pixel values ​​have changed. This percentage is used as the dynamic change frequency characteristic; a higher percentage indicates a higher dynamic change frequency for the rendering data unit. For example, within each rendering cycle, pixel data for the rendering data unit is saved. In the next cycle, inter-frame differencing is used to compare the pixel data from these two cycles, calculating the area of ​​regions where pixel values ​​have changed. This area is then divided by the total area to obtain the percentage of the region, which is used as the dynamic change frequency characteristic.

[0070] Step S315: Normalize the color contrast feature, edge sharpness feature, and dynamic change frequency feature, and map each feature value to a preset range.

[0071] Normalizing the color contrast, edge sharpness, and dynamic frequency features aims to unify these feature values ​​onto a uniform scale for subsequent comprehensive calculations. Each feature value is mapped to a preset interval, such as [0, 1]. Normalization eliminates dimensional differences between different features, giving them equal weight in the comprehensive calculation. For example, a normalization formula, such as the linear normalization formula: (x - min) / (max - min), can be used, where x is the original feature value, min is the minimum value of the feature, and max is the maximum value of the feature. The color contrast, edge sharpness, and dynamic frequency features are normalized separately, mapping their feature values ​​to preset intervals.

[0072] Step S316: Combine the normalized color contrast features, edge sharpness features, and dynamic change frequency features to obtain a visual feature vector. The visual feature vector is a multi-dimensional vector, with each dimension corresponding to the normalized value of each feature, which serves as the input data for calculating the visual saliency weight.

[0073] The normalized color contrast feature, edge sharpness feature, and dynamic change frequency feature are combined to obtain a visual feature vector. The visual feature vector is a multi-dimensional vector, with each dimension corresponding to the normalized value of each feature. This visual feature vector serves as the input data for calculating the visual saliency weight. By comprehensively considering these features, the visual saliency weight of the rendered data unit can be calculated more accurately. For example, the normalized color contrast feature, edge sharpness feature, and dynamic change frequency feature are arranged in sequence to form a multi-dimensional vector, which is then used as the input for calculating the visual saliency weight.

[0074] Step S320: Based on the normalized color contrast features, edge sharpness features, and dynamic change frequency features, calculate the visual saliency weight of each rendering data unit by weighted summation. In the calculation of the visual saliency weight, the weight coefficient of the dynamic change frequency feature is set higher than that of the color contrast features and edge sharpness features. The weight coefficients of each feature are determined by training with historical rendering effect data.

[0075] Based on normalized color contrast, edge sharpness, and dynamic change frequency features, a weighted summation is used to calculate the visual saliency weight of each rendered data unit. The weighted summation involves multiplying each feature value by its corresponding weight coefficient and then adding the results. During the calculation, the weight coefficient for the dynamic change frequency feature is set higher than that for the color contrast and edge sharpness features because dynamically changing elements are generally more likely to attract the user's attention. The weight coefficients for each feature are determined through training on historical rendering data. By analyzing and training on a large amount of historical rendering data, the most suitable weight coefficients can be found, making the calculated visual saliency weight more consistent with the actual visual effect. For example, based on the weight coefficients obtained from the training, the normalized color contrast, edge sharpness, and dynamic change frequency features are weighted and summed to calculate the visual saliency weight of each rendered data unit.

[0076] Step S330: Extract spatial coordinates from all rendering data units in the background component set to obtain the vertex coordinate set of each background component in the interface coordinate system. The interface coordinate system takes the upper left corner of the display as the origin, and the horizontal and vertical axes correspond to the horizontal and vertical directions of the display, respectively. The coordinate unit is pixels.

[0077] Extracting spatial coordinates from all rendered data units in the background component set is to determine the specific location of each background component on the interface. This involves obtaining the vertex coordinate set of each background component in the interface coordinate system, with the top-left corner of the screen as the origin, and the horizontal and vertical axes corresponding to the screen's horizontal and vertical directions, respectively, using pixels as the coordinate unit. This vertex coordinate set accurately describes the position and extent of the background components.

[0078] Step S340: Calculate the spatial distribution density of the background component set based on the vertex coordinate set. The spatial distribution density is determined by the ratio of the total coverage area of ​​the background components to the total area of ​​the interface. The total coverage area is calculated by merging the drawing areas of all background components and removing overlapping parts. The total area of ​​the interface is calculated by multiplying the width and height of the display resolution.

[0079] Calculating the spatial distribution density of the background component set based on the vertex coordinate set is to understand the distribution of background components on the interface. The spatial distribution density is determined by the ratio of the total coverage area of ​​the background components to the total area of ​​the interface. The total coverage area is calculated by merging the drawing areas of all background components and removing overlapping parts to avoid double-counting overlapping areas. The total interface area is calculated by multiplying the width and height based on the display resolution. For example, first, the vertex coordinate set is processed, merging the drawing areas of all background components and removing overlapping parts to calculate the total coverage area. Then, the total interface area is calculated based on the display resolution, and finally, the ratio of the two is calculated to obtain the spatial distribution density.

[0080] Step S350: Combining visual saliency weight and spatial distribution density, perform a comprehensive priority evaluation on all layers in the dominant component set and background component set to generate a layered rendering strategy that includes layer priority ranking and rendering resource allocation ratio. The rendering resource allocation ratio is positively correlated with visual saliency weight and negatively correlated with spatial distribution density. The correlation coefficient is set by the system's preset rules.

[0081] Combining visual saliency weight and spatial distribution density, a comprehensive priority evaluation is performed on all layers in the dominant component set and background component set to rationally determine the priority of each layer and allocate rendering resources. A layered rendering strategy is generated, including layer priority ranking and rendering resource allocation ratios, which guides the rendering engine to render different layers efficiently. The rendering resource allocation ratio is positively correlated with visual saliency weight, meaning layers with higher visual saliency weights receive more rendering resources; and negatively correlated with spatial distribution density, meaning background components with higher spatial distribution density receive more resources. When performing comprehensive priority evaluation, it is first necessary to clarify the roles of visual saliency weight and spatial distribution density in the evaluation. Visual saliency weight reflects the importance of each layer in attracting user attention, while spatial distribution density reflects the occupancy of background components on interface space. To comprehensively consider these two factors, the system preset rules set correlation coefficients, which are used to adjust the degree of influence of visual saliency weight and spatial distribution density on the rendering resource allocation ratio.

[0082] Step S360: Verify the rationality of layer priority sorting and rendering resource allocation ratio in the layered rendering strategy. Check whether the priority sorting is consistent with the descending order of visual salience weight and whether the sum of resource allocation ratios meets the full ratio requirements. If they are inconsistent, recalculate the evaluation parameters.

[0083] Validating the rationality of a layered rendering strategy is a crucial step in ensuring an efficient and accurate rendering process. This process requires examining two key aspects: layer priority ordering and the allocation of rendering resources.

[0084] First, check if the priority ranking matches the descending order of visual salience weights. Visual salience weights reflect the importance of each layer in the interface, so the priority ranking should be arranged in descending order of visual salience weights. If the priority ranking does not match the descending order of visual salience weights, it indicates that there may be errors or unreasonable factors in the overall priority evaluation process. Second, check if the total resource allocation ratio meets the full ratio requirement. The full ratio requirement means that the total ratio of rendering resources allocated to all layers should be equal to 100% to ensure that all rendering resources are reasonably allocated without waste or shortage. If the total resource allocation ratio does not meet the full ratio requirement, there may be errors or omissions in the calculation process. For example, when calculating the rendering resource allocation ratio of a certain layer, some factors may have been ignored, resulting in an inaccurate allocation ratio. When the priority ranking does not match the descending order of visual salience weights or the total resource allocation ratio does not meet the full ratio requirement, the evaluation parameters need to be recalculated. This may involve recalculating visual salience weights, spatial distribution density, and adjusting correlation coefficients. During the recalculation process, each step needs to be carefully checked to ensure the accuracy and rationality of the calculation. At the same time, the reasonableness of the recalculated results needs to be verified again until the requirements are met.

[0085] Step S400: Perform component fusion rendering on the dominant component set and background component set according to the layered rendering strategy. By adjusting the rendering channel parameters and resource loading priority of different layers, generate an optimized rendering parameter set that includes color space conversion parameters and pixel blending modes.

[0086] In one embodiment, step S400 may specifically include the following steps S410 to S460: Step S410: Based on the layer priority sorting in the layer rendering strategy, rearrange the rendering order of the layers in the dominant component set and the background component set to generate a new layer rendering sequence. In the new layer rendering sequence, the layer with the higher priority sorting will execute the rendering command first.

[0087] In one embodiment, step S410 may specifically include the following steps S411 to S416: Step S411: Extract layer priority ranking information from the layered rendering strategy, obtain the priority score of each layer. The priority score is calculated by combining visual saliency weight and spatial distribution density. The comprehensive calculation method is achieved by weighted summation, and each weight is determined by training with historical rendering effect data.

[0088] Extracting layer priority ranking information from a layered rendering strategy is to obtain a priority score for each layer. The priority score is a numerical value that takes into account both visual saliency weight and spatial distribution density, reflecting the importance of each layer in the entire rendering process.

[0089] Visual salience weight reflects a layer's ability to attract user attention, while spatial distribution density reflects the amount of space occupied by background components on the interface. By combining these two factors through a weighted summation, a more comprehensive priority score can be obtained.

[0090] Each weight is determined through training on historical rendering data. This means that in practical applications, a large amount of historical rendering data will be analyzed and trained to find the most suitable weight values, so that the priority score can more accurately reflect the importance of the layer.

[0091] Step S412: Sort all layers in the dominant component set and background component set in descending order according to priority score to generate a preliminary sorting sequence. In the preliminary sorting sequence, the layers with higher priority scores are ranked first. When the priority scores are the same, they are sorted in ascending order according to the original drawing order index.

[0092] Sort all layers in the dominant and background component sets in descending order of priority score to prioritize important layers for rendering. An initial sorting sequence is generated during the sorting process.

[0093] Priority scores are calculated based on a combination of visual saliency weights and spatial distribution density, reflecting the importance of each layer. Therefore, layers with high priority scores should be placed at the top of the initial sorting sequence to ensure that these important layers are processed first during the rendering process.

[0094] When two layers have the same priority score, they are sorted in ascending order according to their original rendering order index to ensure the determinism of the sorting. The original rendering order index reflects the position of the layer in the initial rendering instruction sequence, and sorting them in ascending order can maintain a certain order. For example, if two layers in an interface have the same priority score, and one of the layers has a lower original rendering order index, then in the initial sorting sequence, that layer will be ranked first.

[0095] Step S413: Perform spatial overlap detection on the layers in the preliminary sorting sequence to identify layer groups with overlapping drawing areas. Overlapping drawing areas are determined by comparing the drawing area coordinates of the layers. When the boundary areas of two layers intersect, they are judged as overlapping.

[0096] In one embodiment, step S413 may specifically include the following steps S4131 to S4137: Step S4131: Extract the drawing area coordinates from the rendering data unit corresponding to each layer in the preliminary sorting sequence. The drawing area coordinates include the coordinates of the top left and bottom right vertices of the layer. The top left coordinate is a combination of the horizontal and vertical coordinate values, and the bottom right coordinate is a combination of another horizontal and another vertical coordinate value. The horizontal coordinate value of the top left corner is less than the horizontal coordinate value of the bottom right corner, and the vertical coordinate value of the top left corner is less than the vertical coordinate value of the bottom right corner.

[0097] The drawing area coordinates include the coordinates of the top-left and bottom-right vertices of the layer. These two coordinates uniquely identify a rectangular area, which is the drawing area of ​​the layer. The top-left corner coordinates are composed of horizontal and vertical coordinate values, and the bottom-right corner coordinates are also composed of horizontal and vertical coordinate values. It is required that the horizontal coordinate value of the top-left corner is less than that of the bottom-right corner, and the vertical coordinate value of the top-left corner is less than that of the bottom-right corner, to ensure the correctness and consistency of the coordinates. For example, each layer in the initial sorted sequence is traversed, and the portion containing vertex parameters is found in its corresponding rendering data unit. Based on the definition and format of the vertex parameters, the coordinates of the top-left and bottom-right vertices are extracted and necessary verification is performed to ensure that the coordinates meet the above requirements.

[0098] Step S4132: Construct an interface space coordinate system, mapping the drawing area coordinates of all layers to this system, generating a rectangular bounding box for each layer. The rectangular bounding box is defined by the coordinates of its top-left and bottom-right corners, covering all pixel areas of the layer. Constructing the interface space coordinate system unifies the drawing area coordinates of all layers into a common coordinate system, facilitating subsequent overlap detection. In this coordinate system, the drawing area of ​​each layer can be represented by a rectangular bounding box. The rectangular bounding box is defined by the coordinates of its top-left and bottom-right corners, covering all pixel areas of the layer. By mapping the drawing area coordinates of all layers to the interface space coordinate system, the position and extent of each layer on the interface, as well as their relative relationships, can be clearly seen.

[0099] For example, first determine the origin and coordinate axis directions of the interface space coordinate system. Typically, the top left corner of the monitor is used as the origin, the horizontal axis is used as the x-axis, and the vertical axis is used as the y-axis. Then, the coordinates of the drawing area of ​​each layer are transformed according to the rules of the coordinate system to generate the corresponding rectangular bounding box.

[0100] Step S4133: Perform pairwise comparisons of the rectangular bounding boxes and calculate the intersection area of ​​the bounding boxes of any two layers. The intersection area is determined by comparing the horizontal and vertical coordinate ranges of the bounding boxes. When both the horizontal and vertical ranges overlap, it is determined that there is an intersection area.

[0101] Pairwise comparisons of rectangular bounding boxes are performed to identify layer pairs with overlapping regions. This process requires calculating the intersection of the bounding boxes of any two layers.

[0102] The intersection region is determined by comparing the horizontal and vertical coordinate ranges of the bounding boxes. Specifically, the horizontal coordinate ranges (i.e., the horizontal coordinate values ​​of the top-left and bottom-right corners) and the vertical coordinate ranges (i.e., the vertical coordinate values ​​of the top-left and bottom-right corners) of the two bounding boxes need to be compared separately. When both the horizontal and vertical ranges overlap, the two bounding boxes are considered to have an intersection region.

[0103] For example, a double loop is used to traverse all the rectangular bounding boxes, comparing each pair of bounding boxes. Their horizontal and vertical coordinate ranges are compared, and if there is an intersection, it is determined whether there is one.

[0104] Step S4134: When the proportion of the intersection region to the area of ​​the two bounding boxes exceeds a preset proportion threshold, it is determined that there is spatial overlap. The preset proportion threshold is determined by statistical analysis of historical overlap detection data.

[0105] After calculating the intersection of the two rectangular bounding boxes, it is necessary to further determine whether the overlap has reached a level requiring processing. By setting a preset proportional threshold, when the proportion of the intersection area to the area of ​​the two bounding boxes exceeds the threshold, it is determined that spatial overlap exists.

[0106] The preset ratio threshold is determined through statistical analysis of historical overlap detection data. This means that in practical applications, a suitable ratio threshold is found by analyzing and summarizing a large number of historical overlap detection results. This threshold can balance the necessity and efficiency of overlap processing, avoiding unnecessary processing of minor overlaps.

[0107] For example, the area of ​​the intersection region and the total area of ​​the two bounding boxes are calculated, and then the proportion of the intersection region to the total area is calculated. This proportion is compared with a preset proportion threshold, and if it exceeds the threshold, it is determined that there is spatial overlap.

[0108] Step S4135: Represent the layers with spatial overlap using a directed graph model. Each layer is a node, and the overlap relationship is a directed edge. Generate a layer overlap relationship graph. The direction of the directed edges is from the layer with the lower priority score to the layer with the higher priority score.

[0109] The directed edge points from the layer with the lower priority score to the layer with the higher priority score. This clearly defines which layer should be prioritized when handling overlap issues. For example, in an interface with two overlapping layers, one is a background decoration layer with a lower priority score, and the other is a button layer with a higher priority score. In the layer overlap diagram, there will be a directed edge pointing from the background decoration layer to the button layer, indicating that the button layer should overlap the background decoration layer during rendering.

[0110] By generating a layer overlap graph, subsequent connected component analysis and layer order adjustment can be performed more easily. For example, graph algorithms can be used to analyze the layer overlap graph to identify related layer groups and determine their correct rendering order.

[0111] For example, iterate through all layer pairs determined to have spatial overlap, adding each layer as a node to the directed graph. Based on priority scores, add directed edges to each pair of overlapping layers, with the direction pointing from the layer with the lower priority score to the layer with the higher priority score. This ultimately generates a layer overlap graph.

[0112] Step S4136: Perform connected component analysis on the layer overlap graph to identify interconnected subgraphs. All layers in each connected subgraph form a layer group. The layer group contains at least two layers that have direct or indirect overlap. The connected component analysis is implemented using a breadth-first search algorithm.

[0113] A layer group contains at least two layers that have a direct or indirect overlap relationship. This overlap can be direct (i.e., the bounding boxes of the two layers intersect) or indirect (i.e., they are indirectly connected through other layers). Connected component analysis can organize these related layers together, facilitating subsequent processing.

[0114] Connectivity analysis is implemented using a breadth-first search (BFS) algorithm. BFS is a commonly used graph traversal algorithm that starts from a primary node and expands layer by layer, visiting all connected nodes. In an overlapping layer graph, starting from an unvisited node, BFS traverses all connected nodes until no further expansion is possible. These visited nodes form a connected subgraph, or a layer group. For example, a marker array is initialized to record whether each node has been visited. Starting from an unvisited node, BFS is used for traversal. During the traversal, visited nodes are marked as visited and added to the current connected subgraph. After the traversal is complete, a connected subgraph, or layer group, is obtained. The process of finding unvisited nodes continues until all nodes have been visited, thus identifying all layer groups.

[0115] Step S4137: Count the number of layers in the layer group, record the number of layers contained in each layer group, and when the number of layers in a layer group exceeds the preset maximum number of layers limit, split the layer group into multiple sub-layer groups. The maximum number of layers limit is set by the system performance parameters.

[0116] The purpose of counting the number of layers in a layer group is to assess the complexity of each layer group and avoid impacting rendering efficiency due to excessively large layer groups. During the counting process, the number of layers contained in each layer group is recorded.

[0117] The preset maximum number of layers is set based on system performance parameters, reflecting the system's ability to handle layer overlap issues. If the number of layers in a layer group exceeds this limit, it indicates that the layer group is too complex and may lead to a decrease in rendering performance. Therefore, it is necessary to split the layer group into multiple sub-layer groups.

[0118] For example, iterate through all layer groups and count the number of layers in each group. For layer groups that exceed the maximum number of layers, they can be split according to certain rules. For example, they can be grouped according to factors such as layer priority or spatial location, and the layers can be reasonably distributed into different sub-layer groups.

[0119] Step S414: Apply the depth-first sorting rule to the layers in the layer group, adjust the layer order in the overlapping area according to the original drawing order index of the layers, and ensure that the interactive function layer is above the static display layer. The interactive function layer is determined by the interaction identifier in the resource interaction type.

[0120] Applying depth-first sorting to layers within a layer group is to further adjust the layer order within overlapping areas, ensuring that interactive layers can be displayed correctly and interact with the user. This process involves adjustments based on the layer's original drawing order index and the type of resource interaction.

[0121] Depth-first search is a graph traversal algorithm that starts from a primary node and visits nodes as deep as possible along a path until it cannot continue. It then backtracks to the previous node and continues visiting other paths. In layer groups, depth-first search can be used to determine the rendering order of layers.

[0122] By using the original drawing order index of the layers, a certain order can be maintained. Meanwhile, to ensure that interactive function layers are located above static display layers, they are identified by the interaction identifier in the resource interaction type. Interactive function layers are typically layers that users can interact with, such as buttons and input boxes; placing them above static display layers ensures convenient user operation.

[0123] For example, for each layer group, traversal is performed starting from a primary layer using a depth-first sorting rule. During traversal, the layer order is adjusted based on the layer's original drawing order index and interaction identifier. When an interactive function layer is encountered, it is moved to the appropriate position, ensuring it is above the static display layers.

[0124] Step S415: Reinsert the adjusted layer group into the initial sorting sequence to generate a new layer rendering sequence that includes spatial overlap processing. The new layer rendering sequence ensures that layers with high visual saliency and interactive functions are drawn first, and this priority is achieved by drawing the earlier positions in the sequence.

[0125] Reinserting the adjusted layer group into the initial sorting sequence is to integrate the resolved layer overlap issue into the overall layer rendering order. During the insertion process, a new layer rendering sequence that includes spatial overlap handling is generated.

[0126] The new layer rendering sequence is designed to prioritize the rendering of visually prominent and interactive layers. By placing these important layers early in the sequence, they are ensured to be processed first during rendering, thereby improving the user's visual experience and interactivity.

[0127] For example, the adjusted layer groups are iterated through, and each layer group is re-inserted according to its relative position in the initial sorting sequence. During insertion, the layer order within each layer group remains unchanged. After insertion, a new layer rendering sequence is generated, ensuring that visually prominent and interactive layers are placed at the beginning of the sequence.

[0128] Step S416: Perform circular dependency detection on the new layer rendering sequence. Check whether there are mutual dependencies between layers using the topological sorting algorithm of the directed graph. When a circular dependency is detected, remove the dependency and record the dependency removal log.

[0129] Performing circular dependency checks on the new layer rendering sequence ensures that the rendering order between layers is reasonable and that there are no deadlock issues caused by mutual dependencies. This process utilizes a topological sorting algorithm for directed graphs.

[0130] Topological sorting algorithms for directed graphs arrange the nodes in a directed graph in a specific order, ensuring that for any directed edge, the starting node always precedes the ending node. If circular dependencies exist in the new layer rendering sequence—that is, two or more layers depend on each other—this situation will be detected during the topological sorting process.

[0131] When a circular dependency is detected, the dependency needs to be resolved to ensure that the rendering process can proceed normally. At the same time, to facilitate subsequent analysis and debugging, a dependency resolution log will be recorded, including specific information about the dependency and the method of resolution.

[0132] For example, in a complex interface, there are two layers, A and B. Layer A depends on the rendering result of layer B, while layer B depends on the rendering result of layer A, thus forming a circular dependency. During topological sorting, this circular dependency will be detected, and appropriate measures will be taken, such as adjusting the rendering order of the layers or modifying the dependency relationship, to resolve the circular dependency.

[0133] Step S420: Based on the new layer rendering sequence, assign an independent rendering channel to each layer, set the channel buffer size and data transfer rate, and generate a rendering channel configuration table. The rendering channel configuration table contains the correspondence between layer identifier, channel number, buffer size and transfer rate, and the channel numbers are assigned sequentially according to the sequence order.

[0134] The new layer rendering sequence allocates independent rendering channels to each layer to improve rendering efficiency and flexibility. Each layer requires resources to process its pixel data during rendering. By allocating independent rendering channels, rendering tasks for different layers can be processed in parallel, thus accelerating rendering. When allocating rendering channels, the channel buffer size and data transfer rate are set. The channel buffer size determines the amount of pixel data that each channel can store; an appropriate buffer size can prevent data overflow or frequent memory swapping. The data transfer rate affects the speed at which pixel data is transferred within the channel; a higher transfer rate ensures that data arrives in the rendering pipeline for processing in a timely manner. The generated rendering channel configuration table contains the correspondence between layer identifiers, channel numbers, buffer sizes, and transfer rates. Layer identifiers are used to uniquely identify each layer, and channel numbers are assigned sequentially according to the new layer rendering sequence, facilitating the management and control of each layer's rendering channels.

[0135] Step S430: Based on the rendering resource allocation ratio in the layered rendering strategy, adjust the resource loading priority of each rendering channel. The layer with the higher resource allocation ratio corresponds to the higher loading priority, and generate a resource loading priority list.

[0136] Adjusting the resource loading priority of each rendering pass according to the rendering resource allocation ratio in the layered rendering strategy is to ensure that important layers receive the necessary resources first. The rendering resource allocation ratio reflects the importance of each layer in the entire rendering process; layers with higher resource allocation ratios should receive higher loading priority.

[0137] By adjusting the resource loading priority of the rendering pipeline, it can be ensured that important layers can acquire the necessary resources in a timely manner when resources are limited, thereby improving rendering efficiency and quality. The generated resource loading priority list records the loading priority information for each rendering pipeline. This list can serve as the basis for the rendering engine to load resources, ensuring that resources are loaded in the correct order and with the correct priority.

[0138] For example, the rendering resource allocation ratio for each layer is obtained from the layered rendering strategy. Based on these ratios, a corresponding resource loading priority is set for each rendering pass. The identifier of the rendering pass and its corresponding loading priority are recorded in a resource loading priority list. The resource loading priority list can be sorted using a sorting algorithm, arranged in descending order of loading priority, to facilitate resource loading by the rendering engine.

[0139] Step S440: Apply color enhancement to the layers in the dominant component set, adjust the hue, saturation, and brightness parameters, and generate color space conversion parameters. The color space conversion parameters include a conversion matrix and an offset. The conversion matrix is ​​a multi-dimensional matrix, and the offset is a multi-dimensional vector, which are calculated by the color enhancement algorithm.

[0140] Applying color enhancement to layers within the dominant component set aims to elevate the visual appeal of important layers and attract the user's attention. This process involves adjusting hue, saturation, and brightness parameters, which alter the image's color representation.

[0141] Hue determines the type of color, saturation indicates the vividness of a color, and brightness reflects the lightness or darkness of a color. By adjusting these parameters, you can make the colors in an image more vibrant and vivid, or create different atmospheres.

[0142] The generated color space conversion parameters include a conversion matrix and an offset. The conversion matrix is ​​a multi-dimensional matrix used to linearly transform the pixel data, changing the color distribution. The offset is a multi-dimensional vector used to shift the transformed pixel data, further adjusting the color representation.

[0143] Color space conversion parameters are calculated using color enhancement algorithms. Different color enhancement algorithms may employ different methods to calculate the conversion matrix and offset. For example, some algorithms may adjust parameters based on the image's histogram statistics, while others may use machine learning methods for optimization.

[0144] For example, for each layer in the dominant component set, a suitable color enhancement algorithm is selected based on its characteristics and requirements. This algorithm is used to calculate adjustments for hue, saturation, and brightness, resulting in a transformation matrix and offset. These color space transformation parameters are recorded for use in subsequent rendering processes.

[0145] Step S450: Apply pixel blending to the layers in the background component set, adjust the blending factor and operation order, and generate a pixel blending mode. The pixel blending mode contains a blending equation and a blending factor parameter. The blending equation combines the color values ​​of the source pixel and the target pixel through logical operators.

[0146] Applying pixel blending to layers within the background component set aims to achieve a seamless blending effect between background layers and between the background layer and the dominant component layer, resulting in a more harmonious visual overall appearance. This process involves adjusting the blending factor and the order of operations.

[0147] The blending factor determines the weights of the source and target pixels during the blending process; adjusting the blending factor controls the blending ratio between the two pixels. The order of operations specifies the execution order of the blending operations; different orders may produce different blending effects.

[0148] The generated pixel blending mode includes a blending equation and a blending factor parameter. The blending equation combines the color values ​​of the source and target pixels using logical operators, such as addition, subtraction, and multiplication. By selecting different logical operators and blending factor parameters, various blending effects can be achieved, such as normal blending, overlay blending, and soft light blending.

[0149] For example, for each layer in the background component set, appropriate blending equations and blending factor parameters are selected based on its relationship with other layers and design requirements. By adjusting these parameters, pixel blending modes are generated. Different layer combinations can be experimented with to select the most suitable pixel blending mode for optimal fusion.

[0150] Step S460: Combine the color space conversion parameters and pixel blending modes to form an optimized rendering parameter set, and perform consistency checks on each parameter in the parameter set. Check whether the data type, value range, and format of the parameters meet the requirements of the rendering engine. If there is any inconsistency, record the parameter error information.

[0151] Combining color space conversion parameters and pixel blending modes to form an optimized rendering parameter set integrates the parameters obtained in previous steps, providing a unified parameter configuration for subsequent rendering processes. After forming the parameter set, each parameter needs to be validated for consistency to ensure its correctness and usability.

[0152] Consistency checks primarily involve verifying whether the data type, value range, and format of parameters conform to the rendering engine's requirements. Data type correctness means the parameter should have the correct data type; for example, a transformation matrix should be a matrix, and an offset should be a vector. Reasonable value range means the parameter's value should be within the range allowed by the rendering engine; for example, the blending factor typically ranges from 0 to 1. Standardized format means the parameter's representation should conform to the rendering engine's specifications, such as the matrix's dimensions and element arrangement.

[0153] When inconsistencies are found among the parameters in the parameter set, parameter error messages are logged. These error messages help developers locate and resolve problems, ensuring the rendering process proceeds correctly. For example, the parameters in the rendering parameter set are iterated through, and their data types, value ranges, and formats are checked according to the rendering engine's requirements. Tools such as conditional statements and regular expressions are used for checking, and when inconsistencies are found, parameter error messages are logged to a log file.

[0154] Step S500: Perform interface redrawing operation based on the rendering engine of the display driven by the optimized rendering parameter set. Apply the color space conversion parameters in the optimized rendering parameter set to the pixel rendering pipeline, and integrate the redrawn interface pixel data by frame buffering according to the pixel blending mode, and output the optimized display interface.

[0155] In one embodiment, step S500 may specifically include the following steps S510 to S560: Step S510: Load the color space conversion parameters from the optimized rendering parameter set into the color processing module of the rendering engine, configure the color conversion matrix and non-linear brightness correction curve in the pixel rendering pipeline. The color conversion matrix is ​​a multi-dimensional matrix, and the non-linear brightness correction curve is implemented through a lookup table. The number of entries in the lookup table is determined by the system's preset rules.

[0156] Loading color space conversion parameters from the optimized rendering parameter set into the rendering engine's color processing module enables the rendering engine to use these parameters to perform color conversions on pixel data. This process requires configuring the color conversion matrix and non-linear brightness correction curves in the pixel rendering pipeline. The color conversion matrix is ​​a multi-dimensional matrix used to linearly transform pixel data, changing the color distribution. By loading the color conversion matrix into the rendering engine's color processing module, the rendering engine can perform color conversions according to the matrix's rules when processing pixel data.

[0157] Non-linear brightness correction curves are used to adjust pixel brightness values ​​to improve image contrast and visual effects. These curves are implemented using a lookup table, a pre-calculated mapping table that maps input brightness values ​​to corrected values. The number of entries in the lookup table is determined by system preset rules; an appropriate number of entries can reduce memory usage while maintaining accuracy.

[0158] In one embodiment, step S510 may specifically include the following steps S511 to S516: Step S511: Analyze the color space conversion parameters in the optimized rendering parameter set, extract the color conversion matrix coefficients and non-linear brightness correction parameters. The color conversion matrix coefficients are multiple floating-point values, and the non-linear brightness correction parameters include a correction exponent and a brightness range. The correction exponent is a floating-point number greater than zero, and the brightness range includes a minimum value and a maximum value.

[0159] In one embodiment, step S511 may specifically include the following steps S5111 to S5116: Step S5111: Perform data structure parsing on the optimized rendering parameter set, identify the data segment identifier and length information of the color space conversion parameters. The data segment identifier is a preset character sequence, and the length information is a value representing the total number of bytes in the data segment.

[0160] Data structure parsing of the optimized rendering parameter set is crucial for accurately locating and extracting color space conversion parameters. This process requires identifying the data segment identifier and length information of the color space conversion parameters. The data segment identifier is a predefined character sequence that uniquely identifies the data segment containing the color space conversion parameters. By identifying the data segment identifier, the starting position of the color space conversion parameters can be quickly located. The length information is a numerical value representing the total number of bytes in the data segment, which helps determine the ending position of the data segment, ensuring the complete extraction of the color space conversion parameters.

[0161] For example, the optimized rendering parameter set is traversed to find the preset data segment identifier. Once the identifier is found, its position is recorded, and its length information is read. Based on the length information, all content of the data segment is extracted and used as the raw data for the color space conversion parameters.

[0162] Step S5112: Extract matrix dimension information and element value sequence from the data segment. The matrix dimension information includes the number of rows and columns, and the element value sequence is a floating-point numerical array. Reorganize the element value sequence into a two-dimensional matrix structure according to the matrix dimension information to obtain the color conversion matrix coefficients. The number of rows and columns of the two-dimensional matrix structure matches the number of pixel color channels.

[0163] Extracting matrix dimension information and element value sequences from the data segment is for constructing a color conversion matrix. Matrix dimension information includes the number of rows and columns, which determines the size and shape of the matrix. The element value sequence is a floating-point array containing all the elements of the matrix.

[0164] The element value sequence is reorganized into a two-dimensional matrix structure based on the matrix dimension information. This transforms a one-dimensional element value sequence into a two-dimensional structure that meets the requirements of matrix operations. The number of rows and columns of the two-dimensional matrix structure matches the number of color channels of a pixel, because the color conversion matrix needs to operate on each color channel of the pixel.

[0165] For example, matrix dimension information, including the number of rows and columns, is read from the data segment. Then, the sequence of element values ​​is extracted sequentially. Based on the matrix dimension information, the sequence of element values ​​is rearranged into a two-dimensional matrix structure. The two-dimensional matrix can be represented using a two-dimensional array in a programming language, with the element values ​​assigned sequentially to their respective positions in the array.

[0166] Step S5113: Continue parsing the nonlinear brightness correction parameter part in the data segment. The nonlinear brightness correction parameter part is located after the matrix coefficients and includes the correction index and the upper and lower limits of the brightness range. The correction index is a floating-point value, and the upper and lower limits of the brightness range are both floating-point values. The upper and lower limits of the brightness range define the effective brightness range of the correction.

[0167] Continuing to analyze the nonlinear brightness correction parameters in the data segment is to obtain the key information needed for brightness correction. Located after the matrix coefficients, the nonlinear brightness correction parameters include the correction exponent and the upper and lower limits of the brightness range. The correction exponent is a floating-point value that determines the degree of brightness correction. A larger correction exponent will cause more drastic brightness changes, while a smaller exponent will cause relatively gentler changes. The upper and lower limits of the brightness range are both floating-point values, defining the effective brightness range for correction. Only brightness values ​​within this range will be corrected; brightness values ​​outside the range remain unchanged.

[0168] For example, after extracting the color conversion matrix coefficients, the nonlinear brightness correction parameter section is read from the data segment. Based on the format and definition of this section, the correction index and the upper and lower limits of the brightness range are extracted. These parameters are stored in the corresponding variables for subsequent brightness correction operations.

[0169] Step S5114: Perform orthogonality verification on the extracted color conversion matrix coefficients, calculate the inner product of the row vectors of the matrix, and determine that the orthogonality is qualified when the absolute value of the inner product of any two row vectors is less than the preset orthogonality threshold. The preset orthogonality threshold is set according to the system accuracy requirements. The orthogonality verification is used to ensure the reversibility of color space conversion.

[0170] Performing orthogonality checks on the extracted color transformation matrix coefficients ensures that the color transformation matrix possesses sound mathematical properties and guarantees the invertibility of color space transformations. In an orthogonal matrix, the inner product of any two row vectors is zero, meaning they are perpendicular to each other.

[0171] Calculating the dot product of the row vectors of a matrix is ​​a crucial step in orthogonality verification. By calculating the dot product of any two row vectors, we can determine whether the matrices are close to orthogonal. If the absolute value of the dot product of any two row vectors is less than a preset orthogonality threshold, the orthogonality is considered acceptable. This preset orthogonality threshold is set according to the system's precision requirements, reflecting the system's tolerance for matrix orthogonality. Orthogonality verification is very important for color space conversion because the inverse of an orthogonal matrix is ​​equal to its transpose, which makes inverse transformations in color space conversions easy and ensures the integrity of color information.

[0172] For example, iterate through the row vectors of the color transformation matrix and calculate the dot product of any two row vectors. Compare the absolute value of the dot product with a preset orthogonality threshold. If the absolute value of all dot products is less than the threshold, the orthogonality is considered satisfactory. Otherwise, the matrix needs to be adjusted or recalculated.

[0173] Step S5115: Perform range verification on the extracted nonlinear brightness correction parameters to ensure that the correction index is within the preset valid value range and that the upper and lower limits of the brightness range conform to the physical display capabilities of the display. The valid range of the correction index and the upper and lower limits of the brightness range are determined by the display hardware parameters.

[0174] Range verification of the extracted nonlinear brightness correction parameters is necessary to ensure their rationality and effectiveness. The correction index and upper and lower limits of the brightness range in the nonlinear brightness correction parameters need to be within reasonable ranges to ensure that the brightness correction operation can be performed normally and will not exceed the physical display capabilities of the monitor.

[0175] The effective range of the calibration index is determined by the monitor's hardware parameters, which specify the range of values ​​for the calibration index. The calibration index should be a floating-point number greater than zero and fall within this effective range. The upper and lower limits of the brightness range also need to conform to the monitor's physical display capabilities; that is, the minimum value cannot be less than the monitor's minimum brightness, and the maximum value cannot be greater than the monitor's maximum brightness.

[0176] For example, based on the display's hardware parameters, a reasonable range for the effective range of the correction index and the upper and lower limits of the brightness range are determined. The extracted correction index and brightness range limits are compared with these ranges. If the parameters are within the effective range, the range verification is deemed successful. Otherwise, the parameters need to be adjusted or re-acquired.

[0177] Step S5116: Package the verified color conversion matrix coefficients and nonlinear brightness correction parameters into a configuration data structure. The configuration data structure includes data segment identifiers, length information, matrix dimensions, matrix coefficients, correction index, and brightness range, which serve as input data loaded into the color processing module of the rendering engine.

[0178] Packaging the validated color conversion matrix coefficients and non-linear brightness correction parameters into a configuration data structure allows for unified management of these parameters and facilitates loading them into the rendering engine's color processing module. The configuration data structure contains several key pieces of information to ensure the rendering engine can correctly use these parameters for color conversion and brightness correction.

[0179] The data segment identifier is used to uniquely identify the configuration data structure, the length information indicates the total number of bytes in the data structure, the matrix dimension and matrix coefficients constitute the color conversion matrix, and the correction index and brightness range are the key parameters for non-linear brightness correction.

[0180] For example, a configuration data structure is defined, containing the required information. The validated color transformation matrix coefficients and non-linear brightness correction parameters are populated according to the data structure format. The configuration data structure can be represented using a structure or class from a programming language, assigning each parameter to its corresponding member variable. Finally, the configuration data structure is loaded as input data into the color processing module of the rendering engine.

[0181] Step S512: Write the color conversion matrix coefficients into the matrix register of the color processing module of the rendering engine, configure the input and output channels of the matrix operation unit, ensure that the pixel data is multiplied in the order of the channels, allocate the address of the matrix register in order, and write the element values ​​of the matrix in sequence.

[0182] Writing the color conversion matrix coefficients to the matrix register of the rendering engine's color processing module allows the rendering engine to use these coefficients for color conversion. The matrix register is a register in the rendering engine specifically used to store matrix data; by writing the matrix coefficients to the register, matrix multiplication operations can be easily performed.

[0183] Configuring the input and output channels of the matrix operation unit ensures that pixel data can be multiplied in channel order. Pixel data typically contains multiple color channels (such as RGB channels), and the matrix operation unit needs to process the data of each channel sequentially. By configuring the input and output channels, the correct transmission and processing of pixel data can be guaranteed.

[0184] The addresses of the matrix registers are allocated sequentially, and the matrix element values ​​are written in order. This ensures that the matrix element values ​​are stored in the registers in the correct order, facilitating reading and calculation by the matrix operation unit.

[0185] For example, the color conversion matrix coefficients are written to the matrix register using the interface functions provided by the rendering engine. The element values ​​are written to the corresponding register addresses sequentially according to the order of the matrix elements. The input and output channels of the matrix operation unit are configured, setting the channel order and data transmission method to ensure that pixel data can be correctly used for matrix multiplication operations.

[0186] Step S513: Generate a nonlinear brightness correction curve based on the nonlinear brightness correction parameters. Map the correction index to the corrected brightness value using a lookup table to generate a nonlinear brightness correction lookup table. The input of the lookup table is the brightness value range, and the output is the corrected brightness value. The correction method is implemented through exponential operation.

[0187] Generating a nonlinear brightness correction curve based on nonlinear brightness correction parameters is for the purpose of correcting pixel brightness. The nonlinear brightness correction curve describes the mapping relationship between the input brightness value and the corrected brightness value. Mapping the correction exponent to the corrected brightness value using a lookup table is an efficient implementation method. The lookup table is a pre-calculated mapping table that maps the input brightness value range to the corrected brightness value. The input to the lookup table is the brightness value range, and the output is the corrected brightness value. The correction method is implemented through exponential operations; the input brightness value is exponentially calculated based on the correction exponent to obtain the corrected brightness value.

[0188] For example, the input and output ranges of the lookup table are determined based on the correction exponent and brightness range in the nonlinear brightness correction parameters. The input brightness value is calculated using the exponentiation formula to obtain the corrected brightness value. These mapping relationships are stored in the lookup table, which can be implemented using data structures such as arrays or hash tables.

[0189] Step S514: Load the non-linear brightness correction lookup table into the lookup table cache of the rendering engine, configure the post-processing stage of the pixel rendering pipeline, and adjust the brightness of the pixel data after color conversion through the non-linear brightness correction lookup table. The starting address of the lookup table cache is set by the register of the rendering engine.

[0190] Loading the non-linear brightness correction lookup table into the rendering engine's lookup table cache allows the rendering engine to quickly access the lookup table and perform brightness adjustments. The lookup table cache is a dedicated cache area in the rendering engine used to store lookup tables; loading the lookup table into this area improves access speed.

[0191] The post-processing stage of the pixel rendering pipeline is configured so that the color-converted pixel data undergoes brightness adjustment via a non-linear brightness correction lookup table. In the pixel rendering pipeline, color conversion is typically completed in earlier stages, while brightness adjustment occurs in the later post-processing stage. By configuring the post-processing stage to apply the lookup table to the pixel data, the brightness adjustment effect can be achieved. The starting address of the lookup table buffer is set through a register in the rendering engine. By setting the register value, the storage location of the lookup table in the buffer can be specified, facilitating access by the rendering engine.

[0192] For example, using the interface functions provided by the rendering engine, a non-linear brightness correction lookup table is loaded into the lookup table buffer. The rendering engine registers are set to specify the starting address of the lookup table buffer. The post-processing stage of the pixel rendering pipeline is configured to apply the lookup table to the brightness adjustment process of the pixel data.

[0193] Step S515: Verify the configuration parameters of the color processing module by comparing the read-back value from the register with the expected configuration value, and calculate the degree of difference between the read-back value and the expected value. When the degree of difference is less than the preset error threshold, the configuration is determined to be correct. The preset error threshold is set according to the system accuracy requirements.

[0194] Verifying the configuration parameters of the color processing module is a crucial step in ensuring that the rendering engine accurately executes color conversion and brightness correction operations. After completing operations such as writing the color conversion matrix coefficients to the matrix register, configuring the input and output channels of the matrix operation unit, and loading the nonlinear brightness correction lookup table into the lookup table cache, it is necessary to verify that these configurations are correctly effective.

[0195] The current actual configuration is obtained by reading register readback values. Registers are important components in the rendering engine that store configuration information; reading their values ​​reveals the actual parameter settings. These readback values ​​are compared with the expected configuration values, which are the ideal parameters set in previous steps. The degree of difference between the readback values ​​and the expected values ​​is calculated; this degree of difference reflects the deviation between the actual and expected configurations.

[0196] The preset error threshold is set based on the system's accuracy requirements, and different systems have different requirements for configuration accuracy. For example, in a high-precision image rendering system, the error threshold will be set relatively small to ensure the accuracy of color conversion and brightness correction. When the difference is less than the preset error threshold, the configuration is considered correct, indicating that the color processing module has been configured as expected and can execute subsequent rendering instructions normally. For example, the register read function provided by the rendering engine is used to obtain the readback value. The readback value is compared bit by bit or item by item with the expected configuration value, and the difference or deviation ratio between them is calculated. This difference is compared with the preset error threshold, and the configuration is determined to be correct based on the comparison result.

[0197] Step S516: After the verification is passed, a configuration completion signal is generated, triggering the rendering engine to enter the ready state to prepare to execute subsequent rendering instructions. The ready state is achieved by setting the status bits of the rendering engine status register.

[0198] After verifying the configuration parameters of the color processing module, a configuration completion signal is generated to inform the rendering engine that the color processing module has been correctly configured and can begin executing subsequent rendering commands. This signal is a crucial indicator that the system has completed the preparation work for color conversion and brightness correction.

[0199] Triggering the rendering engine to enter the ready state means that the rendering engine is ready to execute rendering tasks. This state transition is achieved by setting the status bits in the rendering engine's status register. The status register is a component in the rendering engine used to store system status information; by modifying the values ​​of its status bits, the state of the rendering engine can be changed.

[0200] Step S520: Based on the new layer rendering sequence and rendering channel configuration table, drive the rendering engine to execute the rendering instructions of each layer in sequence, perform color conversion on the pixel data of each layer through the configured pixel rendering pipeline, generate color-optimized layer pixel data, and execute the rendering instructions by calling the application programming interface function of the rendering engine.

[0201] Driving the rendering engine to execute rendering instructions based on the new layer rendering sequence and rendering pass configuration table is a crucial step in achieving optimized rendering. The new layer rendering sequence determines the rendering order of layers, ensuring that visually salient and interactive layers are rendered first. The rendering pass configuration table assigns an independent rendering pass to each layer and sets the pass buffer size and data transfer rate. Driving the rendering engine to execute the rendering instructions for each layer sequentially means processing each layer according to the new layer rendering sequence. For each layer, its pixel data undergoes color conversion through the configured pixel rendering pipeline. The color processing module has already been configured in previous steps, including loading color conversion matrix coefficients and a non-linear brightness correction lookup table, so the pixel rendering pipeline can process the pixel data according to these configurations.

[0202] The system generates color-optimized layer pixel data, and through color conversion and brightness correction, makes the colors of each layer more vibrant and vivid, and the brightness more appropriate. Rendering commands are executed by calling the rendering engine's application programming interface (API) functions. These functions are interfaces provided by the rendering engine to control the rendering process, and by calling these functions, rendering operations on the layers can be performed.

[0203] For example, the new layer rendering sequence is traversed. For each layer, its corresponding rendering channel information is retrieved from the rendering channel configuration table. The rendering engine's API functions are called to input the layer's pixel data into the pixel rendering pipeline through the corresponding rendering channel, where color conversion and brightness correction are performed, ultimately generating color-optimized layer pixel data.

[0204] Step S530: Apply the pixel blending mode in the optimized rendering parameter set to the color-optimized layer pixel data. Perform pixel blending operations sequentially according to the layer rendering order. The pixel data of the previous layer and the overlapping area of ​​the next layer are merged according to the blending mode. The blending operation is implemented through the pixel shader.

[0205] Applying the pixel blending mode from the optimized rendering parameter set to the color-optimized layer pixel data achieves a blending effect between layers, making the overall interface visually more harmonious. In the previous steps, color conversion and brightness correction were performed on the pixel data of each layer, resulting in color-optimized layer pixel data.

[0206] Pixel blending is performed sequentially according to the layer rendering order. This is because the rendering order of the layers is determined in the new layer rendering sequence, and blending in this order ensures the correctness of the blending effect. The pixel data of the previous layer and the overlapping area of ​​the next layer are merged according to the blending mode. This can handle the overlap problem between layers and make the pixel values ​​of the overlapping parts present a suitable blending effect.

[0207] Blending operations are implemented through pixel shaders, which are programs in the rendering engine used to handle pixel-level operations. They calculate and merge pixel values ​​according to the pixel blending mode. Different pixel blending modes have different blending equations and blending factor parameters, and the pixel shader processes the pixel values ​​accordingly based on these parameters.

[0208] For example, the new layer rendering sequence is traversed, and for every two adjacent layers, it is checked whether they have overlapping areas. If overlapping areas exist, the pixel data of that area is input into the pixel shader, and the pixel values ​​are merged according to the pixel blending mode in the optimized rendering parameter set. This process is repeated until all layers have completed the pixel blending operation.

[0209] Step S540: Write the blended layer pixel data into the frame buffer area, perform frame buffer integration, including pixel format conversion and resolution adaptation, and generate frame buffer data that conforms to the display output format. Pixel format conversion converts the original pixel format into a format supported by the display, and resolution adaptation is achieved through a scaling algorithm.

[0210] Writing the blended layer pixel data to the frame buffer is to integrate the pixel data of all layers into a complete frame. The frame buffer is a buffer in the rendering engine used to store the final rendering result. Writing the blended pixel data to this area facilitates subsequent output operations. Frame buffer integration includes two important steps: pixel format conversion and resolution adaptation. Pixel format conversion converts the original pixel format to a format supported by the display. Different displays may support different pixel formats, such as RGB, RGBA, etc. Pixel format conversion ensures that the pixel data can be correctly displayed on the display.

[0211] Resolution adaptation is achieved through scaling algorithms. Since different monitors have different resolutions, the pixel data generated during rendering may have different sizes. To ensure the rendering results display correctly on monitors with different resolutions, the pixel data needs to be scaled. The scaling algorithm calculates an appropriate scaling ratio based on the monitor's resolution and the original pixel data size, and then scales the pixel data accordingly.

[0212] Step S550: Send the frame buffer data to the display controller of the monitor to trigger the refresh operation of the monitor and output the optimized display interface. The refresh operation is achieved by writing the frame buffer address and refresh command to the display controller.

[0213] Sending frame buffer data to the display controller is the final step in presenting the rendered result to the user. The display controller is the component in the display used to control display operations; it is responsible for receiving frame buffer data and displaying it on the screen.

[0214] Triggering a refresh operation on the display updates the displayed content, showing the new frame buffer data. This is achieved by writing the frame buffer address and a refresh command to the display controller. The frame buffer address specifies the location of the frame buffer data in the storage device, allowing the display controller to read the data. The refresh command instructs the display controller to begin updating the display content.

[0215] For example, a data transfer interface is used to send frame buffer data to the display controller. Dedicated register operation functions are used to write the frame buffer address and refresh command to the display controller's registers. Upon receiving this information, the display controller begins reading the frame buffer data and performing a refresh operation, ultimately displaying the optimized display interface.

[0216] Step S560: Perform a visual effect evaluation on the optimized display interface. By comparing the pixel data differences before and after optimization, calculate the color deviation value and sharpness index. The color deviation value is calculated using a preset color difference calculation method, and the sharpness index is calculated by summing the edge gradient magnitudes.

[0217] The visual effect evaluation of the optimized display interface is to verify the effectiveness of the optimization method and ensure that the optimized interface has significant improvements in color and sharpness. By comparing the pixel data differences of the interface before and after optimization, the impact of the optimization operation on the interface can be intuitively understood. Color deviation values ​​are calculated, reflecting the degree of color difference before and after optimization. Using a preset color difference calculation method, the pixel data of the interface before and after optimization is analyzed to calculate the color deviation. The color difference calculation method can be based on different color spaces (such as RGB, Lab, etc.), and calculates the deviation value according to factors such as brightness, saturation, and hue. The sharpness index is calculated by the sum of edge gradient magnitudes, which reflects the sharpness of image edges. In the optimized interface, the sharper the edges, the larger the sum of edge gradient magnitudes. By calculating the sum of edge gradient magnitudes before and after optimization, the improvement in interface sharpness can be evaluated.

[0218] Please see Figure 2 , Figure 2 This is a schematic diagram of a computer system provided in an embodiment of the present invention. The computer system includes at least one processor 210, a memory 250, at least one network interface 220, and an external interface 230. The various components in the computer system 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to implement communication between these components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 240.

[0219] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0220] External interface 230 may include, for example, one or more speakers or displays. External interface 230 may also include one or more input devices 432, such as a keyboard, mouse, microphone array, touch screen display assembly, camera, etc.

[0221] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices physically located away from the processor 210.

[0222] The memory 250 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 250 described in this embodiment is intended to include any suitable type of memory.

[0223] In some embodiments, memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0224] Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 252 is used to reach external devices, such as data sources, via one or more (wired or wireless) network interfaces 220. Exemplary network interfaces 220 include Bluetooth, WiFi, and Universal Serial Bus (USB), etc. Presentation module 253 is configured to enable the display of information (e.g., external interface for operating peripheral devices and displaying content and information) via one or more output devices 231 (e.g., display screen, speaker, etc.) associated with external interface 230; The input processing module 254 is used to detect and translate one or more user inputs or interactions from one or more input devices 232.

[0225] In one embodiment, the processor 210 executes the image rendering-based display interface optimization method provided above in the embodiments of the present invention by running a computer program in the memory 250.

Claims

1. A display interface optimization method based on image rendering, characterized in that, The method includes: Obtain the interface rendering data within the current rendering cycle of the display. The interface rendering data includes the rendering instruction sequence of visual elements and the corresponding resource call records. The rendering instruction sequence consists of rendering operation instructions arranged in execution order. The resource call records include the image resource identifiers called during the rendering process and the corresponding loading path information. Visual component analysis is performed based on the interface rendering data. By analyzing the layer drawing order in the rendering instruction sequence and the image resource attributes in the resource call record, the dominant component set and background component set in the interface visual components are separated. The dominant component set contains rendering data units corresponding to visual elements with interactive functions, and the background component set contains rendering data units corresponding to static visual elements used for interface decoration. The rendering center of gravity is calibrated based on the dominant component set and the background component set. By calculating the visual saliency weight of each rendering data unit in the dominant component set and the spatial distribution density of the background component set, a layered rendering strategy including layer priority sorting and rendering resource allocation ratio is generated. Based on the layered rendering strategy, component fusion rendering is performed on the dominant component set and the background component set. By adjusting the rendering channel parameters and resource loading priority of different layers, an optimized rendering parameter set containing color space conversion parameters and pixel blending modes is generated. The display's rendering engine is driven by the optimized rendering parameter set to perform interface redrawing operations. The color space conversion parameters in the optimized rendering parameter set are applied to the pixel rendering pipeline, and the redrawn interface pixel data is integrated by frame buffering according to the pixel blending mode to output the optimized display interface.

2. The method according to claim 1, characterized in that, The step of analyzing visual components based on the interface rendering data involves separating the dominant component set and the background component set from the interface visual components by analyzing the layer drawing order in the rendering instruction sequence and the image resource attributes in the resource call record. The rendering instruction sequence is decomposed, and the layer identification information and drawing order index in each rendering operation instruction are extracted to generate a layer drawing order list. The layer drawing order list contains layer identifiers arranged in execution order and corresponding drawing area coordinates. The drawing area coordinates are obtained by parsing the vertex parameters in the instruction. The image resource attributes in the resource call record are extracted, the interactive function markers and static display features of each image resource are identified, and an image resource attribute feature set is generated. The image resource attribute feature set includes resource interaction type and visual complexity descriptor. The visual complexity descriptor is calculated by the correlation between the number of pixels contained in the resource and the proportion of the transparency channel. The layer drawing order list is associated and matched with the image resource attribute feature set. A mapping relationship between drawing order and resource attribute is established based on the layer identifier, and a layer resource association table is generated. The layer resource association table contains the correspondence between layer identifier, drawing order index, resource interaction type and visual complexity descriptor. Based on the interactive function markers in the layer resource association table, the rendering data units corresponding to the layers with interactive function markers are selected as candidate dominant components. The interactive function markers are determined by identifying the event response function pointers in the resource attributes. Based on the drawing order index and visual complexity descriptor in the layer resource association table, the visual saliency score of the candidate dominant component is calculated. The visual saliency score is determined by multiplying the reverse weighted value of the drawing order index with the visual complexity descriptor. The candidate dominant components whose visual saliency scores meet the preset conditions are formed into a dominant component set, and the remaining rendering data units are formed into a background component set. The integrity of the rendering data units in the dominant component set and the background component set is checked. The ratio of the number of rendering data units in each set to the total number of original layers is calculated. The check is completed when the sum of the ratios equals the integrity ratio.

3. The method according to claim 2, characterized in that, The step of decomposing the rendering instruction sequence, extracting the layer identifier information and drawing order index from each rendering operation instruction, and generating a layer drawing order list includes: Each rendering operation instruction in the rendering instruction sequence is parsed to identify the layer operation type and associated parameters in the instruction, and an instruction syntax tree structure is generated. The instruction syntax tree structure contains the hierarchical relationship between operation nodes and parameter nodes. The operation node represents the drawing action type, and the parameter node contains coordinate and color attribute values. Extract the layer identifier field and timing stamp information from the parameter nodes of the instruction syntax tree structure; The time stamp information in the corresponding relationship table is sorted in ascending order to generate a layer execution sequence arranged in chronological order of execution time. Each element in the layer execution sequence contains a layer identifier and a corresponding execution timestamp. The execution timestamp is obtained by parsing the time parameter node in the instruction. A unique drawing order index is assigned to each layer identifier in the layer execution sequence. The drawing order index is incremented sequentially from the starting value according to the order of execution timestamps. The starting value and step size are determined by the system preset rules. Based on the layer identifier, execution timestamp, and drawing order index in the layer execution sequence, a layer drawing order list containing drawing area coordinates is constructed. The drawing area coordinates are obtained by parsing the coordinate parameter node in the rendering operation instruction. The coordinate parameter node contains the two-dimensional coordinate values ​​of four vertices. The validity of the drawing area coordinates in the layer drawing order list is verified. The coordinate values ​​are checked to see if they are within the range of the physical resolution of the monitor. When the coordinate values ​​are outside the range, they are marked as abnormal coordinates and the abnormality type is recorded.

4. The method according to claim 3, characterized in that, The step of extracting the layer identifier field and timing stamp information from the parameter nodes of the instruction syntax tree structure includes: Traverse the parameter node levels of the instruction syntax tree structure, identify the target parameter node containing the layer identifier keyword, the layer identifier keyword includes a preset layer naming prefix and a unique identifier combination, and locate the parameter node where the keyword is located by a string matching algorithm; The text content of the target parameter node is matched with regular expressions to extract the layer identifier field that conforms to the preset format. The layer identifier field includes an application domain identifier of preset length, a layer type code and an instance number. The length of each part is preset through the system configuration file. In the instruction syntax tree structure, find the time parameter node that has a parent-child relationship with the target parameter node, and extract the timestamp value from the time parameter node. The time parameter node is identified by time-related keywords in the node name, and the timestamp value contains complete time record information. Establish a mapping pair between layer identifier fields and timestamp values. Each mapping pair contains a layer identifier field and a corresponding timestamp value. All mapping pairs are sorted in ascending order of timestamp values ​​to generate a mapping table between layer identifiers and execution times. The mapping table also contains the original instruction position index of each mapping pair in the rendering instruction sequence, and the original instruction position index reflects the relative position of the instruction in the sequence. Duplicate checks are performed on the mapping pairs in the corresponding relationship table. When the same layer identifier field appears multiple times under the same timestamp value, the mapping pair with the smallest original instruction position index is retained and the conflict log is recorded.

5. The method according to claim 1, characterized in that, The step of calibrating the rendering center of gravity based on the dominant component set and the background component set, and generating a layered rendering strategy that includes layer priority ranking and rendering resource allocation ratio by calculating the visual saliency weight of each rendering data unit in the dominant component set and the spatial distribution density of the background component set, includes: Visual features are extracted for each rendering data unit in the set of dominant components to obtain the color contrast feature, edge sharpness feature and dynamic change frequency feature of each rendering data unit. The color contrast feature is calculated by the degree of dispersion of the difference between gray values ​​of adjacent pixels, the edge sharpness feature is calculated by the central tendency of the edge gradient magnitude, and the dynamic change frequency feature is calculated by the proportion of the region where the pixel value changes per unit time. Based on the normalized color contrast features, edge sharpness features, and dynamic change frequency features, the visual saliency weight of each rendering data unit is calculated by weighted summation. In the calculation of the visual saliency weight, the weight coefficient of the dynamic change frequency feature is set higher than that of the color contrast features and edge sharpness features. The weight coefficients of each feature are determined by training with historical rendering effect data. Spatial coordinates are extracted from all rendering data units in the background component set to obtain the vertex coordinate set of each background component in the interface coordinate system. The interface coordinate system has the upper left corner of the display as the origin, and the horizontal and vertical axes correspond to the horizontal and vertical directions of the display, respectively. The coordinate unit is pixels. The spatial distribution density of the background component set is calculated based on the vertex coordinate set. The spatial distribution density is determined by the ratio of the total coverage area of ​​the background components to the total area of ​​the interface. The total coverage area is calculated by merging the drawing areas of all background components and removing overlapping parts. The total area of ​​the interface is calculated by multiplying the width and height of the display resolution. Combining the visual saliency weight and spatial distribution density, a comprehensive priority evaluation is performed on all layers in the dominant component set and the background component set to generate a layered rendering strategy that includes layer priority ranking and rendering resource allocation ratio. The rendering resource allocation ratio is positively correlated with the visual saliency weight and negatively correlated with the spatial distribution density. The correlation coefficient is set by the system preset rules. The rationality of the layer priority order and rendering resource allocation ratio in the layered rendering strategy is verified. It is checked whether the priority order is consistent with the descending order of visual salience weight and whether the sum of the resource allocation ratio meets the full ratio requirement. If they are inconsistent, the evaluation parameters are recalculated.

6. The method according to claim 5, characterized in that, The step of extracting visual features from each rendering data unit in the dominant component set to obtain the color contrast features, edge sharpness features, and dynamic change frequency features of each rendering data unit includes: The pixel data of the rendering data unit is converted to a color space, transforming the red-green-blue color space into a hue-saturation-brightness color space, and separating the hue channel, saturation channel and brightness channel. The difference in grayscale values ​​between adjacent pixels is calculated in the brightness channel. The gradient magnitudes in the horizontal and vertical directions are calculated by the gradient operator. The central tendency of the gradient magnitudes is used as the color contrast feature. The gradient operator uses a convolution kernel of a preset size. Edge detection is performed on the pixel data of the rendering data unit to extract the edge contour. The average gradient value of the edge contour is calculated as the edge sharpness feature. The average gradient value is obtained by dividing the sum of the gradient magnitudes of all pixels on the edge contour by the number of pixels. The pixel change region of the rendering data unit in a continuous rendering cycle is monitored, and the area ratio of the region where the pixel value changes per unit time is counted. The area ratio of the region is used as a dynamic change frequency feature, and the unit time is set as the duration of the current rendering cycle. The change region is detected by the inter-frame difference method. The color contrast feature, edge sharpness feature, and dynamic change frequency feature are normalized, and each feature value is mapped to a preset range. The normalized color contrast feature, edge sharpness feature, and dynamic change frequency feature are combined to obtain a visual feature vector. The visual feature vector is a multi-dimensional vector, with each dimension corresponding to the normalized value of each feature, which serves as the input data for calculating the visual saliency weight.

7. The method according to claim 6, characterized in that, The step of performing edge detection on the pixel data of the rendering data unit, extracting edge contours, and calculating the average gradient value of the edge contours as edge sharpness features includes: Gaussian blur is applied to the pixel data of the rendering data unit, and a Gaussian kernel function of a preset size is used to smooth the pixel data; The first-order partial derivative operator is applied to the smoothed and filtered pixel data to calculate the gradient components in the horizontal and vertical directions, generating the gradient intensity matrix and gradient direction matrix. The first-order partial derivative operator uses a convolution kernel with a preset structure. Non-maximum suppression is applied to the gradient intensity matrix to retain local maxima points along the gradient direction, generating a refined set of edge candidate points. A dual threshold is applied to the set of edge candidate points. A preset high threshold and a preset low threshold are set. Points above the preset high threshold are marked as strong edge points, and points between the preset high threshold and the preset low threshold and connected to strong edge points are marked as weak edge points. The dual thresholds are determined by statistical analysis of historical edge detection data. The strong edge points and weak edge points are combined to obtain a complete edge contour. The average gradient value of the edge contour is calculated as the edge sharpness feature. The average gradient value is obtained by dividing the sum of the gradient magnitudes of all pixels on the edge contour by the number of pixels. Outlier detection is performed on the edge sharpness feature. Statistical methods are used to identify outliers. When the edge sharpness feature value exceeds the set range determined by statistical laws, the outlier value is replaced by the statistical mean.

8. The method according to claim 1, characterized in that, The process involves performing component fusion rendering on the dominant component set and the background component set according to the layered rendering strategy. By adjusting the rendering channel parameters and resource loading priority of different layers, an optimized rendering parameter set containing color space conversion parameters and pixel blending modes is generated, including: Based on the layer priority sorting in the layered rendering strategy, the rendering order of the layers in the dominant component set and the background component set is rearranged to generate a new layer rendering sequence. In the new layer rendering sequence, the layer with the higher priority sorting will execute the rendering command first. Based on the new layer rendering sequence, an independent rendering channel is assigned to each layer, the channel buffer size and data transfer rate are set, and a rendering channel configuration table is generated. The rendering channel configuration table contains the correspondence between layer identifier, channel number, buffer size and data transfer rate, and the channel numbers are assigned sequentially according to the sequence order. Based on the rendering resource allocation ratio in the layered rendering strategy, the resource loading priority of each rendering channel is adjusted. The layer with the higher resource allocation ratio corresponds to a higher loading priority, and a resource loading priority list is generated. Color enhancement is applied to the layers in the dominant component set, adjusting the hue, saturation, and brightness parameters to generate color space conversion parameters. The color space conversion parameters include a conversion matrix and an offset. The conversion matrix is ​​a multi-dimensional matrix, and the offset is a multi-dimensional vector. Pixel blending is applied to the layers in the background component set, adjusting the blending factor and the order of operations to generate a pixel blending mode. The pixel blending mode includes a blending equation and a blending factor parameter. The blending equation combines the color values ​​of the source pixel and the target pixel through logical operators. The color space conversion parameters and the pixel blending mode are combined to form an optimized rendering parameter set. The consistency of each parameter in the parameter set is checked to see if the data type, value range and format of the parameters meet the requirements of the rendering engine. If there is a discrepancy, the parameter error information is recorded.

9. The method according to claim 8, characterized in that, The step of rearranging the rendering order of layers in the dominant component set and background component set according to the layer priority sorting in the layered rendering strategy to generate a new layer rendering sequence includes: The layer priority ranking information is extracted from the layered rendering strategy to obtain the priority score of each layer. The priority score is calculated by combining the visual saliency weight and the spatial distribution density. The comprehensive calculation method is achieved by weighted summation, and each weight is determined by training with historical rendering effect data. All layers in the dominant component set and background component set are sorted in descending order according to priority score to generate a preliminary sorting sequence. In the preliminary sorting sequence, the layers with higher priority scores are ranked first. When the priority scores are the same, they are sorted in ascending order according to the original drawing order index. Spatial overlap detection is performed on the layers in the preliminary sorting sequence to identify layer groups with overlapping drawing areas. The overlapping drawing areas are determined by comparing the drawing area coordinates of the layers. When the boundary areas of two layers intersect, they are judged as overlapping. Apply a depth-first sorting rule to the layers in the layer group, adjust the layer order in the overlapping area according to the original drawing order index of the layers, and ensure that the interactive function layer is located above the static display layer. The interactive function layer is determined by the interaction identifier in the resource interaction type. The adjusted layer group is re-inserted into the initial sorting sequence to generate a new layer rendering sequence that includes spatial overlap processing. The new layer rendering sequence ensures that layers with high visual saliency and interactive functions are drawn first, and the priority drawing is achieved by the earlier position in the sequence. The new layer rendering sequence is subjected to circular dependency detection. A topological sorting algorithm for directed graphs is used to check whether there are mutual dependencies between layers. When a circular dependency is detected, the dependency is removed and a dependency removal log is recorded.

10. A computer system, characterized in that, include: A memory, wherein a computer program is stored; A processor for loading the computer program to implement the display interface optimization method based on image rendering as described in any one of claims 1-9.