CN114816311B - Screen movement method and device - Google Patents
Screen movement method and device Download PDFInfo
- Publication number
- CN114816311B CN114816311B CN202210751665.0A CN202210751665A CN114816311B CN 114816311 B CN114816311 B CN 114816311B CN 202210751665 A CN202210751665 A CN 202210751665A CN 114816311 B CN114816311 B CN 114816311B
- Authority
- CN
- China
- Prior art keywords
- display screen
- distance
- instruction
- module
- distance parameter
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 230000033001 locomotion Effects 0.000 title claims abstract description 63
- 238000001514 detection method Methods 0.000 claims abstract description 81
- 230000015654 memory Effects 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 18
- 238000003860 storage Methods 0.000 claims description 11
- 230000001960 triggered effect Effects 0.000 claims description 10
- 230000005540 biological transmission Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 description 28
- 239000010410 layer Substances 0.000 description 26
- 230000006870 function Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 15
- 238000007726 management method Methods 0.000 description 11
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 10
- 230000004044 response Effects 0.000 description 9
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 7
- 238000005096 rolling process Methods 0.000 description 7
- 230000005236 sound signal Effects 0.000 description 7
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 6
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000001133 acceleration Effects 0.000 description 4
- 230000008602 contraction Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 229920001621 AMOLED Polymers 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 239000010985 leather Substances 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 239000012792 core layer Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000001976 improved effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003238 somatosensory effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/147—Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及终端技术领域,并且具体地,涉及一种屏幕移动的方法和装置。The present application relates to the field of terminal technology, and in particular, to a method and device for moving a screen.
背景技术Background technique
随着智能终端的飞速发展,用户对终端的体验也随之提高。对于智能终端而言,具备大屏幕可显著提升用户的体验。通常而言,大屏幕终端的体积较大,不利于用户携带。With the rapid development of smart terminals, the user experience of terminals has also improved. For smart terminals, having a large screen can significantly improve the user experience. Generally speaking, large-screen terminals are large in size and are not easy for users to carry.
柔性屏幕的出现为便携式大屏幕的发展提供了可能。柔性屏幕包括柔性有机发光二极管(organic light-emitting diode,OLED)等屏幕类型。通过将柔性屏幕应用在智能终端中,使得智能终端的灵活性和便携性更高。目前,一些厂商已将柔性屏幕应用在手机中,比如,卷轴屏终端。但是,如何控制卷轴屏终端的屏幕移动尚无有效解决方案。The emergence of flexible screens has made it possible to develop portable large screens. Flexible screens include flexible organic light-emitting diodes (OLED) and other screen types. By applying flexible screens to smart terminals, smart terminals are more flexible and portable. At present, some manufacturers have applied flexible screens to mobile phones, such as scroll screen terminals. However, there is no effective solution for how to control the screen movement of scroll screen terminals.
发明内容Summary of the invention
有鉴于此,本申请提供了一种屏幕移动的方法、装置、电子设备、计算机可读存储介质和计算机程序产品,能够有效控制显示屏的移动,极大提升卷屏终端的用户体验。In view of this, the present application provides a method, device, electronic device, computer-readable storage medium and computer program product for screen movement, which can effectively control the movement of the display screen and greatly improve the user experience of the roll-screen terminal.
第一方面,提供了一种屏幕移动的方法,所述方法应用于电子设备,所述电子设备具有可伸缩显示屏,所述电子设备包括距离检测模块,所述方法包括:In a first aspect, a method for moving a screen is provided, the method being applied to an electronic device, the electronic device having a retractable display screen, the electronic device including a distance detection module, the method comprising:
检测到第一指令,所述第一指令用于指示显示屏进行移动;A first instruction is detected, where the first instruction is used to instruct the display screen to move;
通过所述距离检测模块获取距离参数,所述距离参数用于表征所述显示屏发生移动的距离;Acquiring a distance parameter through the distance detection module, wherein the distance parameter is used to characterize the distance that the display screen moves;
确定所述距离参数是否满足第一预设条件;Determining whether the distance parameter satisfies a first preset condition;
响应于所述第一指令,在所述距离参数满足所述第一预设条件时,控制所述显示屏移动;In response to the first instruction, when the distance parameter meets the first preset condition, controlling the display screen to move;
在所述距离参数不满足所述第一预设条件时,控制所述显示屏停止移动。When the distance parameter does not meet the first preset condition, the display screen is controlled to stop moving.
上述方法可以由终端设备或终端设备中的芯片执行。基于上述方案,通过距离检测模块获取距离参数,得到显示屏发生移动的距离,然后通过判断显示屏移动的距离是否满足第一预设条件,决定显示屏是否移动。如果距离参数满足第一预设条件,则控制显示屏移动,如果距离参数不满足第一预设条件,则控制显示屏停止移动。本申请实施例的屏幕移动的方法,能够有效控制卷屏电子设备的屏幕移动状态。The above method can be executed by a terminal device or a chip in the terminal device. Based on the above scheme, the distance parameter is obtained by the distance detection module to obtain the distance that the display screen moves, and then whether the display screen moves is determined by judging whether the distance the display screen moves meets the first preset condition. If the distance parameter meets the first preset condition, the display screen is controlled to move; if the distance parameter does not meet the first preset condition, the display screen is controlled to stop moving. The method for moving the screen in the embodiment of the present application can effectively control the screen movement state of the rolling screen electronic device.
在一种可能的实现方式中,在所述显示屏移动的过程中,所述方法还包括:In a possible implementation manner, during the movement of the display screen, the method further includes:
检测到第二指令,所述第二指令用于指示显示屏停止移动;detecting a second instruction, wherein the second instruction is used to instruct the display screen to stop moving;
响应于所述第二指令,控制所述显示屏停止移动。In response to the second instruction, the display screen is controlled to stop moving.
因此,在显示屏移动的过程中,还可以响应用户的停止指令,停止移动显示屏,提升用户对显示屏的控制体验。Therefore, during the movement of the display screen, it can also respond to the user's stop command to stop moving the display screen, thereby improving the user's control experience over the display screen.
在一种可能的实现方式中,所述第一指令用于指示所述显示屏朝着显示屏拉伸的方向移动,其中,拉伸后的显示屏的尺寸大于拉伸前显示屏的尺寸;In a possible implementation, the first instruction is used to instruct the display screen to move in a direction in which the display screen is stretched, wherein the size of the display screen after stretching is larger than the size of the display screen before stretching;
所述距离参数满足第一预设条件,包括:所述距离参数小于第一距离阈值;The distance parameter satisfies a first preset condition, including: the distance parameter is less than a first distance threshold;
其中,控制所述显示屏移动,包括:控制所述显示屏拉伸。Wherein, controlling the display screen to move includes: controlling the display screen to stretch.
因此,通过第一指令控制显示屏朝着拉伸方向移动,或者说正向移动,提升用户对卷屏的使用体验。另外,可以通过第一距离阈值约束显示屏拉伸的距离,避免发生无效移动,有助于节省功耗。Therefore, the first instruction controls the display screen to move in the stretching direction, or in other words, to move forward, thereby improving the user experience of scrolling. In addition, the first distance threshold can be used to constrain the stretching distance of the display screen to avoid invalid movement, which helps save power consumption.
在一种可能的实现方式中,所述第一指令用于指示所述显示屏朝着显示屏收缩的方向移动,其中,收缩后的显示屏的尺寸小于收缩前显示屏的尺寸;In a possible implementation, the first instruction is used to instruct the display screen to move in a direction of shrinking the display screen, wherein the size of the display screen after shrinking is smaller than the size of the display screen before shrinking;
所述距离参数满足第一预设条件,包括:所述距离参数大于第二距离阈值;The distance parameter satisfies a first preset condition, including: the distance parameter is greater than a second distance threshold;
其中,控制所述显示屏移动,包括:控制所述显示屏收缩。Wherein, controlling the display screen to move includes: controlling the display screen to shrink.
因此,通过第一指令控制显示屏朝着收缩方向移动,或者说反向移动,提升用户对卷屏的使用体验。另外,可以通过第二距离阈值约束显示屏收缩的距离,避免发生无效移动,有助于节省功耗。Therefore, the first instruction controls the display screen to move in the contraction direction, or in the reverse direction, thereby improving the user experience of scrolling. In addition, the second distance threshold can be used to constrain the contraction distance of the display screen to avoid invalid movement, which helps save power consumption.
在一种可能的实现方式中,所述距离检测模块是激光对焦模组。In a possible implementation, the distance detection module is a laser focus module.
第二方面,提供了一种屏幕移动的装置,包括用于执行第一方面中任一种方法的单元。该装置可以是终端(或者终端设备),也可以是终端(或者终端设备)内的芯片。该装置包括距离检测模块、输入单元、显示单元和处理单元。可选地,显示单元可以是可伸缩显示屏。可选地,距离检测模块可以是激光对焦模组。In a second aspect, a device for moving a screen is provided, comprising a unit for executing any one of the methods in the first aspect. The device may be a terminal (or terminal device), or a chip in a terminal (or terminal device). The device comprises a distance detection module, an input unit, a display unit, and a processing unit. Optionally, the display unit may be a retractable display screen. Optionally, the distance detection module may be a laser focus module.
当该装置是终端时,该处理单元可以是处理器,该输入单元可以是通信接口,该显示单元可以是图形处理模块和屏幕;该终端还可以包括存储器,该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该终端执行第一方面中的任一种方法。When the device is a terminal, the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the terminal may also include a memory for storing computer program code, and when the processor executes the computer program code stored in the memory, the terminal executes any one of the methods in the first aspect.
当该装置是终端内的芯片时,该处理单元可以是芯片内部的逻辑处理单元,该输入单元可以是输出接口、管脚或电路等,该显示单元可以是芯片内部的图形处理单元;该芯片还可以包括存储器,该存储器可以是该芯片内的存储器(例如,寄存器、缓存等),也可以是位于该芯片外部的存储器(例如,只读存储器、随机存取存储器等);该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该芯片执行第一方面的任一种方法。When the device is a chip in a terminal, the processing unit may be a logic processing unit inside the chip, the input unit may be an output interface, a pin or a circuit, etc., and the display unit may be a graphics processing unit inside the chip; the chip may also include a memory, which may be a memory inside the chip (for example, a register, a cache, etc.) or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip executes any one of the methods of the first aspect.
第三方面,提供了一种电子设备,包括:可伸缩显示屏,距离检测模块,以及处理器;In a third aspect, an electronic device is provided, comprising: a retractable display screen, a distance detection module, and a processor;
其中,所述处理器用于检测第一指令,所述第一指令用于指示显示屏进行移动;Wherein, the processor is used to detect a first instruction, and the first instruction is used to instruct the display screen to move;
所述距离检测模块用于检测距离参数,所述距离参数用于表征所述可伸缩显示屏发生移动的距离;The distance detection module is used to detect a distance parameter, and the distance parameter is used to characterize the distance that the retractable display screen moves;
所述处理器还用于确定所述距离参数是否满足第一预设条件;响应于所述第一指令,在所述距离参数满足所述第一预设条件时,控制所述显示屏移动;在所述距离参数不满足所述第一预设条件时,控制所述显示屏停止移动。The processor is also used to determine whether the distance parameter satisfies a first preset condition; in response to the first instruction, control the display screen to move when the distance parameter satisfies the first preset condition; and control the display screen to stop moving when the distance parameter does not satisfy the first preset condition.
在一种可能的实现方式中,所述距离检测模块是激光对焦模组,所述激光对焦模组通过连接器与所述处理器进行数据传输。In a possible implementation, the distance detection module is a laser focus module, and the laser focus module transmits data with the processor via a connector.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序代码,当所述计算机程序代码被屏幕移动的装置运行时,使得该装置执行第一方面中的任一种方法。According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a device for moving a screen, the device executes any one of the methods in the first aspect.
第五方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被屏幕移动的装置运行时,使得该装置执行第一方面中的任一种方法。In a fifth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed by a device for moving a screen, the device executes any one of the methods in the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例的屏幕显示区域的一个示例图;FIG1 is an exemplary diagram of a screen display area according to an embodiment of the present application;
图2是具有可伸缩显示屏的终端的部分结构示意图;FIG2 is a schematic diagram of a partial structure of a terminal with a retractable display screen;
图3是一种适用于本申请的电子设备的硬件系统的示意图;FIG3 is a schematic diagram of a hardware system of an electronic device applicable to the present application;
图4是一种适用于本申请的电子设备的软件系统的示意图;FIG4 is a schematic diagram of a software system of an electronic device applicable to the present application;
图5是本申请实施例的屏幕移动的方法的示意性流程图;FIG5 is a schematic flow chart of a method for moving a screen according to an embodiment of the present application;
图6是本申请实施例的屏幕移动的方法的一个具体流程图;FIG6 is a specific flow chart of the method for moving the screen according to an embodiment of the present application;
图7是本申请实施例的屏幕移动的装置的一个示意性框图;FIG7 is a schematic block diagram of a device for moving a screen according to an embodiment of the present application;
图8是本申请实施例的电子设备的一个结构示例图。FIG. 8 is a structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
本申请实施例提供的屏幕移动的方法可应用于具有柔性显示屏的电子设备。该电子设备例如可以为各种终端设备,例如手机、平板电脑、多媒体播放设备、电子书阅读器、个人计算机、个人数字助理(personaldigitalassistant,PDA)、智能手表等。本申请对电子设备的具体形式不作限制。The screen movement method provided in the embodiment of the present application can be applied to electronic devices with flexible display screens. The electronic devices can be, for example, various terminal devices, such as mobile phones, tablet computers, multimedia playback devices, e-book readers, personal computers, personal digital assistants (PDAs), smart watches, etc. The present application does not limit the specific form of the electronic device.
本申请实施例的电子设备的柔性显示屏可以是可伸缩的。可伸缩显示屏也可以称作卷屏(或者说卷轴屏)结构。卷屏的状态一般包括三种模式:不展开、部分展开以及全展开等三种屏幕调节模式。基于这三种模式,具有卷屏的电子设备的显示屏也具有相应的屏幕显示区域。以下结合图1中的示例进行描述。The flexible display screen of the electronic device of the embodiment of the present application may be retractable. The retractable display screen may also be referred to as a roll screen (or scroll screen) structure. The state of the roll screen generally includes three modes: three screen adjustment modes, namely, non-expanded, partially expanded, and fully expanded. Based on these three modes, the display screen of the electronic device with the roll screen also has a corresponding screen display area. The following is described in conjunction with the example in FIG. 1.
图1示出了根据本申请实施例的屏幕显示区域的一个示意图。以电子设备是终端为例,对于卷屏终端而言,终端显示屏的区域可以包括图1示出的3种状态。卷屏终端的显示屏在不展开的状态下,终端屏幕的外露区域可以如图1中(1)所示的显示区域10。卷屏终端的显示屏在部分展开的状态下,终端屏幕的外露区域可以如图1中(2)所示的显示区域11。显示区域11的面积大于显示区域10的面积。卷屏终端的显示屏在全展开的状态下,终端屏幕的外露区域可以如图1中(3)所示的显示区域12。显示区域12的面积大于显示区域11的面积。FIG1 shows a schematic diagram of a screen display area according to an embodiment of the present application. Taking the electronic device as a terminal as an example, for a rolling screen terminal, the area of the terminal display screen may include the three states shown in FIG1 . When the display screen of the rolling screen terminal is not unfolded, the exposed area of the terminal screen may be the display area 10 as shown in FIG1 (1). When the display screen of the rolling screen terminal is partially unfolded, the exposed area of the terminal screen may be the display area 11 as shown in FIG1 (2). The area of the display area 11 is larger than the area of the display area 10. When the display screen of the rolling screen terminal is fully unfolded, the exposed area of the terminal screen may be the display area 12 as shown in FIG1 (3). The area of the display area 12 is larger than the area of the display area 11.
可以理解,显示屏完全展开的尺寸大小(比如显示区域12的尺寸),可以取决于产品实现,本申请实施例不作具体限定。It can be understood that the size of the fully unfolded display screen (such as the size of the display area 12) may depend on the product implementation and is not specifically limited in the embodiments of the present application.
应理解,图1中示出的显示屏在不展开、部分展开和全展开的状态只是示例性描述,本申请实施例并不限于此。It should be understood that the display screen shown in FIG. 1 in the non-expanded, partially expanded and fully expanded states is only an exemplary description, and the embodiments of the present application are not limited thereto.
还应理解,图1中的场景只是示意性说明本申请的一个应用场景,这并不对本申请实施例构成限定,本申请并不限于此。It should also be understood that the scenario in Figure 1 is only a schematic illustration of an application scenario of the present application, which does not constitute a limitation on the embodiments of the present application, and the present application is not limited to this.
在本申请实施例中,对于上述卷屏终端而言,其显示屏的移动可以通过设置相应地移动组件来实现,显示屏移动的距离可以通过距离检测模块来检测。以下结合图2中示出的部分结构描述。In the embodiment of the present application, for the above-mentioned rolling screen terminal, the movement of its display screen can be achieved by setting a corresponding moving component, and the distance of the display screen movement can be detected by a distance detection module. The following is a partial structural description in conjunction with FIG.
图2示出了具有可伸缩显示屏的终端的部分结构示意图。如图2中(1)所示,终端壳体组件20包括壳体21和壳体22。壳体21和壳体22能够相对运动。柔性显示屏23的显示区域可以通过壳体21和壳体22之间的相对运动实现改变。壳体21和壳体22之间的相对运动可通过设置移动模组(图2中未示出)来实现。FIG2 shows a partial structural schematic diagram of a terminal with a retractable display screen. As shown in FIG2 (1), the terminal housing assembly 20 includes a housing 21 and a housing 22. The housing 21 and the housing 22 can move relative to each other. The display area of the flexible display screen 23 can be changed by the relative movement between the housing 21 and the housing 22. The relative movement between the housing 21 and the housing 22 can be achieved by setting a moving module (not shown in FIG2).
比如,柔性显示屏23的显示区域可以如图1中示出的3种状态。For example, the display area of the flexible display screen 23 can be in three states as shown in FIG. 1 .
本申请实施例对移动模组的具体形式不作限定。可选地,移动模组可以通过机械组件来实现。比如,移动模组可以是卷轴结构,通过转动卷轴结构可以带动显示屏拉伸或收缩。可选地,移动模组的移动可以通过驱动结构来实现,比如,移动模组通过步进马达来驱动。The embodiments of the present application do not limit the specific form of the mobile module. Optionally, the mobile module can be implemented by a mechanical component. For example, the mobile module can be a scroll structure, and the display screen can be stretched or retracted by rotating the scroll structure. Optionally, the movement of the mobile module can be achieved by a driving structure, for example, the mobile module is driven by a stepping motor.
可以理解,图2中仅示出了终端的部分组件,本申请实施例并不限于此。事实上,终端还可以包括其他组件,比如摄像头。可选地,摄像头也可以设置在壳体组件20中。It is understood that FIG. 2 only shows some components of the terminal, and the embodiments of the present application are not limited thereto. In fact, the terminal may also include other components, such as a camera. Optionally, the camera may also be disposed in the housing assembly 20.
在本申请实施例中,通过在终端中设置距离检测模块来检测显示屏发生移动的距离。本申请实施例对距离检测模块的具体形式不作限定,只有能够检测出显示屏移动的距离即可。比如,距离检测模块可以是激光对焦模组。又比如,距离检测模块可以是红外距离检测器。又比如,距离检测模块可以是声波距离检测传感器。又比如,距离检测模块可以是位移传感器。可以理解,此处关于距离检测模块的举例只是示例性描述,本申请实施例并不限于此,距离检测模块也可以是其他形式的测距仪。In an embodiment of the present application, a distance detection module is provided in the terminal to detect the distance that the display screen moves. The embodiment of the present application does not limit the specific form of the distance detection module, as long as it can detect the distance that the display screen moves. For example, the distance detection module may be a laser focus module. For another example, the distance detection module may be an infrared distance detector. For another example, the distance detection module may be an acoustic wave distance detection sensor. For another example, the distance detection module may be a displacement sensor. It can be understood that the examples of the distance detection module here are only exemplary descriptions, and the embodiments of the present application are not limited thereto, and the distance detection module may also be other forms of rangefinders.
以激光对焦模组为例,激光对焦模组的工作原理如下:通过向目标表面发射红外光,并测量被反射回来的光的时间差,来计算目标表面到激光对焦模组间的距离。Taking the laser focus module as an example, the working principle of the laser focus module is as follows: by emitting infrared light to the target surface and measuring the time difference of the reflected light, the distance between the target surface and the laser focus module is calculated.
可选地,图2中以距离检测模块是激光对焦模组为例进行描述。图2中(2)示出了激光对焦模组设置在终端中的一个结构示例图。如图2中(2)所示,终端的处理器4(比如CPU)设置在基板(或者说主板)中。比如,基板可以是印刷电路板(printed circuit board,PCB)。处理器4与连接器3可通过I2C总线 6相连。激光对焦模组1可通过连接器3与处理器4实现数据传输。Optionally, FIG2 describes the distance detection module as a laser focus module. FIG2 (2) shows a structural example diagram of a laser focus module set in a terminal. As shown in FIG2 (2), a processor 4 (such as a CPU) of the terminal is set in a substrate (or a mainboard). For example, the substrate can be a printed circuit board (PCB). The processor 4 and the connector 3 can be connected via an I2C bus 6. The laser focus module 1 can realize data transmission with the processor 4 via the connector 3.
本申请实施例对激光对焦模组1的设置位置不作具体限定,只要能够检测到显示屏移动的距离即可。例如,激光对焦模组1可通过柔性电路板(flexible printed circuit,FPC)2放置在终端的整机中部靠近移动模组的位置。激光对焦模组1发出的光线可以对准移动模组,并保持发出的光线不被其他物体遮挡。The embodiment of the present application does not specifically limit the location of the laser focus module 1, as long as the distance of the display screen movement can be detected. For example, the laser focus module 1 can be placed in the middle of the terminal near the mobile module through a flexible printed circuit (FPC) 2. The light emitted by the laser focus module 1 can be aimed at the mobile module and the emitted light can be kept from being blocked by other objects.
本申请实施例对移动模组设置的位置不作具体限定。移动模组可以带动显示屏移动即可。移动模组可以通过驱动装置实现移动。驱动装置可以是软件和/或硬件的形式。比如,驱动装置可以是马达驱动,即通过马达驱动移动模组进行移动。The embodiment of the present application does not specifically limit the location of the mobile module. The mobile module can drive the display screen to move. The mobile module can be moved by a driving device. The driving device can be in the form of software and/or hardware. For example, the driving device can be a motor drive, that is, the mobile module is driven by a motor to move.
如图2中(2)所示,柔性电路板2与连接器3连接,即,柔性电路板2可通过连接器3与主板连接。本申请实施例对连接器3的类型不作具体限定。比如,与柔性电路板2相连的连接器3可以是板对板连接器(board to board,BTB),也可以是弹片式连接器。As shown in (2) of FIG. 2 , the flexible circuit board 2 is connected to the connector 3, that is, the flexible circuit board 2 can be connected to the mainboard through the connector 3. The embodiment of the present application does not specifically limit the type of the connector 3. For example, the connector 3 connected to the flexible circuit board 2 can be a board to board connector (board to board, BTB) or a spring-type connector.
VDD 7用于为激光对焦模组1供电。VDD 7与连接器3连接。VDD 7可与电源管理单元(power management unit,PMU)5连接实现为激光对焦模组1供电。VDD 7 is used to power the laser focus module 1. VDD 7 is connected to the connector 3. VDD 7 can be connected to a power management unit (PMU) 5 to power the laser focus module 1.
上述电源管理单元5也可以替换为其他供电平台或其他供电形式,本申请实施例并不限于此。比如,通过外置低压差线性稳压器(low dropout regulator,LDO)为激光对焦模组1供电。The power management unit 5 may also be replaced by other power supply platforms or other power supply forms, and the embodiments of the present application are not limited thereto. For example, the laser focus module 1 is powered by an external low dropout regulator (LDO).
如图2中(2)所示,当终端的显示屏未展开时,激光对焦模组1与壳体22的边框之间的距离为A,也可以理解为显示屏在初始位置时,激光对焦模组1与壳体22边框之间的缝隙为A;当终端的显示屏完全展开时,激光对焦模组1与壳体22边框之间的距离为B。可以理解,在终端的显示屏部分展开时,激光对焦模组1与壳体22边框之间的距离处于A和B之间。As shown in (2) of FIG. 2 , when the display screen of the terminal is not unfolded, the distance between the laser focus module 1 and the frame of the housing 22 is A. It can also be understood that when the display screen is in the initial position, the gap between the laser focus module 1 and the frame of the housing 22 is A; when the display screen of the terminal is fully unfolded, the distance between the laser focus module 1 and the frame of the housing 22 is B. It can be understood that when the display screen of the terminal is partially unfolded, the distance between the laser focus module 1 and the frame of the housing 22 is between A and B.
图2中(3)示出了距离检测模块与CPU连接的原理图。如图2中(3)所示,距离检测模块(比如,上述激光对焦模组1)通过连接器(比如上述连接器3)与CPU(比如上述处理器4)进行数据传输。距离检测模块与CPU之间包括INT中断通路、EN使能通路、串行数据线(serialdata,SDA)通路和串行时钟线(Serial clock line,SCL)通路等。FIG2 (3) shows a schematic diagram of the distance detection module connected to the CPU. As shown in FIG2 (3), the distance detection module (for example, the laser focus module 1) transmits data to the CPU (for example, the processor 4) through a connector (for example, the connector 3). The distance detection module and the CPU include an INT interrupt path, an EN enable path, a serial data line (SDA) path, and a serial clock line (SCL) path.
SDA通路和SCL通路是I2C总线的两条通路,二者都是双向I/O线。对于SDA通路,CPU和连接器之间通过I2C_SDA引脚相连;连接器与距离检测模块之间通过I2C_SDA_BTB引脚相连。对于SCL通路,CPU和连接器之间通过I2C_SCL引脚相连;连接器与距离检测模块之间通过I2C_SCL_BTB引脚相连。The SDA path and the SCL path are two paths of the I2C bus, both of which are bidirectional I/O lines. For the SDA path, the CPU and the connector are connected through the I2C_SDA pin; the connector and the distance detection module are connected through the I2C_SDA_BTB pin. For the SCL path, the CPU and the connector are connected through the I2C_SCL pin; the connector and the distance detection module are connected through the I2C_SCL_BTB pin.
INT中断通路是由距离检测模块发给CPU进行中断事件处理。对于INT中断通路,CPU和连接器之间通过INT引脚相连;连接器与距离检测模块之间通过INT_BTB引脚相连。The INT interrupt path is sent by the distance detection module to the CPU for interrupt event processing. For the INT interrupt path, the CPU and the connector are connected through the INT pin; the connector and the distance detection module are connected through the INT_BTB pin.
EN使能通路是由CPU发出,使能距离检测模块进行工作。对于EN使能通路,CPU和连接器之间通过EN引脚相连;连接器与距离检测模块之间通过EN_BTB引脚相连。The EN enable path is sent by the CPU to enable the distance detection module to work. For the EN enable path, the CPU and the connector are connected through the EN pin; the connector and the distance detection module are connected through the EN_BTB pin.
VDD为距离检测模块的供电单元,如前文所述,供电单元可以是上述电源管理单元5或其他外置LDO。连接器与距离检测模块之间通过VDD_BTB引脚相连。VDD is a power supply unit of the distance detection module. As mentioned above, the power supply unit may be the power management unit 5 or other external LDO. The connector is connected to the distance detection module via the VDD_BTB pin.
GND为接地端。连接器与距离检测模块之间通过GND_BTB引脚相连。GND is the ground terminal. The connector and the distance detection module are connected through the GND_BTB pin.
应理解,图2中(3)示出的连接原理图只是示例性描述,本申请实施例并不限于此。本领域技术人员也可以基于上述原理,获得其他连接图。并且,如果距离检测模块采用不同的形式,本领域技术人员可以基于距离检测模块的形式对连接原理做出相应的合理连接。It should be understood that the connection principle diagram shown in (3) of FIG. 2 is only an exemplary description, and the embodiments of the present application are not limited thereto. A person skilled in the art can also obtain other connection diagrams based on the above principles. Furthermore, if the distance detection module adopts a different form, a person skilled in the art can make a corresponding reasonable connection for the connection principle based on the form of the distance detection module.
还应理解,图2中(3)示出的连接原理图只是部分引脚线,本申请实施例并不限于此。It should also be understood that the connection schematic diagram shown in (3) of FIG. 2 is only a partial pin line, and the embodiments of the present application are not limited to this.
本申请实施例提供的技术方案,通过距离检测模块实时测距,以获取距离参数,并判断距离参数是否满足第一预设条件,来控制显示屏是否移动,能够有效控制卷屏电子设备的屏幕移动状态。The technical solution provided in the embodiment of the present application measures the distance in real time through the distance detection module to obtain the distance parameter, and determines whether the distance parameter meets the first preset condition to control whether the display screen moves, which can effectively control the screen movement state of the roll-screen electronic device.
图3示出了一种适用于本申请的电子设备的硬件系统。FIG. 3 shows a hardware system of an electronic device suitable for the present application.
电子设备100可以是手机、智慧屏、平板电脑、可穿戴电子设备、车载电子设备、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、投影仪等等,本申请实施例对电子设备100的具体类型不作任何限制。The electronic device 100 can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc. The embodiment of the present application does not impose any limitation on the specific type of the electronic device 100.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M,距离检测模块180N等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, a distance detection module 180N, etc.
需要说明的是,图3所示的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图3所示的部件更多或更少的部件,或者,电子设备100可以包括图3所示的部件中某些部件的组合,或者,电子设备100可以包括图3所示的部件中某些部件的子部件。比如,图3所示的接近光传感器180G可以是可选的。图3示的部件可以以硬件、软件、或软件和硬件的组合实现。It should be noted that the structure shown in FIG3 does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in FIG3, or the electronic device 100 may include a combination of some of the components shown in FIG3, or the electronic device 100 may include sub-components of some of the components shown in FIG3. For example, the proximity light sensor 180G shown in FIG3 may be optional. The components shown in FIG3 may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元。例如,处理器110可以包括以下处理单元中的至少一个:应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、神经网络处理器(neural-network processing unit,NPU)。其中,不同的处理单元可以是独立的器件,也可以是集成的器件。The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Different processing units may be independent devices or integrated devices.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
图3所示的各模块间的连接关系只是示意性说明,并不构成对电子设备100的各模块间的连接关系的限定。可选地,电子设备100的各模块也可以采用上述实施例中多种连接方式的组合。The connection relationship between the modules shown in Fig. 3 is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of multiple connection modes in the above embodiments.
电子设备100可以通过GPU、显示屏194以及应用处理器实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏194可以用于显示图像或视频。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体(active-matrix organic light-emitting diode,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、迷你发光二极管(mini light-emitting diode,Mini LED)、微型发光二极管(micro light-emitting diode,Micro LED)、微型OLED (Micro OLED)或量子点发光二极管(quantum dotlight emitting diodes,QLED)。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。在本申请实施例中,显示屏194是柔性显示屏,或者说,可伸缩显示屏,或者说卷屏。在一些实施例中,显示屏194的展开状态可以如图1中示出的3种状态。The display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 194 is a flexible display screen, or a retractable display screen, or a roll screen. In some embodiments, the unfolded state of the display screen 194 can be 3 states as shown in Figure 1.
电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
ISP 用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP可以对图像的噪点、亮度和色彩进行算法优化,ISP还可以优化拍摄场景的曝光和色温等参数。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithm optimization on the noise, brightness and color of the image. The ISP can also optimize the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的红绿蓝(red green blue,RGB),YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard red green blue (RGB), YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D以及应用处理器等实现音频功能,例如,音乐播放和录音。The electronic device 100 can implement audio functions, such as music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也可以用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170或者音频模块170的部分功能模块可以设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and can also be used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称为喇叭,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐或免提通话。The speaker 170A, also called a horn, is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or make a hands-free call through the speaker 170A.
受话器170B,也称为听筒,用于将音频电信号转换成声音信号。当用户使用电子设备100接听电话或语音信息时,可以通过将受话器170B靠近耳朵接听语音。The receiver 170B, also called an earpiece, is used to convert an audio electrical signal into a sound signal. When a user uses the electronic device 100 to answer a call or voice message, the user can listen to the voice by placing the receiver 170B close to the ear.
麦克风170C,也称为话筒或传声器,用于将声音信号转换为电信号。当用户拨打电话或发送语音信息时,可以通过靠近麦克风170C发声将声音信号输入麦克风170C。Microphone 170C, also called a microphone or a speaker, is used to convert sound signals into electrical signals. When a user makes a call or sends a voice message, the user can input the sound signal into microphone 170C by speaking close to microphone 170C.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备100平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of theUSA,CTIA)标准接口。The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,例如可以是电阻式压力传感器、电感式压力传感器或电容式压力传感器。电容式压力传感器可以是包括至少两个具有导电材料的平行板,当力作用于压力传感器180A,电极之间的电容改变,电子设备100根据电容的变化确定压力的强度。当触摸操作作用于显示屏194时,电子设备100根据压力传感器180A检测所述触摸操作。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令;当触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, for example, they can be resistive pressure sensors, inductive pressure sensors or capacitive pressure sensors. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When the force acts on the pressure sensor 180A, the capacitance between the electrodes changes, and the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When the touch operation acts on the display screen 194, the electronic device 100 detects the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on a short message application icon, an instruction to view the short message is executed; when a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on a short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x轴、y轴和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。例如,当快门被按下时,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航和体感游戏等场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used in scenes such as navigation and somatosensory games.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。电子设备100可以根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. The electronic device 100 can set features such as automatic unlocking of the flip cover according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover.
加速度传感器180E可检测电子设备100在各个方向上(一般为x轴、y轴和z轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。加速度传感器180E还可以用于识别电子设备100的姿态,作为横竖屏切换和计步器等应用程序的输入参数。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally the x-axis, y-axis and z-axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter for applications such as horizontal and vertical screen switching and pedometers.
距离传感器180F用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,例如在拍摄场景中,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, for example, in a shooting scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(light-emitting diode,LED)和光检测器,例如,光电二极管。LED可以是红外LED。电子设备100通过LED向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到反射光时,电子设备100可以确定附近存在物体。当检测不到反射光时,电子设备100可以确定附近没有物体。电子设备100可以利用接近光传感器180G检测用户是否手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式或口袋模式的自动解锁与自动锁屏。应理解,图3中所述的接近光传感器180G可以是可选部件。在一些场景下,可以利用超声传感器来替代接近光传感器180G检测接近光。The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When the reflected light is detected, the electronic device 100 may determine that there is an object nearby. When the reflected light is not detected, the electronic device 100 may determine that there is no object nearby. The electronic device 100 may use the proximity light sensor 180G to detect whether the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used for automatic unlocking and automatic screen lock in a holster mode or a pocket mode. It should be understood that the proximity light sensor 180G described in FIG. 3 may be an optional component. In some scenarios, an ultrasonic sensor may be used to replace the proximity light sensor 180G to detect proximity light.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。在一些实施例中,可以通过环境光传感器180L检测所述终端的环境光信息。The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch. In some embodiments, the ambient light information of the terminal can be detected by the ambient light sensor 180L.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现解锁、访问应用锁、拍照和接听来电等功能。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize functions such as unlocking, accessing application locks, taking photos, and answering calls.
触摸传感器180K,也称为触控器件。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,触摸屏也称为触控屏。触摸传感器180K用于检测作用于其上或其附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,并且与显示屏194设置于不同的位置。The touch sensor 180K is also called a touch control device. The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch control screen. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100 and set at a different position from the display screen 194.
距离检测模块180N用于检测显示屏194移动的距离。比如,距离检测模块180N可以是激光对焦模组,其相关描述可以参考前文图2的描述。The distance detection module 180N is used to detect the distance moved by the display screen 194. For example, the distance detection module 180N may be a laser focus module, and the relevant description thereof may refer to the description of FIG. 2 above.
按键190包括开机键和音量键。按键190可以是机械按键,也可以是触摸式按键。电子设备100可以接收按键输入信号,实现于案件输入信号相关的功能。The key 190 includes a power key and a volume key. The key 190 can be a mechanical key or a touch key. The electronic device 100 can receive a key input signal and implement a function related to the case input signal.
马达191可以产生振动。马达191可以用于来电提示,也可以用于触摸反馈。马达191可以对作用于不同应用程序的触摸操作产生不同的振动反馈效果。对于作用于显示屏194的不同区域的触摸操作,马达191也可产生不同的振动反馈效果。不同的应用场景(例如,时间提醒、接收信息、闹钟和游戏)可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibration. Motor 191 can be used for incoming call reminders and can also be used for touch feedback. Motor 191 can generate different vibration feedback effects for touch operations acting on different applications. Motor 191 can also generate different vibration feedback effects for touch operations acting on different areas of display screen 194. Different application scenarios (for example, time reminders, receiving messages, alarm clocks, and games) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
在一些实施例中,处理器110用于检测第一指令,所述第一指令用于指示显示屏194移动;处理器110可以通过连接器获得距离检测模块180N检测的距离参数,所述距离参数用于表征显示屏194发生移动的距离;处理器110还用于确定所述距离参数是否满足第一预设条件;响应于所述第一指令,在所述距离参数满足所述第一预设条件时,控制显示屏194移动;在所述距离参数不满足所述第一预设条件时,控制显示屏194停止移动。In some embodiments, the processor 110 is used to detect a first instruction, wherein the first instruction is used to instruct the display screen 194 to move; the processor 110 can obtain a distance parameter detected by the distance detection module 180N through a connector, wherein the distance parameter is used to characterize the distance over which the display screen 194 moves; the processor 110 is also used to determine whether the distance parameter satisfies a first preset condition; in response to the first instruction, when the distance parameter satisfies the first preset condition, the display screen 194 is controlled to move; when the distance parameter does not satisfy the first preset condition, the display screen 194 is controlled to stop moving.
上文详细描述了电子设备100的硬件系统,下面介绍电子设备100的软件系统。软件系统可以采用分层架构、事件驱动架构、微核架构、微服务架构或云架构,本申请实施例以分层架构为例,示例性地描述电子设备100的软件系统。The above describes in detail the hardware system of the electronic device 100, and the following describes the software system of the electronic device 100. The software system may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the layered architecture as an example to exemplarily describe the software system of the electronic device 100.
如图4所示,采用分层架构的软件系统分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,软件系统可以分为四层,从上至下分别为应用程序层、应用程序框架层、安卓运行时(Android Runtime)和系统库、以及内核层。As shown in FIG4 , a software system using a layered architecture is divided into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android Runtime) and the system library, and the kernel layer.
应用程序层可以包括相机、图库、日历、通话、地图、导航、WLAN、蓝牙、音乐、视频、短信息等应用程序。The application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用程序编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层可以包括一些预定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer may include some predefined functions.
例如,应用程序框架层包括窗口管理器、内容提供器、视图系统、电话管理器、资源管理器和通知管理器。For example, the application framework layer includes the window manager, content provider, view system, telephony manager, resource manager, and notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏、锁定屏幕和截取屏幕。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, and capture the screen.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频、图像、音频、拨打和接听的电话、浏览历史和书签、以及电话簿。Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, and phone books.
视图系统包括可视控件,例如显示文字的控件和显示图片的控件。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成,例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备100的通信功能,例如通话状态(接通或挂断)的管理。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (connected or hung up).
资源管理器为应用程序提供各种资源,比如本地化字符串、图标、图片、布局文件和视频文件。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于下载完成告知和消息提醒。通知管理器还可以管理以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知。通知管理器还可以管理以对话窗口形式出现在屏幕上的通知,例如在状态栏提示文本信息、发出提示音、电子设备振动以及指示灯闪烁。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used for download completion notifications and message reminders. The notification manager can also manage notifications that appear in the system's top status bar in the form of icons or scrolling bar text, such as notifications from applications running in the background. The notification manager can also manage notifications that appear on the screen in the form of dialog windows, such as prompting text messages in the status bar, emitting reminder sounds, vibrating electronic devices, and flashing indicator lights.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理、堆栈管理、线程管理、安全和异常的管理、以及垃圾回收等功能。The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块,例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:针对嵌入式系统的开放图形库(opengraphics library for embedded systems,OpenGL ES)和2D图形引擎(例如:skia图形库(skia graphics library,SGL))。The system library can include multiple functional modules, such as: surface manager, media library, 3D graphics processing library (such as open graphics library for embedded systems (OpenGL ES)) and 2D graphics engine (such as skia graphics library (SGL)).
在一些实施例中,系统库还可以包括显示屏移动决策模块。显示屏移动决策模块用于确定距离参数是否满足第一预设条件;在所述距离参数满足所述第一预设条件时,通过移动模组驱动控制显示屏移动;在所述距离参数不满足所述第一预设条件时,通过移动模组驱动控制显示屏停止移动。In some embodiments, the system library may further include a display screen movement decision module. The display screen movement decision module is used to determine whether the distance parameter meets a first preset condition; when the distance parameter meets the first preset condition, the display screen is controlled to move by the mobile module drive; when the distance parameter does not meet the first preset condition, the display screen is controlled to stop moving by the mobile module drive.
应理解,显示屏移动决策模块也可以位于图中的其他层,比如,应用程序层、应用程序框架层等,此处仅是以显示屏移动决策模块位于系统库为例进行说明,本申请实施例并不限于此。It should be understood that the display screen movement decision module can also be located in other layers in the figure, such as the application layer, the application framework layer, etc. The display screen movement decision module is located in the system library as an example for explanation here, and the embodiments of the present application are not limited to this.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D图层和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D layers and 3D layers for multiple applications.
媒体库支持多种音频格式的回放和录制、多种视频格式回放和录制以及静态图像文件。媒体库可以支持多种音视频编码格式,例如: MPEG4、H.264、动态图像专家组音频层面3(moving picture experts group audio layer III,MP3)、高级音频编码(advancedaudio coding,AAC)、自适应多码率(adaptive multi-rate,AMR)、联合图像专家组(jointphotographic experts group,JPG)和便携式网络图形(portable network graphics,PNG)。The media library supports playback and recording of multiple audio formats, playback and recording of multiple video formats, and still image files. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, moving picture experts group audio layer III (MP3), advanced audio coding (AAC), adaptive multi-rate (AMR), joint photographic experts group (JPG) and portable network graphics (PNG).
三维图形处理库可以用于实现三维图形绘图、图像渲染、合成和图层处理。The 3D graphics processing library can be used to implement 3D graphics drawing, image rendering, compositing and layer processing.
二维图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层可以包括显示驱动、摄像头驱动、音频驱动、传感器驱动和距离检测驱动等驱动模块。The kernel layer is the layer between hardware and software. The kernel layer can include driver modules such as display driver, camera driver, audio driver, sensor driver and distance detection driver.
在一些实施例中,内核层还可以包括距离检测驱动和移动模组驱动。距离检测驱动用于驱动距离检测模块进行距离测量。移动模组驱动用于驱动移动模组进行移动,以改变显示屏的显示区域。In some embodiments, the core layer may further include a distance detection driver and a mobile module driver. The distance detection driver is used to drive the distance detection module to perform distance measurement. The mobile module driver is used to drive the mobile module to move to change the display area of the display screen.
应理解,上述是以图3为例对电子设备的结构图进行举例说明,通过图4对电子设备的软件架构进行举例描述,本申请实施例并不限于此。It should be understood that the above is an example of the structural diagram of the electronic device using FIG. 3 as an example, and the software architecture of the electronic device is described by way of example through FIG. 4 , and the embodiments of the present application are not limited thereto.
以下结合图5-图6描述本申请实施例的屏幕移动的方法。The following describes the screen movement method of the embodiment of the present application in conjunction with Figures 5 and 6.
参考图5,图5示出了本申请实施例的屏幕移动的方法500的示意性流程图。该方法500应用于具有可伸缩显示屏的电子设备。该电子设备包括距离检测模块。可以理解,该方法500可应用于图1和图2所示的场景。如图5所示,该方法500包括:Referring to FIG. 5 , FIG. 5 shows a schematic flow chart of a method 500 for moving a screen according to an embodiment of the present application. The method 500 is applied to an electronic device having a retractable display screen. The electronic device includes a distance detection module. It can be understood that the method 500 can be applied to the scenarios shown in FIG. 1 and FIG. 2 . As shown in FIG. 5 , the method 500 includes:
S501,检测到第一指令,所述第一指令用于指示显示屏进行移动。S501: Detect a first instruction, where the first instruction is used to instruct a display screen to move.
第一指令可以指示电子设备的可伸缩显示屏正向移动,或者,指示电子设备的可伸缩显示屏反向移动。其中,正向可以理解为显示屏拉伸的方向。反向可以理解为显示屏收缩的方向。The first instruction may instruct the retractable display screen of the electronic device to move forward, or instruct the retractable display screen of the electronic device to move backward, wherein the forward direction may be understood as the direction in which the display screen is stretched, and the backward direction may be understood as the direction in which the display screen is contracted.
可选地,作为一个实施例,第一指令用于指示显示屏进行移动,具体包括:所述第一指令用于指示显示屏朝着显示屏拉伸的方向移动,其中,拉伸后的显示屏的尺寸大于拉伸前显示屏的尺寸。比如,显示屏的显示区域从图1中(1)或图1中(2)示出的区域,变化至图1中(3)示出的显示区域时,即为显示屏拉伸的过程。在该实施例中,第一指令也可以称作拉伸指令。Optionally, as an embodiment, the first instruction is used to instruct the display screen to move, specifically including: the first instruction is used to instruct the display screen to move in the direction of the display screen stretching, wherein the size of the display screen after stretching is larger than the size of the display screen before stretching. For example, when the display area of the display screen changes from the area shown in (1) or (2) in FIG. 1 to the display area shown in (3) in FIG. 1, it is the process of display screen stretching. In this embodiment, the first instruction can also be called a stretching instruction.
可选地,作为一个实施例,第一指令用于指示显示屏进行移动,具体包括:所述第一指令用于指示显示屏朝着显示屏收缩的方向移动,其中,收缩后的显示屏的尺寸小于收缩前显示屏的尺寸。比如,显示屏的显示区域从图1中(2)示出的区域,变化至图1中(1)示出的区域,时,即为显示屏收缩的过程。在该实施例中,第一指令也可以称作收缩指令。Optionally, as an embodiment, the first instruction is used to instruct the display screen to move, specifically including: the first instruction is used to instruct the display screen to move in the direction of the display screen shrinking, wherein the size of the display screen after shrinking is smaller than the size of the display screen before shrinking. For example, when the display area of the display screen changes from the area shown in (2) in FIG. 1 to the area shown in (1) in FIG. 1, it is the process of shrinking the display screen. In this embodiment, the first instruction can also be called a shrinking instruction.
第一指令的触发形式可以有多种,包括但不限于硬件触发和/或软件触发等,本申请实施例对此不作具体限定。The first instruction may be triggered in various forms, including but not limited to hardware triggering and/or software triggering, etc., which is not specifically limited in the embodiments of the present application.
一种实现方式,第一指令可以是用户通过按键触发的。例如,可在电子设备上设置功能按键,当用户按压该按键后,触发所述第一指令。In one implementation, the first instruction may be triggered by a user by pressing a key. For example, a function key may be set on the electronic device, and when the user presses the key, the first instruction is triggered.
另一种实现方式,第一指令可以是用户通过操作电子设备中的某一控件触发的。例如,点击应用程序中的控件。In another implementation, the first instruction may be triggered by the user operating a certain control in the electronic device, for example, by clicking a control in an application.
可选地,第一指令可以是用于控制移动模组移动的指令。比如,假设移动模组通过马达驱动,则第一指令可以是用于控制马达转动的脉冲宽度调制(pulsewidthmodulation,PWM)信号。Optionally, the first instruction may be an instruction for controlling the movement of the mobile module. For example, assuming that the mobile module is driven by a motor, the first instruction may be a pulse width modulation (PWM) signal for controlling the rotation of the motor.
S502,通过距离检测模块获取距离参数,所述距离参数用于表征显示屏发生移动的距离。S502: Acquire a distance parameter through a distance detection module, where the distance parameter is used to characterize the distance that the display screen moves.
一种实现方式,距离检测模块是激光对焦模组。比如,激光对焦模组的设置位置可以如图2中(2)所示。距离检测模块的其他实现方式可以参考前文描述,此处不再赘述。In one implementation, the distance detection module is a laser focus module. For example, the laser focus module may be disposed at a position as shown in (2) in FIG2. Other implementations of the distance detection module may refer to the above description and will not be described here.
可以理解,激光对焦模组只是示例性描述,本申请并不限于此。激光对焦模组也可以被具有相同功能的传感器或模块替换。比如,激光对焦模组可用于检测显示屏移动的距离,那么该激光对焦模组可以被替换为用于检测显示屏移动的距离的传感器。It is understood that the laser focus module is only an exemplary description, and the present application is not limited thereto. The laser focus module can also be replaced by a sensor or module with the same function. For example, the laser focus module can be used to detect the distance the display screen moves, so the laser focus module can be replaced by a sensor for detecting the distance the display screen moves.
具体地,通过距离检测模块可以测量显示屏移动的距离。显示屏移动的距离包括显示屏拉伸的距离,或者,显示屏收缩的距离。Specifically, the distance detection module can measure the distance that the display screen moves, and the distance that the display screen moves includes the distance that the display screen stretches, or the distance that the display screen shrinks.
显示屏发生移动的距离具体包括:显示屏的初始位置与显示屏当前位置之间的相对距离。示例性地,如果显示屏发生了拉伸移动,则距离指的是显示屏的初始位置与显示屏拉伸移动后所在的位置之间的距离;如果显示屏发生了收缩移动,则距离指的是显示屏的初始位置与显示屏收缩移动后所在的位置之间的距离。The distance that the display screen moves specifically includes: the relative distance between the initial position of the display screen and the current position of the display screen. For example, if the display screen is stretched, the distance refers to the distance between the initial position of the display screen and the position of the display screen after the stretching movement; if the display screen is shrunk, the distance refers to the distance between the initial position of the display screen and the position of the display screen after the shrunk movement.
可以理解,所述距离参数可直接表征显示屏发生移动的距离,也可以间接表征显示屏发生移动的距离,本申请实施例对此不作具体限定。例如,距离参数可以是具体的距离值,即直接反映了显示屏发生移动的距离。又例如,距离参数可以记录显示屏移动后所在的位置,当距离参数传输到处理器后,处理器可以基于距离参数计算出显示屏发生移动的距离。It can be understood that the distance parameter can directly represent the distance that the display screen moves, or can indirectly represent the distance that the display screen moves, and the embodiments of the present application do not specifically limit this. For example, the distance parameter can be a specific distance value, that is, it directly reflects the distance that the display screen moves. For another example, the distance parameter can record the position of the display screen after it moves. When the distance parameter is transmitted to the processor, the processor can calculate the distance that the display screen moves based on the distance parameter.
可选地,距离检测模块在测量到显示屏移动的距离后,可以将距离参数(包括距离数据)传输给电子设备的处理器,以便处理器基于距离参数作进一步分析。Optionally, after measuring the distance moved by the display screen, the distance detection module may transmit distance parameters (including distance data) to a processor of the electronic device so that the processor may perform further analysis based on the distance parameters.
可选地,距离检测模块可以通过连接器与电子设备的处理器连接(比如,如图2中(3)所示的连接原理),进行数据的传输。Optionally, the distance detection module may be connected to a processor of the electronic device via a connector (for example, as shown in the connection principle (3) in FIG. 2 ) to transmit data.
一种实现方式,距离检测模块将距离参数通过I2C总线传输给电子设备的处理器。In one implementation, the distance detection module transmits the distance parameter to the processor of the electronic device via the I2C bus.
本申请实施例对距离检测模块检测时机不作具体限定。比如,距离检测模块可以实时检测显示屏移动的距离。又比如,距离检测模块可以是在显示屏发生移动后检测显示屏移动的距离。又比如,距离检测模块可以是在检测到第一指令后,就实时检测显示屏移动的距离。The embodiments of the present application do not specifically limit the detection timing of the distance detection module. For example, the distance detection module can detect the distance moved by the display screen in real time. For another example, the distance detection module can detect the distance moved by the display screen after the display screen moves. For another example, the distance detection module can detect the distance moved by the display screen in real time after detecting the first instruction.
S503,确定距离参数是否满足第一预设条件。S503: Determine whether the distance parameter satisfies a first preset condition.
引入第一预设条件目的在于基于距离参数判断是否可以移动显示屏。The first preset condition is introduced to determine whether the display screen can be moved based on the distance parameter.
可选地,第一预设条件可以通过距离阈值来确定。基于第一指令指示的具体内容,距离参数满足第一预设条件可以有不同的情况。Optionally, the first preset condition may be determined by a distance threshold. Based on the specific content indicated by the first instruction, there may be different situations in which the distance parameter satisfies the first preset condition.
比如,距离参数满足第一预设条件可以包括:距离参数大于设定的阈值。又比如,距离参数满足第一预设条件可以包括:距离参数小于设定的阈值。For example, the distance parameter meeting the first preset condition may include: the distance parameter is greater than a set threshold. For another example, the distance parameter meeting the first preset condition may include: the distance parameter is less than a set threshold.
又例如,距离参数满足第一预设条件可以包括:距离参数位于某一距离区间。For another example, the distance parameter satisfying the first preset condition may include: the distance parameter is located in a certain distance interval.
应理解,上述关于第一预设条件的描述只是示例描述,本申请实施例不限于此。It should be understood that the above description of the first preset condition is only an example description, and the embodiments of the present application are not limited thereto.
S504,响应于所述第一指令,在距离参数满足第一预设条件时,控制显示屏移动;在距离参数不满足第一预设条件时,控制显示屏停止移动。S504, in response to the first instruction, when the distance parameter meets the first preset condition, control the display screen to move; when the distance parameter does not meet the first preset condition, control the display screen to stop moving.
在本申请实施例中,通过距离检测模块获取距离参数,得到显示屏发生移动的距离,然后通过判断显示屏移动的距离是否满足第一预设条件,决定显示屏是否移动。如果距离参数满足第一预设条件,则控制显示屏移动,如果距离参数不满足第一预设条件,则控制显示屏停止移动。本申请实施例的屏幕移动的方法,能够有效控制卷屏电子设备的屏幕移动状态。In an embodiment of the present application, a distance parameter is obtained through a distance detection module to obtain the distance that the display screen moves, and then a decision is made as to whether the display screen moves by judging whether the distance that the display screen moves meets a first preset condition. If the distance parameter meets the first preset condition, the display screen is controlled to move; if the distance parameter does not meet the first preset condition, the display screen is controlled to stop moving. The screen movement method of an embodiment of the present application can effectively control the screen movement state of a roll-screen electronic device.
对于卷屏电子设备而言,显示屏可以基于移动指令正向移动或反向移动。本申请实施例在显示屏移动的过程中,可以实时获取距离参数,以便控制显示屏的合理移动。以下描述详细实施例。For a roll-up electronic device, the display screen can move forward or backward based on a movement instruction. In the process of the display screen moving, the embodiment of the present application can obtain the distance parameter in real time to control the reasonable movement of the display screen. The detailed embodiment is described below.
可选地,作为一种实施例,第一指令用于指示所述显示屏朝着显示屏拉伸的方向移动。此时距离参数满足第一预设条件,包括:所述距离参数小于第一距离阈值。Optionally, as an embodiment, the first instruction is used to instruct the display screen to move in the direction of the display screen stretching. At this time, the distance parameter satisfies the first preset condition, including: the distance parameter is less than a first distance threshold.
也就是说,如果判断距离参数小于第一距离阈值,说明当前显示屏还未到达显示屏完全展开的状态,显示屏还可以继续拉伸移动,则可以控制显示屏朝着拉伸的方向移动,或者说正向移动。That is to say, if the distance parameter is judged to be less than the first distance threshold, it means that the current display screen has not yet reached the fully extended state, and the display screen can continue to stretch and move, then the display screen can be controlled to move in the stretching direction, or in the positive direction.
可以理解,在该实施例中,第一指令也可以称作正向移动指令,或者,拉伸指令等。本申请实施例对第一指令的命名不作具体限定。It can be understood that in this embodiment, the first instruction can also be called a forward movement instruction, or a stretching instruction, etc. The embodiment of the present application does not specifically limit the naming of the first instruction.
可选地,上述第一距离阈值可以基于显示屏的完全展开的状态确定。当显示屏完全展开时,可以将显示屏未展开时的初始位置与显示屏完全展开的位置之间的距离,作为第一距离阈值的取值。另外,在具体实现时,还可以考虑距离检测模块与电子设备的壳体边框之间的缝隙,将显示屏为未展开时的初始状态时距离检测模块所在的位置,与显示屏完全展开时电子设备的壳体边框所在的位置之间的距离,作为第一距离阈值。比如,第一距离阈值可以是图2中(2)示出的距离B。Optionally, the first distance threshold can be determined based on the fully unfolded state of the display screen. When the display screen is fully unfolded, the distance between the initial position of the display screen when it is not unfolded and the position of the display screen when it is fully unfolded can be used as the value of the first distance threshold. In addition, in a specific implementation, the gap between the distance detection module and the shell frame of the electronic device can also be considered, and the distance between the position of the distance detection module when the display screen is in the initial state when it is not unfolded and the position of the shell frame of the electronic device when the display screen is fully unfolded can be used as the first distance threshold. For example, the first distance threshold can be the distance B shown in (2) in Figure 2.
应理解,上述关于第一距离阈值的确定方式只是示例性描述,本申请实施例不作具体限定。It should be understood that the above-mentioned method for determining the first distance threshold is only an exemplary description and is not specifically limited in the embodiments of the present application.
另一种实现方式,第一指令用于指示所述显示屏朝着显示屏收缩的方向移动。此时距离参数满足第一预设条件,包括:所述距离参数大于第二距离阈值。In another implementation, the first instruction is used to instruct the display screen to move in a direction in which the display screen shrinks. At this time, the distance parameter satisfies the first preset condition, including: the distance parameter is greater than a second distance threshold.
也就是说,如果判断距离参数大于第二距离阈值,说明当前显示屏还未到达显示屏不展开的状态,显示屏还可以继续收缩移动,则可以控制显示屏朝着收缩的方向移动,或者说反向移动。That is to say, if it is determined that the distance parameter is greater than the second distance threshold, it means that the current display screen has not yet reached the state where the display screen is not unfolded, and the display screen can continue to shrink and move, so the display screen can be controlled to move in the shrinking direction, or in the opposite direction.
可以理解,在该实施例中,第一指令也可以称作反向移动指令,或者,收缩指令等。本申请实施例对第一指令的命名不作具体限定。It can be understood that in this embodiment, the first instruction can also be called a reverse movement instruction, or a contraction instruction, etc. The embodiment of the present application does not specifically limit the naming of the first instruction.
可选地,上述第二距离阈值可以基于显示屏的未展开的状态确定。例如,当显示屏未展开时,可以考虑距离检测模块与电子设备的壳体边框之间的缝隙,将显示屏为未展开时初始状态时距离检测模块所在的位置与显示屏为未展开时电子设备的壳体边框所在的位置之间的距离,作为第二距离阈值。或者说将距离检测模块与电子设备的壳体边框间的缝隙作为第二距离阈值。比如,第二距离阈值可以是图2中(2)示出的距离A。Optionally, the second distance threshold can be determined based on the unfolded state of the display screen. For example, when the display screen is not unfolded, the gap between the distance detection module and the shell frame of the electronic device can be considered, and the distance between the position of the distance detection module when the display screen is in the initial state when the display screen is not unfolded and the position of the shell frame of the electronic device when the display screen is not unfolded is used as the second distance threshold. In other words, the gap between the distance detection module and the shell frame of the electronic device is used as the second distance threshold. For example, the second distance threshold can be the distance A shown in (2) in Figure 2.
应理解,上述关于第二距离阈值的确定方式只是示例性描述,本申请实施例不作具体限定。It should be understood that the above-mentioned method for determining the second distance threshold is only an exemplary description and is not specifically limited in the embodiments of the present application.
在显示屏移动的过程中,还可以实时检测是否接收到停止指令,以便随时响应用户对显示屏的停止操作行为。During the movement of the display screen, it is also possible to detect in real time whether a stop instruction is received, so as to respond to the user's stop operation on the display screen at any time.
可选地,在显示屏移动的过程中,所述方法还包括:Optionally, during the process of the display screen moving, the method further includes:
检测到第二指令,所述第二指令用于指示显示屏停止移动;detecting a second instruction, wherein the second instruction is used to instruct the display screen to stop moving;
响应于所述第二指令,控制所述显示屏停止移动。In response to the second instruction, the display screen is controlled to stop moving.
上述第二指令可以理解为显示屏停止移动指令。可以理解,无论是显示屏拉伸移动,还是收缩移动,上述第二指令均是适用的。The second instruction can be understood as an instruction for the display screen to stop moving. It can be understood that the second instruction is applicable whether the display screen is stretched or contracted.
举例来说,当显示屏正在朝着拉伸的方向移动时,如果接收到了第二指令,则显示屏停止拉伸移动。当显示屏正在朝着收缩的方向移动时,如果接收到了第二指令,则显示屏停止收缩移动。For example, when the display screen is moving in the direction of stretching, if the second instruction is received, the display screen stops stretching. When the display screen is moving in the direction of contraction, if the second instruction is received, the display screen stops contracting.
第二指令的触发形式可以有多种,包括但不限于硬件触发和/或软件触发等,本申请实施例对此不作具体限定。The second instruction may be triggered in various forms, including but not limited to hardware triggering and/or software triggering, etc., which is not specifically limited in the embodiments of the present application.
一种实现方式,第二指令可以是用户通过按键触发的。例如,可在电子设备上设置按键,当用户按压该按键后,触发所述第二指令。In one implementation, the second instruction may be triggered by a user by pressing a button. For example, a button may be set on the electronic device, and when the user presses the button, the second instruction is triggered.
另一种实现方式,第二指令可以是用户通过操作电子设备中的某一控件触发的。例如,点击应用程序中的控件。In another implementation, the second instruction may be triggered by the user operating a certain control in the electronic device, for example, by clicking a control in an application.
因此,在显示屏移动的过程中,还可以响应用户的停止指令,停止移动显示屏,提升用户对显示屏的控制体验。Therefore, during the movement of the display screen, it can also respond to the user's stop command to stop moving the display screen, thereby improving the user's control experience over the display screen.
在本申请实施例中,当显示屏停止移动后,根据显示屏移动的距离可以获知显示屏的尺寸,然后通过软件方式为显示屏显示的内容进行相应适配,以获得充满科技感的显示效果,提升卷屏的显示效果。In an embodiment of the present application, when the display screen stops moving, the size of the display screen can be obtained based on the distance the display screen has moved, and then the content displayed on the display screen is adapted accordingly through software to obtain a display effect full of technological sense and enhance the display effect of the scroll screen.
为便于理解,以下结合图6中的逻辑流程进行描述。如图6所示,包括:For ease of understanding, the following is described in conjunction with the logic flow in Figure 6. As shown in Figure 6, it includes:
步骤1,判断是否检测到正向移动指令。Step 1, determine whether a forward movement instruction is detected.
例如,正向移动指令可对应前文的第一指令。第一指令具体用于指示显示屏朝着显示屏拉伸的方向移动。For example, the forward movement instruction may correspond to the first instruction mentioned above. The first instruction is specifically used to instruct the display screen to move in the direction in which the display screen is stretched.
如果检测到正向移动指令,则执行步骤2;如果未检测到正向移动指令,则执行步骤9。If a forward movement command is detected, step 2 is executed; if no forward movement command is detected, step 9 is executed.
具体地,在检测到正向移动指令后,可以通过距离检测模块获取距离参数,然后基于距离参数作进一步判断。Specifically, after the forward movement instruction is detected, the distance parameter can be acquired through the distance detection module, and then further judgment can be made based on the distance parameter.
步骤2,判断距离参数是否小于第一距离阈值。Step 2: Determine whether the distance parameter is less than a first distance threshold.
如果距离参数小于第一距离阈值,则执行步骤3;如果距离参数不小于第一距离阈值,则执行步骤9。第一距离阈值的描述可以参考前文,为了简洁,此处不再赘述。这样,在判断到达第一距离阈值时,显示屏会自动停止移动,或者说自动执行停止指令,避免造成显示屏的无效移动,有助于节省终端功耗。If the distance parameter is less than the first distance threshold, step 3 is executed; if the distance parameter is not less than the first distance threshold, step 9 is executed. The description of the first distance threshold can be referred to in the previous text, and for the sake of brevity, it is not repeated here. In this way, when it is judged that the first distance threshold is reached, the display screen will automatically stop moving, or automatically execute the stop command, so as to avoid invalid movement of the display screen, which helps to save terminal power consumption.
步骤3,显示屏正向移动。正向移动即前文提及的朝着显示屏拉伸的方向移动。Step 3: The display screen moves in a positive direction. The positive movement is the movement in the direction of stretching the display screen mentioned above.
步骤4,判断是否检测到停止指令(对应前文的第二指令)。停止指令用于指示显示屏停止移动。Step 4: Determine whether a stop command (corresponding to the second command in the previous text) is detected. The stop command is used to instruct the display screen to stop moving.
如果检测到停止指令,则执行步骤9;如果未检测到停止指令,则执行步骤2。If a stop command is detected, execute step 9; if no stop command is detected, execute step 2.
步骤5,判断是否检测到反向移动指令。Step 5, determine whether a reverse movement instruction is detected.
例如,反向移动指令可对应前文的第一指令。第一指令具体用于指示显示屏朝着显示屏收缩的方向移动。For example, the reverse movement instruction may correspond to the first instruction mentioned above. The first instruction is specifically used to instruct the display screen to move in the direction of shrinking the display screen.
如果检测到反向移动指令,则执行步骤6;如果未检测到反向移动指令,则执行步骤9。If a reverse movement instruction is detected, step 6 is executed; if no reverse movement instruction is detected, step 9 is executed.
具体地,在检测到反向移动指令后,可以通过距离检测模块获取距离参数,然后基于距离参数作进一步判断。Specifically, after the reverse movement instruction is detected, the distance parameter can be acquired through the distance detection module, and then further judgment can be made based on the distance parameter.
步骤6,判断距离参数是否大于第二距离阈值。Step 6: Determine whether the distance parameter is greater than a second distance threshold.
如果距离参数大于第二距离阈值,则执行步骤7;如果距离参数不大于第二距离阈值,则执行步骤9。这样,在判断到达第二距离阈值时,显示屏会自动停止移动,或者说自动执行停止指令,避免造成显示屏的无效移动,有助于节省终端功耗。If the distance parameter is greater than the second distance threshold, step 7 is executed; if the distance parameter is not greater than the second distance threshold, step 9 is executed. In this way, when it is determined that the second distance threshold is reached, the display screen will automatically stop moving, or automatically execute the stop command, to avoid invalid movement of the display screen, which helps to save terminal power consumption.
步骤7,显示屏反向移动。反向移动即前文提及的朝着显示屏收缩的方向移动。Step 7: The display screen moves in the reverse direction. The reverse movement is the movement in the direction of shrinking the display screen mentioned above.
步骤8,判断是否检测到停止指令(对应前文的第二指令)。停止指令用于指示显示屏停止移动。如果检测到停止指令,则执行步骤9;如果未检测到停止指令,则执行步骤6。Step 8, determine whether a stop command (corresponding to the second command in the previous text) is detected. The stop command is used to instruct the display screen to stop moving. If the stop command is detected, execute step 9; if the stop command is not detected, execute step 6.
步骤9,显示屏停止移动。Step 9, the display stops moving.
应理解,图6中示出的具体流程仅是便于本领域技术人员理解,本申请实施例并不限于此。It should be understood that the specific process shown in FIG. 6 is only for the convenience of understanding of those skilled in the art, and the embodiments of the present application are not limited thereto.
由上可知,本申请提供的屏幕移动的方法,通过距离检测模块获取距离参数,并判断距离参数是否满足第一预设条件,来决定显示屏是否移动,能够有效控制卷屏电子设备的屏幕移动状态。From the above, it can be seen that the screen movement method provided in the present application obtains the distance parameter through the distance detection module, and determines whether the distance parameter meets the first preset condition to determine whether the display screen moves, which can effectively control the screen movement state of the rolling screen electronic device.
上文结合图1至图6,详细了本申请实施例提供的一种屏幕移动的方法。下面结合图7和图8描述本申请的装置实施例。应理解,本申请实施例的屏幕移动的装置可以执行前述本申请实施例的各种屏幕移动的方法的实施例,即以下各种产品的具体工作过程,可以参考前述方法实施例中的对应过程。The above text, in conjunction with Figures 1 to 6, details a method for moving a screen provided by an embodiment of the present application. The following describes an embodiment of the device of the present application in conjunction with Figures 7 and 8. It should be understood that the device for moving a screen in an embodiment of the present application can execute the embodiments of various methods for moving a screen in the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.
图7是本申请实施例的装置700的示意性框图。如图7所示,该装置700包括:处理模块710,距离检测模块720。FIG7 is a schematic block diagram of a device 700 according to an embodiment of the present application. As shown in FIG7 , the device 700 includes: a processing module 710 and a distance detection module 720 .
应理解,装置700可以执行图5和图6所示的屏幕移动的方法。在一种可能的示例中,装置700可以是终端设备。It should be understood that the apparatus 700 may execute the screen movement method shown in Figures 5 and 6. In a possible example, the apparatus 700 may be a terminal device.
在一种可能的示例中,处理模块710用于检测到第一指令,所述第一指令用于指示显示屏进行移动;In a possible example, the processing module 710 is used to detect a first instruction, where the first instruction is used to instruct the display screen to move;
所述处理模块710还用于通过所述距离检测模块720获取距离参数,所述距离参数用于表征所述显示屏发生移动的距离;The processing module 710 is further used to obtain a distance parameter through the distance detection module 720, where the distance parameter is used to characterize the distance that the display screen moves;
所述处理模块710还用于确定所述距离参数是否满足第一预设条件;The processing module 710 is also used to determine whether the distance parameter meets a first preset condition;
所述处理模块710还用于响应于所述第一指令,在所述距离参数满足所述第一预设条件时,控制显示屏移动;在所述距离参数不满足所述第一预设条件时,控制显示屏停止移动。The processing module 710 is further configured to, in response to the first instruction, control the display screen to move when the distance parameter satisfies the first preset condition; and control the display screen to stop moving when the distance parameter does not satisfy the first preset condition.
可选地,作为一种可能的实现方式,所述处理模块710还用于,在所述显示屏移动的过程中,检测到第二指令,所述第二指令用于指示显示屏停止移动;响应于所述第二指令,控制所述显示屏停止移动。Optionally, as a possible implementation, the processing module 710 is also used to, during the movement of the display screen, detect a second instruction for instructing the display screen to stop moving; and in response to the second instruction, control the display screen to stop moving.
可选地,作为一种可能的实现方式,所述第一指令用于指示所述显示屏朝着显示屏拉伸的方向移动,其中,拉伸后的显示屏的尺寸大于拉伸前显示屏的尺寸;Optionally, as a possible implementation manner, the first instruction is used to instruct the display screen to move in a direction in which the display screen is stretched, wherein a size of the display screen after stretching is larger than a size of the display screen before stretching;
所述距离参数满足第一预设条件,包括:所述距离参数小于第一距离阈值;The distance parameter satisfies a first preset condition, including: the distance parameter is less than a first distance threshold;
其中,所述处理模块710用于控制所述显示屏移动,包括:控制所述显示屏拉伸。The processing module 710 is used to control the movement of the display screen, including: controlling the stretching of the display screen.
可选地,作为一种可能的实现方式,所述第一指令用于指示所述显示屏朝着显示屏收缩的方向移动,其中,收缩后的显示屏的尺寸小于收缩前显示屏的尺寸;Optionally, as a possible implementation manner, the first instruction is used to instruct the display screen to move in a direction of shrinking the display screen, wherein the size of the display screen after shrinking is smaller than the size of the display screen before shrinking;
所述距离参数满足第一预设条件,包括:所述距离参数大于第二距离阈值;The distance parameter satisfies a first preset condition, including: the distance parameter is greater than a second distance threshold;
其中,所述处理模块710用于控制所述显示屏移动,包括:控制所述显示屏收缩。The processing module 710 is used to control the movement of the display screen, including: controlling the display screen to shrink.
可选地,作为一种可能的实现方式,所述距离检测模块是激光对焦模组。Optionally, as a possible implementation manner, the distance detection module is a laser focus module.
应理解,上述装置700以功能模块的形式体现。这里的术语“模块”可以通过软件和/或硬件的形式实现,本申请实施例对此不作具体限定。It should be understood that the above device 700 is embodied in the form of a functional module. The term "module" here can be implemented in the form of software and/or hardware, and this embodiment of the application does not specifically limit this.
例如,“模块”可以是实现上述功能的软件程序、硬件电路或者二者结合。所述硬件电路可能包括(applicationspecificintegratedcircuit,ASIC)应用特定集成电路、电子电路、执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、集成逻辑电路,和/或其他可以提供上述功能的合适器件。在一个简单的实施例中,本领域的技术人员可以想到装置700可以采用图4所示的形式。比如,所述处理单元710通过显示屏移动决策模块来实现;所述距离检测模块720通过距离检测驱动实现。For example, a "module" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) that executes one or more software or firmware programs and a memory, an integrated logic circuit, and/or other suitable devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the device 700 can take the form shown in Figure 4. For example, the processing unit 710 is implemented by a display screen movement decision module; the distance detection module 720 is implemented by a distance detection driver.
图8是本申请实施例的电子设备800的示意性结构框图。如图8所示,该装置800包括以下一个或多个部件:处理器810,可伸缩显示屏820以及距离检测模块830。FIG8 is a schematic structural block diagram of an electronic device 800 according to an embodiment of the present application. As shown in FIG8 , the device 800 includes one or more of the following components: a processor 810 , a retractable display screen 820 , and a distance detection module 830 .
在一些可能的实现方式中,所述处理器810用于检测第一指令,所述第一指令用于指示所述可伸缩显示屏820进行移动;In some possible implementations, the processor 810 is used to detect a first instruction, where the first instruction is used to instruct the retractable display screen 820 to move;
所述距离检测模块830用于检测距离参数,所述距离参数用于表征所述可伸缩显示屏820发生移动的距离;The distance detection module 830 is used to detect a distance parameter, where the distance parameter is used to characterize the distance that the retractable display screen 820 moves;
所述处理器810还用于确定所述距离参数是否满足第一预设条件;响应于所述第一指令,在所述距离参数满足所述第一预设条件时,控制所述可伸缩显示屏820移动;在所述距离参数不满足所述第一预设条件时,控制所述可伸缩显示屏820停止移动。The processor 810 is also used to determine whether the distance parameter satisfies a first preset condition; in response to the first instruction, when the distance parameter satisfies the first preset condition, control the retractable display screen 820 to move; when the distance parameter does not satisfy the first preset condition, control the retractable display screen 820 to stop moving.
可选地,作为一种可能的实现方式,所述距离检测模块830是激光对焦模组,所述激光对焦模组通过连接器与所述处理器810进行数据传输。Optionally, as a possible implementation, the distance detection module 830 is a laser focus module, and the laser focus module transmits data with the processor 810 via a connector.
可伸缩显示屏820用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。可伸缩显示屏820通常设置在电子设备800的前面板。本申请实施例中,可伸缩显示屏820外露显示区域的尺寸能够随伸缩操作而改变。The retractable display screen 820 is used to receive a touch operation on or near the retractable display screen 820 using any suitable object such as a finger or a stylus, and to display the user interface of each application. The retractable display screen 820 is usually disposed on the front panel of the electronic device 800. In the embodiment of the present application, the size of the exposed display area of the retractable display screen 820 can be changed with the retractable operation.
可选地,该电子设备800还包括存储器840。存储器840可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器840包括非瞬时性计算机可读介质(non-transitory computer-readablestorage medium)。存储器840可用于存储指令、程序、代码、代码集或指令集。存储器840可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据电子设备800的使用所创建的数据(比如音频数据、电话本)等。Optionally, the electronic device 800 also includes a memory 840. The memory 840 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 840 includes a non-transitory computer-readable storage medium. The memory 840 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 840 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book) created according to the use of the electronic device 800, etc.
可选地,电子设备800中还包括驱动结构,驱动结构用于驱动可伸缩显示屏820收缩或伸展。Optionally, the electronic device 800 further includes a driving structure, and the driving structure is used to drive the retractable display screen 820 to contract or extend.
除此之外,本领域技术人员可以理解,上述附图所示出的电子设备800结构并不构成对电子设备800的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,电子设备800中还包括射频电路、拍摄组件、传感器、音频电路、无线保真(Wireless Fidelity,WiFi)组件、电源、蓝牙组件等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the electronic device 800 shown in the above figure does not constitute a limitation on the electronic device 800, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device 800 also includes a radio frequency circuit, a shooting component, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) component, a power supply, a Bluetooth component and other components, which will not be described in detail here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
本申请还提供了一种计算机程序产品,该计算机程序产品被处理器执行时实现本申请中任一方法实施例所述的方法。The present application also provides a computer program product, which, when executed by a processor, implements the method described in any method embodiment of the present application.
该计算机程序产品可以存储在存储器中,经过预处理、编译、汇编和链接等处理过程最终被转换为能够被处理器执行的可执行目标文件。The computer program product can be stored in a memory, and is finally converted into an executable target file that can be executed by a processor after preprocessing, compiling, assembling and linking.
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时实现本申请中任一方法实施例所述的方法。该计算机程序可以是高级语言程序,也可以是可执行目标程序。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method described in any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
该计算机可读存储介质可以是易失性存储器或非易失性存储器,或者,可以同时包括易失性存储器和非易失性存储器。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rateSDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(directrambus RAM,DR RAM)。The computer-readable storage medium may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM).
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application 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.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories ROM, random access memories RAM, magnetic disks or optical disks.
应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。例如,A/ B可以表示A或B。In addition, the terms "system" and "network" are often used interchangeably in this article. The term "and/or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship. For example, A/ B can mean A or B.
本申请实施例中出现的术语(或者说编号)“第一”、“第二”、…等,仅用于描述目的,即只是为了区分不同的对象,比如,不同的“指令”等,并不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、…等的特征可以明示或者隐含地包括一个或者更多个特征。在本申请实施例的描述中,“至少一个(项)”是指一个或多个。“多个”的含义是两个或两个以上。“以下至少一个(项)”或其类似表达,是指这些项中的任意组合,包括单个(项)或复数个(项)的任意组合。The terms (or numbers) "first", "second", ..., etc. that appear in the embodiments of the present application are used for descriptive purposes only, that is, only to distinguish different objects, such as different "instructions", etc., and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", ..., etc. may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "at least one (item)" means one or more. "Multiple" means two or more. "At least one of the following (items)" or similar expressions refers to any combination of these items, including any combination of a single (item) or multiple (items).
例如,本申请实施例中出现的类似于“项目包括如下中至少一种:A,B,以及C”表述的含义,如无特别说明,通常是指该项目可以为如下中任一个:A;B;C;A和B;A和C;B和C;A,B和C;A和A;A,A和A;A,A和B;A,A和C,A,B和B;A,C和C;B和B,B,B和B,B,B和C,C和C;C,C和C,以及其他A,B和C的组合。以上是以A,B和C共3个元素进行举例来说明该项目的可选用条目,当表达为“项目包括如下中至少一种:A,B,……,以及X”时,即表达中具有更多元素时,那么该项目可以适用的条目也可以按照前述规则获得。For example, the meaning of the expression similar to "the item includes at least one of the following: A, B, and C" in the embodiments of the present application, unless otherwise specified, generally means that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B and C, C and C; C, C and C, and other combinations of A, B and C. The above is an example of three elements, A, B and C, to illustrate the optional items of the item. When it is expressed as "the item includes at least one of the following: A, B, ..., and X", that is, when there are more elements in the expression, the items that can be applied to the item can also be obtained according to the above rules.
总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。In short, the above is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210751665.0A CN114816311B (en) | 2022-06-29 | 2022-06-29 | Screen movement method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210751665.0A CN114816311B (en) | 2022-06-29 | 2022-06-29 | Screen movement method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114816311A CN114816311A (en) | 2022-07-29 |
CN114816311B true CN114816311B (en) | 2024-04-12 |
Family
ID=82523216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210751665.0A Active CN114816311B (en) | 2022-06-29 | 2022-06-29 | Screen movement method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114816311B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100025360A (en) * | 2008-08-27 | 2010-03-09 | 엘지전자 주식회사 | Mobile terminal and operation control method thereof |
CN108900661A (en) * | 2018-06-08 | 2018-11-27 | Oppo广东移动通信有限公司 | Electronic device and control method thereof |
CN111104086A (en) * | 2019-11-19 | 2020-05-05 | 维沃移动通信有限公司 | A display method and electronic device |
CN111835892A (en) * | 2019-04-22 | 2020-10-27 | 北京小米移动软件有限公司 | Electronic device and control method |
CN112887486A (en) * | 2021-01-28 | 2021-06-01 | 维沃移动通信有限公司 | Leading sound control method and device of electronic equipment |
CN113726947A (en) * | 2020-05-26 | 2021-11-30 | Oppo广东移动通信有限公司 | Voice communication method, device, terminal and storage medium |
CN113807047A (en) * | 2020-05-28 | 2021-12-17 | Oppo广东移动通信有限公司 | Information display method, device, terminal and storage medium |
CN113824818A (en) * | 2020-06-16 | 2021-12-21 | Oppo广东移动通信有限公司 | Device control method, device, storage medium and electronic device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102359550B1 (en) * | 2015-08-26 | 2022-02-08 | 엘지전자 주식회사 | Flexible display device and operating method thereof |
-
2022
- 2022-06-29 CN CN202210751665.0A patent/CN114816311B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100025360A (en) * | 2008-08-27 | 2010-03-09 | 엘지전자 주식회사 | Mobile terminal and operation control method thereof |
CN108900661A (en) * | 2018-06-08 | 2018-11-27 | Oppo广东移动通信有限公司 | Electronic device and control method thereof |
CN111835892A (en) * | 2019-04-22 | 2020-10-27 | 北京小米移动软件有限公司 | Electronic device and control method |
CN111104086A (en) * | 2019-11-19 | 2020-05-05 | 维沃移动通信有限公司 | A display method and electronic device |
CN113726947A (en) * | 2020-05-26 | 2021-11-30 | Oppo广东移动通信有限公司 | Voice communication method, device, terminal and storage medium |
CN113807047A (en) * | 2020-05-28 | 2021-12-17 | Oppo广东移动通信有限公司 | Information display method, device, terminal and storage medium |
CN113824818A (en) * | 2020-06-16 | 2021-12-21 | Oppo广东移动通信有限公司 | Device control method, device, storage medium and electronic device |
CN112887486A (en) * | 2021-01-28 | 2021-06-01 | 维沃移动通信有限公司 | Leading sound control method and device of electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114816311A (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113794800B (en) | Voice control method and electronic equipment | |
CN112269527B (en) | Application interface generation method and related device | |
CN110569095B (en) | Method and electronic device for displaying page elements | |
CN113364971B (en) | Image processing method and device | |
CN113994317A (en) | User interface layout method and electronic equipment | |
CN117908733A (en) | Display control method of system navigation bar, graphical user interface and electronic equipment | |
US20230236714A1 (en) | Cross-Device Desktop Management Method, First Electronic Device, and Second Electronic Device | |
CN110780929B (en) | Method for calling hardware interface and electronic device | |
US20230351570A1 (en) | Image processing method and apparatus | |
CN110830645A (en) | Operation method and electronic equipment | |
CN114596819A (en) | Brightness adjustment method and related device | |
CN114422686B (en) | Parameter adjustment method and related device | |
CN113986406B (en) | Method, device, electronic equipment and storage medium for generating doodle pattern | |
CN115802145A (en) | Shooting method and electronic equipment | |
CN114816311B (en) | Screen movement method and device | |
WO2024152676A1 (en) | Window management method and electronic device | |
CN115022527B (en) | Method and electronic device for enabling collaborative function | |
WO2024037542A1 (en) | Touch input method, system, electronic device, and storage medium | |
CN116795306A (en) | Image display method and electronic device | |
CN117135448A (en) | Shooting method and electronic equipment | |
CN118069262A (en) | Window adjusting method and related device | |
CN113849113A (en) | Touch operation processing method, electronic device and computer-readable storage medium | |
CN116668581B (en) | Method and device for preventing false touch | |
CN116684725B (en) | Layout method and device of application interface, electronic equipment, storage medium and chip | |
CN116027933B (en) | Methods and devices for processing service information |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |