Resolution adaptive adjustment method and device, electronic equipment and storage medium

By pre-setting resolution adaptation strategies and controllable ranges, the target resolution and aspect ratio of the display screen can be quickly selected, solving the problems of long development cycles and low adaptation efficiency caused by uncertain display screen sizes, and achieving efficient resolution adaptive adjustment.

CN118840983BActive Publication Date: 2026-03-20GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

When the screen size is uncertain, it is difficult to adapt to the optimal resolution. Existing methods result in long development cycles and low resolution adaptation efficiency.

Method used

By pre-setting a resolution adaptation strategy, multiple controllable ranges are determined, and adaptive adjustment is performed based on the target resolution within the controllable range of screen resolution. The mapping relationship is used to quickly select the appropriate target ratio for scaling, avoiding the need to refactor the interface process.

Benefits of technology

It shortens the debugging cycle of the display screen, improves the efficiency of resolution adaptation, and ensures that the display screen achieves the best display effect at different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118840983B_ABST
    Figure CN118840983B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a resolution self-adaptive adjusting method, which comprises the following steps: acquiring a preset resolution adaptation strategy, determining a plurality of controllable ranges according to a target resolution in the resolution adaptation strategy, wherein the resolution adaptation strategy comprises a mapping relationship between different target resolutions and different target proportions, acquiring a first resolution of a screen, in the case that the first resolution is within the controllable range, determining that a target resolution corresponding to the first resolution is a first target resolution according to the controllable range, and searching for a first target proportion corresponding to the first target resolution in the resolution adaptation strategy, and performing self-adaptive adjustment on the first resolution according to the first target proportion to adjust to the first target resolution, so that the debugging period of the display screen is shortened, and the resolution adaptation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a resolution adaptive adjustment method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the development of computer technology, people have higher and higher requirements for image quality, and different resolutions and different sizes of display screens will bring different visual experiences.

[0003] Different display screen sizes have their corresponding optimal resolutions, but in the case of uncertain display screen size, it is difficult to adapt the optimal resolution, and in the resolution adaptation process, if the resolution is not modified proportionally, the resolution adaptation of the display screen interface almost needs to reconstruct the entire interface process, increasing the adaptation difficulty. The existing method is to determine the size of the display screen after designing and debugging the display screen, to scale and adjust the current resolution according to the determined display screen size, to determine the optimal resolution corresponding to the display screen size, and to display the display screen based on the optimal resolution. This makes the development of hardware and software unable to be performed in parallel, resulting in a long development cycle and low resolution adaptation efficiency. SUMMARY

[0004] Embodiments of the present application provide a resolution adaptive adjustment method and device, electronic equipment and storage medium to solve the problem of long product development cycle and low resolution adaptation efficiency, shorten the debugging cycle of the display screen, and improve the adaptation efficiency of the resolution.

[0005] In a first aspect, embodiments of the present application provide a resolution adaptive adjustment method, comprising:

[0006] obtaining a pre-set resolution adaptation strategy, determining a plurality of controllable ranges according to a target resolution in the resolution adaptation strategy, the resolution adaptation strategy comprising a mapping relationship between different target resolutions and different target proportions;

[0007] obtaining a first resolution of a screen, in the case that the first resolution is within the controllable range, determining a first target resolution corresponding to the first resolution according to the controllable range, and searching for a first target proportion corresponding to the first target resolution in the resolution adaptation strategy;

[0008] adaptively adjusting the first resolution according to the first target proportion to adjust to a resolution closest to the first target resolution.

[0009] Further, in the case that the first resolution is not in the controllable range, a screen ratio is obtained, and the first resolution is scaled according to the screen ratio to obtain a second resolution in the controllable range;

[0010] According to the controllable range, a target resolution corresponding to the second resolution is determined as a second target resolution, and a second target ratio corresponding to the second target resolution is searched in the resolution adaptation strategy;

[0011] According to the second target ratio, the second resolution is adaptively adjusted to a resolution closest to the second target resolution.

[0012] Further, the determination of the controllable range according to the target resolution in the resolution adaptation strategy comprises:

[0013] The numerical values of the target resolutions in the resolution adaptation strategy are obtained, and the numerical values of the target resolutions are sorted from small to large;

[0014] The range formed by two adjacent target resolutions is determined as a controllable range.

[0015] Further, the determination of the first target resolution corresponding to the first resolution according to the controllable range comprises:

[0016] The controllable range in which the first resolution is located is determined;

[0017] The first resolution is compared with the target resolutions in the controllable range respectively, and the target resolution closest to the first resolution is determined as the first target resolution.

[0018] Further, if the target resolutions closest to the first resolution are two, the target resolution with higher resolution is determined as the first target resolution.

[0019] Further, after the resolution adaptation strategy set in advance is obtained, the method further comprises:

[0020] The software programs corresponding to different mapping relationships are stored through different files;

[0021] In the hardware debugging process, after the target resolution to be adapted is determined, the software program stored corresponding to the target resolution is accessed.

[0022] Further, the scaling of the first resolution according to the screen ratio comprises:

[0023] According to the received node obtaining instruction, the scaling ratio is adjusted to the screen ratio in the resolution node editing interface.

[0024] In a second aspect, the embodiments of the present application provide a resolution self-adaptive adjusting device, comprising:

[0025] an acquisition module, configured to acquire a preset resolution adaptation strategy;

[0026] a range determination module, configured to determine a plurality of controllable ranges according to target resolutions in the resolution adaptation strategy, the resolution adaptation strategy comprising a mapping relationship between different target resolutions and different target scales;

[0027] a resolution determination module, configured to acquire a first resolution of a screen, and in a case where the first resolution is within the controllable range, configured to determine, according to the controllable range, that a target resolution corresponding to the first resolution is a first target resolution;

[0028] a target scale determination module, configured to find, in the resolution adaptation strategy, a first target scale corresponding to the first target resolution;

[0029] an adjusting module, configured to perform self-adaptive adjustment on the first resolution according to the first target scale, so as to adjust to a resolution closest to the first target resolution.

[0030] In a third aspect, the embodiments of the present application provide an electronic device, comprising a memory and one or more processors;

[0031] the memory, configured to store one or more programs;

[0032] when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the resolution self-adaptive adjusting method according to the first aspect.

[0033] In a fourth aspect, the embodiments of the present application provide a storage medium containing computer executable instructions, when executed by a computer processor, for performing the resolution self-adaptive adjusting method according to the first aspect.

[0034] The embodiment of the present application acquires a preset resolution adaptation strategy, determines a plurality of controllable ranges according to a target resolution in the resolution adaptation strategy, the resolution adaptation strategy comprises a mapping relationship between different target resolutions and different target scales, acquires a first resolution of a screen, in a case that the first resolution is within the controllable range, determines that a target resolution corresponding to the first resolution is a first target resolution according to the controllable range, and finds a first target scale corresponding to the first target resolution in the resolution adaptation strategy, and performs adaptive adjustment on the first resolution according to the first target scale to adjust to a resolution closest to the first target resolution. By pre-setting the resolution adaptation strategy, when a new display screen device appears, the most suitable strategy for the current display screen can be directly selected in the resolution adaptation strategy, the display screen is adapted according to the most suitable strategy, so that the debugging period of the display screen is shortened, and the resolution adaptation efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 is a flowchart of a resolution adaptive adjustment method provided by the embodiment of the present application;

[0036] Figure 2 is a flowchart of another resolution adaptive adjustment method provided by the embodiment of the present application;

[0037] Figure 3 is a flowchart of a method for determining a controllable range according to a target resolution provided by the embodiment of the present application;

[0038] Figure 4 is a structural schematic diagram of a resolution adaptive adjustment device provided by the embodiment of the present application;

[0039] Figure 5 is a structural schematic diagram of a computer device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purposes, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in combination with the drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the contents. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The processes can be terminated when the operations are completed, but can also have additional steps not included in the drawings. The processes can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0041] The use scenario of the present solution is to pre-set a resolution adaptation strategy in the software development stage, so that when a new display screen device is designed and debugged, the most suitable strategy for the current display screen can be directly selected in the resolution adaptation strategy, and the display screen is adapted according to the most suitable strategy, so that the development of hardware and software cannot be performed in parallel. The adaptive adjustment of the resolution can be realized by running the related application program on the browser or the corresponding software.

[0042] Figure 1 is a flowchart of an image display method provided by an embodiment of the present application, as shown in Figure 1 , and specifically includes the following steps:

[0043] Step S101, a pre-set resolution adaptation strategy is acquired, and a plurality of controllable ranges are determined according to a target resolution in the resolution adaptation strategy, wherein the resolution adaptation strategy includes a mapping relationship between different target resolutions and different target proportions.

[0044] In one embodiment, the resolution can refer to how many pixels the display screen can display, which can be used to represent the precision resolution of the screen image. The resolution ratio can represent the ratio of the number of horizontal pixels to the number of vertical pixels on the display screen. The adaptation strategy can be a method for indicating the display screen resolution adjustment, and the resolution adaptation strategy can include conditions corresponding to different resolutions, which can include different screen sizes corresponding to resolutions, screen types corresponding to different resolutions, and the like. In one embodiment, optionally, the resolution adaptation strategy includes a mapping relationship between different target resolutions and different target ratios. The mapping relationship can be used to represent the corresponding relationship between two elements. In the resolution adaptation strategy, there is a mapping relationship between the target resolution and the target size, so that when a target resolution is determined, the target ratio corresponding to the target resolution can be directly determined according to the mapping relationship between them. The target resolution can be a resolution that is often used or a resolution that has a wide range of applications, and the number of target resolutions in the resolution adaptation strategy can be 7-10. The target ratio can be determined according to the target resolution, and one target resolution corresponds to one target ratio. The developer can match the target resolution with the best target ratio through the related application program, thereby providing the best visual experience for the user. In the resolution adaptation strategy, there is a mapping relationship between the target resolution and the target ratio, for example, the target resolution 1920*1080 corresponds to the target size 16:9, the target resolution 1280*1024 corresponds to the target size 5:4, the target resolution 1280*768 corresponds to the target size 5:3, and the target resolution 1024*768 corresponds to the target size 4:3. The mapping relationship is recorded in the form of a table, so that when the target resolution is determined, the best ratio corresponding to the target resolution can be quickly determined. The controllable range can refer to the resolution range in which the screen resolution can be adaptively adjusted according to the resolution adaptation strategy.

[0045] In one embodiment, the developer inputs the relationship between different target sizes corresponding to the target resolution into the mapping relationship table in the database after testing the target resolution and the corresponding target size through the related application program. When the system receives the adjustment instruction issued by the worker, the pre-set resolution adaptation strategy is obtained from the database, and the range formed by two target resolutions is determined as a plurality of controllable ranges.

[0046] In one embodiment, optionally, the determining the controllable range according to the target resolution in the resolution adaptation strategy comprises:

[0047] obtaining the numerical values of the target resolutions in the resolution adaptation strategy, and sorting the numerical values of the target resolutions from small to large;

[0048] determining the range formed by two adjacent sizes of target resolutions as a controllable range.

[0049] In one embodiment, after accessing the resolution adaptation strategy in the database, the values of the target resolutions in the resolution adaptation strategy are determined, and the values are sorted according to their sizes. For example, if the values of the target resolutions in the resolution adaptation strategy are determined to be 1280*1024, 1024*768, 1280*768, and 1920*1080, the target resolutions are sorted in ascending order as 1024*768<1280*768<1280*1024<1920*1080. The range formed by 1024*768 and 1280*768 is determined as a controllable range, the range formed by 1280*768 and 1280*1024 is determined as a controllable range, and the range formed by 1280*1024 and 1920*1080 is determined as a controllable range. Thus, the multiple controllable ranges are 1024*768-1280*768, 1280*768-1280*1024, and 1280*1024-1920*1080.

[0050] As described above, in one embodiment, the values of the target resolutions in the resolution adaptation strategy are obtained, the values of the target resolutions are sorted in ascending order, and the range formed by two adjacent target resolutions is determined as a controllable range. This can quickly determine multiple controllable ranges and can also avoid the problem that too many controllable ranges affect the determination efficiency of the target resolution.

[0051] In one embodiment, after obtaining the pre-set resolution adaptation strategy, the method further includes:

[0052] The software programs corresponding to different mapping relationships are stored in different files.

[0053] In the hardware debugging process, after the target resolution is determined, the software program corresponding to the target resolution is accessed.

[0054] In one embodiment, during the software development process, the developer can store the target sizes corresponding to the target resolutions in different files. In each file, the best icon ratio, font ratio, and text content corresponding to the resolution can also be stored. During the debugging process of the display screen, after the target resolution is determined, the system only needs to access the software program in the storage file corresponding to the target resolution, thereby avoiding storing the storage files corresponding to the target resolutions in the same storage file and affecting the debugging efficiency.

[0055] It can be learned from the above that, in an embodiment, different mapping relationship corresponding software programs are stored through different files, and in the hardware debugging process, after the adaptive target resolution is determined, the software program stored corresponding to the target resolution is accessed, so that the adaptive target resolution corresponding software program is directly accessed, and thus the debugging efficiency of the display screen is improved.

[0056] In step S102, the first resolution of the screen is acquired, and in a case where the first resolution is within the controllable range, a target resolution corresponding to the first resolution is determined as a first target resolution according to the controllable range, and a first target ratio corresponding to the first target resolution is searched in the resolution adaptation strategy.

[0057] In an embodiment, the first resolution can be a current resolution of the display screen to be adjusted, that is, a screen resolution without adaptive adjustment. The first target resolution can be a target resolution of the first resolution after adaptive adjustment. The first target resolution has a corresponding target ratio in the resolution adaptation strategy, and the target ratio is the first target ratio.

[0058] In an embodiment, when a display screen is acquired and adaptive adjustment of the resolution of the display screen is needed, a related application program is run on the display screen, and a worker inputs the first resolution into the application program. The system receives the input first resolution and judges whether the first resolution is within the controllable range. In an embodiment, the first resolution is compared with each controllable range to determine in which controllable range the first resolution is, and two target resolutions constituting the controllable range are determined. One of the two target resolutions can be determined as the first target resolution, and a target resolution with a higher similarity to the first resolution can also be determined as the first target resolution. After the first target resolution is determined, a first target ratio corresponding to the first target resolution is searched in the resolution adaptation strategy. For example, if the first target resolution is 1280*768, the first target ratio corresponding to the first target resolution can be determined as 5:3 according to the resolution adaptation strategy.

[0059] In an embodiment, the first target resolution corresponding to the first resolution is determined according to the controllable range, including:

[0060] The controllable range in which the first resolution is located is determined.

[0061] The first resolution is compared with the target resolutions in the controllable range respectively, and a target resolution closest to the first resolution is determined as the first target resolution.

[0062] For example, if the first resolution is 1400*1050, it can be determined that the first resolution is in the controllable range of 1280*1024-1920*1080 according to the size relationship of the resolution values, and the first resolution 1400*1050 is compared with the target resolutions 1280*1024 and 1920*1080 respectively. It can be determined that the first resolution is closest to the target resolution 1280*1024, and the target resolution 1280*1024 is taken as the first target resolution.

[0063] As can be seen from the above, by determining the controllable range in which the first resolution is located, comparing the first resolution with the target resolutions in the controllable range, and determining the target resolution closest to the first resolution as the first target resolution, the first target resolution determined in the above manner can make the adjusted resolution closer to the preset strategy, which can not only improve the adaptation efficiency of the display screen, but also make the display screen achieve the best display effect of resolution adaptation.

[0064] In an embodiment, optionally, if the target resolutions closest to the first resolution are two, the target resolution with higher resolution is determined as the first target resolution.

[0065] For example, if the first resolution is 1280*800 and it is determined that the controllable range in which it is located is 1280*700-1280*900, after comparing the first resolution with the two target resolutions constituting the controllable range, it can be determined that the first resolution is the same in closeness to the two target resolutions, and 1280*900 is taken as the first target resolution.

[0066] As can be seen from the above, in an embodiment, if the target resolutions closest to the first resolution are two, the target resolution with higher resolution is determined as the first target resolution, which can further improve the display effect of the display screen while ensuring the adaptation effect.

[0067] In step S103, the first resolution is adaptively adjusted according to the first target ratio to a resolution closest to the first target resolution.

[0068] In an embodiment, after the first target ratio is determined, the first resolution is adaptively adjusted according to the first target ratio to the first target resolution. For example, if the first target ratio is 5:3 and the first resolution is 1280*720, the first resolution is proportionally enlarged according to the ratio of 5:3, so that the adjusted resolution is close to the first target resolution, such as 1300*780.

[0069] It can be learned from the above that, in one embodiment, a preset resolution adaptation strategy is acquired, a plurality of controllable ranges are determined according to target resolutions in the resolution adaptation strategy, the resolution adaptation strategy includes a mapping relationship between different target resolutions and different target scales, a first resolution of a screen is acquired, in a case where the first resolution is within the controllable ranges, a target resolution corresponding to the first resolution is determined as a first target resolution according to the controllable ranges, and a first target scale corresponding to the first target resolution is searched for in the resolution adaptation strategy, and the first resolution is adaptively adjusted according to the first target scale to adjust to a resolution closest to the first target resolution. By presetting the resolution adaptation strategy and the controllable ranges, when a new display screen device is debugged, a target resolution closest to a current display screen resolution and a corresponding scaling scale can be quickly selected in the resolution adaptation strategy according to the controllable ranges, so that the debugging period of the display screen is shortened, and the resolution adaptation efficiency is improved.

[0070] Figure 2 is a flowchart of another resolution adaptive adjustment method provided by the embodiment of the application, as shown in Figure 2 , and specifically includes the following steps:

[0071] In step S201, a preset resolution adaptation strategy is acquired, and a plurality of controllable ranges are determined according to target resolutions in the resolution adaptation strategy, the resolution adaptation strategy including a mapping relationship between different target resolutions and different target scales.

[0072] In step S202, a first resolution of a screen is acquired, in a case where the first resolution is not within the controllable ranges, a screen scale is acquired, and the first resolution is scaled according to the screen scale to obtain a second resolution within the controllable ranges.

[0073] In one embodiment, the screen scale can be a scale of a display screen to be debugged. The second resolution can be a resolution within the controllable ranges. In one embodiment, after the first resolution of the display screen to be adjusted is acquired, the first resolution is compared with the controllable ranges to determine whether the first resolution is within each controllable range, if the first resolution is not within any controllable range, the screen scale of the display screen to be debugged is acquired, and the second resolution is obtained by scaling adjustment according to the screen scale, so that the second resolution is within a controllable range closest to the first resolution. For example, if the first resolution is 800:500, the first resolution is compared with each controllable range to determine that the first resolution is not within any controllable range, the scale of the screen to be debugged is 8:5, and the first resolution is enlarged according to the scale of 8:5 to obtain the second resolution, so that the second resolution is within the controllable range of 1024*768-1280*768.

[0074] In an embodiment, the scaling the first resolution according to the screen ratio comprises:

[0075] According to the received node acquisition instruction, adjusting the scaling ratio to the screen ratio in the resolution node editing interface.

[0076] In an embodiment, the node acquisition instruction can refer to a command for acquiring the node editing interface. The node editing interface can refer to a code writing interface. The developer writes a set of corresponding codes on each development node, which can include the current resolution, the maximum resolution, the current resolution ratio, and the resolution scaling ratio. After receiving the input node acquisition command, the system enters the code writing interface of the resolution node, and modifies the resolution scaling ratio in the code writing interface to the screen ratio.

[0077] From the above, in an embodiment, according to the received node acquisition instruction, adjusting the scaling ratio to the screen ratio in the resolution node editing interface, which is beneficial to improve the resolution adaptation efficiency by directly modifying the resolution scaling ratio on the corresponding node.

[0078] In step S203, determining the target resolution corresponding to the second resolution as a second target resolution according to the controllable range, and searching for a second target ratio corresponding to the second target resolution in the resolution adaptation strategy.

[0079] The second target resolution can be a target resolution for self-adaptive adjustment of the second resolution, and the second target resolution can be a maximum target resolution or a minimum target resolution in the resolution adaptation strategy. In an embodiment, if the first resolution is less than the minimum target resolution in the minimum controllable range, the minimum target resolution is determined as the second target resolution, and if the first resolution is greater than the maximum target resolution in the maximum controllable range, the maximum target resolution is determined as the second target resolution, and a second target ratio corresponding to the determined second target resolution is searched for in the resolution adaptation strategy.

[0080] Figure 3 A process diagram for self-adaptive adjustment of the first resolution to the final display resolution provided by an embodiment of the present application is shown in FIG. 2. Figure 3If the first resolution is 800:500, which is smaller than the minimum controllable range 1024*768-1280*768, the first resolution 800:500 is enlarged by a ratio of 8:5 to obtain a second resolution, so that the second resolution is within the range of 1024*768-1280*768. For example, the obtained second resolution is 1024*640. The second resolution is compared with the target resolution 1024*768 and the target resolution 1280*768, and it is determined that the target resolution closest to the second resolution is the target resolution 1024*768. Then, the target resolution 1024*768 is determined as the second target resolution, and the second target ratio corresponding to the target resolution 1024*768 is searched in the resolution adaptation strategy.

[0081] In step S204, the second resolution is adaptively adjusted according to the second target ratio, so as to be adjusted to a resolution closest to the second target resolution.

[0082] In an embodiment, after the second target ratio is determined, the second resolution is adaptively adjusted according to the second target ratio, so as to be adjusted to a resolution closest to the second target resolution. For example, Figure 3 If the first target ratio is 4:3 and the second resolution is 1024*640, the second resolution is enlarged by a ratio of 4:3, so that the adjusted resolution is close to the second target resolution. The adjusted resolution can be 1040*780.

[0083] As described above, in an embodiment, when the first resolution is not within the controllable range, the screen ratio is obtained, the first resolution is scaled according to the screen ratio, so as to obtain a second resolution within the controllable range. The target resolution corresponding to the second resolution is determined as a second target resolution, and the second target ratio corresponding to the second target resolution is searched in the resolution adaptation strategy. The second resolution is adaptively adjusted according to the second target ratio, so as to be adjusted to a resolution closest to the second target resolution. The most suitable target resolution can be determined for a resolution not within the controllable range, so that the adaptive adjustment method is more universal and can be applied to more display screen devices. By pre-setting the resolution adaptation strategy and the controllable range, when a new display screen device is debugged, the target resolution closest to the current display screen resolution and the corresponding scaling ratio can be quickly selected in the resolution adaptation strategy according to the controllable range, so that the debugging period of the display screen is shortened, and the resolution adaptation efficiency is improved.

[0084] Figure 4 FIG. 1 is a structural schematic diagram of a resolution adaptive adjustment device provided by an embodiment of the present application, as shown inFigure 4 The device specifically includes, as shown:

[0085] The acquisition module 41 is configured to acquire a pre-set resolution adaptation strategy.

[0086] The range determination module 42 is configured to determine a plurality of controllable ranges according to target resolutions in the resolution adaptation strategy, the resolution adaptation strategy including a mapping relationship between different target resolutions and different target scales.

[0087] The resolution determination module 43 is configured to acquire a first resolution of a screen, and in a case where the first resolution is within the controllable range, determine a target resolution corresponding to the first resolution as a first target resolution according to the controllable range.

[0088] The target scale determination module 44 is configured to find a first target scale corresponding to the first target resolution in the resolution adaptation strategy.

[0089] The adjustment module 45 is configured to adaptively adjust the first resolution according to the first target scale to adjust to a resolution closest to the first target resolution.

[0090] As known from the above, in one embodiment, a pre-set resolution adaptation strategy is acquired, a plurality of controllable ranges are determined according to target resolutions in the resolution adaptation strategy, the resolution adaptation strategy including a mapping relationship between different target resolutions and different target scales, a first resolution of a screen is acquired, in a case where the first resolution is within the controllable range, a target resolution corresponding to the first resolution is determined as a first target resolution according to the controllable range, and a first target scale corresponding to the first target resolution is found in the resolution adaptation strategy, and the first resolution is adaptively adjusted according to the first target scale to adjust to a resolution closest to the first target resolution. By pre-setting the resolution adaptation strategy and the controllable range, and when a new display screen device is debugged, a target resolution closest to a current display screen resolution and a corresponding scaling scale can be quickly selected in the resolution adaptation strategy according to the controllable range, thereby shortening a debugging period of the display screen and improving resolution adaptation efficiency.

[0091] In one possible embodiment, the resolution determination module 43 is further configured to:

[0092] In a case where the first resolution is not within the controllable range, a screen scale is acquired, and the first resolution is scaled according to the screen scale to obtain a second resolution within the controllable range.

[0093] In one possible embodiment, the target scale determination module 44 is further configured to:

[0094] According to the controllable range, the second resolution corresponds to a target resolution of a second target resolution, and a second target ratio corresponding to the second target resolution is found in the resolution adaptation strategy.

[0095] In one possible embodiment, the adjusting module 45 is further configured to:

[0096] According to the second target ratio, the second resolution is adaptively adjusted to a resolution closest to the second target resolution.

[0097] In one possible embodiment, the range determining module 42 is specifically configured to:

[0098] The numerical values of the target resolutions in the resolution adaptation strategy are obtained, and the numerical values of the target resolutions are sorted from small to large;

[0099] A range composed of two adjacent sizes of target resolutions is determined as a controllable range.

[0100] In one possible embodiment, the resolution determining module 43 is specifically configured to:

[0101] A controllable range in which the first resolution is located is determined;

[0102] The first resolution is compared with the target resolutions in the controllable range respectively, and a target resolution closest to the first resolution is determined as a first target resolution.

[0103] In one possible embodiment, the resolution determining module 43 is specifically further configured to:

[0104] If the target resolutions closest to the first resolution are two, a target resolution with a higher resolution is determined as the first target resolution.

[0105] In one possible embodiment, the apparatus further includes a storage module, and the storage module is configured to:

[0106] Different software programs corresponding to different mapping relationships are stored through different files;

[0107] In the hardware debugging process, after the adapted target resolution is determined, a software program stored corresponding to the target resolution is accessed.

[0108] In one possible embodiment, the resolution determining module 43 further includes a scaling unit, and the scaling unit is configured to:

[0109] According to the received node acquisition instruction, the scaling ratio is adjusted to the screen ratio in the resolution node editing interface.

[0110] Figure 5 A structural schematic diagram of a computer device provided by an embodiment of the present application is shown in the figure, which includes a processor 501, a memory 502, an input device 503 and an output device 504; the number of processors 501 in the device can be one or more, Figure 5 one processor 501 is taken as an example in the figure; the processor 501, the memory 502, the input device 503 and the output device 504 in the device can be connected through a bus or other means, Figure 5 the bus connection is taken as an example in the figure. The memory 502 as a kind of computer readable storage medium can be used to store software program, computer executable program and module. The processor 501 can execute the various functional applications and data processing of the device by running the software program, instruction and module stored in the memory 502, that is, the resolution adaptive adjustment method described above is realized. The input device 503 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 504 can include display device such as display screen. Figure 5 The embodiment of the present application also provides a nonvolatile storage medium containing computer executable instructions, which are used to execute a resolution adaptive adjustment method described in the above embodiment when executed by a computer processor, wherein the resolution adaptive adjustment method includes: obtaining a pre-set resolution adaptation strategy, determining a plurality of controllable ranges according to the target resolution in the resolution adaptation strategy, and the resolution adaptation strategy includes the mapping relationship between different target resolutions and different target proportions; obtaining the first resolution of the screen, in the case that the first resolution is within the controllable range, determining the first target resolution corresponding to the first resolution according to the controllable range as the first target resolution, and searching for the first target proportion corresponding to the first target resolution in the resolution adaptation strategy; and adaptively adjusting the first resolution according to the first target proportion to adjust to the resolution closest to the first target resolution.

[0111] It is worth noting that the embodiments of the resolution adaptive adjustment device described above include various units and modules only according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific name of each functional unit is only for easy mutual distinction, and does not limit the protection scope of the embodiments of the present application.

[0112]

[0113] ​In some possible implementation, each of the aspects of the method provided by the present application can also be implemented as a program product in the form of a computer program product, which includes program codes for causing a computer device to perform the steps of the method according to various exemplary embodiments of the present application described above in the specification, for example, the computer device can perform the resolution self-adaptive adjustment method described in the embodiments of the present application. The program product can be implemented by any combination of one or more computer readable media.

Claims

1. A resolution adaptive adjustment method, characterized in that, include: Obtain a pre-set resolution adaptation strategy, sort the target resolution values ​​in the resolution adaptation strategy from smallest to largest, and determine the range formed by two adjacent target resolutions as a controllable range. The resolution adaptation strategy includes the mapping relationship between different target resolutions and different target ratios. Obtain the first resolution of the screen. If the first resolution is within the controllable range, determine the target resolution corresponding to the first resolution as the first target resolution based on the controllable range, and find the first target ratio corresponding to the first target resolution in the resolution adaptation strategy. The first resolution is adaptively adjusted according to the first target ratio to achieve a resolution that is closest to the first target resolution.

2. The resolution adaptive adjustment method according to claim 1, characterized in that, The method further includes: If the first resolution is not within the controllable range, obtain the screen ratio, and scale the first resolution according to the screen ratio to obtain a second resolution within the controllable range; Based on the controllable range, the target resolution corresponding to the second resolution is determined as the second target resolution, and the second target ratio corresponding to the second target resolution is found in the resolution adaptation strategy; The second resolution is adaptively adjusted according to the second target ratio to achieve a resolution that is closest to the second target resolution.

3. The resolution adaptive adjustment method according to claim 1, characterized in that, Determining the target resolution corresponding to the first resolution as the first target resolution based on the controllable range includes: Determine the controllable range of the first resolution; The first resolution is compared with the target resolution within the controllable range, and the target resolution closest to the first resolution is determined as the first target resolution.

4. The resolution adaptive adjustment method according to claim 3, characterized in that, If there are two target resolutions that are closest to the first resolution, then the target resolution with the higher resolution is determined as the first target resolution.

5. The resolution adaptive adjustment method according to claim 1, characterized in that, After obtaining the pre-set resolution adaptation strategy, the following is also included: The software programs corresponding to different mapping relationships are stored in different files; During hardware debugging, after determining the target resolution to be adapted, the software program stored corresponding to the target resolution is accessed.

6. The resolution adaptive adjustment method according to claim 2, characterized in that, The scaling of the first resolution according to the screen ratio includes: Based on the received node acquisition instruction, the scaling ratio is adjusted to the screen ratio in the resolution node editing interface.

7. A resolution adaptive adjustment device for implementing the resolution adaptive adjustment method as described in any one of claims 1-6, characterized in that, The device includes: The acquisition module is used to obtain the pre-set resolution adaptation strategy; The range determination module is used to sort the target resolution values ​​in the resolution adaptation strategy from smallest to largest, and determine the range formed by two adjacent target resolutions as a controllable range. The resolution adaptation strategy includes the mapping relationship between different target resolutions and different target ratios. A resolution determination module is used to obtain a first resolution of the screen, and when the first resolution is within the controllable range, it is used to determine the target resolution corresponding to the first resolution as the first target resolution based on the controllable range; The target ratio determination module is used to find the first target ratio corresponding to the first target resolution in the resolution adaptation strategy; The adjustment module is used to adaptively adjust the first resolution according to the first target ratio, so as to adjust it to a resolution that is closest to the first target resolution.

8. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the resolution adaptive adjustment method as described in any one of claims 1-6.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the resolution adaptive adjustment method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Native interface adaptive method, apparatus and electronic equipment employing same

    CN105653254A

  • Method and device for performing adaption on interface control

    CN105760178A