A dynamic data mapping method for multi-terminal display consistency
Patent Information
- Application Number
- CN202611386533.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-03
AI Technical Summary
在复杂显示内容中,现有技术缺乏基于终端显示特征、视觉元素属性以及实时显示环境的联合调整机制,导致不同终端之间显示内容难以保持文本尺寸、色彩边界及元素布局关系的一致性,导致视觉元素比例失衡和布局偏移。
By collecting the physical resolution of each terminal screen to generate a display reference grid, extracting the color space values of visual elements and text font size for size pre-compensation and color gamut boundary clipping, analyzing the relative alignment features and margin ratios between elements, adjusting the contrast in combination with the brightness environment value and performing sub-pixel smoothing correction, generating the final mapping frame and sending it to the terminal for rendering and display.
It achieves consistency in the size, color, and layout of visual elements across multiple terminals, reduces visual deviations caused by differences in display parameters, and improves the adaptive mapping and refined rendering effects of display data.
Smart Images

Figure CN123030147A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of dynamic display, more particularly, the present application relates to a dynamic data mapping method for multi-terminal display consistency. BACKGROUND
[0002] With the continuous development of mobile terminals, desktop terminals and intelligent display devices, the application demand of synchronously displaying the same business content between multiple terminals is increasing. In complex display content, visual elements not only contain size information, but also contain text size, color space and relative layout relationship between elements. The existing technology usually performs scaling processing on the overall page size, completes fixed mapping in the data generation stage, so that different terminals can complete basic display.
[0003] The existing technology has the following shortcomings: At present, in complex display content, there is a lack of dynamic mapping mechanism based on terminal display characteristics, visual element attributes and real-time display environment joint adjustment, which leads to difficulty in synchronously maintaining the consistency of text size, color boundary and element layout relationship when the display content is converted between different terminals, so that the scaled display result is prone to problems such as imbalance of visual element proportion, layout offset and decline of display effect. Therefore, a dynamic data mapping method for multi-terminal display consistency is proposed.
[0004] The above information disclosed in the background section is only used to enhance the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present application provide a dynamic data mapping method for multi-terminal display consistency, which solves the problems proposed in the above background technology by using a cooperative mapping mechanism of terminal display characteristic dynamic modeling, visual element attribute adaptive adjustment and display environment perception optimization.
[0006] To achieve the above-mentioned purpose, the present application provides the following technical scheme, a dynamic data mapping method for multi-terminal display consistency, comprising the following steps: Step S1: in response to a multi-terminal access request, collecting the screen physical resolution of each terminal, performing normalized scaling mapping on the screen physical resolution to generate a display reference grid of each terminal, and calculating the logical scaling step of each terminal based on the display reference grid; Step S2: obtaining original visual elements in the data source to be displayed, extracting color space values and text size of the original visual elements, performing size pre-compensation on the text size according to the logical scaling step, and performing color gamut boundary clipping in combination with the color space values to generate a terminal adaptation element set; Step S3: Perform layout constraint parsing on the terminal adaptation element set, extract the relative alignment features and margin ratios between elements, calculate the mapping position offset of each element in combination with the display reference grid, and generate a preliminary mapping frame. Step S4: Obtain the contrast of the initial mapping frame, collect the current brightness environment value of each terminal, adjust the contrast of the initial mapping frame using the current brightness environment value, perform sub-pixel smoothing correction on the mapping position offset, output the final mapping frame and send it to each terminal for rendering and display.
[0007] In a preferred embodiment, in step S1, in response to a multi-terminal access request, the screen physical resolution of each terminal is read, including the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction. By comparing the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction of each terminal, the maximum value is selected as the display reference size, and the horizontal reference size and the vertical reference size are obtained. The horizontal scaling ratio and vertical scaling ratio of the terminal are obtained by mapping the number of physical pixels in the screen's physical resolution to the horizontal reference size and the number of physical pixels in the vertical direction to the vertical reference size, respectively.
[0008] In a preferred embodiment, in step S1, for the physical pixel coordinates of any terminal, the two coordinate axes of the corresponding display reference grid that are the physical pixel coordinates are multiplied by the horizontal scaling ratio and the vertical scaling ratio respectively to obtain the horizontal coordinates and vertical coordinates of the physical pixel. After converting the horizontal and vertical coordinates of all physical pixels, they are aggregated into the display reference grid for the terminal. Based on the intervals between the display reference grids, calculate the horizontal and vertical logical scaling steps for each terminal.
[0009] In a preferred embodiment, in step S2, the original visual elements in the data source to be displayed are obtained. The original visual elements represent the visual content in the data source to be displayed that has not been adapted to the terminal. Read the color space value and text size of each original visual element from the data source to be displayed. The color space value represents the color position of the original visual element in the preset color space, and the text size represents the size of the text characters in the original visual element. Read the text font size of the original visual element, calculate the arithmetic mean of the horizontal and vertical logical scaling steps corresponding to each terminal to obtain the average logical scaling step, divide the text font size by the average logical scaling step to obtain the pre-compensated text display font size.
[0010] In a preferred embodiment, in step S2, after reading the color gamut boundary range of each terminal, color gamut boundary clipping is performed in conjunction with the color space values: Read the color space values corresponding to each original visual element and the color gamut boundary range corresponding to each terminal, and perform boundary judgment and boundary clipping on each color component of the color space value to make the clipped color space value within the color gamut boundary range of the corresponding terminal. The color space values after color gamut boundary clipping and the text font size after size pre-compensation are written together into the corresponding visual element display data to generate a terminal-adapted element set.
[0011] In a preferred embodiment, in step S3, the positional relationship of each element in the terminal adaptation element set is read to obtain the positional information of the left edge, right edge, top edge, bottom edge, width and height of the terminal adaptation element, and the relative alignment features between elements are calculated. For any two adjacent terminal adapter elements in the terminal adapter element set, calculate the horizontal and vertical spacing between the two terminal adapter elements to obtain the horizontal spacing distance and the vertical spacing distance. Divide the horizontal spacing by the average width of the two terminal adapter elements, and divide the vertical spacing by the average height of the two terminal adapter elements to obtain the horizontal margin ratio and the vertical margin ratio, respectively.
[0012] In a preferred embodiment, in step S3, the original layout position of the terminal adapter element is read, the original layout position is converted into coordinates in the display reference grid, and for any terminal adapter element, the relative alignment features of its adjacent terminal adapter elements are read. Based on the relative alignment features, the margin ratio is multiplied by the average width and height of the adjacent elements to obtain the target spacing. This is then superimposed onto the edge coordinates of the previous element to calculate the target position of the next element. The horizontal and vertical mapping position offsets are obtained by subtracting the original position from the target position. All elements are then recombined according to the target position to generate the initial mapping frame.
[0013] In a preferred embodiment, in step S4, the brightness values of all pixel positions in the preliminary mapping frame are counted to obtain the full frame brightness distribution of the preliminary mapping frame. The upper and lower brightness limits are determined from the brightness distribution of the initial mapped frame. The difference between the brightness value corresponding to the upper brightness limit and the brightness value corresponding to the lower brightness limit is calculated to obtain the contrast of the initial mapped frame. Collect the current ambient brightness value of each terminal, read the ambient brightness level corresponding to the current ambient brightness value, convert the ambient brightness level into an ambient brightness adjustment coefficient, and multiply the contrast ratio by the ambient brightness adjustment coefficient to obtain the target contrast ratio.
[0014] In a preferred embodiment, in step S4, after adjusting the brightness value according to the target contrast, the horizontal and vertical offset difference values of adjacent elements are compared in the arrangement order, and for elements with too large offset difference, the average of the offset of the current element and the previous element is taken as the correction value; The correction value is added to the target position to obtain a sub-pixel correction position, and then converted into physical pixel coordinates according to the logical scaling step and the decimal part is reserved as a sub-pixel offset for linear interpolation to obtain the final pixel position; All elements are re-filled into the frame to generate a final mapping frame, which is converted into terminal physical pixel coordinates and then packaged and delivered to the terminal for rendering and display.
[0015] Technical effects and advantages of the present application: The present application collects the physical resolution of each terminal screen and performs normalized scaling mapping to generate a display reference grid and a logical scaling step, extracts the color space value and text size of the original visual elements in the data source to be displayed, and performs size pre-compensation and color gamut boundary clipping, analyzes the relative alignment characteristics and margin ratio between elements to calculate the mapping position offset to generate a preliminary mapping frame, adjusts the contrast according to the preliminary mapping frame contrast and the current brightness environment value, and performs sub-pixel smoothing correction on the mapping position offset, improves the size, color and layout consistency of visual elements on multiple terminals, realizes adaptive mapping and fine rendering of display data, and reduces visual deviation caused by display parameter differences of different terminals. BRIEF DESCRIPTION OF DRAWINGS
[0016] Fig. 1 The present application is a dynamic data mapping method for multi-terminal display consistency.
[0017] Fig. 2 The present application is a dynamic data mapping method for multi-terminal display consistency. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0019] This invention generates a display reference grid and logical scaling step by collecting the physical resolution of each terminal screen and performing normalized scaling mapping. It extracts the color space values and text size of the original visual elements in the data source to be displayed and performs size pre-compensation and color gamut boundary clipping. It analyzes the relative alignment features and margin ratios between elements to calculate the mapping position offset and generate a preliminary mapping frame. It combines the contrast of the preliminary mapping frame with the current brightness environment value to perform contrast adjustment and performs sub-pixel smoothing correction on the mapping position offset. This improves the consistency of the size, color and layout of visual elements across multiple terminals and achieves adaptive mapping and refined rendering of display data.
[0020] Example 1, as Figs. 1-2 As shown, a dynamic data mapping method for display consistency across multiple terminals includes the following steps: Step S1: Respond to the multi-terminal access request, collect the screen physical resolution of each terminal, perform normalized scaling mapping on the screen physical resolution to generate the display reference grid of each terminal, and calculate the logical scaling step of each terminal based on the display reference grid. Step S2: Obtain the original visual elements from the data source to be displayed, extract the color space values and text font size of the original visual elements, perform size pre-compensation on the text font size according to the logical scaling step, perform color gamut boundary clipping in combination with the color space values, and generate a terminal-adapted element set; Step S3: Perform layout constraint parsing on the terminal adaptation element set, extract the relative alignment features and margin ratios between elements, calculate the mapping position offset of each element based on the display reference grid and relative alignment features, and generate a preliminary mapping frame. Step S4: Obtain the contrast of the initial mapping frame, collect the current brightness environment value of each terminal, adjust the contrast of the initial mapping frame using the current brightness environment value, perform sub-pixel smoothing correction on the mapping position offset, output the final mapping frame and send it to each terminal for rendering and display.
[0021] The specific implementation is as follows: In step S1, in response to the multi-terminal access request, the screen physical resolution of each terminal is read. The screen physical resolution is obtained from the display device parameters read when the terminal accesses the device, including the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction of the screen, which is used to represent the pixel matrix size that the terminal can actually use to display images.
[0022] Read the physical resolution of the screen of all connected terminals, compare the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction of each terminal, select the maximum value as the display reference size, and obtain the horizontal reference size and the vertical reference size.
[0023] For any terminal, the number of physical pixels in the horizontal direction of the screen physical resolution is proportionally mapped to the horizontal reference size; the number of physical pixels in the vertical direction is proportionally mapped to the vertical reference size, so as to obtain the horizontal scaling ratio and the vertical scaling ratio of the terminal respectively.
[0024] Specifically, calculate the horizontal scaling ratio and the vertical scaling ratio of any terminal: ; ; in, Indicates the terminal number; Indicates the first The number of physical pixels in the horizontal direction of each terminal; Indicates the first The number of physical pixels in the vertical direction of each terminal; Indicates a common horizontal reference dimension; Indicates a common vertical reference dimension; Indicates the first The horizontal scaling ratio of each terminal; Indicates the first Vertical scaling ratio of each terminal.
[0025] The horizontal scaling ratio and the vertical scaling ratio reflect the correspondence between the number of physical pixels on the terminal and the common display reference size, respectively.
[0026] Based on the aforementioned horizontal and vertical scaling ratios, the physical pixel coordinates on the terminal screen are converted into coordinates in the display reference grid. Specifically, for any terminal's physical pixel coordinates, the corresponding coordinates in the display reference grid are obtained by multiplying the two axes of the physical pixel coordinates by the horizontal and vertical scaling ratios, respectively, to obtain the horizontal and vertical coordinates of the physical pixel.
[0027] After converting the horizontal and vertical coordinates of all physical pixels, they are aggregated into a display reference grid for the terminal, representing the display position of the physical pixels on the terminal screen under a common display reference size.
[0028] The logical scaling step size for each terminal is calculated based on the display reference grid. The logical scaling step size represents the interval between adjacent physical pixels on the terminal screen in a unified logical display coordinate system.
[0029] Specifically, based on the intervals between the display reference grids, the horizontal and vertical logical scaling steps for each terminal are calculated respectively: ; ; in, Indicates the first The horizontal logical scaling step size of each terminal; Indicates the first The vertical logical scaling step size of each terminal; and These represent the coordinates in the display reference grid corresponding to adjacent horizontal physical pixels; and These represent the coordinates in the display reference grid corresponding to adjacent vertical physical pixels.
[0030] The horizontal logical scaling step size reflects the horizontal spacing between adjacent physical pixels on the terminal screen in the unified logical display coordinates; the vertical logical scaling step size reflects the vertical spacing between adjacent physical pixels on the terminal screen in the unified logical display coordinates.
[0031] In step S2, the original visual elements in the data source to be displayed are obtained. The original visual elements represent the visual content in the data source to be displayed that has not been adapted to the terminal.
[0032] The data source to be displayed is predetermined based on the actual display business and consists of raw data content that needs to be displayed synchronously to multiple terminals, including text, graphics, images, and other visual content with color and position attributes.
[0033] Specifically, the color space value and text size of each original visual element are read from the data source to be displayed. The color space value represents the color position of the original visual element in the preset color space; the text size represents the size of the text characters in the original visual element.
[0034] Based on the logical scaling step size of each terminal, size pre-compensation is performed on the text font size in the original visual elements. Size pre-compensation is used to pre-adjust the display size of text characters according to the size correspondence between terminal display pixels and unified logical coordinates, so that the display size of the same text element remains consistent on different terminals.
[0035] Read the text font size of the original visual elements, calculate the arithmetic mean of the horizontal and vertical logical scaling steps corresponding to each terminal, and obtain the average logical scaling step. Divide the text font size by the average logical scaling step to obtain the pre-compensated text display font size, which is used as the size of the text element when displayed on the terminal.
[0036] Color space values are combined to perform gamut boundary clipping. Gamut boundary clipping is used to limit the color space values of the original visual elements to the color gamut range that each terminal can display, so as to avoid color distortion caused by the color components of the original visual elements exceeding the display capabilities of the terminal.
[0037] Specifically, the display capability parameters corresponding to each terminal are read. These parameters are provided by each terminal when it connects to the network, including the color space type supported by the terminal display screen, the display range of each color component, and the conversion relationship between color spaces.
[0038] For any terminal, read the color space type in the corresponding display capability parameters, determine the corresponding color gamut boundary range based on the color space type, and use the color gamut boundary range to limit the color space area that the terminal can display.
[0039] After reading the color gamut boundary range of each terminal, color gamut boundary clipping is performed in combination with color space values.
[0040] Specifically, the color space values corresponding to each original visual element and the color gamut boundary range corresponding to each terminal are read. For any original visual element, each color component in its color space value is read and compared with the allowable range of the corresponding color component in the terminal color gamut boundary range to determine whether the color component is within the terminal color gamut boundary range.
[0041] When all color components in the color space are within the corresponding color gamut boundary range, the color space value of the original visual element remains unchanged, and the color space value of the original visual element is directly used as the color space value corresponding to the terminal.
[0042] When any color component of a color space value exceeds the boundary of the corresponding terminal color gamut, boundary clipping is performed. When the color component is less than the lower boundary of the corresponding color gamut boundary, the color component is adjusted to the corresponding lower boundary value; when the color component is greater than the upper boundary of the corresponding color gamut boundary, the color component is adjusted to the corresponding upper boundary value; when the color component is between the lower and upper boundary values of the corresponding color gamut boundary, the color component remains unchanged.
[0043] Boundary judgment and boundary clipping are performed on each color component of the color space value to ensure that the clipped color space value is always within the color gamut boundary of the corresponding terminal.
[0044] The color space value after gamut boundary clipping reflects the color of the original visual element within the displayable color gamut of the current terminal. The greater the difference between the color space value and the original visual element's color space value, the greater the extent to which the color of the original visual element exceeds the displayable color gamut of the terminal.
[0045] The color space values after color gamut boundary clipping and the text font size after size pre-compensation are written together into the corresponding visual element display data to generate a terminal-adapted element set.
[0046] The terminal-adapted element set is used to represent a set of visual elements after text size pre-compensation and color gamut boundary clipping.
[0047] It should be noted that the preset color space is predetermined based on the color expression requirements of unified processing of multi-terminal display data. A color space that can be used to represent both the original visual element colors and the color gamut boundaries of each terminal display is selected as the unified color expression space, and the color components and the value range of each color component in the color space are predetermined. The visual element display data is predefined according to the display requirements of the terminal adaptation elements. It consists of the color space value corresponding to the terminal adaptation element, the text display font size, the element size, the target position, and the mapping position offset, and is stored in a unified data field order.
[0048] In step S3, layout constraint parsing is performed on the terminal adapter element set. Layout constraint parsing is used to read the spatial relationship between each terminal adapter element and determine the arrangement constraints of each terminal adapter element in the display reference grid.
[0049] Specifically, the positional relationships of each element in the terminal adaptation element set are read to obtain the positional information of the left edge, right edge, top edge, bottom edge, width, and height of the terminal adaptation element, and the relative alignment features and margin ratio between elements are calculated.
[0050] Relative alignment features are used to represent the horizontal alignment, vertical alignment, and relative positional relationships between adjacent elements; margin ratio is used to represent the proportional relationship between the spacing between adjacent elements and the size of the corresponding element.
[0051] For any two adjacent terminal adapter elements, calculate the horizontal and vertical spacing between the two terminal adapter elements to obtain the horizontal spacing distance and the vertical spacing distance.
[0052] Divide the horizontal spacing by the average width of the two terminal adapter elements; divide the vertical spacing by the average height of the two terminal adapter elements to obtain the horizontal margin ratio and the vertical margin ratio, respectively.
[0053] The horizontal margin ratio and the vertical margin ratio together constitute the margin ratio between elements.
[0054] After calculating the margin ratio between elements, the horizontal and vertical alignment relationships of adjacent elements are further determined.
[0055] Specifically, the position information of the left edge, right edge, top edge, and bottom edge of any two adjacent terminal adapter elements is read, and the difference between the corresponding edge positions of the two adjacent terminal adapter elements is calculated.
[0056] For horizontal alignment, the left and right edge positions of the two terminal adaptation elements are compared respectively. When the difference between the left edge positions of the two terminal adaptation elements is within the preset position matching range, the two terminal adaptation elements are determined to be horizontally aligned on the left edge; when the difference between the right edge positions of the two terminal adaptation elements is within the preset position matching range, the two terminal adaptation elements are determined to be horizontally aligned on the right edge.
[0057] It should be noted that the preset position matching range is determined in advance based on the coordinate resolution capability of the display reference grid and the position error allowed by the element layout. The maximum coordinate difference allowed between the corresponding edge positions or center positions of adjacent terminal adaptation elements is used as the preset position matching range.
[0058] Furthermore, the average values of the left and right edge positions of the two terminal adaptation elements are calculated to obtain the horizontal center position. The difference between the two horizontal center positions is calculated, and the absolute value is taken as the horizontal center position difference. When the horizontal center position difference is within the preset position matching range, the two terminal adaptation elements are determined to be horizontally center aligned.
[0059] For vertical alignment, the top and bottom edge positions of the two terminal adaptation elements are compared respectively. When the difference between the top edge positions of the two terminal adaptation elements is within the preset position matching range, the two terminal adaptation elements are determined to be vertically aligned at the top edge; when the difference between the bottom edge positions of the two terminal adaptation elements is within the preset position matching range, the two terminal adaptation elements are determined to be vertically aligned at the bottom edge.
[0060] Calculate the average of the top and bottom edge positions of the two terminal adaptation elements to obtain the vertical center position. Calculate the difference between the two vertical center positions and take the absolute value as the vertical center position difference. When the vertical center position difference is within the preset position matching range, the two terminal adaptation elements are determined to be vertically center aligned.
[0061] For any two adjacent terminal adapter elements, their horizontal edge alignment relationship, center alignment relationship, and vertical edge alignment relationship and center alignment relationship are obtained respectively. The relative alignment features between the two terminal adapter elements are formed by combining the relative positional relationship between the two terminal adapter elements.
[0062] Relative alignment features are used to describe the spatial arrangement constraints between adjacent terminal adapter elements.
[0063] It should be noted that the difference in horizontal center position represents the distance between the horizontal center positions of two terminal adapter elements; the difference in vertical center position represents the distance between the vertical center positions of two terminal adapter elements.
[0064] Based on the display reference grid and relative alignment features, the mapping position offset of each element is calculated. The mapping position offset is used to represent the positional difference between the target position of the terminal adaptation element in the unified logical display coordinates and its original layout position.
[0065] Specifically, the original layout position of the terminal adapter element is read, and the original layout position is converted into coordinates in the display reference grid. For any terminal adapter element, the relative alignment features of its adjacent terminal adapter elements are read, and the horizontal or vertical position of the terminal adapter element relative to the adjacent terminal adapter elements is determined based on the relative alignment features.
[0066] For horizontally arranged adjacent terminal adapter elements, multiply the horizontal margin ratio by the average width of the two elements to obtain the target horizontal spacing; add the target horizontal spacing to the right edge position of the previous terminal adapter element to obtain the target left edge horizontal coordinate of the next terminal adapter element.
[0067] For vertically arranged adjacent terminal adapter elements, multiply the vertical margin ratio by the average height of the two elements to obtain the target vertical spacing; add the target vertical spacing to the lower edge position of the previous terminal adapter element to obtain the target upper edge ordinate of the next terminal adapter element.
[0068] The target position is determined by the x-coordinate of the left edge of the target and the y-coordinate of the top edge of the target.
[0069] It should be noted that the target horizontal spacing is used to determine the horizontal coordinate of the left edge of the target of the next element; the target vertical spacing is used to determine the vertical coordinate of the top edge of the target of the next element; the target position reflects the logical display position that the terminal adaptation element should be in after being rearranged according to the display reference grid, relative alignment features and margin ratio.
[0070] Subtract the x and y coordinates of the original layout position of the terminal adaptation element from the x and y coordinates of the target position to obtain the mapping position offset of each element in the horizontal and vertical directions.
[0071] The mapping position offset is used to characterize the degree of adjustment of each terminal adaptation element relative to the original layout position.
[0072] The color space values, pre-compensated text font size, element size, target position, and mapping position offset of each terminal adaptation element are combined, and the terminal adaptation elements are rearranged according to the spatial order in the display reference grid to generate a preliminary mapping frame.
[0073] Each terminal adaptation element in the initial mapping frame adopts the adaptation attributes from the terminal adaptation element set and is arranged according to the target position.
[0074] In step S4, the brightness values corresponding to each pixel position in the preliminary mapping frame are read, the brightness distribution of the preliminary mapping frame is statistically analyzed based on the brightness values of each pixel position, and the contrast of the preliminary mapping frame is determined based on the brightness distribution. The contrast is used to reflect the brightness difference between the bright and dark areas in the preliminary mapping frame.
[0075] Specifically, the upper and lower brightness limits are determined from the brightness distribution of the initial mapped frame. The difference between the brightness value corresponding to the upper brightness limit and the brightness value corresponding to the lower brightness limit is calculated to obtain the contrast of the initial mapped frame.
[0076] It should be noted that the upper and lower limits of brightness are determined based on representative bright and dark areas in the brightness distribution to avoid individual abnormal bright or dark spots having an excessive impact on the contrast calculation results.
[0077] The current ambient brightness value of each terminal is collected. The current ambient brightness value is collected by the ambient light detector set on the corresponding terminal. The ambient light detector converts the light intensity of the current environment of the terminal into readable ambient brightness data.
[0078] The current ambient brightness value reflects the degree to which the terminal display area is affected by external ambient light.
[0079] When collecting the current brightness environment value, the current brightness environment value is associated with the terminal identifier of the corresponding terminal, so that each terminal corresponds to a current brightness environment value, and the current brightness environment value is associated with the preliminary mapping frame according to the terminal identifier.
[0080] Read the ambient brightness level corresponding to the current ambient brightness value, convert the ambient brightness level into an ambient brightness adjustment coefficient, and multiply the contrast ratio by the ambient brightness adjustment coefficient to obtain the target contrast ratio.
[0081] It should be noted that the ambient brightness adjustment coefficient is a preset positive real number, and its value is greater than zero. When the ambient brightness is high, this coefficient is greater than 1, which is used to enhance the contrast to compensate for the decrease in readability caused by ambient light. When the ambient brightness is low, this coefficient is less than 1 and greater than 0, which is used to reduce the contrast to avoid excessive brightness and glare. The coefficients corresponding to each ambient brightness level are pre-stored in the terminal configuration table. The target contrast ratio reflects the brightness difference that the initial mapping frame needs to maintain under the current brightness environment. The ambient brightness adjustment coefficient reflects the degree of adjustment of the display contrast under the current brightness environment.
[0082] After determining the target contrast, the difference between the target contrast and the contrast of the initial mapping frame is calculated to obtain the contrast adjustment amount. The contrast adjustment amount reflects the degree of brightness difference correction that needs to be performed on the initial mapping frame.
[0083] Determine whether the contrast of the initial mapping frame is zero: if the contrast is zero, it indicates that the current image is a uniform brightness image, no adjustment is needed, and the contrast adjustment is skipped directly, keeping the brightness value of each pixel unchanged; if the contrast is not zero, the target contrast is divided by the contrast to obtain the proportional adjustment coefficient.
[0084] Read the brightness values of all pixel positions in the initial mapping frame and calculate the average brightness of all pixel positions to obtain the average brightness of the initial mapping frame. For any pixel position in the initial mapping frame, perform a difference operation between the brightness value of that pixel position and the average brightness of the initial mapping frame to obtain the brightness deviation.
[0085] Multiply the brightness deviation by the aforementioned proportional adjustment coefficient and add it to the average brightness of the initial mapped frame to obtain the adjusted brightness value.
[0086] After completing the brightness adjustment, the target position, color space value, and pre-compensated text font size of each terminal adaptation element in the initial mapping frame are kept unchanged to obtain the initial mapping frame after contrast adjustment.
[0087] After completing the contrast adjustment, read the mapping position offset corresponding to each terminal adaptation element. The mapping position offset includes the horizontal mapping position offset and the vertical mapping position offset.
[0088] According to the arrangement order of the terminal adaptation elements in the initial mapping frame, the mapping position offsets of adjacent terminal adaptation elements are compared. For the horizontal direction, the horizontal mapping position offsets of adjacent terminal adaptation elements are read, and the difference between the horizontal mapping position offset of the next terminal adaptation element and the horizontal mapping position offset of the previous terminal adaptation element is calculated to obtain the horizontal offset difference. For the vertical direction, the vertical mapping position offsets of adjacent terminal adaptation elements are read, and the difference between the vertical mapping position offset of the next terminal adaptation element and the vertical mapping position offset of the previous terminal adaptation element is calculated to obtain the vertical offset difference.
[0089] Horizontal offset difference reflects the degree of positional adjustment of adjacent terminal adapter elements in the horizontal direction; vertical offset difference reflects the degree of positional adjustment of adjacent terminal adapter elements in the vertical direction.
[0090] The subpixel smoothing correction result for the mapping position offset is determined based on the horizontal and vertical offset differences.
[0091] Specifically, a one-way sequential weighting process is applied to the mapping position offsets of adjacent terminal adapter elements. This ensures that the horizontal mapping position offset of the current terminal adapter element is constrained by the horizontal mapping position offset of the previous terminal adapter element, and the vertical mapping position offset of the current terminal adapter element is also constrained by the vertical mapping position offset of the previous terminal adapter element. When the horizontal offset difference between the current and previous terminal adapter elements is large, the difference is reduced; when the vertical offset difference is large, the difference is reduced. For adjacent terminal adapter elements with small horizontal and vertical offset differences, their original mapping position offsets are retained to avoid redundant adjustments to terminal adapter elements that already meet layout constraints.
[0092] The subpixel smoothing correction result for the mapping position offset is determined based on the horizontal and vertical offset differences.
[0093] Specifically, for any terminal adapter element, its horizontal mapping position offset and the horizontal mapping position offset of the previous terminal adapter element are read, the difference between the two is calculated and the absolute value is taken to obtain the horizontal offset difference; the vertical mapping position offset and the vertical mapping position offset of the previous terminal adapter element are read to obtain the vertical offset difference.
[0094] To prevent drastic changes in the position adjustments of adjacent elements, a one-way sequential smoothing process is performed on the mapping position offset: the horizontal mapping position offset of the current terminal-adapted element is arithmetically averaged with the horizontal mapping position offset of the previous terminal-adapted element to obtain the corrected horizontal mapping position offset; similarly, the vertical mapping position offset is arithmetically averaged to obtain the corrected vertical mapping position offset.
[0095] The corrected horizontal mapping position offset and the corrected vertical mapping position offset are respectively superimposed on the target position of the corresponding terminal adapter element to obtain the sub-pixel corrected position.
[0096] The subpixel correction position reflects the final display position of the terminal adaptation element after adjacent position constraints. The larger the difference between the subpixel correction position and the original target position, the greater the position correction amount of the terminal adaptation element.
[0097] The subpixel correction positions are converted into physical pixel coordinates according to the logical scaling step size corresponding to each terminal. The decimal part of the conversion result is retained as the subpixel offset. The display positions of adjacent pixels of the terminal adaptation elements are then linearly interpolated based on the subpixel offset to obtain the corrected pixel positions. The terminal adaptation elements are then recombined into the preliminary mapping frame after contrast adjustment according to the corrected pixel positions to generate the final mapping frame.
[0098] After generating the final mapping frame, the display reference grid coordinates in the final mapping frame are converted inversely to the physical pixel coordinates of the corresponding terminal based on the screen physical resolution and logical scaling step of each terminal. The pixel data of the final mapping frame is then arranged and encapsulated according to the display data format corresponding to the terminal. After encapsulation, the final mapping frames for each terminal are sent to their respective terminals. The terminals read the pixel data and display position parameters from the final mapping frame and perform rendering and display according to the pixel positions determined by the final mapping frame, thus completing dynamic data mapping for consistent display across multiple terminals.
[0099] It should be noted that the ambient light detector is pre-selected according to the terminal's ambient brightness acquisition accuracy requirements. It is a photoelectric detection device with light intensity detection capability and output data that can be converted into ambient brightness values. The ambient brightness level is pre-divided according to the brightness variation range of the actual use environment of the terminal. The current brightness ambient value that the ambient light detector can detect is segmented according to continuous brightness intervals. Each brightness interval corresponds to an ambient brightness level, and a corresponding ambient brightness adjustment coefficient is configured for each ambient brightness level.
[0100] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0101] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0102] In this document, the singular forms “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that terms such as “comprising / including” or “having” specify the presence of the stated features, integrals, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integrals, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0103] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0104] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A dynamic data mapping method for display consistency across multiple terminals, characterized in that: Includes the following steps: Step S1: Respond to the multi-terminal access request, collect the screen physical resolution of each terminal, perform normalized scaling mapping on the screen physical resolution to generate the display reference grid of each terminal, and calculate the logical scaling step of each terminal based on the display reference grid. Step S2: Obtain the original visual elements from the data source to be displayed, extract the color space values and text font size of the original visual elements, perform size pre-compensation on the text font size according to the logical scaling step, perform color gamut boundary clipping in combination with the color space values, and generate a terminal-adapted element set; Step S3: Perform layout constraint parsing on the terminal adaptation element set, extract the relative alignment features and margin ratios between elements, calculate the mapping position offset of each element in combination with the display reference grid, and generate a preliminary mapping frame. Step S4: Obtain the contrast of the initial mapping frame, collect the current brightness environment value of each terminal, adjust the contrast of the initial mapping frame using the current brightness environment value, perform sub-pixel smoothing correction on the mapping position offset, output the final mapping frame and send it to each terminal for rendering and display.
2. The dynamic data mapping method for multi-terminal display consistency according to claim 1, characterized in that: In step S1, in response to the multi-terminal access request, the screen physical resolution of each terminal is read, including the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction. By comparing the number of physical pixels in the horizontal direction and the number of physical pixels in the vertical direction of each terminal, the maximum value is selected as the display reference size, and the horizontal reference size and the vertical reference size are obtained. The horizontal scaling ratio and vertical scaling ratio of the terminal are obtained by mapping the number of physical pixels in the screen's physical resolution to the horizontal reference size and the number of physical pixels in the vertical direction to the vertical reference size, respectively.
3. The dynamic data mapping method for multi-terminal display consistency according to claim 2, characterized in that: In step S1, for the physical pixel coordinates of any terminal, the two coordinate axes of the corresponding display reference grid that are the physical pixel coordinates are multiplied by the horizontal scaling ratio and the vertical scaling ratio respectively to obtain the horizontal coordinates and vertical coordinates of the physical pixel. After converting the horizontal and vertical coordinates of all physical pixels, they are aggregated into the display reference grid for the terminal. Based on the intervals between the display reference grids, calculate the horizontal and vertical logical scaling steps for each terminal.
4. The dynamic data mapping method for multi-terminal display consistency according to claim 1, characterized in that: In step S2, the original visual elements in the data source to be displayed are obtained. The original visual elements represent the visual content in the data source to be displayed that has not been adapted to the terminal. Read the color space value and text size of each original visual element from the data source to be displayed. The color space value represents the color position of the original visual element in the preset color space, and the text size represents the size of the text characters in the original visual element. Read the text font size of the original visual element, calculate the arithmetic mean of the horizontal and vertical logical scaling steps corresponding to each terminal to obtain the average logical scaling step, divide the text font size by the average logical scaling step to obtain the pre-compensated text display font size.
5. The dynamic data mapping method for multi-terminal display consistency according to claim 4, characterized in that: In step S2, after reading the color gamut boundary range of each terminal, color gamut boundary clipping is performed in conjunction with the color space values: Read the color space values corresponding to each original visual element and the color gamut boundary range corresponding to each terminal, and perform boundary judgment and boundary clipping on each color component of the color space value to make the clipped color space value within the color gamut boundary range of the corresponding terminal. The color space values after color gamut boundary clipping and the text font size after size pre-compensation are written together into the corresponding visual element display data to generate a terminal-adapted element set.
6. The dynamic data mapping method for multi-terminal display consistency according to claim 1, characterized in that: In step S3, the positional relationship of each element in the terminal adaptation element set is read to obtain the positional information of the left edge, right edge, top edge, bottom edge, width and height of the terminal adaptation element, and the relative alignment features between elements are calculated. For any two adjacent terminal adapter elements in the terminal adapter element set, calculate the horizontal and vertical spacing between the two terminal adapter elements to obtain the horizontal spacing distance and the vertical spacing distance. Divide the horizontal spacing by the average width of the two terminal adapter elements, and divide the vertical spacing by the average height of the two terminal adapter elements to obtain the horizontal margin ratio and the vertical margin ratio, respectively.
7. A dynamic data mapping method for multi-terminal display consistency according to claim 6, characterized in that: In step S3, the original layout position of the terminal adapter element is read and converted into coordinates in the display reference grid. For any terminal adapter element, the relative alignment features of its adjacent terminal adapter elements are read. Based on the relative alignment features, the margin ratio is multiplied by the average width and height of the adjacent elements to obtain the target spacing. This is then superimposed onto the edge coordinates of the previous element to calculate the target position of the next element. The horizontal and vertical mapping position offsets are obtained by subtracting the original position from the target position. All elements are then recombined according to the target position to generate the initial mapping frame.
8. A dynamic data mapping method for multi-terminal display consistency according to claim 1, characterized in that: In step S4, the brightness values of all pixel positions in the preliminary mapping frame are counted to obtain the full frame brightness distribution of the preliminary mapping frame; The upper and lower brightness limits are determined from the brightness distribution of the initial mapped frame. The difference between the brightness value corresponding to the upper brightness limit and the brightness value corresponding to the lower brightness limit is calculated to obtain the contrast of the initial mapped frame. Collect the current ambient brightness value of each terminal, read the ambient brightness level corresponding to the current ambient brightness value, convert the ambient brightness level into an ambient brightness adjustment coefficient, and multiply the contrast ratio by the ambient brightness adjustment coefficient to obtain the target contrast ratio.
9. A dynamic data mapping method for multi-terminal display consistency according to claim 8, characterized in that: In step S4, after adjusting the brightness value according to the target contrast, the horizontal and vertical offset differences of adjacent elements are compared in the order of arrangement. For elements with large differences in adjacent offsets, the offsets of the current element and the previous element are added together and the average value is taken as the correction value. The correction value is superimposed on the target position to obtain the sub-pixel correction position. Then, it is converted into physical pixel coordinates according to the logical scaling step and the decimal part is retained as the sub-pixel offset for linear interpolation to obtain the final pixel position. All elements are refilled into the frame to generate the final mapped frame, which is then converted in reverse to the physical pixel coordinates of each terminal before being packaged and sent to the terminal for rendering and display.
