Methods and apparatuses for automatically adapting to display screens, electronic devices, media

CN115705133BActive Publication Date: 2026-09-18QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110893376.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-04
Publication Date
2026-09-18
Estimated Expiration
2041-08-04

AI Technical Summary

Technical Problem

[0005]通过获取显示屏幕的纵横比,确定调整系数,直接改变图片横纵比,会导致图片严重失真

Benefits of technology

[0018] By obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the content on the target display screen are determined. By calculating the rate of change of width and height during the adjustment of the display content, the display content is iteratively adjusted proportionally, thereby effectively reducing the impact of image distortion, improving the accuracy of adjustment control, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115705133B_ABST
    Figure CN115705133B_ABST
Patent Text Reader

Abstract

This application relates to the field of display screen adaptation technology, and discloses a method for automatically adapting to a display screen, comprising: obtaining the size parameters of a target display screen and the display parameters of the display content on the current display screen; determining the display area and display size of the display content on the target display screen based on the size parameters and the display parameters; and iteratively adjusting the size of the display content so that the display content is displayed in the display area according to the display size. By obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the display content on the target display screen are determined, and by calculating the rate of change of width and height during the adjustment process of the display content, the display content is iteratively adjusted proportionally, thereby effectively reducing the impact of image distortion and improving the user experience. This application also discloses a device, electronic device, and storage medium for automatically adapting to a display screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display screen adaptation technology, such as a method and apparatus for automatically adapting to a display screen, electronic devices, and storage media. Background Technology

[0002] With the advancement of technology, users own more electronic products. In order to achieve the expected display effect of images or text on the display screens of different electronic products, it is necessary to adjust the display parameters of images or text in advance.

[0003] Currently, existing technical solutions provide a method for automatic image display adaptation. Specifically, this involves obtaining the aspect ratio of the display screen, determining an aspect ratio adjustment coefficient based on the screen's aspect ratio, and thereby adjusting the aspect ratio of the image to be displayed so that it adapts to the display screen.

[0004] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art:

[0005] By obtaining the aspect ratio of the display screen and determining the adjustment coefficient, directly changing the aspect ratio of the image will result in severe image distortion. Summary of the Invention

[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0007] This disclosure provides a method, apparatus, electronic device, and storage medium for automatically adapting to display screens to reduce image distortion.

[0008] In some embodiments, the method for automatically adapting to the display screen includes:

[0009] Obtain the size parameters of the target display screen and the display parameters of the content on the current display screen;

[0010] The display area and display size of the display content on the target display screen are determined based on the size parameters and the display parameters;

[0011] The size of the displayed content is iteratively adjusted so that the displayed content is displayed in the display area according to the displayed size.

[0012] In some embodiments, the means for automatically adapting to the display screen includes:

[0013] A processor and a memory storing program instructions, characterized in that the processor is configured to, when executing the program instructions, perform the method described above for automatically adapting to a display screen.

[0014] In some embodiments, the electronic device, including a display screen, further includes:

[0015] The device described above is used for automatically adapting to the display screen.

[0016] In some embodiments, the storage medium stores program instructions that, when executed, perform the method described above for automatically adapting to the display screen.

[0017] The method, apparatus, electronic device, and storage medium for automatic screen adaptation provided in this disclosure can achieve the following technical effects:

[0018] By obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the content on the target display screen are determined. By calculating the rate of change of width and height during the adjustment of the display content, the display content is iteratively adjusted proportionally, thereby effectively reducing the impact of image distortion, improving the accuracy of adjustment control, and enhancing the user experience.

[0019] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0020] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:

[0021] Figure 1 This is a schematic diagram of a method for automatically adapting to a display screen provided in an embodiment of this disclosure;

[0022] Figure 2 This is a schematic diagram of another method for automatically adapting to a display screen provided in an embodiment of this disclosure;

[0023] Figure 3 This disclosure provides an iterative adjustment flowchart;

[0024] Figure 4 This is a schematic diagram of another method for automatically adapting to a display screen provided in an embodiment of this disclosure;

[0025] Figure 5 This is another flowchart of iterative adjustments provided in this disclosure embodiment;

[0026] Figure 6 This is a schematic diagram of another method for automatically adapting to a display screen provided in an embodiment of this disclosure;

[0027] Figure 7 This is a schematic diagram of an apparatus for automatically adapting to a display screen, provided in an embodiment of this disclosure. Detailed Implementation

[0028] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0029] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0030] Unless otherwise stated, the term "multiple" means two or more.

[0031] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0032] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0033] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0034] In this disclosure, the electronic device can refer to a smart home appliance formed by incorporating microprocessors, sensor technology, and network communication technology into home appliances. The electronic device can also refer to a mobile device with wireless connectivity, which can communicate with the aforementioned smart home appliances via the internet, or directly via Bluetooth, Wi-Fi, or other methods. In some embodiments, the electronic device is, for example, a mobile device, a computer, or an in-vehicle device built into a hovercraft, or any combination thereof. Mobile devices may include, for example, mobile phones, smart home devices, wearable devices, smart mobile devices, virtual reality devices, or any combination thereof. Wearable devices include, for example, smartwatches, smart bracelets, pedometers, etc.

[0035] Combination Figure 1 As shown, this disclosure provides a method for automatically adapting to a display screen, including:

[0036] S01, the electronic device obtains the size parameters of the target display screen and the display parameters of the display content on the current display screen.

[0037] S02, the electronic device determines the display area and display size of the display content on the target display screen based on the size parameters and display parameters.

[0038] In this technical solution, the electronic device determines the ideal display parameters of the content on the target display screen based on the size parameters of the target display screen and the display parameters of the content on the current display screen. In practical applications, the display area of ​​the content on the target display screen can be determined by the distance of the content from the height-related edge and the distance of the content from the width-related edge on the target display screen. In practical applications, the display size of the content on the target display screen can be the target width and the target height of the content.

[0039] S03, the electronic device iteratively adjusts the size of the displayed content so that the displayed content is displayed in the display area according to the display size.

[0040] In this technical solution, the electronic device iteratively adjusts the size of the displayed content, which can be done by adjusting the height and width of the displayed content proportionally. The adjustment range of each iteration cycle can be understood as the adjustment step size of the current iteration cycle.

[0041] The method for automatically adapting to a display screen provided in this disclosure obtains the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, determines the ideal display parameters of the content on the target display screen, and performs proportional iterative adjustments to the content by calculating the rate of change of width and height during the adjustment process. This effectively reduces the impact of image distortion, improves the accuracy of adjustment control, and enhances the user experience.

[0042] Optionally, the size parameters of the target display screen include the width and height of the target display screen; the display parameters of the display content on the current display screen include the width of the display content, the height of the display content, the width of the current display screen, the height of the current display screen, and the relative position of the display content on the current display screen.

[0043] In some alternative implementations, combined with Figure 2 As shown in the embodiments of this disclosure, another method for automatically adapting to a display screen may include:

[0044] S11, the electronic device obtains the size parameters of the target display screen and the display parameters of the display content on the current display screen.

[0045] S12, the electronic device determines the display area and display size of the display content on the target display screen based on the size parameters and display parameters.

[0046] S13, the electronic device acquires the display orientation of the displayed content and the display orientation of the target display screen.

[0047] S14, if the display orientation of the displayed content is inconsistent with the display orientation of the target display screen, the electronic device rotates the displayed content to be consistent with the display orientation of the target display screen.

[0048] S15, the electronic device iteratively adjusts the size of the displayed content so that the displayed content is displayed in the display area according to the display size.

[0049] In practical applications, when adapting an image from a mobile phone screen to a computer screen, the mobile phone screen is the current display, and the computer screen is the target display. The image's display orientation on the mobile phone screen is the horizontal direction of the coordinate system, while the computer screen's display orientation is the vertical direction. That is, after obtaining the size parameters of the computer screen and the image's display parameters on the mobile phone screen, the image's display orientation needs to be rotated to match the computer screen's orientation. It should be understood that during this rotation, the image's size and position information remain unchanged.

[0050] In this way, by pre-adjusting the display orientation of the content to match that of the target display screen, the display content can avoid failing to achieve the expected display effect during the screen adaptation process, thus providing a basis for subsequent adjustments to the display content.

[0051] Optionally, based on size parameters and display parameters, the electronic device determines the display area and display size of the displayed content on the target display screen, including:

[0052] Calculate c1 = c2 × α1 to obtain the target height c1 of the displayed content;

[0053] Calculate c3 = c4 × α2 to obtain the target width c3 of the displayed content;

[0054] Calculate d1 = d2 × α1 to obtain the distance d1 of the displayed content on the edge of the target display screen related to its height;

[0055] Calculate d3 = d4 × α2 to obtain the distance d3 of the displayed content on the side of the target display screen related to its width;

[0056] The display size of the content on the target display screen is determined according to the target height c1 and the target width c3;

[0057] Based on distances d1 and d3, determine the display area of ​​the content on the target display screen;

[0058] Where α1 represents the height conversion coefficient of the displayed content, α2 represents the width conversion coefficient of the displayed content, c2 represents the height of the displayed content on the current screen, c4 represents the width of the displayed content on the current screen; d2 represents the distance of the displayed content on the current screen relative to the height, and d4 represents the distance of the displayed content on the current screen relative to the width; where α1 is determined based on the height of the target screen and the height of the current screen, and α2 is determined based on the width of the target screen and the width of the current screen.

[0059] Optionally, the electronic device determines α1 based on the height of the target display screen and the current display screen height, including:

[0060] calculate Obtain the height conversion factor α1 of the displayed content;

[0061] Where a1 represents the height of the target display screen and b1 represents the height of the current display screen.

[0062] Optionally, the electronic device determines α2 based on the width of the target display screen and the width of the current display screen, including:

[0063] calculate Obtain the width conversion factor α2 of the displayed content;

[0064] Where a2 represents the width of the target display screen and b2 represents the width of the current display screen.

[0065] In practical applications, when adapting a text box from a smartwatch screen to a mobile phone screen, the smartwatch screen is the current display, and the mobile phone screen is the target display. It should be understood that the text box has automatic line wrapping, and the font size adjusts according to the text box size. The smartwatch screen can be 35 mm wide and 40 mm high, while the mobile phone screen can be 70 mm wide and 160 mm high. The width and height of the text box can be expressed in millimeters, centimeters, or other units of length, or they can be represented by the distance between corresponding points related to the text box's width or height within the coordinate area of ​​the current display screen. This application does not impose specific limitations on this, as long as it reflects the width and height of the text box. If the current width of the text box is 4 and the current height is 7, based on the above size parameters, the height conversion factor α1 of the displayed content is 4, and the width conversion factor α2 of the displayed content is 2. Therefore, the target height c1 of the displayed content is determined to be 28, and the target width c3 of the displayed content is determined to be 8.

[0066] In this way, by calculating the height conversion factor and the width conversion factor of the displayed content, the display size of the displayed content in the ideal display parameters of the target display is determined, providing a data basis for subsequent adjustments to the displayed content.

[0067] In this technical solution, the distance d2 of the displayed content relative to the height of the current display screen and the distance d4 of the displayed content relative to the width of the current display screen can be determined based on the relative position of the displayed content on the current display screen. It should be understood that, when the relative position of the displayed content on the current display screen is known, the distance between the displayed content and the edge representing the height of the current display screen can be obtained, which is equivalent to d2; similarly, it should be understood that, when the relative position of the displayed content on the current display screen is known, the distance between the displayed content and the edge representing the width of the current display screen can be obtained, which is equivalent to d4.

[0068] Optionally, the distance d2 of the displayed content on the edge related to the height of the current display screen can be the distance between the center point of the displayed content and the edge representing the height of the current display screen.

[0069] Optionally, the distance d2 of the displayed content on the edge related to the height of the current display screen can be the distance between any point on one edge of the displayed content and the edge representing the height of the current display screen.

[0070] Optionally, the distance d4 of the displayed content on the edge related to the width of the current display screen can be the distance between the center point of the displayed content and the edge representing the width of the current display screen.

[0071] Optionally, the distance d4 of the displayed content on the edge related to the width of the current display screen can be the distance between any point on one edge of the displayed content and the edge representing the width of the current display screen.

[0072] In practical applications, when adapting an image from a computer screen to a smart TV screen, the computer screen is the current display, and the smart TV screen is the target display. With both the computer screen and the smart TV screen placed vertically on the ground, the side closest to the ground is considered the bottom edge of the display, the side opposite the bottom edge is considered the top edge, and the two edges adjacent to the bottom edge are considered the first and second side edges, respectively. That is, the distance from any point on one edge of the image to the first or second side edge of the computer screen is equivalent to the distance d2 of the displayed content on the current screen relative to its height in this technical solution; the distance from any point on one edge of the image to the bottom or top edge of the computer screen is equivalent to the distance d4 of the displayed content on the current screen relative to its width in this technical solution. It should be understood that the distance from the point on the image that is identical to the determined d2 to the first or second side of the smart TV display screen is equivalent to the distance d1 of the display content on the target display screen relative to its height in this technical solution; the distance from the point on the image that is identical to the determined d4 to the bottom or top side of the smart TV display screen is equivalent to the distance d3 of the display content on the target display screen relative to its width in this technical solution.

[0073] In this way, by determining the distance of the displayed content to the height-related edge of the target display screen, and the distance of the displayed content to the width-related edge of the target display screen, the display area of ​​the displayed content in the ideal display parameters of the target display screen is determined, providing a data basis for the subsequent adaptation of the displayed content to the target display screen.

[0074] In some alternative implementations, combined with Figure 3 As shown, this disclosure provides an iterative adjustment flowchart in which an electronic device iteratively adjusts the size of displayed content, including:

[0075] S21, the height β of the displayed content is adjusted for the i-th time. i and the width δ of the displayed content i .

[0076] S22, determine the height change rate Eβ of the displayed content after the i-th adjustment. i and the rate of change of width Eδ i .

[0077] S23, if Eβi or Eδ i If a change in value occurs (positive or negative), stop adjusting the height and width of the displayed content; otherwise, continue adjusting the height β of the displayed content for the (i+1)th time. i+1 and the width δ of the displayed content i+1 Where i is a positive integer greater than 0.

[0078] Optionally, the height β of the displayed content is adjusted for the i-th time. i ,include:

[0079] Calculate β i =β i-1 +e i1 Get the height β of the displayed content after the i-th adjustment. i ;

[0080] Where, β i-1 This indicates the (i-1)th adjustment of the displayed content height, e i1 This indicates the step size for iteratively adjusting the height of the displayed content in the i-th iteration.

[0081] Optionally, the width δ of the displayed content is adjusted for the i-th time. i ,include:

[0082] Calculate δ i =δ i-1 +e i2 Obtain the width δ of the displayed content during the i-th adjustment. i ;

[0083] Where, δ i-1 This indicates the (i-1)th adjustment of the width of the displayed content, e i2 This indicates the step size for iterative adjustment of the displayed content width in the i-th iteration.

[0084] In this technical solution, it should be understood that e i1 With e i2 The value of can be positive or negative.

[0085] In practical applications, when adapting a text box from a computer screen to a mobile phone screen, the computer screen is the current display, and the mobile phone screen is the target display. It should be understood that the height β of the displayed content is adjusted starting from the i-th time. i and the width δ of the displayed content i Previously, the text box's height was determined by its position on the computer screen, and its width by its position on the mobile phone screen. In practical applications, the height β of the displayed content is adjusted starting from the i-th time. i and the width δ of the displayed content iPreviously, if the height of the text box was 50 and the width was 30, the first iteration of height adjustment for the displayed content would have a step size e. 11 The value is negative 10, and the step size e is adjusted in the second height iteration of the displayed content. 21 The value is negative 5, and the first iteration of the width adjustment step is e. 12 The value is negative 6, and the first iteration of the width adjustment step is e. 22 The value is -3. After the first adjustment, the corresponding β1 value is 40 and δ1 value is 24. After the second adjustment, the corresponding β1 value is 35 and δ1 value is 21, and so on for the remaining adjustments.

[0086] Optionally, e i1 e i2 The proportional relationship is the same as that of β0 and δ0.

[0087] Where β0 represents the height of the displayed content on the current screen, and δ0 represents the width of the displayed content on the current screen.

[0088] In some alternative implementations, e i1 With e i2 The value can be preset.

[0089] Optionally, e i1 With e i2 The value can be fixed.

[0090] Optionally, e i1 With e i2 The value can be variable.

[0091] In some alternative implementations, e i1 The value of satisfies |e i1 |greater than|e i+11 |,e i2 The value of satisfies |e i2 |greater than|e i+12 |

[0092] In practical applications, it should be understood that, in order to reduce the number of operations performed by electronic devices, the e in the initial stage of iteration... i1 With e i2 The absolute value of the value should be greater than e before the iteration stops. i1 With e i2 The absolute value of the value, i.e., e 11 The absolute value is greater than e 21 The absolute value of e; 12 The absolute value is greater than e 22 The absolute value of.

[0093] By using height and width iteration adjustment steps that are proportional to the width and height of the displayed content on the current screen, the width and height of the displayed content can be adjusted proportionally. This effectively reduces the impact of image distortion, improves the accuracy of adjustment control, and enhances the user experience.

[0094] Optionally, the electronic device determines the height variation rate Eβ of the displayed content in the following manner. i and the rate of change of width Eδ i :

[0095] calculate Obtain the height change rate of the displayed content after the i-th adjustment. Where t is the sampling period of the iterative adjustment.

[0096] Optionally, the electronic device determines the width variation rate Eδ of the displayed content in the following manner. i :

[0097] calculate Obtain the rate of change of the width of the displayed content after the i-th adjustment. Where t is the sampling period of the iterative adjustment.

[0098] In practical applications, if Eβ i or Eδ i The fact that adjustments to the height and width of the displayed content cease when a positive or negative value changes can be understood as determining Eβ. i-1 With Eβ i The positive or negative value state, or to determine Eδ i-1 With Eδ i The positive and negative states, in Eβ i-1 With Eβ i , or Eδ i-1 With Eδ i If the positive or negative value of Eβ changes, the adjustment of the height and width of the displayed content stops. It should be understood that during the adaptation process from the current display to the target display, if the size of the current display is smaller than the size of the target display, Eβ is adjusted in each iteration. i With Eδ i It's a gradual reduction process; if the current display size is larger than the target display size, Eβ is adjusted in each iteration. i With Eδ i It's a gradual process. In Eβ i or Eδ i When the positive or negative value of a certain term in Eβ changes, that is, when the change occurs... i or Eδ i The corresponding adjusted height or width of the displayed content reaches or exceeds the display size. It should be understood that in Eβ... ior Eδ i When one of the terms takes a value of zero, it is equivalent to Eβ. i or Eδ i The width or height of the corresponding display content achieves the ideal display parameters for the content on the target display screen.

[0099] In this way, by judging whether the positive or negative value of the height change rate or width change rate of the displayed content changes after the i-th adjustment, the termination condition of the iterative adjustment process of stopping the displayed content can be used to effectively avoid data oscillations that occur when the displayed content fails to reach the display size in the ideal display parameters of the target display screen without distortion.

[0100] Combination Figure 4 As shown in the embodiments of this disclosure, another method for automatically adapting to a display screen is provided, including:

[0101] S31, the electronic device acquires the size parameters of the target display screen and the display parameters of the display content on the current display screen.

[0102] S32, the electronic device determines the display area and display size of the display content on the target display screen based on the size parameters and display parameters.

[0103] S33, the electronic device performs its first iterative adjustment to the size of the displayed content.

[0104] S34, the electronic device obtains the display content height iteration adjustment step size, display content width iteration adjustment step size, and the current size of the display content when the first iteration adjustment stops.

[0105] S35, when the height and width change rates of the displayed content change in the first iteration change state change, the electronic device determines the second iteration adjustment step size of the displayed content height and the second iteration adjustment step size of the displayed content width based on the iterative adjustment step size of the displayed content height and the iterative adjustment step size of the displayed content width.

[0106] In practical applications, it should be understood that after the first iteration of adjusting the size of the displayed content, the size of the displayed content has reached or is close to the display size. That is, the change in the height and width change rates of the displayed content during the first iteration can be understood as the size of the displayed content approaching the display size.

[0107] S36, the electronic device performs a second iteration to adjust the current size of the displayed content so that the displayed content is displayed in the display area according to the display size.

[0108] In this way, by obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the content on the target display screen are determined. By calculating the rate of change of width and height during the adjustment of the display content, and by performing two different iterative adjustments on the display content, the impact of image distortion is further reduced, the accuracy of adjustment control is improved, and the user experience is enhanced.

[0109] Optionally, the step size for the second iteration adjustment of the display content height and the second iteration adjustment step size of the display content width are determined based on the iterative adjustment step size of the display content height and the display content width, including:

[0110] With a fixed coefficient, reduce the iteration adjustment step size of the display content height and the iteration adjustment step size of the display content width at the stop state of the first iteration adjustment; use the reduced iteration adjustment step size of the display content height as the iteration adjustment step size of the second iteration adjustment of the display content height; use the reduced iteration adjustment step size of the display content width as the iteration adjustment step size of the second iteration adjustment of the display content width.

[0111] In this technical solution, the fixed coefficient can be 17%, 20%, 5% or other values, and this application does not make a specific limitation on it.

[0112] In practical applications, if the display content height is adjusted by a step size of 20 and the display content width by a step size of 15, with a fixed coefficient of 10%, when the first iteration of adjustment stops, then the second iteration of adjustment for the display content height will be 2 and the second iteration of adjustment for the display content width will be 1.5.

[0113] In this way, by obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the content on the target display screen are determined. By calculating the rate of change of width and height during the adjustment of the display content, and by performing two different iterative adjustments on the display content, the impact of image distortion is further reduced, the accuracy of adjustment control is improved, and the user experience is enhanced.

[0114] In some alternative implementations, combined with Figure 5 As shown, this disclosure provides a flowchart of another iterative adjustment. The electronic device performs a second iterative adjustment to the current size of the displayed content, including:

[0115] S41, the height β of the displayed content is adjusted for the j-th time. j and the width δ of the displayed content j .

[0116] S42, determine the height change rate Eβ of the displayed content after the j-th adjustment. j and the rate of change of width Eδj .

[0117] S43, if Eβ j or Eδ j If a change in value occurs (positive or negative), stop adjusting the height and width of the displayed content; otherwise, continue adjusting the height β of the displayed content for the (j+1)th time. j+1 and the width δ of the displayed content j+1 .

[0118] Where j is a positive integer greater than 0.

[0119] Optionally, the height β of the displayed content is adjusted for the j-th time. j ,include:

[0120] Calculate β j =β j-1 +e j1 Obtain the height β of the displayed content after the j-th adjustment. j ;

[0121] Where, β j-1 This indicates the (j-1)th adjustment of the displayed content height, e j1 This indicates the step size for iteratively adjusting the height of the displayed content in the j-th iteration.

[0122] Optionally, the width δ of the displayed content is adjusted for the j-th time. j ,include:

[0123] Calculate δ j =δ j-1 +e j2 Obtain the width δ of the displayed content during the j-th adjustment. j ;

[0124] Where, δ j-1 This indicates the (j-1)th adjustment of the displayed content width, e j2 This indicates the step size for iterative adjustment of the displayed content width in the j-th iteration.

[0125] Optionally, the height variation rate Eβ of the displayed content is determined as follows: j and the rate of change of width Eδ j :

[0126] calculate Obtain the height change rate of the displayed content after the j-th adjustment. Where t is the sampling period of the iterative adjustment.

[0127] Optionally, the width variation rate Eδ of the displayed content is determined as follows: j :

[0128] calculate Obtain the rate of change of the width of the displayed content after the j-th adjustment. Where t is the sampling period of the iterative adjustment.

[0129] In practical applications, it should be understood that before the electronic device performs a second iteration to adjust the current size of the displayed content, the dimensions corresponding to the current size of the displayed content are the current sizes of the displayed content at the state where the first iteration stopped. That is, the height and width of the displayed content at the time the first iteration stopped.

[0130] In this way, by obtaining the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the ideal display parameters of the content on the target display screen are determined. By calculating the rate of change of width and height during the adjustment of the display content, and by performing two iterative adjustments of different lengths on the display content, the impact of image distortion is further reduced, the accuracy of adjustment control is improved, and the user experience is enhanced.

[0131] In some alternative implementations, combined with Figure 6 As shown in the embodiments of this disclosure, another method for automatically adapting to a display screen may include:

[0132] S51, the electronic device obtains the size parameters of the target display screen and the display parameters of the text box on the current display screen.

[0133] S52, the electronic device determines the display area and display size of the text box on the target display screen based on the size parameters and display parameters.

[0134] S53, the electronic device iteratively adjusts the size of the text box so that the text box is displayed in the display area according to the display size.

[0135] In this embodiment of the disclosure, the text size of the text box does not adjust with the size adjustment of the text box.

[0136] S54, the electronic device obtains the display parameters of the first line of characters of the text box on the current display screen.

[0137] S55, the electronic device uses the display parameters of the first line of characters of the text box on the current display screen to determine the display parameters of the first line of characters of the text box on the target display screen.

[0138] S56, the electronic device iteratively adjusts the first line of characters in the text box so that the first line of characters in the text box is displayed according to the display parameters of the first line of characters on the target display screen.

[0139] Optionally, obtain the display parameters of the first line of characters of the text box on the current screen, including:

[0140] Get the character display area and character size of the first line character of the text box on the current screen.

[0141] S57, the electronic device adjusts the character size of other characters in the text box so that the character size of the other characters in the text box is consistent with the character size of the first line of characters on the target display screen.

[0142] In this embodiment of the disclosure, "other characters in the text box" refers to all characters in the text box except for the first line of characters.

[0143] Optionally, obtain the character display area of ​​the first line of the text box on the current screen, including:

[0144] Get the distance d between the first line of characters and the two sides of the reference point. a With distance d b .

[0145] According to distance d a With distance d b This determines the first line of characters in the text box within the character display area of ​​the reference object.

[0146] Where, d a d represents the distance of the edge relative to the height of the reference object. b This represents the distance of the edge relative to the width of the reference object.

[0147] In some alternative implementations, the reference is a text box, and obtaining the character display area of ​​the first line of characters in the text box on the current display screen includes:

[0148] Get the distance d between the first line of characters and the two sides of the text box. a With distance d b .

[0149] According to distance d a With distance d b This determines the character display area of ​​the first line of the text box on the current screen.

[0150] It should be understood that the position of the text box on the current screen is fixed. By using the text box as a reference, the distance between the first line of characters and the two sides of the text box can be determined, and thus the character display area of ​​the first line of characters on the current screen can be determined.

[0151] In some alternative implementations, the reference is the current display screen, and obtaining the character display area of ​​the first line of the text box on the current display screen includes:

[0152] Get the distance d between the first line of characters and the two edges of the current display screen. a With distance d b .

[0153] According to distance d a With distance d b This determines the character display area of ​​the first line of the text box on the current screen.

[0154] Optionally, obtain the character size of the first line of characters in the text box on the current screen, including:

[0155] Get the width c of the first line character of the text box on the current screen. a .

[0156] In practical applications, the first line of characters is within the width c of the current display screen. a This can be understood as the sum of the width of the first-line indentation character and the width of the first-line character, where width c a The unit of measurement for the width is the same as the unit of measurement for the width or height of the text box, and will not be repeated in this embodiment.

[0157] Optionally, the display parameters of the first line of the text box on the target display screen are determined using the display parameters of the first line of the text box on the current display screen, including:

[0158] Calculate c b =c a ×α2, obtain the target width c of the first line of characters in the text box. b .

[0159] Calculate d c =d a ×α1, obtain the distance d of the displayed content on the edge of the target display screen relative to its height. c .

[0160] Calculate d d =d b ×α2, obtain the distance d of the displayed content on the side of the target display screen relative to its width. d .

[0161] According to the target width c b Determine the display size of the first line of characters in the text box on the target screen.

[0162] According to distance d c With distance d d This determines the display area of ​​the target display screen where the content will be displayed.

[0163] Optionally, the first line of characters in the text box can be iteratively adjusted, including:

[0164] The k-th adjustment of the width δ of the first line of the text box k .

[0165] Determine the rate of change Eδ of the width of the first line of characters in the text box after the k-th adjustment. k .

[0166] If Eδ kIf a positive or negative value changes, stop adjusting the width of the first line of characters in the text box; otherwise, continue adjusting the width δ of the first line of characters in the text box for the (k+1)th time. k+1 .

[0167] Where k is a positive integer greater than 0.

[0168] Optionally, the width δ of the first line of characters in the text box is adjusted for the kth time. k ,include:

[0169] Calculate δ k =δ k-1 +e k Obtain the width δ of the displayed content after the k-th adjustment. k ;

[0170] Where, δ k-1 This indicates the (k-1)th adjustment of the displayed content width, e k This indicates the step size for iterative adjustment of the displayed content width in the kth iteration.

[0171] In practical applications, the character size of the first line of characters in a text box on the current display screen can be 14pt, 20pt, small four, five, or other expressions used to indicate character font size; this application does not specifically limit this. It should be understood that e k It can be represented as 1pt or a font size, e k The value of Eδ can be positive or negative. It should be understood that during the adaptation process from the current display to the target display, if the size of the current display is smaller than the size of the target display, Eδ is adjusted in each iteration. k It's a gradual reduction process; if the current display size is larger than the target display size, Eδ is adjusted in each iteration. k It is a gradual process of increase.

[0172] Optionally, the width variation rate Eδ of the first line of characters in the text box is determined as follows: k :

[0173] calculate Obtain the rate of change of the width of the displayed content after the k-th adjustment. Where t is the sampling period of the iterative adjustment.

[0174] Optionally, adjust the character size of other characters in the text box, including:

[0175] Get the first character of the text box and iterate to adjust its size until the adjustment stops.

[0176] Adjust the size of other characters in the text box based on the obtained character size.

[0177] In practical applications, it should be understood that... Figure 6In S54, the display parameters of the first line of characters in a text box on the current screen can be obtained. Figure 4 S36 is executed after the second iteration adjusts the current size of the displayed content. The displayed content mentioned in S36 corresponds to the text box mentioned in S54. Subsequent execution steps are the same as... Figure 6 The same applies to S54 to S57, and will not be repeated here.

[0178] In this way, when the displayed content is a text box, and the text size does not adjust with the size of the text box, after iterative adjustments of the text box are completed, the text within the text box is adjusted to fit the target display screen. This improves the accuracy of adjustment control and enhances the user experience.

[0179] Combination Figure 7 As shown, this disclosure provides an apparatus for automatically adapting to a display screen, including a processor 100 and a memory 101. Optionally, the apparatus may further include a communication interface 102 and a bus 103. The processor 100, communication interface 102, and memory 101 can communicate with each other via the bus 103. The communication interface 102 can be used for information transmission. The processor 100 can call logical instructions in the memory 101 to execute the method for automatically adapting to a display screen described in the above embodiment.

[0180] Furthermore, the logic instructions in the aforementioned memory 101 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0181] The memory 101, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 100 executes functional applications and data processing by running the program instructions / modules stored in the memory 101, that is, it implements the method for automatically adapting to the display screen in the above embodiments.

[0182] The memory 101 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 101 may include high-speed random access memory and may also include non-volatile memory.

[0183] This disclosure provides an electronic device, including a display screen, and further including the above-described means for automatically adapting to the display screen.

[0184] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to perform the above-described method for automatically adapting to a display screen.

[0185] This disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the above-described method for automatically adapting to a display screen.

[0186] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0187] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0188] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0189] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0190] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for automatically adapting a display screen, characterized in that, include: Obtain the size parameters of the target display screen and the display parameters of the content on the current display screen; The display area and display size of the display content on the target display screen are determined based on the size parameters and the display parameters; The size of the displayed content is iteratively adjusted so that the displayed content is displayed in the display area according to the displayed size; The iterative adjustment of the size of the displayed content includes: the first i Adjust the height of the displayed content. β i and the width of the displayed content δ i ; Determine the first i The rate of change in the height of the displayed content after the adjustment Eβ i and width change rate Eδ i ;if Eβ i or Eδ i If a change in value occurs (positive or negative), stop adjusting the height and width of the displayed content; otherwise, continue. i +1 adjustment to the height of the displayed content β i+1 and the width of the displayed content δ i+1 ;in, i It is a positive integer greater than 0; in, β i-1 Indicates the first i -1 adjustment to the height of the displayed content. δ i-1 Indicates the first i -1 adjustment to the width of the displayed content. e i1 Indicates the first i The height of the displayed content is adjusted iteratively step by step. e i2 Indicates the first i The width of the displayed content is adjusted iteratively step by step.

2. The method according to claim 1, characterized in that, The size parameters of the target display screen include the width and height of the target display screen; the display parameters of the display content on the current display screen include the width of the display content, the height of the display content, the width of the current display screen, the height of the current display screen, and the relative position of the display content on the current display screen.

3. The method according to claim 2, characterized in that, Determining the display area and display size of the display content on the target display screen based on the size parameters and the display parameters includes: calculate Obtain the target height of the displayed content. c 1; calculate Get the target width of the displayed content. c 3; calculate Obtain the distance of the displayed content to the edge of the target display screen relative to its height. d 1; calculate Obtain the distance of the displayed content to the width-related edge of the target display screen. d 3; According to the target height c 1 and the target width c 3. Determine the display size of the displayed content on the target display screen; According to the distance d 1 and the distance mentioned d 3. Determine the display area of ​​the displayed content on the target display screen; in, α 1 represents the height conversion factor of the displayed content. α 2 represents the width conversion factor of the displayed content. c 2 indicates the height of the displayed content on the current screen. c 4 indicates the width of the displayed content on the current screen; d 2 indicates the distance of the displayed content to the edge of the current screen relative to its height. d 4 represents the distance of the displayed content to the edge of the current screen relative to its width; where, α 1. Determine based on the height of the target display screen and the current display screen height. α 2. Determine based on the width of the target display screen and the width of the current display screen.

4. The method according to claim 1, characterized in that, The displayed content is a text box; after iteratively adjusting the size of the displayed content, it also includes: Get the display parameters of the first line of characters in the text box on the current screen; By using the display parameters of the first line of characters in the text box on the current screen, determine the display parameters of the first line of characters in the text box on the target screen; Iteratively adjust the first line of characters in the text box so that the first line of characters is displayed according to the display parameters of the first line of characters on the target screen; Adjust the character size of the other characters in the text box so that they match the character size of the first line on the target display screen.

5. The method according to claim 4, characterized in that, The step of obtaining the first line character of the text box in the character display area of ​​the current screen includes: Get the distance between the first line of characters and the two edges of the reference point. d a With distance d b ; According to distance d a With distance d b This determines the character display area of ​​the first line of the text box on the current screen. in, d a This represents the distance of the edge relative to the height of the reference object. d b This indicates the distance of the edge relative to the width of a reference object, which can be the text box or the current display screen.

6. An apparatus for automatically adapting to a display screen, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to, when executing the program instructions, perform the method for automatically adapting to a display screen as described in any one of claims 1 to 5.

7. An electronic device, comprising a display screen, characterized in that, It also includes the means for automatically adapting to the display screen as described in claim 6.

8. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for automatically adapting to the display screen as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image size adaptation method and device

    CN110209266A

  • Image adaptation method, electronic equipment and storage medium

    CN110738598A