Data display processing method, device, computer equipment and storage medium

By adjusting the frame buffer, display area and screen density of the display device, resolution switching is achieved, which solves the high cost problem caused by hardware replacement in resolution switching of terminal devices, reduces service costs and improves switching efficiency.

CN113835651BActive Publication Date: 2025-07-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010586726.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2025-07-22
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

In the prior art, terminal devices need to replace hardware during resolution switching, resulting in high service costs.

Method used

By obtaining resolution switching requests, adjust the frame buffer, display area and screen density of the display device to achieve resolution switching without changing hardware.

Benefits of technology

Reduces the service cost of terminal devices, improves the efficiency and user experience of resolution switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835651B_ABST
    Figure CN113835651B_ABST
Patent Text Reader

Abstract

The present application relates to a data display processing method, apparatus, computer device, and storage medium. The method includes: obtaining a resolution switching request, where the resolution switching request carries the current resolution and the target resolution of a display device; adjusting a frame buffer corresponding to the display device, as well as the current display area and the current screen density of the display device according to the resolution switching request to obtain an adjusted frame buffer and an adjusted display device; switching the current resolution to the target resolution according to the resolution switching request; during the resolution switching process, adjusting display data in the adjusted frame buffer according to the target resolution; and after the resolution switching is completed, displaying the adjusted display data on the display device after the resolution switching. Using this method can reduce the service cost of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a data display processing method, apparatus, computer device, and storage medium. Background Art

[0002] With the development of the Internet, the processing power and storage capacity of terminals have also developed rapidly. More and more people use terminals for diverse activities such as entertainment, reading, and office work. To meet the diverse needs of users for terminal display services, it is necessary to adjust the resolution of the display device. Currently, some terminal screens support multiple resolutions and can switch between them. In the traditional method, switching between multiple resolutions is achieved by replacing corresponding hardware in the terminal, resulting in a relatively high service cost for the terminal device. Therefore, how to reduce the service cost of terminal devices has become a technical problem to be solved currently. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a data display processing method, apparatus, computer device, and storage medium that can reduce the service cost of terminal devices.

[0004] A data display processing method, the method comprising:

[0005] Obtain a resolution switching request, the resolution switching request carrying the current resolution and the target resolution of the display device;

[0006] Adjust the frame buffer corresponding to the display device, as well as the current display area and the current screen density of the display device according to the resolution switching request, to obtain an adjusted frame buffer and an adjusted display device;

[0007] Switch the current resolution to the target resolution according to the resolution switching request;

[0008] During the resolution switching process, adjust the display data in the adjusted frame buffer according to the target resolution;

[0009] After the resolution switching is completed, display the adjusted display data on the display device after the resolution switching.

[0010] In one embodiment, the adjusting the frame buffer of the display device, the current display area and the current screen density of the display device according to the resolution switching request includes:

[0011] Call a first interface and a second interface according to the resolution switching request;

[0012] Adjust the frame buffer of the display device according to the target resolution through the first interface;

[0013] Adjust the current display area and the current screen density of the display device according to the target resolution and the current resolution through the second interface.

[0014] In one embodiment, the adjusting the frame buffer of the display device according to the target resolution through the first interface includes:

[0015] Obtain the resolution of the frame buffer of the display device through the first interface;

[0016] Adjust the resolution of the frame buffer to the target resolution.

[0017] In one embodiment, the adjusting the current display area and the current screen density of the display device according to the target resolution through the second interface includes:

[0018] Determine the target display area size of the display device according to the target resolution through the second interface;

[0019] Adjust the current display area according to the target display area size, and adjust the current screen density of the display device to the target screen density corresponding to the target resolution.

[0020] In one embodiment, the method further includes:

[0021] During the resolution switching process, call the transition layer through the resolution switching request, and cover the scaling process of the display data through the transition layer;

[0022] When the resolution switching is completed, hide the transition layer.

[0023] In one embodiment, before obtaining the resolution switching request, the method further includes:

[0024] Traverse the display configuration information of the display device;

[0025] Obtain multiple resolutions corresponding to the display device from the display configuration information;

[0026] Determine the current resolution of the display device from multiple resolutions according to the preset configuration information.

[0027] In one embodiment, the method further includes:

[0028] Receive the default setting operation of the target resolution;

[0029] When the terminal is restarted after being shut down, recognize the default setting operation, and use the target resolution as the default resolution of the display device according to the default setting operation.

[0030] A data display processing device, the device comprising:

[0031] An acquisition module, configured to acquire a resolution switching request, where the resolution switching request carries the current resolution and the target resolution of the display device;

[0032] A first adjustment module, configured to adjust the frame buffer corresponding to the display device, as well as the current display area and the current screen density of the display device according to the resolution switching request, to obtain an adjusted frame buffer and an adjusted display device;

[0033] A switching module, configured to switch the current resolution to the target resolution according to the resolution switching request;

[0034] A second adjustment module, configured to adjust the display data in the adjusted frame buffer according to the target resolution during the resolution switching process;

[0035] A display module, configured to display the adjusted display data on the display device after the resolution switching is completed.

[0036] A computer device, comprising a memory and a processor, where the memory stores a computer program that can run on the processor, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0037] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0038] The above data display processing method, device, computer device and storage medium adjust the frame buffer corresponding to the display device, as well as the current display area size and current screen density of the display device according to the resolution switching request, so as to obtain an adjusted frame buffer and an adjusted display device. Switch the current resolution to the target resolution according to the resolution switching request. During the resolution switching process, adjust the display data in the adjusted frame buffer according to the target resolution. After the resolution switching is completed, display the adjusted display data on the display device after the resolution switching. When performing resolution switching, there is no need to replace hardware, and only need to adjust the frame buffer corresponding to the display device, the current display area of the display device and the current screen density to achieve subsequent resolution switching. Furthermore, during the resolution switching process, adjust the display data to be displayed according to the target resolution. It can effectively reduce the service cost of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 FIG. is an application environment diagram of the data display processing method in an embodiment;

[0040] Figure 2 FIG. is a schematic flowchart of the data display processing method in an embodiment;

[0041] Figure 3 FIG. is a schematic flowchart of the step of adjusting the frame buffer of the display device, the current display area of the display device and the current screen density according to the resolution switching request in an embodiment;

[0042] Figure 4 FIG. is a structural block diagram of the data display processing device in an embodiment;

[0043] Figure 5 FIG. is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] The data display processing method provided by the present application can be applied to, for example Figure 1In the application environment shown, the terminal 102 includes a display device 104. The terminal 102 obtains a resolution switching request, and the resolution switching request carries the current resolution and the target resolution of the display device. The terminal 102 adjusts the frame buffer corresponding to the display device, as well as the current display area size and the current screen density of the display device 104 according to the resolution switching request, so as to obtain an adjusted frame buffer and an adjusted display device 104. The terminal 102 switches the current resolution to the target resolution according to the resolution switching request. During the resolution switching process, the terminal 102 adjusts the display data in the adjusted frame buffer according to the target resolution. After the resolution switching is completed, the terminal 102 displays the adjusted display data on the display device 104 after the resolution switching. Among them, the terminal 102 can be but is not limited to various personal computers, laptop computers, smart phones and tablet computers. The display device 104 can be a display screen on the terminal 102 that can display content.

[0046] In one embodiment, as Figure 2 shown, a data display processing method is provided. Taking the terminal in Figure 1 as an example, the method includes the following steps:

[0047] Step 202: Obtain a resolution switching request, where the resolution switching request carries the current resolution and the target resolution of the display device.

[0048] When the terminal starts up, it will traverse the display configuration information of the registered display devices. The display configuration information may include information such as screen width, screen length, screen density, and resolution. Identify whether the terminal supports multiple resolutions in the display configuration information of the registered display devices. Resolution refers to the number of pixel points in the horizontal and vertical directions, with the unit of px, and 1 px represents 1 pixel point. The resolution can be represented by the product of the number of vertical pixel points and the number of horizontal pixel points. For example, 1920 px * 1080 px. When the terminal supports multiple resolutions, it can switch between resolutions. For example, the terminal can support two resolutions, QHD+ (Quarter High Definition, one-fourth of FHD 1920*1080) and FHD+ (Full High Definition, full high definition 1920*1080). After the terminal starts up, it can determine the current resolution among multiple resolutions according to the preset configuration information. The terminal can display the data to be displayed on the display device according to the current resolution. When the terminal receives a resolution switching request, it parses the resolution switching request to obtain the current resolution and the target resolution of the display device. The target resolution is the resolution to be switched to. The target resolution can be greater than the current resolution or less than the current resolution. For example, when the terminal's battery power is low or power consumption needs to be saved, the target resolution can be less than the current resolution to save power consumption. Another example is that when the terminal needs to improve the screen clarity, the target resolution can be greater than the current resolution.

[0049] Step 204, adjust the frame buffer corresponding to the display device, as well as the current display area size and the current screen density of the display device according to the resolution switching request, to obtain the adjusted frame buffer and the adjusted display device.

[0050] The terminal calls a preset thread according to the resolution switching request. The preset thread can be surfaceflinger. The frame buffer (framebuffer) corresponding to the display device is adjusted through the preset thread. At the same time, the current display area and the current screen density of the display device are adjusted through the preset thread, so as to obtain the adjusted frame buffer and the adjusted display device. One display device can correspond to one frame buffer. The frame buffer is a two-dimensional array composed of pixels and is located in the kernel space. Each storage unit in the frame buffer can correspond to a pixel on the screen of the display device, and the data to be displayed in the entire frame buffer can correspond to a frame of image, that is, the screen picture displayed on the display device. The frame buffer is used to store the data to be displayed and provide the data to be displayed to the display device. The current display area can be the display ratio of the original data to be displayed corresponding to the area where the data has been displayed. The screen density refers to the number of pixel points per inch.

[0051] Step 206: Switch the current resolution to the target resolution according to the resolution switching request.

[0052] Step 208: During the resolution switching process, adjust the display data in the adjusted frame buffer according to the target resolution.

[0053] Step 210: After the resolution switching is completed, display the adjusted display data on the display device after the resolution switching.

[0054] After the terminal adjusts the frame buffer corresponding to the display device, as well as the current display area size and the current screen density of the display device, it can switch the resolution according to the resolution switching request. The terminal switches the current resolution to the target resolution.

[0055] During the process of the terminal switching the resolution, since the resolution has changed, it is necessary to adjust the display data in the adjusted frame buffer according to the target resolution. Specifically, the terminal calculates the ratio between the target resolution and the current resolution as the scaling parameter. Then, the display data in the adjusted frame buffer is scaled accordingly according to the scaling parameter.

[0056] After the resolution switching is completed, the scaled display data is re-rendered on the display device after the switching to obtain the rendered interface.

[0057] In this embodiment, the frame buffer corresponding to the display device, as well as the current display area size and the current screen density of the display device, are adjusted according to the resolution switching request to obtain the adjusted frame buffer and the adjusted display device. The current resolution is switched to the target resolution according to the resolution switching request. During the resolution switching process, the display data in the adjusted frame buffer is adjusted according to the target resolution. After the resolution switching is completed, the adjusted display data is displayed on the display device after the resolution switching. When performing the resolution switching, there is no need to replace the hardware. Only by adjusting the frame buffer corresponding to the display device, the current display area of the display device, and the current screen density can the subsequent resolution switching be realized. Furthermore, during the resolution switching process, the display data is adjusted to be displayed according to the target resolution. This can effectively reduce the service cost of the terminal.

[0058] In one embodiment, as Figure 3 shown, the steps of adjusting the frame buffer of the display device, the current display area of the display device, and the current screen density according to the resolution switching request include:

[0059] Step 302: Call the first interface and the second interface according to the resolution switching request.

[0060] Step 304, adjust the frame buffer of the display device according to the target resolution through the first interface.

[0061] Step 306, adjust the current display area and the current screen density of the display device according to the target resolution and the current resolution through the second interface.

[0062] The terminal calls a preset thread according to the resolution switching request. The preset thread can be surfaceflinger. The first interface and the second interface are called in parallel through the preset thread. For example, the first interface can be the HWComposer interface. Furthermore, the frame buffer of the display device is adjusted through the first interface. Specifically, the resolution of the frame buffer is adjusted through the first interface to adjust the resolution of the frame buffer to the target resolution. Since the number of pixels of the display data in the display device is limited by the frame buffer, the number of pixels can be used as the resolution of the frame buffer, which is beneficial to subsequent resolution switching. The terminal adjusts the current display area and the current screen density of the display device through the second interface to obtain the display area size and the screen density corresponding to the target resolution.

[0063] In this embodiment, calling the first interface and the second interface in parallel according to the resolution switching request can realize adjusting the frame buffer of the display device and adjusting the current display area and the current screen density of the display device at the same time. It is beneficial to improve the resolution switching efficiency.

[0064] In one embodiment, adjusting the frame buffer of the display device according to the target resolution through the first interface includes: obtaining the resolution of the frame buffer of the display device through the first interface; adjusting the resolution of the frame buffer to the target resolution.

[0065] The terminal adjusts the frame buffer through the first interface. The size of the frame buffer can represent the storage resolution. Since the number of pixels of the display data in the display device is limited by the frame buffer, the number of pixels can be used as the resolution of the frame buffer, which is beneficial to subsequent resolution switching.

[0066] Adjusting the frame buffer through the first interface means adjusting the resolution of the frame buffer. Obtain the resolution of the frame buffer of the display device through the first interface and switch the resolution to the target resolution. Specifically, clear the historical data stored in the frame buffer through the first interface, switch the resolution of the cleared frame buffer according to the target resolution, and update the resource identifier of the frame buffer after the resolution is switched, so as to identify or modify the frame buffer through the resource identifier in the subsequent operations.

[0067] In this embodiment, by switching the resolution of the frame buffer, it is possible to achieve point-to-point display of the data to be displayed during the resolution switching process.

[0068] In one embodiment, adjusting the current display area and the current screen density of the display device according to the target resolution through the second interface includes: determining the size of the target display area of the display device according to the target resolution through the second interface; adjusting the current display area according to the size of the target display area, and adjusting the current screen density of the display device to the target screen density corresponding to the target resolution.

[0069] Due to the resolution switch, the display area of the display device will change accordingly. Therefore, it is necessary to configure the size of the display area according to the target resolution to conform to the target resolution and ensure the normal display of the display data. Obtain the size of the current display area of the display device at the current resolution through the second interface, and determine the size of the target display area of the display device according to the target resolution. Then calculate the ratio of the size of the target display area to the size of the current display area, and use this ratio as the scaling ratio to scale the current display area.

[0070] Screen density refers to the number of pixels per inch, and the unit is dpi. Screen density is related to screen size and resolution. Resolution can be expressed by the product of the number of vertical pixels and the number of horizontal pixels. The calculation formula for screen density is:

[0071]

[0072] It can be seen from the above calculation formula that when the screen size remains unchanged, the higher the resolution, the greater the screen density; when the resolution remains unchanged, the smaller the screen size, the greater the screen density.

[0073] The terminal can obtain the current resolution and the current screen density through the second interface. When the screen size is fixed, the target screen density corresponding to the target resolution can be calculated according to the proportional relationship between the resolution and the screen density. Then switch the target screen density to the current screen density.

[0074] In this embodiment, the size of the target display area of the display device is determined according to the target resolution through the second interface, so as to adjust the current display area according to the size of the target display area, and adjust the current screen density of the display device to the target screen density corresponding to the target resolution. It can ensure that the size of the display area and the screen density are adapted to the target resolution.

[0075] In one embodiment, the above method further includes: during the resolution switching process, calling a transition layer through a resolution switching request, and covering the scaling process of the display data through the transition layer; when the resolution switching is completed, hiding the transition layer.

[0076] During the process of the terminal switching the current resolution to the target resolution, the screen display interface of the display device will present a scaling state. To mask this scaling state, a transition layer can be called through a resolution switching request. The transition layer can be screenshotSurface. Cover this transition layer on the scaling layer of the display data. When the resolution is switched from a high resolution to a low resolution, the transition layer can be enlarged; when the resolution is switched from a low resolution to a high resolution, the transition layer can be shrunk. Since enlarging or shrinking the transition layer is processed in GPU composition. Therefore, it is necessary to keep GPU composition running during the resolution switching process. When the resolution switching is completed, hide this transition layer, that is, end the call of the transition layer.

[0077] In this embodiment, covering the scaling process of the display data through the transition layer realizes the optimization of the resolution switching effect, enabling the user to switch the resolution without perception.

[0078] In one embodiment, before obtaining the resolution switching request, the above method further includes: traversing the display configuration information; obtaining multiple resolutions corresponding to the display device in the display configuration information; determining the current resolution of the display device from the multiple resolutions according to the preset configuration information.

[0079] When the terminal starts up, that is, when it is powered on, a class of display management service will be created. The global display state is processed through the display management service. The terminal will register all display devices. The display devices can include the main display device and the virtual display device. For example, the virtual display device can be that the terminal projects the display data onto the TV screen through the network, and at this time the TV screen can be the virtual display device. The terminal will traverse the display configuration information of each display device. The display configuration information can include information such as screen width, screen length, screen density, and resolution. Determine multiple resolutions corresponding to the display device in the display configuration information. Then determine the current resolution of the display device from the multiple resolutions according to the preset configuration information. The preset configuration information can include the default resolution preset by the system administrator. The terminal displays data on the display device according to the default resolution. When the resolution acquisition request is obtained, use the default resolution as the current resolution, and the resolution acquisition request also carries the selected target resolution.

[0080] During the process of the terminal obtaining the resolution, it can be processed according to the following logical relationship. Specifically, when the terminal starts up (i.e., powers on), it will create a new class of DisplayManagerService() and process the messages in registerDefaultDisplayAdapters().

[0081] After that, the terminal can register all display devices in registerDefaultDisplayAdapters() to obtain the display configuration information, and provide corresponding display adapters for the registered display devices through LocalDisplayAdapters (local display adapters) to manage the display devices through the display adapters. Among them, the display devices can include the main display device and the virtual display device. For example, the virtual display device can be that the terminal projects the display data to the TV screen through the network, and at this time, the TV screen can be the virtual display device.

[0082] The terminal sends getDisplayConfigs() to getActiveConfig() to SurfaceControl through LocalDisplayAdapters. Thus, it sends a display configuration information acquisition request to Surfacefliner through SurfaceControl, obtains the display configuration information in Surfacefliner, and then determines multiple resolutions and refresh rates corresponding to the display device in the display configuration information. For example, when the display device supports two resolutions of QHD+ (Quarter High Definition, one-fourth of FHD 1920*1080) and FHD+ (Full High Definition, full high definition 1920*1080), and two refresh rates of 120fps and 60fps, the display configuration policy (DisplayConfig) of the display device obtained by the terminal can include: QHD+ / 120fps, QHD+ / 60fps, FHD+ / 120fps, and FHD+ / 60fps. The display configuration policy (DisplayConfig) can also include information such as screen density (density), screen width (width), screen height (height), the number of pixels per inch in the horizontal direction (xdpi), and the number of pixels per inch in the vertical direction (ydpi).

[0083] In this embodiment, the resolution is obtained by traversing the display configuration information of the display device, and the current resolution is determined according to the configuration information to realize the automatic configuration of the current resolution.

[0084] In one embodiment, the above method further includes: receiving a default setting operation for a target resolution; when the terminal is restarted after being shut down, identifying the default setting operation, and setting the default resolution of the target resolution display device according to the default setting operation.

[0085] The terminal can receive a default setting operation for a target resolution, set the switched target resolution as the default resolution, and store it. When the terminal is restarted after being shut down, the terminal will identify the default setting operation, parse the default setting operation to obtain the target resolution, and then use the target resolution as the default resolution of the display device.

[0086] In this embodiment, by receiving a default setting operation for a target resolution, when the terminal is restarted after being shut down, the default setting operation can be identified, and then the default resolution of the target resolution display device can be set according to the default setting operation. The resolution can be automatically set without frequently switching the resolution, improving the service efficiency of the terminal.

[0087] It should be understood that although Figures 2 to 3 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figures 2 to 3 at least a part of the steps in

[0088] In one embodiment, as Figure 4 shown, a data display processing device is provided, including: an acquisition module 402, a first adjustment module 404, a switching module 406, a second adjustment module 408, and a display module 410, where:

[0089] The acquisition module 402 is configured to acquire a resolution switching request, and the resolution switching request carries the current resolution and the target resolution of the display device.

[0090] The first adjustment module 404 is configured to adjust the frame buffer corresponding to the display device, as well as the current display area and the current screen density of the display device, according to the resolution switching request, to obtain an adjusted frame buffer and an adjusted display device.

[0091] The switching module 406 is configured to switch the current resolution to the target resolution according to the resolution switching request.

[0092] A second adjustment module 408, configured to adjust the display data in the adjusted frame buffer according to the target resolution during the resolution switching process.

[0093] A display module 410, configured to display the adjusted display data on the display device after the resolution switching is completed.

[0094] In one embodiment, the switching module 406 is further configured to call a first interface and a second interface according to a resolution switching request; adjust the frame buffer of the display device according to the target resolution through the first interface; and adjust the current display area and the current screen density of the display device according to the target resolution and the current resolution through the second interface.

[0095] In one embodiment, the switching module 406 is further configured to obtain the resolution of the frame buffer of the display device through the first interface; and adjust the resolution of the frame buffer to the target resolution.

[0096] In one embodiment, the switching module 406 is further configured to determine the size of the target display area of the display device according to the target resolution through the second interface; adjust the current display area according to the size of the target display area, and adjust the current screen density of the display device to the target screen density corresponding to the target resolution.

[0097] In one embodiment, the above device further includes: an overlay module, configured to call a transition layer through a resolution switching request during the resolution switching process, and overlay the scaling process of the display data through the transition layer; and hide the transition layer when the resolution switching is completed.

[0098] In one embodiment, the above device further includes: a determination module, configured to traverse the display configuration information of the display device; obtain multiple resolutions corresponding to the display device from the display configuration information; and determine the current resolution of the display device according to the preset configuration information.

[0099] In one embodiment, the above device further includes: an identification module, configured to receive a default setting operation of the target resolution; when the terminal is restarted after being shut down, identify the default setting operation, and use the target resolution as the default resolution of the display device according to the default setting operation.

[0100] For the specific limitations of the data display processing device, reference may be made to the limitations on the data display processing method in the foregoing text, which will not be elaborated here. Each module in the above data display processing device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0101] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a data display processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0102] Those skilled in the art can understand that Figure 5 the structure shown in

[0103] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0104] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calling a first interface and a second interface according to a resolution switching request; adjusting a frame buffer of a display device according to a target resolution through the first interface; and adjusting a current display area and a current screen density of the display device according to the target resolution and the current resolution through the second interface.

[0105] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining a resolution of a frame buffer of a display device through a first interface; and adjusting the resolution of the frame buffer to a target resolution.

[0106] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining a target display area size of a display device according to a target resolution through a second interface; adjusting a current display area according to the target display area size, and adjusting a current screen density of the display device to a target screen density corresponding to the target resolution.

[0107] In one embodiment, when the processor executes the computer program, the following steps are further implemented: during a resolution switching process, calling a transition layer through a resolution switching request, and covering a scaling process of display data through the transition layer; and hiding the transition layer when the resolution switching is completed.

[0108] In one embodiment, when the processor executes the computer program, the following steps are further implemented: traversing display configuration information; obtaining a plurality of resolutions corresponding to a display device from the display configuration information; and determining a current resolution of the display device from the plurality of resolutions according to preset configuration information.

[0109] In one embodiment, when the processor executes the computer program, the following steps are further implemented: receiving a default setting operation for a target resolution; when the terminal is restarted after being shut down, identifying the default setting operation, and setting the default resolution of the target resolution display device according to the default setting operation.

[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a resolution switching request, where the resolution switching request carries a current resolution and a target resolution of a display device; adjusting a frame buffer corresponding to the display device, a current display area size, and a current screen density of the display device according to the resolution switching request to obtain an adjusted frame buffer and an adjusted display device; switching the current resolution to the target resolution according to the resolution switching request; adjusting display data in the adjusted frame buffer according to the target resolution during the resolution switching process; and displaying the adjusted display data on the display device after the resolution switching is completed.

[0111] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calling a first interface and a second interface according to a resolution switching request; adjusting a frame buffer of a display device according to a target resolution through the first interface; and adjusting a current display area and a current screen density of the display device according to the target resolution and a current resolution through the second interface.

[0112] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining a resolution of a frame buffer of a display device through the first interface; and adjusting the resolution of the frame buffer to a target resolution.

[0113] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a target display area size of a display device according to a target resolution through the second interface; adjusting a current display area according to the target display area size, and adjusting a current screen density of the display device to a target screen density corresponding to the target resolution.

[0114] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: during a resolution switching process, calling a transition layer through a resolution switching request, and covering a scaling process of display data through the transition layer; and hiding the transition layer when the resolution switching is completed.

[0115] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: traversing display configuration information; obtaining a plurality of resolutions corresponding to a display device in the display configuration information; and determining a current resolution of the display device from the plurality of resolutions according to preset configuration information.

[0116] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: receiving a default setting operation for a target resolution; and when the terminal is restarted after being shut down, identifying the default setting operation and setting a default resolution of the display device according to the default setting operation.

[0117] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by requesting relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0118] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0119] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A data display processing method, characterized in that, The method includes: Obtaining a resolution switching request, where the resolution switching request carries the current resolution and the target resolution of the display device; the ratio between the current resolution and the target resolution is the scaling parameter; Invoking a first interface and a second interface according to the resolution switching request; obtaining the resolution of the frame buffer of the display device through the first interface; adjusting the resolution of the frame buffer to the target resolution; determining the target display area size of the display device according to the target resolution and the current resolution through the second interface; scaling the current display area according to the ratio between the target display area size and the current display area size, and adjusting the current screen density of the display device to the target screen density corresponding to the target resolution, to obtain an adjusted frame buffer and an adjusted display device; Switching the current resolution to the target resolution according to the resolution switching request; During the resolution switching process, scaling and adjusting the display data in the adjusted frame buffer through the scaling parameter; After the resolution switching is completed, displaying the adjusted display data on the display device after the resolution switching.

2. The method according to claim 1, characterized in that, The adjusting the resolution of the frame buffer to the target resolution includes: Clearing the historical data stored in the frame buffer through the first interface; According to the target resolution, switching the resolution of the cleared frame buffer to the target resolution; Updating the resource identifier of the frame buffer after the resolution switching; Wherein, the adjusted frame buffer includes the frame buffer after the resolution switching and the updated resource identifier.

3. The method according to claim 1, wherein The method further includes: During the resolution switching process, invoking a transition layer through the resolution switching request, and covering the scaling process of the display data through the transition layer; When the resolution switching is completed, hiding the transition layer.

4. The method according to claim 1, wherein The size of the frame buffer represents the resolution stored by the display device.

5. The method according to claim 1, wherein Before obtaining the resolution switching request, the method further includes: Traversing the display configuration information of the display device; Obtaining multiple resolutions corresponding to the display device from the display configuration information; Determining the current resolution of the display device from the multiple resolutions according to the preset configuration information.

6. The method according to claim 1, wherein The resolution switching request is used to invoke a preset thread, and the preset thread is used to adjust the frame buffer.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Receiving the default setting operation of the target resolution; When the terminal is restarted after being shut down, identifying the default setting operation, and taking the target resolution as the default resolution of the display device according to the default setting operation.

8. A data display processing device, characterized in that, The device includes: An obtaining module, configured to obtain a resolution switching request, where the resolution switching request carries the current resolution and the target resolution of the display device; the ratio between the current resolution and the target resolution is the scaling parameter; A first adjustment module, configured to call a first interface and a second interface according to the resolution switching request; obtain the resolution of the frame buffer of the display device through the first interface; adjust the resolution of the frame buffer to the target resolution; determine the target display area size of the display device according to the target resolution and the current resolution through the second interface; scale the current display area according to the ratio of the target display area size to the current display area size, and adjust the current screen density of the display device to the target screen density corresponding to the target resolution, so as to obtain an adjusted frame buffer and an adjusted display device; A switching module, configured to switch the current resolution to the target resolution according to the resolution switching request; A second adjustment module, configured to scale and adjust the display data in the adjusted frame buffer through the scaling parameter during the resolution switching process; A display module, configured to display the adjusted display data on the display device after the resolution switching is completed.

9. A computer device, comprising a memory and a processor, the memory storing a computer program that can run on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Resolution switching method of Android device, and Android device

    CN105955686A

  • Image display method and mobile terminal

    CN108664228A