CN115705133A - Method and device for automatically adapting display screen, electronic equipment and medium - Google Patents

Method and device for automatically adapting display screen, electronic equipment and medium Download PDF

Info

Publication number
CN115705133A
CN115705133A CN202110893376.XA CN202110893376A CN115705133A CN 115705133 A CN115705133 A CN 115705133A CN 202110893376 A CN202110893376 A CN 202110893376A CN 115705133 A CN115705133 A CN 115705133A
Authority
CN
China
Prior art keywords
display
display screen
display content
width
height
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110893376.XA
Other languages
Chinese (zh)
Inventor
付红敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110893376.XA priority Critical patent/CN115705133A/en
Publication of CN115705133A publication Critical patent/CN115705133A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application relates to the technical field of adaptive display screens, and discloses a method for automatically adapting a display screen, which comprises the following steps: acquiring size parameters of a target display screen and display parameters of display contents on a current display screen; determining the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter; and iteratively adjusting the size of the display content to enable the display content to be displayed in the display area according to the display size. The method comprises the steps of determining ideal display parameters of display contents on a target display screen by obtaining size parameters of the target display screen and display parameters of the contents to be displayed on a current display screen, and carrying out equal-proportion iterative adjustment on the display contents by calculating the change rate of the width and the height in the adjustment process of the display contents, thereby effectively reducing the influence caused by picture distortion and improving the user experience. The application also discloses a device, an electronic device and a storage medium for automatically adapting the display screen.

Description

Method and device for automatically adapting display screen, electronic equipment and medium
Technical Field
The present application relates to the field of adapting display screens, and in particular, to a method and an apparatus for automatically adapting a display screen, an electronic device, and a storage medium.
Background
With the advancement of science and technology, users have more electronic products, and display parameters of pictures or characters need to be adjusted in advance in order to achieve desired display effects of the pictures or characters on display screens of different electronic products.
At present, in the prior art solutions, a method for automatically adapting to a picture display is provided. The method specifically comprises the steps of obtaining the horizontal-vertical ratio of a display screen, and determining an aspect ratio adjustment coefficient according to the horizontal-vertical ratio of the display screen, so that the horizontal-vertical ratio of a picture to be displayed is adjusted, and the picture to be displayed is matched with the display screen.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
the aspect ratio of a display screen is obtained, an adjustment coefficient is determined, and the aspect ratio of a picture is directly changed, so that the picture is seriously distorted.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended to be a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method and a device for automatically adapting a display screen, electronic equipment and a storage medium, so as to reduce the technical problem of picture distortion.
In some embodiments, the method for automatically adapting a display screen comprises:
acquiring size parameters of a target display screen and display parameters of display contents on a current display screen;
determining the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter;
and iteratively adjusting the size of the display content so as to display the display content in the display area according to the display size.
In some embodiments, the means for automatically adapting a display screen comprises:
a processor and a memory storing program instructions, characterized in that the processor is configured to execute the method for automatically adapting a display screen as described above when executing the program instructions.
In some embodiments, the electronic device, including a display screen, further includes:
such as the above-described device for automatically adapting a display screen.
In some embodiments, the storage medium stores program instructions that, when executed, perform the method for automatically adapting a display screen as described above.
The method and the device for automatically adapting the display screen, the electronic device and the storage medium provided by the embodiment of the disclosure can realize the following technical effects:
the method comprises the steps of determining ideal display parameters of display contents on a target display screen by obtaining size parameters of the target display screen and display parameters of the contents to be displayed on a current display screen, and carrying out equal-proportion iterative adjustment on the display contents by calculating the change rate of the width and the height in the adjustment process of the display contents, thereby effectively reducing the influence caused by picture distortion, improving the accuracy of adjustment control and improving the use experience of a user.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
FIG. 1 is a schematic diagram of a method for automatically adapting a display screen provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of another method for automatically adapting a display screen provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of an embodiment of the present disclosure providing an iterative adjustment;
FIG. 4 is a schematic diagram of another method for automatically adapting a display screen provided by an embodiment of the present disclosure;
FIG. 5 is a flow chart of another iterative adjustment provided by embodiments of the present disclosure;
FIG. 6 is a schematic diagram of another method for automatically adapting a display screen provided by an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an apparatus for automatically adapting a display screen according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and claims of the embodiments of the disclosure and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. E.g., a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponding to B refers to an association or binding relationship between a and B.
In the embodiment of the present disclosure, the electronic device may be an intelligent home appliance formed by introducing a microprocessor, a sensor technology, and a network communication technology into the home appliance. The electronic device can also be a mobile device with a wireless connection function, and can be in communication connection with the intelligent household appliance through being connected with the internet, or can be in communication connection with the intelligent household appliance directly through Bluetooth, wifi and other modes. In some embodiments, the electronic device is, for example, a mobile device, a computer, or a vehicle-mounted device built in a floating car, or any combination thereof. The mobile device may include, for example, a cell phone, a smart home device, a wearable device, a smart mobile device, a virtual reality device, or the like, or any combination thereof, wherein the wearable device includes, for example: smart watches, smart bracelets, pedometers, and the like.
As shown in fig. 1, an embodiment of the present disclosure provides a method for automatically adapting a display screen, including:
and S01, the electronic equipment acquires the size parameter of the target display screen and the display parameter of the display content on the current display screen.
And S02, the electronic equipment determines the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter.
In the technical scheme, the electronic equipment determines ideal display parameters of the display content on the target display screen according to the size parameters of the target display screen and the display parameters of the display content on the current display screen. In practical applications, the display area of the display content on the target display screen may be determined by the distance between the side of the display content on the target display screen, which is associated with the height, and the distance between the side of the display content on the target display screen, which is associated with the width. In practical applications, the display size of the display content on the target display screen may be a target width of the display content and a target height of the display content.
And S03, the electronic equipment iteratively adjusts the size of the display content so that the display content is displayed in the display area according to the display size.
In the technical solution, the electronic device iteratively adjusts the size of the display content, which may be proportionally adjusting the height and the width of the display content, and the adjustment range of each iteration cycle may be understood as an adjustment step length of the current iteration cycle.
By adopting the method for automatically adapting the display screen, which is provided by the embodiment of the disclosure, the ideal display parameter of the display content on the target display screen is determined by acquiring the size parameter of the target display screen and the display parameter of the content to be displayed on the current display screen, and the equal-proportion iterative adjustment is performed on the display content by calculating the change rate of the width and the height in the adjustment process of the display content, so that the influence caused by picture distortion is effectively reduced, the accuracy of adjustment control is improved, and the use experience of a user is improved.
Optionally, the size parameter of the target display screen includes a width of the target display screen and a height of the target display screen; and the display parameters of the display content on the current display screen comprise 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.
In some alternative implementations, as shown in fig. 2, another method for automatically adapting a display screen provided by the embodiments of the present disclosure may include:
s11, the electronic equipment obtains the size parameters of the target display screen and the display parameters of the display content on the current display screen.
And S12, the electronic equipment determines the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter.
S13, the electronic equipment acquires the display direction of the display content and the display direction of the target display screen.
And S14, under the condition that the display direction of the display content is not consistent with that of the target display screen, the electronic equipment rotates the display content to be consistent with that of the target display screen.
And S15, the electronic equipment iteratively adjusts the size of the display content so that the display content is displayed in the display area according to the display size.
In practical application, when the picture on the mobile phone display screen is adapted to the computer display screen for display, the mobile phone display screen is the current display screen, and the computer display screen is the target display screen. The display direction of the picture on the mobile phone display screen is the transverse direction of the coordinate system, and the display direction of the computer display screen is the longitudinal direction of the coordinate system. Namely, after the size parameter of the computer display screen and the display parameter of the picture on the mobile phone display screen are obtained, the display direction of the picture needs to be rotated to be consistent with the display direction of the computer display screen. It should be understood that the size information and the position information of the picture are not changed during the rotation.
Therefore, the display direction of the display content is adjusted in advance to be consistent with the display direction of the target display screen, the situation that the display content cannot achieve the expected display effect in the display screen adapting process is avoided, and a basis is provided for the follow-up adjustment of the display content.
Optionally, according to the size parameter and the display parameter, the electronic device determines a display area and a display size of the display content on the target display screen, including:
calculating c 1 =c 2 ×α 1 Obtaining a target height c of the display content 1
Calculation of c 3 =c 4 ×α 2 Obtaining a target width c of the display content 3
Calculating d 1 =d 2 ×α 1 Obtaining the distance d between the display content on the target display screen and the height-related edge 1
Calculating d 3 =d 4 ×α 2 Obtaining the distance d of the display content on the edge of the target display screen related to the width 3
According to the target height c 1 And a target width c 3 Determining the display size of the display content on the target display screen;
according to the distance d 1 And a distance d 3 Determining a display area of the display content on the target display screen;
wherein alpha is 1 Indicating the height of the displayed contentConversion coefficient, α 2 Width conversion coefficient representing display contents, c 2 Height of the display content on the current display screen, c 4 The width of the display content on the current display screen is represented; d is a radical of 2 Indicating the distance of the display content on the current display screen from the highly relevant edge, d 4 The distance of the display content on the current display screen and the width-related edge is represented; wherein alpha is 1 Determined according to the height of the target display screen and the height of the current display screen, alpha 2 And determining according to the width of the target display screen and the width of the current display screen.
Optionally, the electronic device determines alpha according to the height of the target display screen and the height of the current display screen 1 The method comprises the following steps:
calculating out
Figure BDA0003196858500000061
Obtaining a height conversion coefficient alpha of display content 1
Wherein, a 1 Height of target display screen, b 1 Indicating the current display screen height.
Optionally, the electronic device determines alpha according to the width of the target display screen and the width of the current display screen 2 The method comprises the following steps:
calculating out
Figure BDA0003196858500000062
Obtaining a width conversion coefficient alpha of display content 2
Wherein, a 2 Width of target display screen, b 2 Indicating the width of the current display screen.
In practical application, when a text box on the display screen of the smart watch is adapted to the display screen of the mobile phone for display, the display screen of the smart watch is the current display screen, and the display screen of the mobile phone is the target display screen. It should be appreciated that the text box has an auto-wrap property, and the size of the font adjusts to follow the size of the text box. The width of the display screen of the smart watch can be 35 mm, the height of the display screen of the smart watch can be 40 mm, the width of the display screen of the mobile phone can be 70 mm, and the height of the display screen of the mobile phone can be 35 mmThe degree may be 160 mm, and the width and the height of the text box may be expressed in mm, cm or other length units, or may be expressed by a distance between corresponding points of the text box in the coordinate area of the current display screen, which is related to the width or the height of the text box. If the current width of the text box is 4, the current height of the text box is 7. The height conversion coefficient alpha of the display content can be determined according to the size parameters 1 To 4, the width conversion coefficient α of the display contents 2 Is 2. Further, a target height c of the display content can be determined 1 Target width c of the display content, 28 3 Is 8.
In this way, the display size of the display content in the ideal display parameter of the target display is determined by calculating the height conversion coefficient and the width conversion coefficient of the display content, and a data basis is provided for the adjustment of the subsequent display content.
In the technical scheme, the distance d between the display content on the current display screen and the height-related edge 2 The distance d of the display content on the side of the current display screen related to the width 4 May be determined based on the relative position of the display content on the current display screen. It will be appreciated that where the relative position of the display content on the current display screen is known, the distance of the display content from the edge representing the height of the current display screen, i.e. corresponding to d, may be obtained 2 (ii) a It should be understood that in the case where the relative position of the display content on the current display screen is known, the distance of the display content from the side representing the width of the current display screen, i.e., corresponding to d, may be obtained 4
Optionally, the distance d of the display content on the current display screen and the height-related edge 2 May be the distance of the center point of the display content from the edge representing the current display screen height.
Optionally, the distance d between the current display screen and the height-related edge of the display content 2 May be the distance of any point on one edge of the display content from the edge representing the current display screen height.
Optionally, displayThe distance d of the content on the side of the current display screen related to the width 4 May be the distance of the center point of the display content from the edge representing the width of the current display screen.
Optionally, the distance d of the display content on the side of the current display screen related to the width 4 May be the distance of any point on one edge of the display content from the edge representing the current display screen width.
In practical application, when the picture on the computer display screen is adapted to the smart television display screen for display, the computer display screen is the current display screen, and the smart television display screen is the target display screen. When the computer display screen and the intelligent television display screen are vertically placed in a place, the edge closest to the ground is regarded as the bottom edge of the display screen, the edge opposite to the bottom edge is regarded as the top edge, and the two edges adjacent to the bottom edge are regarded as the first side edge and the second side edge respectively. That is, the distance from any point on one edge of the picture to the first side or the second side of the computer display screen is equal to the distance d between the current display screen and the highly-related edge of the display content in the technical scheme 2 (ii) a The distance from any point on one edge of the picture to the bottom edge or the top edge of the computer display screen is equal to the distance d between the current display screen and the edge related to the width of the display content in the technical scheme 4 . It should be understood that d is determined on the picture 2 The same distance between the point and the first side or the second side of the smart television display screen is equal to the distance d between the display content in the technical scheme and the edge related to the height of the target display screen 1 (ii) a Picture and determination of d 4 The same distance between the point and the bottom edge or the top edge of the smart television display screen is equivalent to the distance d between the display content in the technical scheme and the edge related to the width of the target display screen 3
In this way, the distance between the target display screen and the edge related to the height of the display content and the distance between the target display screen and the edge related to the width of the display content are determined, and the display area of the display content in the ideal display parameter of the target display is determined, so that a data base is provided for the target display screen to be matched with the subsequent display content.
In some alternative implementations, with reference to fig. 3, an embodiment of the present disclosure provides a flowchart of iterative adjustment, where an electronic device iteratively adjusts a size of display content, where the iterative adjustment includes:
s21, adjusting the height beta of the display content for the ith time i And width delta of display content i
S22, determining the height change rate E beta of the display content after the ith adjustment i Sum width change rate E δ i
S23, if E beta i Or E delta i Stopping adjusting the height and width of the display content when the positive and negative values change; otherwise, continuing to adjust the height beta of the display content for the (i + 1) th time i+1 And width delta of display content i+1 . Wherein i is a positive integer greater than 0.
Optionally, the height beta of the display content is adjusted for the ith time i The method comprises the following steps:
calculating beta i =β i-1 +e i1 Obtaining the height beta of the ith adjusted display content i
Wherein beta is i-1 Indicating the height of the display content adjusted i-1, e i1 And the ith time is represented as the height iterative adjustment step of the display content.
Optionally, the width delta of the display content is adjusted for the ith time i The method comprises the following steps:
calculating delta i =δ i-1 +e i2 Obtaining the width delta of the ith adjustment display content i
Wherein, delta i-1 Indicating the i-1 th adjustment of the width of the display content, e i2 And the ith iteration adjustment step of the display content width is shown.
In this solution, it should be understood that e i1 And e i2 The value of (b) may be a positive or negative number.
In practical application, when the text box on the computer display screen is adapted to the display screen of the mobile phone for display, the computer display screen is the current display screen, and the mobile phone display screen is the target display screen. It should be understood that the height β of the display content is adjusted at the beginning of the ith time i And width delta of display content i In the prior art, the height value of the text box is equivalent to the height of the text box in a computer display screen, and the width value of the text box is equivalent to the width of the text box in a mobile phone display screen. In practical application, the height beta of the display content is adjusted at the beginning of the ith time i And width delta of display content i Before, if the height of the text box is 50 and the width of the text box is 30, the step length e for iteratively adjusting the height of the display content for the first time is determined 11 The value is minus 10, the step length e of the second time of the iterative adjustment of the height of the display content 21 The value is minus 5, the iterative adjustment step length e of the first width of the display content 12 The value is negative 6, the first time width iterative adjustment step length e of the display content 22 The value is minus 3. Then after the first adjustment the corresponding beta 1 The value is 40, delta 1 Value 24, corresponding to beta after the second adjustment 1 The value is 35, delta 1 The value is 21, and the rest adjustment results are analogized in the same way.
Alternatively, e i1 、e i2 Proportional relation of (c) to beta 0 、δ 0 The same is true.
Wherein, beta 0 Height, delta, indicating the display content in the current display screen 0 Indicating the width of the display content in the current display screen.
In some alternative embodiments, e i1 And e i2 The value of (b) may be predetermined.
Alternatively, e i1 And e i2 The value of (c) may be fixed.
Alternatively, e i1 And e i2 The value of (d) may not be fixed.
In some alternative embodiments, e i1 Satisfies | e i1 | is greater than | e i+11 |,e i2 Is taken to satisfy | e i2 | is greater than | e i+12 |。
In practical applications, it should be understood that e is the starting phase of an iteration in order to reduce the number of operations of the electronic device i1 And e i2 Should be greater than e before the iteration stops i1 And e i2 Is the absolute value of the value of (a), i.e. e 11 Is greater than e 21 Absolute value of (d); e.g. of the type 12 Is greater than e 22 The absolute value of (c).
Therefore, the width and the height of the display content in the current display screen are the same as the width and the height of the display content in a proportional relation, the height iterative adjustment step length and the width iterative adjustment step length are used for adjusting the width and the height of the display content, and the equal proportional adjustment of the display content can be guaranteed, so that the influence caused by picture distortion is effectively reduced, the accuracy of adjustment control is improved, and the user experience is improved.
Optionally, the electronic device determines the high degree change rate E β of the display content in the following manner i And rate of change of sum width E δ i
Calculating out
Figure BDA0003196858500000091
And obtaining the height change rate of the display content after the ith adjustment. Wherein t is the sampling period of the iterative adjustment.
Optionally, the electronic device determines the rate of change of the width E δ of the display content in the following manner i
Computing
Figure BDA0003196858500000092
And obtaining the width change rate of the display content after the ith adjustment. Wherein t is the sampling period of the iterative adjustment.
In practical application, if E beta i Or E delta i If the change of the positive and negative values occurs, the adjustment of the height and width of the display content is stopped, which can be understood as the judgment of E beta i-1 And E beta i Positive or negative value state of, or judgement of, E delta i-1 And E delta i Positive and negative value of (E) at E beta i-1 And E beta i Or E.delta i-1 And E delta i When the positive and negative values of the display content are changed, the adjustment of the height and width of the display content is stopped. It should be understood that in the process of adapting from the current display to the target display, if the size of the current display is smaller than that of the target display, each iteration adjusts E β i And E delta i Is a gradual decreasing process; if the size of the current display screen is larger than that of the target display screen, E beta is adjusted in each iteration i And E delta i Is a gradual rising process. At E beta i Or E delta i In the case of a change in the positive or negative state of one of the two, i.e. the changed E β i Or E delta i And the height of the corresponding adjusted display content or the width of the display content reaches or exceeds the display size. It should be understood that at E β i Or E delta i When a certain term is zero, it is equivalent to Ebeta i Or E delta i The width or height of the corresponding display content achieves the ideal display parameters of the display content on the target display screen.
Therefore, by judging whether the positive and negative states of the height change rate or the width change rate of the display content after the ith adjustment change, and taking the positive and negative states as termination conditions for stopping the iterative adjustment process of the display content, the data oscillation generated when the display content cannot reach the display size in the ideal display parameters of the target display screen under the condition of no distortion can be effectively avoided.
In conjunction with fig. 4, another method for automatically adapting a display screen is provided in an embodiment of the present disclosure, which includes:
s31, the electronic equipment acquires the size parameter of the target display screen and the display parameter of the display content on the current display screen.
And S32, the electronic equipment determines the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter.
And S33, the electronic equipment performs first iterative adjustment on the size of the display content.
And S34, the electronic equipment acquires the height iterative adjustment step length of the display content, the width iterative adjustment step length of the display content and the current size of the display content in the first iterative adjustment stop state.
And S35, under the condition that the height change rate and the width change rate of the display content subjected to the first iterative adjustment are changed in a positive and negative value state, the electronic equipment determines the second iterative adjustment step length of the height of the display content and the second iterative adjustment step length of the width of the display content according to the height iterative adjustment step length of the display content and the iterative adjustment step length of the width of the display content.
In practical application, it should be understood that, after the size of the display content is adjusted in the first iteration, the size of the display content reaches or approaches to the display size, that is, the positive and negative state changes of the height change rate and the width change rate of the display content adjusted in the first iteration can be understood as that the size of the display content approaches to the display size.
And S36, the electronic equipment performs second iterative adjustment on the current size of the display content so that the display content is displayed in the display area according to the display size.
Therefore, the ideal display parameters of the display content on the target display screen are determined by acquiring the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the change rate of the width and the height in the adjustment process of the display content is calculated, and the display content is subjected to two different iterative adjustments, so that the influence caused by picture distortion is further reduced, the accuracy of adjustment control is improved, and the use experience of a user is improved.
Optionally, determining a second iterative adjustment step length of the height of the display content and a second iterative adjustment step length of the width of the display content according to the iterative adjustment step length of the height of the display content and the iterative adjustment step length of the width of the display content includes:
reducing the iterative adjustment step length of the height of the display content and the iterative adjustment step length of the width of the display content by a fixed coefficient under the state that the first iterative adjustment is stopped; the reduced height iterative adjustment step length of the display content is used as the second time iterative adjustment step length of the height of the display content; and iteratively adjusting the step length of the reduced display content width to serve as the second iterative adjustment step length of the display content width.
In the present technical solution, the fixed coefficient may be 17%,20%,5% or other values, which is not specifically limited in the present application.
In practical application, if the display content height iterative adjustment step size is 20, the display content width iterative adjustment step size is 15, and the fixed coefficient value is 10% in the first iterative adjustment stop state, the display content height second iterative adjustment step size is 2, and the display content width second iterative adjustment step size is 1.5.
Therefore, the ideal display parameters of the display content on the target display screen are determined 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 change rate of the width and the height in the adjustment process of the display content is calculated, and the display content is subjected to twice different iterative adjustments, so that the influence caused by picture distortion is further reduced, the accuracy of adjustment control is improved, and the user experience is improved.
In some alternative implementations, as shown in fig. 5, an embodiment of the present disclosure provides another flowchart of iterative adjustment. And the electronic equipment performs second iterative adjustment on the current size of the display content, and the second iterative adjustment comprises the following steps:
s41, adjusting the height beta of the display content for the jth time j And width delta of display content j
S42, determining the height change rate E beta of the display content after the jth adjustment j And rate of change of sum width E δ j
S43, if E beta j Or E delta j When the positive and negative values change, stopping adjusting the height and width of the display content; otherwise, continuing to adjust the height beta of the display content for the (j + 1) th time j+1 And width delta of display content j+1
Wherein j is a positive integer greater than 0.
Optionally, adjusting the height β of the display content j times j The method comprises the following steps:
calculating beta j =β j-1 +e j1 Obtaining the height beta of the j-th adjusted display content j
Wherein, beta j-1 Indicating the j-1 th adjustment of the height of the displayed content, e j1 And indicating the j-th iteration adjustment step size of the display content height.
Optionally, adjusting the width δ of the display content j times j The method comprises the following steps:
calculating delta j =δ j-1 +e j2 Obtaining the width delta of the j-th adjustment display content j
Wherein, delta j-1 Indicating j-1 th adjustment of the width of the display content, e j2 And the j-th time display content width iterative adjustment step size is shown.
Alternatively, the height change rate E β of the display content is determined in the following manner j And rate of change of sum width E δ j
Computing
Figure BDA0003196858500000121
And obtaining the height change rate of the display content after the j adjustment. Wherein t is the sampling period of the iterative adjustment.
Alternatively, the rate of change in width E δ of the display content is determined as follows j
Computing
Figure BDA0003196858500000122
And obtaining the width change rate of the display content after the jth adjustment. Wherein t is the sampling period of the iterative adjustment.
In practical applications, it should be understood that, before the electronic device performs the second iterative adjustment on the current size of the display content, the size corresponding to the current size of the display content is the current size of the display content in the state where the first iterative adjustment is stopped. I.e. the height and width of the displayed content, at the time the first iteration stops.
Therefore, the ideal display parameters of the display content on the target display screen are determined by acquiring the size parameters of the target display screen and the display parameters of the content to be displayed on the current display screen, the change rate of the width and the height in the adjustment process of the display content is calculated, and the display content is subjected to two times of iterative adjustment with different step lengths, so that the influence caused by picture distortion is further reduced, the accuracy of adjustment control is improved, and the use experience of a user is improved.
In some alternative embodiments, as shown in fig. 6, another method for automatically adapting a display screen provided by an embodiment of the present disclosure may include:
s51, the electronic equipment acquires the size parameters of the target display screen and the display parameters of the text box on the current display screen.
S52, the electronic equipment determines the display area and the display size of the text box on the target display screen according to the size parameter and the display parameter.
And S53, the electronic equipment iteratively adjusts the size of the text box so that the text box is displayed in the display area according to the display size.
In the disclosed embodiment, the text size of the text box is not adjusted following the resizing of the text box.
S54, the electronic equipment acquires the display parameters of the first line characters of the text box on the current display screen.
S55, the electronic equipment determines the display parameters of the first line characters of the text box on the target display screen by using the display parameters of the first line characters of the text box on the current display screen.
And S56, the electronic equipment carries out iterative adjustment on the first line character of the text box so as to display the first line character of the text box according to the display parameters of the first line character on the target display screen.
Optionally, the obtaining of the display parameter of the top line character of the text box on the current display screen includes:
and acquiring a character display area and a character size of the first line of characters of the text box on the current display screen.
And S57, the electronic equipment adjusts the character sizes of other characters of the text box so that the character sizes of the other characters of the text box and the first line of characters on the target display screen are consistent.
In embodiments of the present disclosure, the other characters of the text box represent all characters of the text box except the top line character.
Optionally, the obtaining of the first line character of the text box in the character display area of the current display screen includes:
obtaining the distance d between the first line character and two edges of the reference object a And a distance d b
According to the distance d a And a distance d b And determining that the first line character of the text box is in the character display area of the reference object.
Wherein, d a Representing the distance of the edge in relation to the height of the reference object, d b Indicating the distance of the edge relative to the width of the reference object.
In some optional embodiments, the reference object is a text box, and acquiring a first line character of the text box in a character display area of a current display screen includes:
obtaining the distance d between the first line character and two edges of the text box a And a distance d b
According to the distance d a And a distance d b And determining that the first line of characters of the text box is in the character display area of the current display screen.
It should be understood that the position of the text box on the current display screen is fixed, and the first line of characters can be determined in the character display area of the current display screen by taking the text box as a reference object and determining the distance between the first line of characters and two edges of the text box.
In some optional embodiments, the obtaining, with the reference object as the current display screen, a character display area of a first line character of the text box on the current display screen includes:
obtaining the distance d between the first line character and the two edges of the current display screen a And a distance d b
According to distance d a And a distance d b And determining the character display area of the first line of characters of the text box on the current display screen.
Optionally, the obtaining a character size of a top line character of the text box on the current display screen includes:
acquiring the width c of the first line character of the text box on the current display screen a
In practical application, the width c of the first line character on the current display screen a It can be understood that the sum of the widths of the first indented character and the first character, the width c a The width measurement unit is the same as the measurement unit of the width or height of the text box, which is not described again in this disclosure.
Optionally, determining the display parameter of the top character of the text box on the target display screen by using the display parameter of the top character of the text box on the current display screen includes:
calculation of c b =c a ×α 2 Obtaining the target width c of the first line character of the text box b
Calculating d c =d a ×α 1 Obtaining the distance d between the display content on the target display screen and the height-related edge c
Calculating d d =d b ×α 2 Obtaining the distance d of the display content on the edge of the target display screen related to the width d
According to the target width c a And determining the display size of the first line character of the text box on the target display screen.
According to the distance d c And a distance d d And determining the display area of the display content on the target display screen.
Optionally, iteratively adjusting the first line character of the text box includes:
adjusting the width delta of the first line character of the text box for the kth time k
Determining the width change rate E delta of the first line character of the text box after the k adjustment k
If E δ j When the positive and negative values change, stopping adjusting the width of the first line character of the text box; otherwise, continuously adjusting the width delta of the first line character of the text box for the (k + 1) th time k+1
Wherein k is a positive integer greater than 0.
Optionally, the width delta of the first line character of the text box is adjusted for the k time k The method comprises the following steps:
calculating delta k =δ k-1 +e k Obtaining the width delta of the k-th adjustment display content k
Wherein, delta k-1 Indicates the k-1 th adjustment of the width of the display content, e k And the step size of the iterative adjustment of the display content width at the kth time is shown.
In practical applications, the character size of the first line of characters of the text box on the current display screen can be 14pt, 20pt, four, five or other fonts used for representing charactersThe expression of the size is not specifically limited in this application. It is to be understood that e k Can be expressed as 1pt or a font size, e k The value of (d) may be positive or negative. It should be understood that in the adaptation process from the current display screen to the target display screen, if the size of the current display screen is smaller than that of the target display screen, each iteration adjusts E δ k Is a gradual decreasing process; if the size of the current display screen is larger than that of the target display screen, E delta is adjusted in each iteration k Is a gradual rising process.
Alternatively, the rate of change E δ in width of the top line character of the text box is determined as follows k
Calculating out
Figure BDA0003196858500000151
And obtaining the width change rate of the display content after the jth adjustment. Wherein t is the sampling period of the iterative adjustment.
Optionally, adjusting the character size of other characters of the text box includes:
acquiring the size of the first line character when the iterative adjustment of the first line character of the text box is stopped;
and adjusting the character sizes of other characters of the text box according to the acquired character size.
In practical applications, it should be understood that, in fig. 6, the step S54 obtains the display parameters of the top line of characters of the text box on the current display screen, and may be performed after the step S36 in fig. 4 performs second iterative adjustment on the current size of the display content, where the display content mentioned in the step S36 corresponds to the text box mentioned in the step S54, and the subsequent execution steps are the same as those in S54 to S57 in fig. 6, and are not described again in this application.
In this way, under the condition that the display content is the text box and the size of the characters of the text box is not adjusted along with the size adjustment of the text box, after the iterative adjustment of the text box is completed, the characters of the text box are adjusted so that the characters of the text box are matched with the target display screen. Therefore, the accuracy of adjustment control is improved, and the use experience of a user is improved.
As shown in fig. 7, an apparatus for automatically adapting a display screen according to an embodiment of the present disclosure includes a processor (processor) 100 and a memory (memory) 101. Optionally, the apparatus may also include a Communication Interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via a bus 103. The communication interface 102 may be used for information transfer. The processor 100 may invoke logic instructions in the memory 101 to perform the method for automatically adapting a display screen of the above-described embodiment.
In addition, the logic instructions in the memory 101 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 101, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing, i.e. implements the method for automatically adapting a display screen in the above embodiments, by running program instructions/modules stored in the memory 101.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
The embodiment of the disclosure provides an electronic device, which comprises a display screen and further comprises the device for automatically adapting the display screen.
Embodiments of the present disclosure provide a computer-readable storage medium having stored thereon computer-executable instructions configured to perform the above-described method for automatically adapting a display screen.
Embodiments of the present disclosure provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for automatically adapting a display screen.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising one of 8230," does not exclude the presence of additional like elements in a process, method or device comprising the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosure, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for automatically adapting a display screen, comprising:
acquiring size parameters of a target display screen and display parameters of display contents on a current display screen;
determining the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter;
and iteratively adjusting the size of the display content to enable the display content to be displayed in the display area according to the display size.
2. The method of claim 1, wherein the size parameters of the target display screen comprise a width of the target display screen and a height of the target display screen; the display parameters of the display content on the current display screen comprise 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 of claim 2, wherein the determining the display area and the display size of the display content on the target display screen according to the size parameter and the display parameter comprises:
calculation of c 1 =c 2 ×α 1 Obtaining a target height c of the display content 1
Calculating c 3 =c 4 ×α 2 Obtaining a target width c of the display content 3
Calculating d 1 =d 2 ×α 1 Obtaining the distance d between the display content on the target display screen and the height-related edge 1
Calculating d 3 =d 4 ×α 2 Obtaining the distance d of the display content on the edge of the target display screen related to the width 3
According to said target height c 1 And the target width c 3 Determining the display size of the display content on the target display screen;
according to said distance d 1 To said distance d 3 Determining the display area of the display content on the target display screen;
wherein alpha is 1 Height conversion factor, alpha, representing display content 2 Width conversion coefficient representing display contents, c 2 Indicating the height of the display content on the current display screen, c 4 The width of the display content on the current display screen is represented; d 2 Indicating the distance of the display content on the current display screen from the highly relevant edge, d 4 The distance of the display content on the current display screen and the width-related edge is represented; wherein alpha is 1 Determined according to the height of the target display screen and the height of the current display screen, alpha 2 And determining according to the width of the target display screen and the width of the current display screen.
4. The method of claim 1, wherein iteratively resizing the display content comprises:
adjusting the height beta of the display content for the ith time i And width delta of display content i
Determining the height change rate E beta of the display content after the ith adjustment i Sum width change rate E δ i
If E β is i Or E delta i Stopping adjusting the height and width of the display content when the positive and negative values change; otherwise, continuing to adjust the height beta of the display content for the (i + 1) th time i+1 And width delta of display content i+1
Wherein i is a positive integer greater than 0.
5. The method of claim 4,
β i =β i-1 +e i1
δ i =δ i-1 +e i2
wherein beta is i-1 Indicating that the height of the display contents is adjusted i-1, delta i-1 Indicating the i-1 th adjustment of the width of the display content, e i1 Represents the height iterative adjustment step of the ith display content, e i2 And the step size of the iterative adjustment of the width of the display content at the ith time is shown.
6. The method of claim 1, wherein the display content is a text box; after the iteratively adjusting the size of the display content, the method further comprises:
acquiring display parameters of a first line of characters of a text box on a current display screen;
determining the display parameters of the first line characters of the text box on the target display screen by using the display parameters of the first line characters of the text box on the current display screen;
iteratively adjusting the first line character of the text box so as to display the first line character of the text box according to the display parameter of the first line character on the target display screen;
and adjusting the character sizes of other characters of the text box so that the other characters of the text box are consistent with the character size of the first line of characters on the target display screen.
7. The method of claim 6, wherein the obtaining of the first line character of the text box in the character display area of the current display screen comprises:
obtaining the distance d between the first line character and two edges of the reference object a And a distance d b
According to distance d a And a distance d b Determining a character display area of the first line of characters of the text box on the current display screen;
wherein d is a Distance, d, representing the edge in relation to the height of the reference object b A distance representing an edge related to a width of a reference object, which may be the text box or the current display screen.
8. An apparatus for automatically adapting a display screen, comprising a processor and a memory having stored thereon program instructions, characterized in that the processor is configured to carry out the method for automatically adapting a display screen according to any one of claims 1 to 7 when executing the program instructions.
9. An electronic device comprising a display screen, characterized in that it further comprises an apparatus for automatically adapting a display screen according to claim 8.
10. A storage medium storing program instructions, characterized in that said program instructions, when executed, perform a method for automatically adapting a display screen according to any one of claims 1 to 7.
CN202110893376.XA 2021-08-04 2021-08-04 Method and device for automatically adapting display screen, electronic equipment and medium Pending CN115705133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110893376.XA CN115705133A (en) 2021-08-04 2021-08-04 Method and device for automatically adapting display screen, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110893376.XA CN115705133A (en) 2021-08-04 2021-08-04 Method and device for automatically adapting display screen, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115705133A true CN115705133A (en) 2023-02-17

Family

ID=85178723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110893376.XA Pending CN115705133A (en) 2021-08-04 2021-08-04 Method and device for automatically adapting display screen, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115705133A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611406A (en) * 2023-07-20 2023-08-18 北京天健源达科技股份有限公司 Text editing method and device for electronic medical record
CN116820370A (en) * 2023-05-29 2023-09-29 深圳市视景达科技有限公司 Picture display proportion compensation method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116820370A (en) * 2023-05-29 2023-09-29 深圳市视景达科技有限公司 Picture display proportion compensation method, device, equipment and storage medium
CN116611406A (en) * 2023-07-20 2023-08-18 北京天健源达科技股份有限公司 Text editing method and device for electronic medical record

Similar Documents

Publication Publication Date Title
US10699166B2 (en) Font attributes for font recognition and similarity
US20230237841A1 (en) Occlusion Detection
US20180239995A1 (en) Font Recognition using Text Localization
US10198801B2 (en) Image enhancement using self-examples and external examples
CN115705133A (en) Method and device for automatically adapting display screen, electronic equipment and medium
US10593020B2 (en) Unsupervised learning approach for video deblurring
CN109829453A (en) It is a kind of to block the recognition methods of text in card, device and calculate equipment
US20170098141A1 (en) Determination of Font Similarity
US9466092B2 (en) Content-aware image rotation
US11710262B2 (en) Preserving document design using font synthesis
CN108229301B (en) Eyelid line detection method and device and electronic equipment
CN106663311B (en) System and method for increasing the locating depth of image
WO2023035531A1 (en) Super-resolution reconstruction method for text image and related device thereof
CN108898549A (en) Image processing method, picture processing unit and terminal device
US20140368509A1 (en) Iterative Patch-Based Image Upscaling
US20160189059A1 (en) Feature transformation learning device, feature transformation learning method, and program storage medium
CN112199139B (en) Self-adaptive adjustment method and device for system scaling
CN113689525A (en) Character beautifying method and device, readable storage medium and electronic equipment
US20160357395A1 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
CN111724306A (en) Image reduction method and system based on convolutional neural network
WO2022166753A1 (en) Page display method and apparatus
CN113850239B (en) Multi-document detection method and device, electronic equipment and storage medium
US11776168B2 (en) Extracting textures from text based images
EP3992915A1 (en) Systems and methods for applying effects to design elements
US20130321470A1 (en) Apparatus and method for viewing an image that is larger than an area of a display device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination