Screen resolution adjusting method and device, equipment and storage medium
By obtaining the default logical resolution of the screen and determining the scaling multiple based on preset conditions, the function of user-defined adjustment is provided, and the problem of fixed logical resolution in the prior art is solved and the user experience is improved.
Patent Information
- Application Number
- CN202311340710.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the physical resolution of the screen is adjusted by the default scaling multiple, and the resulting logical resolution is fixed, which cannot meet the display effect requirements of different users, resulting in poor user experience.
A method of adjusting screen resolution is provided. By obtaining the default logical resolution of the screen, determining at least one scaling multiple based on preset restrictions, and displaying the corresponding scaling controls, and performing secondary adjustments to the logical resolution in response to user operations.
It realizes user custom adjustments to logical resolution, meets the display effect requirements of different users, and improves the user experience of electronic devices.
Smart Images

Figure CN119851632A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of electronic devices, and in particular, to a method, apparatus, device and storage medium for adjusting screen resolution. Background Art
[0002] At present, the screen sizes and resolutions of electronic devices are becoming more and more diverse. For a screen of a fixed size, different resolutions have different display effects. Therefore, it is necessary to adjust the resolution to achieve the best screen display effect.
[0003] In the prior art, the physical resolution of the screen is adjusted by the default zoom factor to obtain the logical resolution, and the best screen display effect is achieved by the logical resolution. The specific method is: determine the ratio of the horizontal resolution in the physical resolution to the default zoom factor, and use the ratio as the horizontal resolution in the logical resolution; determine the ratio of the vertical resolution in the physical resolution to the default zoom factor, and use the ratio as the vertical resolution in the logical resolution.
[0004] However, since different users have different requirements for display effects, the logical resolution obtained by adjusting the physical resolution of the screen by the default zoom factor is fixed, and thus cannot meet the requirements of different users, resulting in a poor user experience. Summary of the invention
[0005] The embodiments of the present disclosure provide a method, apparatus, device and storage medium for adjusting screen resolution, which can improve the user experience of an operating system.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for adjusting screen resolution, which is applied to an electronic device, comprising:
[0007] Obtaining a default logical resolution of the screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor;
[0008] Determining at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions;
[0009] Displaying at least one zoom control corresponding to the zoom factor;
[0010] In response to a triggering operation on any zoom control, the default logical resolution is adjusted according to a target zoom factor corresponding to the any zoom control.
[0011] In a second aspect, an embodiment of the present disclosure provides a device for adjusting screen resolution, which is applied to an electronic device, and the device includes:
[0012] An acquisition module, used for acquiring a default logical resolution of a screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor;
[0013] A determination module, used to determine at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions;
[0014] A display module, used to display at least one zoom control corresponding to the zoom factor;
[0015] The adjustment module is used to adjust the default logical resolution according to the zoom factor corresponding to any zoom control in response to a trigger operation of any zoom control.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0017] A processor, and a memory communicatively connected to the processor;
[0018] The memory stores computer-executable instructions;
[0019] The processor executes the computer-executable instructions stored in the memory to implement the method for adjusting the screen resolution as described in the first aspect above.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the method for adjusting the screen resolution as described in the first aspect above is implemented.
[0021] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method for adjusting the screen resolution as described in the first aspect above.
[0022] The present embodiment provides a method, device, equipment and storage medium for adjusting screen resolution, the method comprising: obtaining a default logical resolution of the screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default zoom factor; determining at least one zoom factor corresponding to the screen according to the default logical resolution and preset restrictions; displaying a zoom control corresponding to at least one zoom factor; and in response to a trigger operation for any zoom control, adjusting the default logical resolution according to a target zoom factor corresponding to any zoom control. In the disclosed embodiment, since the physical resolution of the screen is first scaled according to the default zoom factor to obtain the default logical resolution; then, according to the default logical resolution and preset restrictions, at least one zoom factor corresponding to the screen is determined; finally, a zoom control corresponding to the zoom factor is displayed, and the logical resolution is adjusted twice according to the user's selection operation of any zoom control, that is, the function of the user's custom adjustment of the logical resolution is realized, so that when the user uses the screen to browse content, the logical resolution of the screen can be easily adjusted to adjust the display ratio of the browsed content, thereby improving the user experience of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1 A schematic diagram of an application scenario of a method for adjusting screen resolution provided by an embodiment of the present disclosure;
[0025] Figure 2 A flowchart of a method for adjusting screen resolution provided by an embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram of a zoom control interface provided by an embodiment of the present disclosure;
[0027] Figure 4 A structural block diagram of a device for adjusting screen resolution provided by an embodiment of the present disclosure;
[0028] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] Before introducing the embodiments of the present disclosure, the terms and application backgrounds involved in the embodiments of the present disclosure are first explained:
[0032] Physical resolution: also called standard resolution, refers to the original resolution of the image displayed on the screen, also called true resolution. The optimal resolution of the screen, that is, the mathematical expression of the number of pixel rows and columns actually existing on the screen, is an inherent parameter of the display and cannot be adjusted. It means the maximum number of pixels that can be displayed on the screen.
[0033] Logical resolution: The resolution of the screen display, calculated by physical resolution and zoom factor: physical resolution / zoom factor = logical resolution. The larger the zoom factor, the smaller the logical resolution, the more display pixels each physical pixel corresponds to, and the larger the display font. For example: the physical resolution is 1920×1080, the zoom factor is 1.2, and the logical resolution is 1536×864. One physical pixel corresponds to 1.2 display pixels, and the display font becomes larger.
[0034] At present, the screen sizes and resolutions of electronic devices are becoming more and more diverse. For a screen of a fixed size, different resolutions have different display effects. Therefore, it is necessary to adjust the resolution to achieve the best screen display effect.
[0035] In the prior art, the physical resolution of the screen is adjusted by the default zoom factor to obtain the logical resolution, and the best screen display effect is achieved by the logical resolution. The specific method is: determine the ratio of the horizontal resolution in the physical resolution to the default zoom factor, and use the ratio as the horizontal resolution in the logical resolution; determine the ratio of the vertical resolution in the physical resolution to the default zoom factor, and use the ratio as the vertical resolution in the logical resolution.
[0036] For example, the physical resolution of the screen is 1920×1080, and the default zoom factor is 1.25, then the logical resolution is: 1920 / 1.25=1536, 1080 / 1.25=864; that is: 1536×864.
[0037] However, since different users have different requirements for display effects, the logical resolution obtained by adjusting the physical resolution of the screen by the default zoom factor is fixed, and thus cannot meet the requirements of different users, resulting in a poor user experience.
[0038] Therefore, how to improve the diversity of logic resolution to meet the display effect requirements of different users has become an urgent problem to be solved.
[0039] In order to solve the above problems, the inventor's technical concept is as follows: first, according to the default logical resolution and the preset restriction conditions, at least one zoom factor corresponding to the screen is determined, and then a zoom control corresponding to at least one zoom factor is displayed, and the logical resolution is adjusted twice according to the user's triggering operation on any zoom control. In this way, the user can customize the logical resolution and then adjust the display ratio of the screen to meet the display effect requirements of different users. Therefore, the user experience is improved.
[0040] The application scenarios of the embodiments of the present disclosure are explained below: Figure 1 A schematic diagram of an application scenario of a method for adjusting screen resolution provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the application scenario includes: an electronic device 11, a processing unit 12, a screen 13, and a storage unit 14.
[0041] Among them, the screen 13 can be an external screen or a built-in screen. Among them, the processing unit 12 can obtain the default logical resolution of the screen and determine at least one zoom factor corresponding to the screen. The processing unit 12 can also display the zoom control corresponding to the zoom factor. The processing unit 12 can also receive the trigger operation of any zoom control and adjust the default logical resolution according to the target zoom factor corresponding to any zoom control. Among them, the executor of the present disclosure is an electronic device, which can specifically be a mobile phone, a tablet, a computer, a server and other devices. The audio permission processing method provided in the embodiment of the present disclosure is described in detail using a detailed embodiment below.
[0042] refer to Figure 2 , Figure 2 A flowchart of a method for adjusting screen resolution provided in an embodiment of the present disclosure. The present disclosure embodiment is described by taking an electronic device as an example. The method includes:
[0043] S201. Obtain a default logical resolution of the screen, where the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor.
[0044] In this step, the default logical resolution is the display resolution of the screen. In some embodiments, the default logical resolution of the screen is determined based on the PPI (Pixels Per Inch) of the screen and the physical resolution of the screen.
[0045] Optionally, the steps for obtaining the default logical resolution of the screen are: determining the number of pixels per inch (PPI) in the screen, and determining a target PPI range to which the PPI belongs from multiple preset PPI ranges; determining a default scaling factor corresponding to the target PPI range; and scaling the physical resolution of the screen according to the default scaling factor to obtain a default logical resolution.
[0046] Among them, the screen of the electronic device can be a built-in screen or an external screen. In this embodiment, no specific requirements are made for multiple preset PPI ranges. Optionally, since the size of the built-in screen is generally smaller than the external screen, in order to improve the display effect of the built-in screen and the external screen, multiple preset PPI ranges corresponding to the built-in screen and multiple preset PPI ranges corresponding to the external screen are set respectively.
[0047] Table 1 is a table of correspondence between multiple preset PPI ranges and default zoom factors provided by the embodiment of the present disclosure. Among them, the correspondence between multiple preset PPI ranges and default zoom factors corresponding to the built-in screen is as follows: the default zoom factor corresponding to the preset PPI range of less than 140 and greater than or equal to 0 (<140) is 1.0; the default zoom factor corresponding to the preset PPI range of less than 170 and greater than or equal to 140 (140-170) is 1.25; the default zoom factor corresponding to the preset PPI range of less than 200 and greater than or equal to 170 (170-200) is 1.5; the default zoom factor corresponding to the preset PPI range of less than 230 and greater than or equal to 200 (200-230) is 1.666; the default zoom factor corresponding to the preset PPI range of less than 290 and greater than or equal to 230 (230-290) is 2.0; the default zoom factor corresponding to the preset PPI range of greater than or equal to 290 (≥290) is 2.5.
[0048] Among them, the correspondence between multiple preset PPI ranges corresponding to the external screen and the default zoom factors is: the default zoom factor corresponding to the preset PPI range is less than 75 and greater than or equal to 0 (<75) is 1.0; the default zoom factor corresponding to the preset PPI range is less than 125 and greater than or equal to 75 (75~125) is 1.25; the default zoom factor corresponding to the preset PPI range is less than 150 and greater than or equal to 125 (125~150) is 1.5; the default zoom factor corresponding to the preset PPI range is less than 175 and greater than or equal to 150 (150~175) is 1.875; the default zoom factor corresponding to the preset PPI range is greater than or equal to 175 (≥175) is 2.0.
[0049] Table 1
[0050]
[0051] S202: Determine at least one zoom factor corresponding to the screen according to a default logical resolution and preset restriction conditions.
[0052] In some embodiments, the preset restriction condition is used to determine at least one zoom factor corresponding to the screen through the adjusted logical resolution. The following is a detailed description of determining at least one zoom factor corresponding to the screen through the restriction conditions of three situations:
[0053] In the first case, the default logical resolution includes the horizontal resolution. The preset constraint condition may be that the adjusted horizontal resolution is a common horizontal resolution. Accordingly, according to the default logical resolution and the preset constraint condition, determining at least one zoom factor corresponding to the screen includes steps (a1) to (a3):
[0054] (a1) Obtain multiple candidate zoom factors.
[0055] In some embodiments, the plurality of candidate zoom factors are arithmetic progressions. Optionally, the minimum value of the arithmetic progression is 0.5, the maximum value is 2.0, and the tolerance of the arithmetic progression can be 0.1; accordingly, the plurality of candidate zoom factors include: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0.
[0056] In other embodiments, multiple candidate zoom factors are determined based on the default zoom factor. Optionally, the multiple candidate zoom factors are N; N values can be set first, and the N candidate zoom factors are determined based on the ratio of the N values to the default zoom factor. For example, the multiple candidate zoom factors are 4, and the N values can be set first to 0.8, 1.0, 1.2 and 1.5; the default zoom factor is 1.0; then the multiple candidate zoom factors are: 0.8, 1.0, 1.2 and 1.5.
[0057] (a2) For each candidate zoom factor, determine a first ratio of the lateral resolution to the candidate zoom factor.
[0058] Exemplarily, the horizontal resolution is 1536, the candidate zoom factor is 1.2, and the first ratio of the horizontal resolution to the candidate zoom factor is: 1280.
[0059] (a3) If the first ratio is any one of a plurality of common horizontal resolutions, it is determined that the restriction condition is satisfied, and at least one candidate zoom factor satisfying the restriction condition is determined as at least one zoom factor corresponding to the screen.
[0060] Optionally, the plurality of common horizontal resolutions include at least one of the following: 768, 1024, 1200, 1280, 1366, 1440, 1536, 1600, 1920. Exemplarily, the first ratio of the horizontal resolution to the candidate zoom factor is 1280, and the first ratio (1280) is a common horizontal resolution, and the candidate zoom factor of 1.2 is determined as the zoom factor corresponding to the screen.
[0061] Here, since the adjusted horizontal resolution is a common horizontal resolution, and the display effect of the common horizontal resolution is more in line with the user's requirements, it is more convenient for the user to quickly select a suitable resolution, thereby further improving the user experience.
[0062] In the second case, the default logical resolution includes a horizontal resolution and a vertical resolution; accordingly, determining at least one zoom factor corresponding to the screen according to the default logical resolution and the preset restriction condition may include the following steps (b1) to (b3):
[0063] (b1) Obtain multiple candidate zoom factors.
[0064] (b2) For each candidate zoom factor, determine a first ratio of the horizontal resolution to the candidate zoom factor and a second ratio of the vertical resolution to the candidate zoom factor.
[0065] Exemplarily, the horizontal resolution is 1536 and the vertical resolution is 864. If the candidate zoom factor is 1.2, the first ratio of the horizontal resolution to the candidate zoom factor is 1280; the second ratio of the vertical resolution to the candidate zoom factor is 720.
[0066] (b3) If the first ratio and / or the second ratio is an integer, it is determined that the restriction condition is satisfied, and at least one candidate zoom factor satisfying the restriction condition is determined as at least one zoom factor corresponding to the screen.
[0067] Exemplarily, the first ratio of the horizontal resolution to the candidate zoom factor is 1280, and the second ratio of the vertical resolution to the candidate zoom factor is 720. Wherein, the first ratio and the second ratio are integers, and if the restriction condition is satisfied, the candidate zoom factor of 1.2 is determined as the zoom factor corresponding to the screen.
[0068] Here, since the adjusted horizontal resolution and / or vertical resolution is an integer, the integer resolution can reduce calculation errors when matching the screen, thereby improving the screen display effect. This makes it easier for users to quickly select a suitable resolution, thereby further improving the user experience.
[0069] In the third case, the screen is an external screen; the size of the external screen is generally large. In order to ensure the display effect of the external screen, the maximum logical resolution is generally set close to the physical resolution of the external screen. Accordingly, under the premise of satisfying the first case and / or the second case, the minimum zoom factor of the at least one zoom factor can be further limited.
[0070] Optionally, before determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen, the step also includes: selecting a minimum zoom factor with the smallest value from at least one zoom factor; determining a third ratio of the default logical resolution to the minimum zoom factor; if the difference between the third ratio and the physical resolution is less than or equal to a preset difference, executing the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0071] The third ratio of the default logical resolution to the minimum zoom factor includes: the ratio of the horizontal logical resolution to the minimum zoom factor, and the ratio of the vertical logical resolution to the minimum zoom factor. In this embodiment, the value of the preset difference is not specifically limited. For example, the preset difference may be 1, 5, or 10.
[0072] Exemplarily, the preset difference is 1, and the minimum zoom factor is 0.8. The physical resolution of the external screen is 1920×1080; the default zoom ratio is 1.25, and the logical resolution is 1536×846; wherein, the third ratio of the horizontal logical resolution to the minimum zoom factor is 1920, and the third ratio of the vertical logical resolution to the minimum zoom factor is 1080; if the difference between the third ratio and the physical resolution is less than the preset difference 1, then continue to perform the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0073] It should be noted that if the difference between the third ratio and the physical resolution of the screen is greater than the preset difference, the minimum zoom factor is deleted from at least one zoom factor; continue to select the minimum zoom factor with the smallest value from at least one zoom factor; until the difference between the third ratio and the physical resolution of the screen is less than or equal to the preset difference, the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen is executed.
[0074] Exemplarily, the preset difference is 10, and the minimum zoom factor is 0.5. The physical resolution of the external screen is 1920×1080; the default zoom ratio is 1.25, and the logical resolution is 1536×846; wherein, the third ratio of the horizontal logical resolution to the minimum zoom factor is 3072 (greater than 1920), and the third ratio of the vertical logical resolution to the minimum zoom factor is 1692 (greater than 1080); the difference between the third ratio and the physical resolution is greater than the preset difference of 10, and the minimum zoom factor of 0.5 is deleted. Further, continue to select the minimum zoom factor of 0.8 with the smallest value from at least one zoom factor; at this time, the difference between the third ratio and the physical resolution is less than the preset difference of 10, and then continue to execute the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0075] It should be noted that in this step, when determining at least one zoom factor, the restriction conditions of the above three situations may be satisfied at the same time, or the restriction conditions of any two of the above three situations may be satisfied, or the restriction conditions of only one of the three situations may be satisfied.
[0076] In some other embodiments, the restriction condition is: a correspondence between a preset PPI range, a default zoom factor, and at least one zoom factor. Accordingly, determining at least one zoom factor corresponding to the screen according to the default logical resolution and the preset restriction condition includes: determining a default zoom factor corresponding to the default logical resolution; determining a target PPI range corresponding to the default zoom factor; and determining at least one zoom factor corresponding to the screen from the correspondence between the preset PPI range, the default zoom factor, and at least one zoom factor according to the target PPI range and the default zoom factor.
[0077] The corresponding relationship when the screen is built-in is different from the corresponding relationship when the screen is external. For example, as shown in Table 2 below, Table 2 is a table of the corresponding relationship between the preset PPI range, the default zoom factor and at least one zoom factor provided in an embodiment of the present disclosure. The screen is a built-in screen or an external screen.
[0078] Optionally, the screen is a built-in screen, and the at least one zoom factor includes at least one of the following: 0.8, 1.0, 1.2 and 1.5; wherein the corresponding relationship between the preset PPI range, the default zoom factor and the at least one zoom factor is as follows: the preset PPI range <140, the default zoom factor 1.0 corresponding to at least one default zoom factor includes: 0.8, 1.0, 1.2 and 1.5; the preset PPI range 140-170, the default zoom factor 1.0 corresponding to at least one default zoom factor includes: 0.8, 1.0, 1.2 and 1.5; the preset PPI range 170-200, the default zoom factor At least one default zoom factor corresponding to a magnification of 1.5 includes: 0.8, 1.0, 1.2 and 1.5; at least one default zoom factor corresponding to a preset PPI range of 200-230 and a default zoom factor of 1.666 includes: 0.8, 1.0, 1.2 and 1.5; at least one default zoom factor corresponding to a preset PPI range of 230-290 and a default zoom factor of 2.0 includes: 0.8, 1.0, 1.2 and 1.5; at least one default zoom factor corresponding to a preset PPI range ≥290 and a default zoom factor of 2.5 includes: 0.8, 1.0, 1.2 and 1.5.
[0079] Optionally, the screen is an external screen, and the at least one zoom factor includes at least one of the following: 0.5, 0.53, 0.67, 0.75, 0.8, 1.0, 1.2, 1.25, 1.333, 1.5 and 1.6. Among them, the correspondence between the preset PPI range, the default zoom factor and at least one zoom factor is as follows: the preset PPI range is less than 75, and the default zoom factor is 1.0, and the at least one default zoom factor corresponding to the default zoom factor includes: 1.0, 1.25 and 1.5; the preset PPI range is 75-125, and the at least one default zoom factor corresponding to the default zoom factor is 1.25 includes: 0.8, 1.0, 1.2 and 1.5; the preset PPI range is 125-150, and the at least one default zoom factor corresponding to the default zoom factor is 1.5 includes: 0.67, 1.0, 1.2 and 1.5; the preset PPI range is 150-175, and the at least one default zoom factor corresponding to the default zoom factor is 1.875 includes: 0.53, 0.8, 1.0, 1.333 and 1.6; the preset PPI range is ≥175, and the at least one default zoom factor corresponding to the default zoom factor is 2.0 includes: 0.5, 0.75, 1.0, 1.25 and 1.5.
[0080] Table 2
[0081]
[0082]
[0083] It should be noted that different zoom factors in Table 2 correspond to different zoom levels. According to the font size of the displayed content, the zoom factors are divided into five zoom levels: small, smaller, normal, larger, and larger.
[0084] S203: Display a zoom control corresponding to at least one zoom factor.
[0085] Optionally, the zoom control is displayed only when the user triggers an adjustment operation. Accordingly, this step is: in response to the adjustment operation for the screen resolution, a zoom control interface is displayed, wherein the zoom control interface includes at least one zoom control corresponding to the zoom multiple.
[0086] In this step, the adjustment operation can be any operation that triggers the zoom control interface. The adjustment operation can be a click operation, a slide operation, or a voice operation. Optionally, the adjustment operation is a single click operation on the "resolution zoom factor" control. Figure 3 As shown, the "Resolution Scaling Factor" control is a scaling factor selection box.
[0087] Among them, the zoom control can include the corresponding zoom multiple, which is convenient for users to distinguish and select. Figure 3 As shown, the zoom control interface includes zoom controls corresponding to four zoom factors, namely: a zoom control corresponding to a zoom factor of 0.8, a zoom control corresponding to a zoom factor of 1.0, a zoom control corresponding to a zoom factor of 1.2, and a zoom control corresponding to a zoom factor of 1.5.
[0088] S204: In response to a triggering operation on any zoom control, the default logical resolution is adjusted according to a target zoom factor corresponding to any zoom control.
[0089] Optionally, the default logical resolution includes horizontal resolution and vertical resolution; accordingly, this step is: determine a fourth ratio of the horizontal resolution to the target zoom factor, and adjust the horizontal resolution to the fourth ratio; determine a fifth ratio of the vertical resolution to the target zoom factor, and adjust the vertical resolution to the fifth ratio.
[0090] Exemplarily, the default logical resolution is 1536×864, wherein the horizontal resolution is 1536 and the vertical resolution is 864. The target zoom factor is 1.25. The fourth ratio of the horizontal resolution to the target zoom factor is determined to be 1280, and the horizontal resolution of 1536 is adjusted to 1280; the fifth ratio of the vertical resolution to the target zoom factor is determined to be 720, and the vertical resolution of 864 is adjusted to 720.
[0091] The screen resolution adjustment method provided in this embodiment first scales the physical resolution of the screen according to a default scaling factor to obtain a default logical resolution; then determines at least one scaling factor corresponding to the screen based on the default logical resolution and preset restrictions; finally, displays a zoom control corresponding to the scaling factor, and performs a secondary adjustment on the logical resolution based on the user's selection operation on any zoom control, that is, implements a function for users to customize the logical resolution, so that when users use the screen to browse content, they can easily adjust the logical resolution of the screen to adjust the display ratio of the browsed content, thereby improving the user experience of the electronic device.
[0092] Figure 4 This is a structural block diagram of a screen resolution adjustment device provided by an embodiment of the present disclosure, which is applied to a terminal device with an application installed. Figure 4 The device for adjusting the screen resolution includes: an acquisition module 401, a determination module 402, a display module 403 and an adjustment module 404.
[0093] The acquisition module 401 is used to acquire a default logical resolution of the screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor;
[0094] A determination module 402, configured to determine at least one zoom factor corresponding to the screen according to the default logical resolution and a preset restriction condition;
[0095] Display module 403, used to display at least one zoom control corresponding to the zoom factor;
[0096] The adjustment module 404 is used to adjust the default logical resolution according to the zoom factor corresponding to any zoom control in response to a trigger operation on any zoom control.
[0097] In one embodiment of the present disclosure, the default logical resolution includes a horizontal resolution; accordingly, the determination module 402 determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset restrictions, specifically including: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor; if the first ratio is any one of multiple common horizontal resolutions, it is determined that the restriction condition is satisfied, and at least one candidate zoom factor that satisfies the restriction condition is determined as the at least one zoom factor corresponding to the screen.
[0098] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; accordingly, the determination module 402 determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset restrictions, specifically including: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor and a second ratio of the vertical resolution to the candidate zoom factor; if the first ratio and / or the second ratio is an integer, it is determined that the restrictions are met, and at least one candidate zoom factor that meets the restrictions is determined as the at least one zoom factor corresponding to the screen.
[0099] According to one or more embodiments of the present disclosure, the screen is an external screen; the determination module 402 is also used to: select a minimum zoom factor with the smallest value from the at least one zoom factor; determine a third ratio of the default logical resolution to the minimum zoom factor; if the difference between the third ratio and the physical resolution is less than or equal to a preset difference, then determine at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0100] According to one or more embodiments of the present disclosure, the determination module 402 is further used to: if the difference between the third ratio and the physical resolution of the screen is greater than the preset difference, delete the minimum zoom factor from the at least one zoom factor; continue to select the minimum zoom factor with the smallest value from the at least one zoom factor; until the difference between the third ratio and the physical resolution of the screen is less than or equal to the preset difference, at least one candidate zoom factor that meets the restriction condition is determined as the at least one zoom factor corresponding to the screen.
[0101] According to one or more embodiments of the present disclosure, the display module 403 displays at least one zoom control corresponding to the zoom factor, specifically including: in response to an adjustment operation on the screen resolution, displaying a zoom control interface, wherein the zoom control interface includes at least one zoom control corresponding to the zoom factor.
[0102] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; the adjustment module 404 adjusts the default logical resolution according to the target zoom factor corresponding to any one of the zoom controls, specifically including: determining a fourth ratio of the horizontal resolution to the target zoom factor, and adjusting the horizontal resolution to the fourth ratio; determining a fifth ratio of the vertical resolution to the target zoom factor, and adjusting the vertical resolution to the fifth ratio.
[0103] According to one or more embodiments of the present disclosure, the plurality of common lateral resolutions include at least one of the following: 768, 1024, 1200, 1280, 1366, 1440, 1536, 1600, and 1920.
[0104] According to one or more embodiments of the present disclosure, the acquisition module 401 acquires the default logical resolution of the screen, specifically including: determining the number of pixels per inch (PPI) in the screen, and determining a target PPI range to which the PPI belongs from a plurality of preset PPI ranges; determining a default zoom factor corresponding to the target PPI range; and scaling the physical resolution of the screen according to the default zoom factor to obtain the default logical resolution.
[0105] According to one or more embodiments of the present disclosure, the determination module 402 determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions, specifically including: determining a default zoom factor corresponding to the default logical resolution; determining a target PPI range corresponding to the default zoom factor; and determining at least one zoom factor corresponding to the screen from the corresponding relationship between the preset PPI range, the default zoom factor and at least one zoom factor according to the target PPI range and the default zoom factor.
[0106] According to one or more embodiments of the present disclosure, the screen is a built-in screen, and the at least one zoom factor includes at least one of the following: 0.8, 1.0, 1.2 and 1.5; or, the screen is an external screen, and the at least one zoom factor includes at least one of the following: 0.5, 0.53, 0.67, 0.75, 0.8, 1.0, 1.2, 1.25, 1.333, 1.5 and 1.6.
[0107] The calling module 601, requesting module 602, querying module 603 and returning module 604 are connected in sequence. The device for adjusting screen resolution provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0108] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method for adjusting the screen resolution provided in any of the above embodiments of the present application.
[0109] Figure 5 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 The electronic device 500 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0110] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0111] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0112] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0113] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0114] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0115] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0116] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0119] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0120] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] In a first aspect, according to one or more embodiments of the present disclosure, a method for adjusting screen resolution is provided, which is applied to an electronic device, and includes:
[0122] Obtaining a default logical resolution of the screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor;
[0123] Determining at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions;
[0124] Displaying at least one zoom control corresponding to the zoom factor;
[0125] In response to a triggering operation on any zoom control, the default logical resolution is adjusted according to a target zoom factor corresponding to the any zoom control.
[0126] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution; accordingly, determining at least one zoom factor corresponding to the screen based on the default logical resolution and preset restrictions includes: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor; if the first ratio is any one of multiple common horizontal resolutions, determining that the restriction condition is satisfied, and determining at least one candidate zoom factor that satisfies the restriction condition as the at least one zoom factor corresponding to the screen.
[0127] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; accordingly, determining at least one zoom factor corresponding to the screen based on the default logical resolution and preset restriction conditions includes: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor and a second ratio of the vertical resolution to the candidate zoom factor; if the first ratio and / or the second ratio is an integer, it is determined that the restriction conditions are met, and at least one candidate zoom factor that meets the restriction conditions is determined as the at least one zoom factor corresponding to the screen.
[0128] According to one or more embodiments of the present disclosure, the screen is an external screen; before determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen, it also includes: selecting a minimum zoom factor with the smallest value from the at least one zoom factor; determining a third ratio of the default logical resolution to the minimum zoom factor; if the difference between the third ratio and the physical resolution is less than or equal to a preset difference, executing the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0129] According to one or more embodiments of the present disclosure, it also includes: if the difference between the third ratio and the physical resolution of the screen is greater than the preset difference, deleting the minimum zoom factor from the at least one zoom factor; continuing to select the minimum zoom factor with the smallest value from the at least one zoom factor; until the difference between the third ratio and the physical resolution of the screen is less than or equal to the preset difference, the step of determining at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen is executed.
[0130] According to one or more embodiments of the present disclosure, the displaying of at least one zoom control corresponding to the zoom factor includes: in response to an adjustment operation on the screen resolution, displaying a zoom control interface, the zoom control interface including at least one zoom control corresponding to the zoom factor.
[0131] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; the adjusting the default logical resolution according to the target zoom factor corresponding to any one of the zoom controls includes: determining a fourth ratio of the horizontal resolution to the target zoom factor, and adjusting the horizontal resolution to the fourth ratio; determining a fifth ratio of the vertical resolution to the target zoom factor, and adjusting the vertical resolution to the fifth ratio.
[0132] According to one or more embodiments of the present disclosure, the plurality of common lateral resolutions include at least one of the following: 768, 1024, 1200, 1280, 1366, 1440, 1536, 1600, and 1920.
[0133] According to one or more embodiments of the present disclosure, obtaining the default logical resolution of the screen includes: determining the number of pixels per inch (PPI) in the screen, and determining a target PPI range to which the PPI belongs from a plurality of preset PPI ranges; determining a default zoom factor corresponding to the target PPI range; and scaling the physical resolution of the screen according to the default zoom factor to obtain the default logical resolution.
[0134] According to one or more embodiments of the present disclosure, determining at least one zoom factor corresponding to the screen based on the default logical resolution and preset restriction conditions includes: determining a default zoom factor corresponding to the default logical resolution; determining a target PPI range corresponding to the default zoom factor; and determining at least one zoom factor corresponding to the screen from a correspondence between a preset PPI range, a default zoom factor and at least one zoom factor based on the target PPI range and the default zoom factor.
[0135] According to one or more embodiments of the present disclosure, the screen is a built-in screen, and the at least one zoom factor includes at least one of the following: 0.8, 1.0, 1.2 and 1.5; or, the screen is an external screen, and the at least one zoom factor includes at least one of the following: 0.5, 0.53, 0.67, 0.75, 0.8, 1.0, 1.2, 1.25, 1.333, 1.5 and 1.6.
[0136] In a second aspect, according to one or more embodiments of the present disclosure, a device for adjusting screen resolution is provided, which is applied to an electronic device, including:
[0137] An acquisition module, used for acquiring a default logical resolution of a screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor;
[0138] A determination module, used to determine at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions;
[0139] A display module, used to display at least one zoom control corresponding to the zoom factor;
[0140] The adjustment module is used to adjust the default logical resolution according to the zoom factor corresponding to any zoom control in response to a trigger operation of any zoom control.
[0141] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution; accordingly, the determination module determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset constraints, specifically including: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor; if the first ratio is any one of multiple common horizontal resolutions, it is determined that the constraint condition is satisfied, and at least one candidate zoom factor that satisfies the constraint condition is determined as the at least one zoom factor corresponding to the screen.
[0142] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; accordingly, the determination module determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset restrictions, specifically including: obtaining multiple candidate zoom factors; for each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor and a second ratio of the vertical resolution to the candidate zoom factor; if the first ratio and / or the second ratio is an integer, it is determined that the restrictions are met, and at least one candidate zoom factor that meets the restrictions is determined as the at least one zoom factor corresponding to the screen.
[0143] According to one or more embodiments of the present disclosure, the screen is an external screen; the determination module is further used to: select a minimum zoom factor with the smallest value from the at least one zoom factor; determine a third ratio of the default logical resolution to the minimum zoom factor; if the difference between the third ratio and the physical resolution is less than or equal to a preset difference, then determine at least one candidate zoom factor that meets the restriction condition as at least one zoom factor corresponding to the screen.
[0144] According to one or more embodiments of the present disclosure, the determination module is further used to: if the difference between the third ratio and the physical resolution of the screen is greater than the preset difference, delete the minimum zoom factor from the at least one zoom factor; continue to select the minimum zoom factor with the smallest value from the at least one zoom factor; until the difference between the third ratio and the physical resolution of the screen is less than or equal to the preset difference, at least one candidate zoom factor that meets the restriction condition is determined as the at least one zoom factor corresponding to the screen.
[0145] According to one or more embodiments of the present disclosure, the display module displays at least one zoom control corresponding to the zoom factor, specifically including: in response to an adjustment operation on the screen resolution, displaying a zoom control interface, wherein the zoom control interface includes at least one zoom control corresponding to the zoom factor.
[0146] According to one or more embodiments of the present disclosure, the default logical resolution includes a horizontal resolution and a vertical resolution; the adjustment module adjusts the default logical resolution according to the target zoom factor corresponding to any one of the zoom controls, specifically including: determining a fourth ratio of the horizontal resolution to the target zoom factor, and adjusting the horizontal resolution to the fourth ratio; determining a fifth ratio of the vertical resolution to the target zoom factor, and adjusting the vertical resolution to the fifth ratio.
[0147] According to one or more embodiments of the present disclosure, the plurality of common lateral resolutions include at least one of the following: 768, 1024, 1200, 1280, 1366, 1440, 1536, 1600, and 1920.
[0148] According to one or more embodiments of the present disclosure, the acquisition module acquires the default logical resolution of the screen, specifically including: determining the number of pixels per inch (PPI) in the screen, and determining a target PPI range to which the PPI belongs from a plurality of preset PPI ranges; determining a default zoom factor corresponding to the target PPI range; and scaling the physical resolution of the screen according to the default zoom factor to obtain the default logical resolution.
[0149] According to one or more embodiments of the present disclosure, the determination module determines at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions, specifically including: determining a default zoom factor corresponding to the default logical resolution; determining a target PPI range corresponding to the default zoom factor; and determining at least one zoom factor corresponding to the screen from the corresponding relationship between the preset PPI range, the default zoom factor and at least one zoom factor according to the target PPI range and the default zoom factor.
[0150] According to one or more embodiments of the present disclosure, the screen is a built-in screen, and the at least one zoom factor includes at least one of the following: 0.8, 1.0, 1.2 and 1.5; or, the screen is an external screen, and the at least one zoom factor includes at least one of the following: 0.5, 0.53, 0.67, 0.75, 0.8, 1.0, 1.2, 1.25, 1.333, 1.5 and 1.6.
[0151] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0152] The memory stores computer-executable instructions;
[0153] The processor executes the computer-executable instructions stored in the memory to implement the method for adjusting the screen resolution as described in the first aspect and various possible designs of the first aspect.
[0154] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the method for adjusting the screen resolution as described in the first aspect and various possible designs of the first aspect is implemented.
[0155] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method for adjusting the screen resolution as described in the first aspect and various possible designs of the first aspect.
[0156] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0157] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0158] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for adjusting screen resolution, characterized in that: Used in electronic equipment, including: Obtaining a default logical resolution of the screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor; Determining at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions; Displaying at least one zoom control corresponding to the zoom factor; In response to a triggering operation on any zoom control, the default logical resolution is adjusted according to a target zoom factor corresponding to the any zoom control.
2. The method according to claim 1, characterized in that The default logical resolution includes a lateral resolution; Accordingly, determining at least one zoom factor corresponding to the screen according to the default logical resolution and the preset restriction condition includes: Get multiple candidate zoom factors; For each candidate zoom factor, determining a first ratio of the lateral resolution to the candidate zoom factor; If the first ratio is any one of a plurality of common horizontal resolutions, it is determined that the restriction condition is satisfied, and at least one candidate zoom factor satisfying the restriction condition is determined as at least one zoom factor corresponding to the screen.
3. The method according to claim 1, characterized in that The default logical resolution includes a horizontal resolution and a vertical resolution; Accordingly, determining at least one zoom factor corresponding to the screen according to the default logical resolution and the preset restriction condition includes: Get multiple candidate zoom factors; For each candidate zoom factor, determining a first ratio of the horizontal resolution to the candidate zoom factor and a second ratio of the vertical resolution to the candidate zoom factor; If the first ratio and / or the second ratio is an integer, it is determined that the restriction condition is satisfied, and at least one candidate zoom factor satisfying the restriction condition is determined as at least one zoom factor corresponding to the screen.
4. The method according to claim 2 or 3, characterized in that: The screen is an external screen; before determining at least one candidate zoom factor satisfying the restriction condition as at least one zoom factor corresponding to the screen, the method further includes: Selecting a minimum zoom factor with the smallest value from the at least one zoom factor; determining a third ratio of the default logical resolution to the minimum zoom factor; If the difference between the third ratio and the physical resolution is less than or equal to a preset difference, a step of determining at least one candidate zoom factor satisfying the restriction condition as at least one zoom factor corresponding to the screen is performed.
5. The method according to claim 4, characterized in that Also includes: If the difference between the third ratio and the physical resolution of the screen is greater than the preset difference, deleting the minimum zoom factor from the at least one zoom factor; Continue to select a minimum zoom factor with the smallest value from the at least one zoom factor; The step of determining at least one candidate zoom factor satisfying the restriction condition as at least one zoom factor corresponding to the screen is performed until the difference between the third ratio and the physical resolution of the screen is less than or equal to the preset difference.
6. The method according to claim 1, characterized in that The displaying of at least one zoom control corresponding to the zoom factor includes: In response to the adjustment operation on the screen resolution, a zoom control interface is displayed, and the zoom control interface includes at least one zoom control corresponding to the zoom multiple.
7. The method according to claim 1, characterized in that The default logical resolution includes a horizontal resolution and a vertical resolution; The adjusting the default logical resolution according to the target zoom factor corresponding to any one of the zoom controls includes: Determining a fourth ratio of the lateral resolution to the target zoom factor, and adjusting the lateral resolution to the fourth ratio; A fifth ratio of the vertical resolution to the target zoom factor is determined, and the vertical resolution is adjusted to the fifth ratio.
8. The method according to claim 2, characterized in that: The plurality of common lateral resolutions include at least one of: 768, 1024, 1200, 1280, 1366, 1440, 1536, 1600, 1920.
9. The method according to claim 1, characterized in that: The method for obtaining the default logical resolution of the screen includes: Determine the number of pixels per inch (PPI) of the screen, and determine a target PPI range to which the PPI belongs from a plurality of preset PPI ranges; Determine a default zoom factor corresponding to the target PPI range; The physical resolution of the screen is scaled according to the default scaling factor to obtain the default logical resolution.
10. The method according to claim 9, characterized in that The determining, according to the default logical resolution and the preset restriction condition, at least one zoom factor corresponding to the screen comprises: Determine a default scaling factor corresponding to the default logical resolution; Determine a target PPI range corresponding to the default zoom factor; According to the target PPI range and the default zoom factor, at least one zoom factor corresponding to the screen is determined from a correspondence between a preset PPI range, a default zoom factor and at least one zoom factor.
11. The method according to claim 10, characterized in that The screen is a built-in screen, and the at least one zoom factor includes at least one of the following: 0.8, 1.0, 1.2 and 1.5; or, The screen is an external screen, and the at least one zoom factor includes at least one of the following: 0.5, 0.53, 0.67, 0.75, 0.8, 1.0, 1.2, 1.25, 1.333, 1.5 and 1.
6.
12. A device for adjusting screen resolution, characterized in that: Used in electronic equipment, including: An acquisition module, used for acquiring a default logical resolution of a screen, wherein the default logical resolution is obtained by scaling the physical resolution of the screen according to a default scaling factor; A determination module, configured to determine at least one zoom factor corresponding to the screen according to the default logical resolution and preset restriction conditions; A display module, used to display at least one zoom control corresponding to the zoom factor; The adjustment module is used to adjust the default logical resolution according to the zoom factor corresponding to any zoom control in response to a trigger operation on any zoom control.
13. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for adjusting the screen resolution according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the method for adjusting the screen resolution according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method for adjusting the screen resolution as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Image display method and device
CN105578268A
Method and device for performing adaption on interface control
CN105760178A
Method and device for displaying video images
CN106791915A
Interaction object control method and device
CN107450841A
Android UI adaptation method and device
CN108415754A