WO2020233554A1 - Angle measurement method and electronic device - Google Patents

Angle measurement method and electronic device Download PDF

Info

Publication number
WO2020233554A1
WO2020233554A1 PCT/CN2020/090949 CN2020090949W WO2020233554A1 WO 2020233554 A1 WO2020233554 A1 WO 2020233554A1 CN 2020090949 W CN2020090949 W CN 2020090949W WO 2020233554 A1 WO2020233554 A1 WO 2020233554A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
parallel
angle
plane
main body
Prior art date
Application number
PCT/CN2020/090949
Other languages
French (fr)
Chinese (zh)
Inventor
卞苏成
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020233554A1 publication Critical patent/WO2020233554A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1637Details related to the display arrangement, including those related to the mounting of the display in the housing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B15/00Measuring arrangements characterised by the use of electromagnetic waves or particle radiation, e.g. by the use of microwaves, X-rays, gamma rays or electrons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1675Miscellaneous details related to the relative movement between the different enclosures or enclosure parts
    • G06F1/1677Miscellaneous details related to the relative movement between the different enclosures or enclosure parts for detecting open or closed state or particular intermediate positions assumed by movable parts of the enclosure, e.g. detection of display lid position with respect to main body in a laptop, detection of opening of the cover of battery compartment

Definitions

  • the electronic device can first detect whether the main body is parallel to the plane, and after detecting that the main body is parallel to the plane, then recognize the angle between the main bodies. Specifically, the electronic device recognizes the first main body and the second main body. The angle between the two bodies is: in response to the first body being parallel to the first plane, the electronic device recognizes the angle between the first body and the second body; or in response to the second body being parallel to the second plane, the electronic device recognizes the first body The included angle with the second body; or in response to the first body being parallel to the first plane and the second body being parallel to the second plane, the electronic device recognizes the included angle between the first body and the second body.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
  • the speaker 170A also called a “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the electronic device can know the angle between the plane 501 and the plane 502 by identifying the angle between the main body 302 and the main body 303, thereby achieving a difference in the angle ⁇ . Angle measurement.
  • FIG. 12 is a schematic structural diagram of yet another electronic device 100 provided by an embodiment of the application.
  • the electronic device 100 includes: a connection unit 401, a connection unit 402, a main body 403, a main body 404, and a main body 405.
  • the connecting unit 401 is used for connecting the main body 403 and the main body 404
  • the connecting unit 402 is used for connecting the main body 404 and the main body 405.
  • the electronic device starts to recognize and record the angle between the first body and the second body. Then, the user bends the display screen 194 inward or outward to rotate the second body so that the second body is parallel to the second plane. When the second body is parallel to the second plane, the recorded angle between the first body and the second body is the angle to be measured. Compared with the foregoing embodiment, there is no need for the user to keep the second plane parallel to the second body at this time. It should be noted that in the above embodiment, the first body is first rotated, and the second body is rotated after the first body is parallel to the first plane. It is understood that the second body can also be rotated first. If you turn the first body again, you can also rotate the first body and the second body together.

Abstract

Provided are an angle measurement method applied to an electronic device. An electronic device comprises a first main body and a second main body, wherein the first main body is connected to the second main body, and the first main body is bendable relative to the second main body. When the included angle between a first plane and a second plane is measured, the method comprises: detecting whether a first main body is parallel to the first plane during a process of the first main body being bent relative to a second main body; an electronic device identifying the included angle between the first main body and the second main body; the electronic device outputting a first angle, wherein the first angle is the included angle, identified by the electronic device when the first main body is parallel to the first plane and the second main body is parallel to the second plane, between the first main body and the second main body.

Description

一种角度测量方法和电子设备Angle measuring method and electronic equipment
本申请要求在2019年5月20日提交中国国家知识产权局、申请号为201910418166.8的中国专利申请的优先权,发明名称为“一种角度测量方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office of China with the application number 201910418166.8, and the priority of the Chinese patent application with the title of "A method of angle measurement and electronic equipment" on May 20, 2019. The entire content is incorporated into this application by reference.
技术领域Technical field
本申请实施例涉及电子技术领域,尤其涉及一种角度测量方法和电子设备。The embodiments of the present application relate to the field of electronic technology, and in particular to an angle measurement method and electronic equipment.
背景技术Background technique
随着电子技术的不断发展,手机等电子设备具备的功能越来越多、体验越来越丰富。比如,用户可以通过手机测量物体的角度。With the continuous development of electronic technology, electronic devices such as mobile phones have more and more functions and richer experiences. For example, users can measure the angle of an object through a mobile phone.
现有技术中,一种角度测量的实现方案为:In the prior art, an implementation scheme of angle measurement is:
电子设备获取摄像头捕获的待测角的图像。电子设备在显示屏上显示含有待测角的图像和两条测量线。用户可以移动该测量线使得该测量线分别与图像中所示的待测角的边沿相重合。电子设备计算两条测量线之间的角度差以实现对待测角的角度测量。The electronic device obtains the image of the angle to be measured captured by the camera. The electronic device displays an image containing the angle to be measured and two measurement lines on the display screen. The user can move the measurement line so that the measurement line coincides with the edge of the angle to be measured shown in the image. The electronic device calculates the angle difference between the two measurement lines to achieve the angle measurement to be measured.
现有技术中的角度测量方法,操作比较繁琐。The angle measurement method in the prior art is complicated to operate.
发明内容Summary of the invention
本申请实施例提供的一种应用于电子设备的角度测量方法及电子设备,方便用户测量物体的角度。The embodiment of the present application provides an angle measurement method applied to an electronic device and an electronic device, which facilitates users to measure the angle of an object.
第一方面,本申请实施例提供一种应用于电子设备的角度测量方法。其中,该电子设备包括第一主体和第二主体,第一主体与第二主体相连,第一主体相对于第二主体可弯折。假设第一待测角为物体的第一平面与物体的第二平面的夹角。In the first aspect, an embodiment of the present application provides an angle measurement method applied to an electronic device. Wherein, the electronic device includes a first body and a second body, the first body is connected to the second body, and the first body is bendable relative to the second body. Assume that the first angle to be measured is the angle between the first plane of the object and the second plane of the object.
一种可能角度测量方法,包括:将第二平面与第二主体平行放置,用户弯折第一主体以使第一主体也平行于第一平面;在第一主体相对于第二主体弯折的过程中,电子设备检测第一主体与第一平面是否平行;电子设备识别第一主体和第二主体之间的角度;电子设备输出第一主体与第一平面平行且第二主体与第二平面平行时电子设备识别的第一主体和第二主体之间的角度(即、第一角度)。A possible angle measurement method includes: placing the second plane parallel to the second body, the user bends the first body so that the first body is also parallel to the first plane; when the first body is bent relative to the second body In the process, the electronic device detects whether the first body is parallel to the first plane; the electronic device recognizes the angle between the first body and the second body; the electronic device outputs that the first body is parallel to the first plane and the second body is parallel to the second plane The angle between the first body and the second body recognized by the electronic device when they are parallel (ie, the first angle).
另一种可能的角度测量方法,包括:将待测物体放在第一主体和第二主体之间,用户弯折第一主体以使第一主体平行于第一平面,用户弯折第二主体以使第二主体平行于第二平面;在第一主体相对于第二主体弯折的过程中,电子设备检测第一主体与第一平面是否平行;在第二主体相对于第一主体弯折的过程中,电子设备检测第二主体与第二平面是否平行;电子设备识别第一主体和第二主体之间的角度;电子设备输出第一主体与第一平面平行且第二主体与第二平面平行时电子设备识别的第一主体和第二主体之间的角度(即、第一角度)。Another possible angle measurement method includes: placing the object to be measured between the first body and the second body, the user bends the first body so that the first body is parallel to the first plane, and the user bends the second body So that the second body is parallel to the second plane; while the first body is bent relative to the second body, the electronic device detects whether the first body is parallel to the first plane; when the second body is bent relative to the first body During the process, the electronic device detects whether the second body is parallel to the second plane; the electronic device recognizes the angle between the first body and the second body; the electronic device outputs that the first body is parallel to the first plane and the second body is parallel to the second The angle between the first body and the second body recognized by the electronic device when the planes are parallel (ie, the first angle).
由此,通过弯折主体使之与构成待测角的平面平行,用户可以方便地测量角度。Therefore, by bending the main body to make it parallel to the plane constituting the angle to be measured, the user can conveniently measure the angle.
其中,可以通过设置于主体上的平行传感器检测物体与平面是否平行。其中,平行传感器包括发射器和接收器。发射器用于发射发射波,接收器用于接收被反射的发射波(即、反射波)。一种可能的方法:若平行传感器接收的反射波大于第一阈值,则电子设备确定主体与平面平行;若平行传感器接收的反射波小于第二阈值,则电子设备确定主体与平面不平行。另一种可能的方法,若设置于主体的平行传感器接收的反射波为最大值,则电子设备确定主体与平面平行。Among them, a parallel sensor provided on the main body can detect whether the object is parallel to the plane. Among them, the parallel sensor includes a transmitter and a receiver. The transmitter is used to transmit the transmitted wave, and the receiver is used to receive the reflected transmitted wave (that is, the reflected wave). A possible method: if the reflected wave received by the parallel sensor is greater than the first threshold, the electronic device determines that the main body is parallel to the plane; if the reflected wave received by the parallel sensor is less than the second threshold, the electronic device determines that the main body is not parallel to the plane. In another possible method, if the reflected wave received by the parallel sensor disposed on the main body is at the maximum value, the electronic device determines that the main body is parallel to the plane.
其中,可以通过不同的方式识别各主体之间的角度。一种可能的方式,可以通过设置于各主体上的加速度传感器来识别各主体之间的角度,具体为:电子设备获取设置于某一主体的第一加速度传感器检测的第一加速度和设置于另一主体的第二加速度传感器检测的第二加速度;根据第一加速度确定上述某一主体的第一姿态,根据第二加速度确定上述另一主体的第二姿态;根据第一姿态和第二姿态,电子设备确定上述某一主体与上述另一主体之间的角度。Among them, the angle between the subjects can be identified in different ways. A possible way is to identify the angle between each subject through the acceleration sensor provided on each subject. Specifically, the electronic device obtains the first acceleration detected by the first acceleration sensor provided on a certain subject and sets it on another subject. The second acceleration detected by the second acceleration sensor of a subject; the first posture of the certain subject is determined according to the first acceleration, and the second posture of the other subject is determined according to the second acceleration; according to the first posture and the second posture, The electronic device determines the angle between the aforementioned one subject and the aforementioned other subject.
其中,当电子设备包括更多的主体时,电子设备可以测量更多的待测角的角度。电子设备还包括第三主体,第三主体和第二主体相连,第三主体相对于第二主体可弯折。第二待测角为物体的第二平面与物体的第三平面的夹角。该角度测量方法还包括:用户弯折第三主体以使第三主体平行于第三平面;在第三主体相对于第二主体弯折的过程中,电子设备检测第三主体与第三平面是否平行;电子设备识别第二主体和第三主体之间的角度;电子设备输出第二平面与第二主体平行且第三平面与第三主体平行时电子设备识别的第二主体和第三主体之间的角度(即、第二角度)。Among them, when the electronic device includes more main bodies, the electronic device can measure more angles to be measured. The electronic device further includes a third body connected to the second body, and the third body is bendable relative to the second body. The second angle to be measured is the angle between the second plane of the object and the third plane of the object. The angle measurement method further includes: the user bends the third body so that the third body is parallel to the third plane; in the process of bending the third body relative to the second body, the electronic device detects whether the third body and the third plane are Parallel; the electronic device recognizes the angle between the second body and the third body; the electronic device outputs the second and third body recognized by the electronic device when the second plane is parallel to the second body and the third plane is parallel to the third body The angle between (ie, the second angle).
在一种可能的设计方法中,电子设备可以先检测主体与平面是否平行,在检测到主体与平面平行之后,再识别各主体之间的角度,具体为:上述电子设备识别第一主体与第二主体的夹角为:响应于第一主体与第一平面平行,电子设备识别第一主体与第二主体的夹角;或者响应于第二主体与第二平面平行,电子设备识别第一主体与第二主体的夹角;或者响应于第一主体与第一平面平行且第二主体与第二平面平行,电子设备识别第一主体与第二主体的夹角。上述电子设备识别第二主体与第三主体的夹角为:响应于第三主体与第三平面平行,电子设备识别第二主体与第三主体的夹角;或者响应于第二主体与第二平面平行,电子设备识别第二主体与第三主体的夹角;或者响应于第二主体与第二平面平行且第三主体与第三平面平行,电子设备识别第二主体与第三主体的夹角。In a possible design method, the electronic device can first detect whether the main body is parallel to the plane, and after detecting that the main body is parallel to the plane, then recognize the angle between the main bodies. Specifically, the electronic device recognizes the first main body and the second main body. The angle between the two bodies is: in response to the first body being parallel to the first plane, the electronic device recognizes the angle between the first body and the second body; or in response to the second body being parallel to the second plane, the electronic device recognizes the first body The included angle with the second body; or in response to the first body being parallel to the first plane and the second body being parallel to the second plane, the electronic device recognizes the included angle between the first body and the second body. The above-mentioned electronic device recognizes the included angle between the second body and the third body: in response to the third body being parallel to the third plane, the electronic device recognizes the included angle between the second body and the third body; or in response to the second body and the second body The plane is parallel, the electronic device recognizes the angle between the second body and the third body; or in response to the second body being parallel to the second plane and the third body being parallel to the third plane, the electronic device recognizes the angle between the second body and the third body angle.
在另一种可能的设计方法中,电子设备可以实时地识别各主体之间的角度,在电子设备检测到主体与平面平行之后,输出该角度,具体为:上述电子设备输出第一角度为:响应于第一主体与第一平面平行,电子设备输出第一角度;或者响应于第二主体与第二平面平行,电子设备输出第一角度;或者响应于第一主体与第一平面平行且第二主体与第二平面平行,电子设备输出第一角度。上述电子设备输出第二角度为:响应于第三主体与第三平面平行,电子设备输出第二角度;或者响应于第二主体与第二平面平行,电子设备输出第二角度;或者响应于第二主体与第二平面平行且第三主体与第三平面平行,电子设备输出第二角度。In another possible design method, the electronic device can recognize the angle between the subjects in real time, and output the angle after the electronic device detects that the subject is parallel to the plane. Specifically, the first angle output by the electronic device is: In response to the first body being parallel to the first plane, the electronic device outputs the first angle; or in response to the second body being parallel to the second plane, the electronic device outputs the first angle; or in response to the first body being parallel to the first plane and the first angle The two main bodies are parallel to the second plane, and the electronic device outputs a first angle. The above-mentioned electronic device outputs the second angle as: in response to the third body being parallel to the third plane, the electronic device outputs the second angle; or in response to the second body being parallel to the second plane, the electronic device outputs the second angle; or in response to the first The two bodies are parallel to the second plane and the third body is parallel to the third plane, and the electronic device outputs the second angle.
在一种可能的设计方法中,该方法还包括:若平面与主体不平行,电子设备输出该平面与该主体不平行的提示。由此提示用户转动不平行的主体使其与平面平行。In a possible design method, the method further includes: if the plane is not parallel to the main body, the electronic device outputs a prompt that the plane is not parallel to the main body. This prompts the user to rotate the non-parallel body to make it parallel to the plane.
第二方面,本申请实施例提供一种电子设备,电子设备至少包括第一主体、第二主体、至少一个平行传感器、处理器、以及用于存储计算机程序的存储器,其中,第一主体与第二主体相连,第一主体相对于第二主体可弯折,计算机程序包括指令。当该指令被处理器执行 时,使得电子设备执行如第一方面中使用第一主体和第二主体检测角度的方法。在可能的设计方案中,电子设备还可以包括第三主体。当该指令被处理器执行时,使得电子设备执行如第一方面中使用第一主体、第二主体以及第三主体检测角度的方法。In a second aspect, embodiments of the present application provide an electronic device. The electronic device at least includes a first body, a second body, at least one parallel sensor, a processor, and a memory for storing a computer program, wherein the first body and the second body The two main bodies are connected, the first main body can be bent relative to the second main body, and the computer program includes instructions. When the instruction is executed by the processor, the electronic device is caused to execute the method of detecting the angle using the first body and the second body as in the first aspect. In a possible design solution, the electronic device may further include a third body. When the instruction is executed by the processor, the electronic device is caused to execute the method of detecting the angle using the first body, the second body, and the third body as in the first aspect.
第三方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的方法。In a third aspect, the present application provides a computer storage medium including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the method described in any one of the first aspect.
第四方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的方法。In a fourth aspect, this application provides a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to execute the method described in any one of the first aspect.
第五方面,本申请提供一种图形用户界面,该图形用户界面具体包括电子设备在执行如第一方面中任一项方法时显示的图形用户界面。In a fifth aspect, the present application provides a graphical user interface, which specifically includes a graphical user interface displayed when an electronic device executes any method as in the first aspect.
可以理解地,上述提供的第二方面所述的电子设备、第三方面所述的计算机存储介质、第四方面所述的计算机程序产品以及第五方面所述的图形用户界面,均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Understandably, the electronic equipment described in the second aspect, the computer storage medium described in the third aspect, the computer program product described in the fourth aspect, and the graphical user interface described in the fifth aspect provided above are all used to execute For the corresponding method provided above, therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
附图说明Description of the drawings
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the application;
图2为本申请实施例提供的一种电子设备的软件结构框图;2 is a software structure block diagram of an electronic device provided by an embodiment of the application;
图3为本申请实施例提供的又一种电子设备的结构示意图;3 is a schematic structural diagram of another electronic device provided by an embodiment of the application;
图4为本申请实施例提供的一种电子设备的主体之间的角度的示意图;4 is a schematic diagram of the angle between the main body of an electronic device provided by an embodiment of the application;
图5为本申请实施例提供的又一种电子设备的结构示意图;FIG. 5 is a schematic structural diagram of yet another electronic device provided by an embodiment of this application;
图6为本申请实施例提供的一种角度测量方法的原理示意图;6 is a schematic diagram of the principle of an angle measurement method provided by an embodiment of the application;
图7为本申请实施例提供的一种角度测量的方法的场景示意图;FIG. 7 is a schematic diagram of a scene of an angle measurement method provided by an embodiment of this application;
图8为本申请实施例提供的一种角度测量的方法的场景示意图;FIG. 8 is a schematic diagram of a scene of an angle measurement method provided by an embodiment of this application;
图9为本申请实施例提供的一种角度测量的方法的场景示意图;FIG. 9 is a schematic diagram of a scene of an angle measurement method provided by an embodiment of this application;
图10为本申请实施例提供的一种角度测量的方法的场景示意图;FIG. 10 is a schematic diagram of a scene of an angle measurement method provided by an embodiment of this application;
图11为本申请实施例提供的一种角度测量的方法的场景示意图;11 is a schematic diagram of a scene of an angle measurement method provided by an embodiment of the application;
图12为本申请实施例提供的又一种电子设备的结构示意图;FIG. 12 is a schematic structural diagram of yet another electronic device provided by an embodiment of this application;
图13为本申请实施例提供的又一种电子设备的结构示意图;FIG. 13 is a schematic structural diagram of another electronic device provided by an embodiment of this application;
图14为本申请实施例提供的又一种角度测量的方法的场景示意图;FIG. 14 is a schematic diagram of a scene of yet another method for angle measurement provided by an embodiment of the application;
图15为本申请实施例提供的又一种角度测量的方法的场景示意图;15 is a schematic diagram of a scene of yet another method for angle measurement provided by an embodiment of this application;
图16为本申请实施例提供的一种角度测量的方法的流程示意图。FIG. 16 is a schematic flowchart of an angle measurement method provided by an embodiment of this application.
具体实施方式Detailed ways
需要说明的是,本申请实施例中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。It should be noted that the descriptions of "first" and "second" in the embodiments of the present application are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, nor do they limit "first" and " The second" is a different type.
本申请实施例中的术语“A和/或B”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请实施例中字符"/",一般表示前后关联对象是一种"或"的关系。The term "A and/or B" in the embodiments of the present application is merely an association relationship describing associated objects, indicating that there can be three types of relationships, for example, there may be three types of relationships, such as A alone, A and B at the same time, and B alone. Happening. In addition, the character "/" in the embodiment of the present application generally indicates that the associated objects before and after are in an "or" relationship.
本申请实施例中描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本申请实施例中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。Some processes described in the embodiments of this application include multiple operations appearing in a specific order, but it should be clearly understood that these operations may be executed out of the order in which they appear in the embodiments of this application or in parallel. The serial numbers such as 101 and 102 are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
本申请实施例提供的一种角度测量方法,可以应用于电子设备。示例性的,该电子设备例如可以为:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、数码相机、个人数字助理(personal digital assistant,简称PDA)、导航装置、移动上网装置(Mobile Internet Device,MID)、车载装置、智能家居设备或可穿戴式设备(Wearable Device)等。The angle measurement method provided by the embodiment of the present application can be applied to electronic equipment. Exemplarily, the electronic device may be, for example, a mobile phone, a tablet computer (Personal Computer), a laptop computer (Laptop Computer), a digital camera, a personal digital assistant (personal digital assistant, PDA for short), a navigation device, and a mobile Internet Device (Mobile Internet Device, MID), in-vehicle device, smart home device or wearable device (Wearable Device), etc.
图1示出了电子设备100的结构示意图。FIG. 1 shows a schematic structural diagram of an 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, and an antenna 2. , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 can include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, and ambient light sensor 180L, bone conduction sensor 180M, parallel sensor 180N, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application 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 shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can 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 an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, the different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transmitter receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to realize communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on. GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏 194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统 (quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display 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),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的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 to the photosensitive element. The photosensitive element may 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 transmits the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, and N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information and can continuously learn by itself. The NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件, 闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can approach the microphone 170C through the mouth to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (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 may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors and so on. The capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the 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 the 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 may be used to determine the movement posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的 开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。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 holster. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and used in applications such as horizontal and vertical screen switching, pedometers and so on.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F, used to measure distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近传感器180G可以是接近光传感器,超声波接近传感器。The proximity sensor 180G may be a proximity optical sensor or an ultrasonic proximity sensor.
接近光传感器可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor to detect that 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 can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
超声波接近传感器可以包括超声波发射器和超声波检测器。电子设备100通过超声波发射器向外发射超声波。电子设备100通过超声波检测器检测被附近物体反射的超声波。当检测到充分的发射波时,电子设备100可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。The ultrasonic proximity sensor may include an ultrasonic transmitter and an ultrasonic detector. The electronic device 100 emits ultrasonic waves to the outside through the ultrasonic transmitter. The electronic device 100 detects ultrasonic waves reflected by nearby objects through an ultrasonic detector. When sufficient emission waves are detected, the electronic device 100 can determine that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light. 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 sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, etc.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音 信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
平行传感器180N用于检测与电子设备平行的平面。平行传感器180N可以包括发射器和接收器。发射器用于发射光波或声波;接收器用于接收被反射的发射光波或声波。为了方便说明,下面将由发射器发射的光波或声波称为“发射波”;将被物体反射的光波或声波称为“反射波”。The parallel sensor 180N is used to detect a plane parallel to the electronic device. The parallel sensor 180N may include a transmitter and a receiver. The transmitter is used to emit light or sound waves; the receiver is used to receive the reflected light or sound waves. For the convenience of description, the light waves or sound waves emitted by the transmitter are referred to as "transmitted waves"; the light waves or sound waves reflected by objects are referred to as "reflected waves".
当待检测的平面与电子设备平行时,发射波垂直入射至该平面,反射波沿原路径返回至平行传感器180N(即、反射波的路径与发射波的路径相同、方向相反),反射波被接收器接收。反之当待检测的平面不平行于电子设备时,发射波以一定的角度入射至该平面,则反射波以偏离原路径的路径返回。此时,反射波的路径偏离平行传感器180N,接收器接收的反射波有所减少,少于平行时接收器接收的反射波。由此可知,通过检测接收器接收的反射波,电子设备可以检测与电子设备平行的平面。如果接收器接收的反射波大于预定的第一阈值就相当于电子设备确定该平面与电子设备平行;反之,如果接收器接收的反射波小于预定的第二阈值时,就相当于电子设备确定该平面不平行于电子设备。需要说明的,第一阈值可以为与第二阈值相同,也可以不同。或者,如果接收器接收的反射波为最大值,就相当于电子设备确定该平面与电子设备平行;反之,如果接收器接收的反射波小于上述最大值就相当于电子设备确定该平面与电子设备不平行。When the plane to be detected is parallel to the electronic device, the transmitted wave enters the plane perpendicularly, and the reflected wave returns to the parallel sensor 180N along the original path (that is, the path of the reflected wave is the same as the path of the transmitted wave, but the direction is opposite). The receiver receives. Conversely, when the plane to be detected is not parallel to the electronic device, the emitted wave is incident on the plane at a certain angle, and the reflected wave returns with a path deviating from the original path. At this time, the path of the reflected wave deviates from the parallel sensor 180N, and the reflected wave received by the receiver is reduced, which is less than the reflected wave received by the receiver when it is parallel. It can be seen that, by detecting the reflected wave received by the receiver, the electronic device can detect a plane parallel to the electronic device. If the reflected wave received by the receiver is greater than the predetermined first threshold, it is equivalent to the electronic device determining that the plane is parallel to the electronic device; conversely, if the reflected wave received by the receiver is less than the predetermined second threshold, it is equivalent to the electronic device determining the plane The plane is not parallel to the electronic device. It should be noted that the first threshold may be the same as or different from the second threshold. Or, if the reflected wave received by the receiver is the maximum value, it is equivalent to the electronic device determining that the plane is parallel to the electronic device; conversely, if the reflected wave received by the receiver is less than the above maximum value, it is equivalent to the electronic device determining that the plane is parallel to the electronic device Not parallel.
需要说明的是,电子设备可以不具备单独的平行传感器180N,由电子设备的接近传感器180G充当平行传感器。It should be noted that the electronic device may not have a separate parallel sensor 180N, and the proximity sensor 180G of the electronic device may serve as the parallel sensor.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The button 190 includes a power button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminding, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect to the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes a layered Android system as an example to illustrate the software structure of the electronic device 100.
图2是本申请实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides application programming interfaces (application programming interface, API) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The content provider is used to store and retrieve data and make these data accessible to applications. The data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text and controls that display pictures. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a 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),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
2D图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传 感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 will be exemplified in conjunction with capturing a photo scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, etc.). The original input events are stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera 193 captures still images or videos.
本申请实施例中,显示屏194可以为可变形的。可变形的显示屏194可以被称为“柔性屏”。变形,意指电子设备的显示屏194的一部分的曲率半径小于基准值。例如,变形可以是,折叠、弯折、扭曲、卷曲、以及其组合中的任意一个。其中,可以根据变形程度区分折叠和弯曲。例如,如果显示屏194按大于某一预定值的角度弯折,则可定义为“折叠”。与此相反,如果显示屏194按等于或小于所述预定值的角度弯折,则可定义为“弯折”。为方便说明,下面将这种弯曲和折叠称为“弯折”。在以下实施例中,将会参考附图更加详细地与显示屏194变形有关的电子设备的结构。In the embodiment of the present application, the display screen 194 may be deformable. The deformable display screen 194 may be referred to as a "flexible screen." Deformation means that the radius of curvature of a part of the display screen 194 of the electronic device is smaller than the reference value. For example, the deformation may be any one of folding, bending, twisting, curling, and combinations thereof. Among them, folding and bending can be distinguished according to the degree of deformation. For example, if the display screen 194 is bent at an angle greater than a predetermined value, it can be defined as "folded." In contrast to this, if the display screen 194 is bent at an angle equal to or smaller than the predetermined value, it can be defined as "bending". For the convenience of description, this bending and folding is referred to as "bending" below. In the following embodiments, the structure of the electronic device related to the deformation of the display screen 194 will be described in more detail with reference to the drawings.
示例性的,以电子设备为双折叠手机为例进行说明。图3为本申请实施例提供的一种电子设备100的结构示意图。如图3所示,电子设备100包括:连接单元301、主体302、主体303和显示屏194。其中,连接单元301用于连接主体302和主体303。主体302和主体303的大小可以相同也可以不同。主体302和主体303的厚度可以相同。显示屏194覆盖连接单元301、主体302以及主体303。显示屏194可以通过连接单元向内或向外弯折,以改变各主体之间的角度。其中,如图4(a)和图4(b)所示,主体302和主体303之间的角度ɑ为主体302和主体303的夹角(即、小于180度的角)。Illustratively, the electronic device is a double-folding mobile phone as an example for description. FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the application. As shown in FIG. 3, the electronic device 100 includes: a connection unit 301, a main body 302, a main body 303 and a display screen 194. The connecting unit 301 is used to connect the main body 302 and the main body 303. The size of the main body 302 and the main body 303 may be the same or different. The thickness of the main body 302 and the main body 303 may be the same. The display screen 194 covers the connection unit 301, the main body 302 and the main body 303. The display screen 194 can be bent inward or outward through the connecting unit to change the angle between the main bodies. 4(a) and 4(b), the angle ɑ between the main body 302 and the main body 303 is the angle between the main body 302 and the main body 303 (ie, an angle less than 180 degrees).
示例性的,如图5(a)和图5(b)所示,电子设备处于平坦状态,也可以称为展开状态。此时,主体302和主体303位于同一水平面上。主体302和主体303之间的角度ɑ为180度。随着用户弯折显示屏194,电子设备可以由平坦状态到折叠状态,或者由折叠状态到平坦状态。所述折叠状态可以包括第一折叠状态和/或第二折叠状态。Exemplarily, as shown in FIGS. 5(a) and 5(b), the electronic device is in a flat state, which may also be referred to as an unfolded state. At this time, the main body 302 and the main body 303 are located on the same horizontal plane. The angle ɑ between the main body 302 and the main body 303 is 180 degrees. As the user bends the display screen 194, the electronic device may change from a flat state to a folded state, or from a folded state to a flat state. The folded state may include a first folded state and/or a second folded state.
如图5(c)和图5(d)所示,电子设备处于第一折叠状态。此时,主体302与主体303相互平行,显示屏194朝向电子设备的外部,主体302和主体303之间的角度ɑ为0度。从平坦状态向外弯折显示屏194至第一折叠状态,主体302和主体303之间的角度逐渐减小,主体302和主体303之间的角度由180度减小到0度。从第一折叠状态向内折显示屏194至平坦状态,主体302和主体303之间的角度逐渐增大,主体302和主体303之间的角度由0度增加到180度。As shown in FIG. 5(c) and FIG. 5(d), the electronic device is in the first folded state. At this time, the main body 302 and the main body 303 are parallel to each other, the display screen 194 faces the outside of the electronic device, and the angle ɑ between the main body 302 and the main body 303 is 0 degree. When the display screen 194 is bent outward from the flat state to the first folded state, the angle between the main body 302 and the main body 303 gradually decreases, and the angle between the main body 302 and the main body 303 decreases from 180 degrees to 0 degrees. Folding the display screen 194 inward from the first folded state to the flat state, the angle between the main body 302 and the main body 303 gradually increases, and the angle between the main body 302 and the main body 303 increases from 0 degrees to 180 degrees.
如图5(e)和图5(f)所示,电子设备处于第二折叠状态。此时,主体302与主体303相互平行,显示屏194朝向电子设备的内部,主体302和主体303之间的角度ɑ为0度。从平坦状态向内弯折显示屏194至第二折叠状态,主体302和主体303之间的角度逐渐变小,主体302和主体303之间的角度由180度逐渐减小至0度。从第二折叠状态向外弯折显示屏194至平坦状态,主体302和主体303之间的角度逐渐增大,主体302和主体303之间的角度由0度增加到180度。As shown in Figure 5(e) and Figure 5(f), the electronic device is in the second folded state. At this time, the main body 302 and the main body 303 are parallel to each other, the display screen 194 faces the inside of the electronic device, and the angle ɑ between the main body 302 and the main body 303 is 0 degree. When the display screen 194 is bent inward from the flat state to the second folded state, the angle between the main body 302 and the main body 303 gradually decreases, and the angle between the main body 302 and the main body 303 gradually decreases from 180 degrees to 0 degrees. When the display screen 194 is bent outward from the second folded state to a flat state, the angle between the main body 302 and the main body 303 gradually increases, and the angle between the main body 302 and the main body 303 increases from 0 degrees to 180 degrees.
需要说明的是,图5中以支持180度弯折的折叠手机为例进行了说明。可以理解的,电子设备也可以支持360度。此时,用户可以从第一折叠状态将显示屏194向内弯折360度至 第二折叠状态,或从第二折叠状态向外弯折360度至第一折叠状态。It should be noted that, in FIG. 5, a folding mobile phone that supports 180-degree bending is taken as an example for illustration. Understandably, the electronic device can also support 360 degrees. At this time, the user can bend the display screen 194 inwardly by 360 degrees from the first folded state to the second folded state, or bend outwardly by 360 degrees from the second folded state to the first folded state.
电子设备100可以识别各主体之间的角度(如,主体302和主体303之间的角度)。例如,电子设备100可以通过加速度传感器180E识别各主体之间的角度。示例性的,电子设备100包括多个加速度传感器180E,分别设置于各主体中。电子设备可以通过各主体(如,主体302,主体303)中设置的加速度传感器检测各主体的各个轴(如,x轴,y轴和z轴)的加速度大小,根据检测得到的各个轴的加速度大小电子设备可以确定各主体的姿态(如,主体302的姿态和主体303的姿态),进而根据任一主体和另一主体的姿态确定该主体之间的角度(如,根据主体302的姿态和主体303的姿态确定主体302和主体303之间的角度)。The electronic device 100 can recognize the angle between the main bodies (for example, the angle between the main body 302 and the main body 303). For example, the electronic device 100 may recognize the angle between the subjects through the acceleration sensor 180E. Exemplarily, the electronic device 100 includes a plurality of acceleration sensors 180E, which are respectively disposed in each main body. The electronic device can detect the acceleration of each axis (e.g., x-axis, y-axis, and z-axis) of each main body through the acceleration sensor provided in each main body (eg, main body 302, main body 303), and according to the detected acceleration of each axis Large and small electronic devices can determine the posture of each subject (e.g., the posture of the subject 302 and the posture of the subject 303), and then determine the angle between the subject according to the posture of any subject and the other subject (e.g., according to the posture of the subject 302 and the The posture of the main body 303 determines the angle between the main body 302 and the main body 303).
以图3所述的双折叠手机为例,电子设备100可以包括第一加速度传感器和第二加速度传感器。其中,第一加速度传感器设置于主体302;第二加速度传感器设置于主体303。第一加速度传感器检测主体302分别在x1,y1和z1轴的加速度。示例性的,x1,y1和z1轴如图6(a)所示,x1轴为主体302所在平面的水平方向;y1轴为主体302所在平面中与x1轴垂直的方向;z1轴为与主体302所在平面垂直的方向。第二加速度传感器检测主体303分别在x2,y2和z2轴的加速度。示例性的,x2,y2和z2轴如图6(a)所示,x2轴为主体303所在平面的水平方向;y2轴为主体303所在平面中与x2轴垂直的方向;z2轴为与主体303所在平面垂直的方向。Taking the double-folding mobile phone described in FIG. 3 as an example, the electronic device 100 may include a first acceleration sensor and a second acceleration sensor. Among them, the first acceleration sensor is disposed on the main body 302; the second acceleration sensor is disposed on the main body 303. The first acceleration sensor detects the acceleration of the main body 302 on the x1, y1, and z1 axes, respectively. Exemplarily, the x1, y1 and z1 axes are shown in Figure 6(a), the x1 axis is the horizontal direction of the plane where the main body 302 is located; the y1 axis is the direction perpendicular to the x1 axis in the plane where the main body 302 is located; the z1 axis is the direction perpendicular to the main body 302 The direction perpendicular to the plane where 302 is located. The second acceleration sensor detects the acceleration of the main body 303 on the x2, y2, and z2 axes, respectively. Exemplarily, the x2, y2 and z2 axes are shown in Figure 6(a), the x2 axis is the horizontal direction of the plane where the main body 303 is located; the y2 axis is the direction perpendicular to the x2 axis in the plane where the main body 303 is located; the z2 axis is the direction perpendicular to the main body 303 The direction perpendicular to the plane where 303 is located.
电子设备100可以根据设置在各主体中的加速度传感器检测的各个轴的加速度以确定各主体的姿态。例如,电子设备100可以根据x1,y1和z1轴的加速度确定主体302的姿态,根据x2,y2和z2轴的加速度确定主体303的姿态。示例性的,电子设备100可以根据x1,y1和z1轴的加速度计算得到z1轴与水平方向的夹角θ z1,根据x2,y2和z2轴的加速度计算得到z2轴与水平方向的夹角θ z2。其计算公式如式1所示: The electronic device 100 may determine the posture of each body based on the acceleration of each axis detected by the acceleration sensor provided in each body. For example, the electronic device 100 may determine the posture of the main body 302 according to the acceleration of the x1, y1 and z1 axes, and determine the posture of the main body 303 according to the acceleration of the x2, y2 and z2 axes. Exemplarily, the electronic device 100 may calculate the angle θ z1 between the z1 axis and the horizontal direction according to the accelerations of the x1, y1 and z1 axes, and calculate the angle θ between the z2 axis and the horizontal direction according to the accelerations of the x2, y2 and z2 axes. z2 . The calculation formula is shown in formula 1:
Figure PCTCN2020090949-appb-000001
Figure PCTCN2020090949-appb-000001
其中a z为x轴的加速度,a y为y轴的加速度,a z为z轴的加速度。θ z为z轴与水平方向的夹角。 Where a z is the acceleration of the x-axis, a y is the acceleration of the y-axis, and a z is the acceleration of the z-axis. θ z is the angle between the z axis and the horizontal direction.
电子设备100可以根据任一主体和另一主体的姿态确定两个主体之间的角度。例如,电子设备100可以根据主体302和主体303的姿态确定主体302和主体303之间的角度。可以理解的是,如图6(b)所示,电子设备可以根据z1轴与水平方向的夹角θ z1,z2轴与水平方向的夹角θ z2计算得到主体302和主体303之间的角度ɑ,其计算公式如式2所示: The electronic device 100 can determine the angle between the two main bodies according to the postures of any one main body and the other main body. For example, the electronic device 100 may determine the angle between the main body 302 and the main body 303 according to the postures of the main body 302 and the main body 303. It is understandable that, as shown in Figure 6(b), the electronic device can calculate the angle between the main body 302 and the main body 303 according to the angle θ z1 between the z1 axis and the horizontal direction, and the angle θ z2 between the z2 axis and the horizontal direction. ɑ, its calculation formula is shown in formula 2:
ɑ=180+θ Z1Z2  (式2) ɑ=180+θ Z1Z2 (Equation 2)
需要说明的是,本申请实施例中,以根据z1轴与水平方向的夹角和z2轴与水平方向的夹角计算主体302和主体303之间的角度为例进行了说明,可以理解的是,计算主体302和主体303之间角度的方法并不限于此。例如,电子设备100可以根据x1轴与水平方向的夹角θ x1,x2轴与水平方向的夹角θ x2计算得到主体302和主体303之间的角度,其计算公式如式3所示: It should be noted that, in the embodiment of the present application, the angle between the main body 302 and the main body 303 is calculated based on the angle between the z1 axis and the horizontal direction and the angle between the z2 axis and the horizontal direction as an example. The method of calculating the angle between the main body 302 and the main body 303 is not limited to this. For example, the electronic device 100 can calculate the angle between the main body 302 and the main body 303 according to the included angle θ x1 between the x1 axis and the horizontal direction, and the included angle θ x2 between the x2 axis and the horizontal direction, and the calculation formula is as shown in Equation 3:
ɑ=180-(θ x1x2)  (式3) ɑ=180-(θ x1x2 ) (Equation 3)
其中,电子设备100可以根据x1,y1和z1轴的加速度计算得到x1轴与水平方向的夹角θ x1,根据x2,y2和z2轴的加速度计算得到x2轴与水平方向的夹角θ x2。其计算公式如式4所示: The electronic device 100 may calculate the angle θ x1 between the x1 axis and the horizontal direction according to the accelerations of the x1, y1 and z1 axes, and obtain the angle θ x2 between the x2 axis and the horizontal direction according to the accelerations of the x2, y2 and z2 axes. The calculation formula is shown in formula 4:
Figure PCTCN2020090949-appb-000002
Figure PCTCN2020090949-appb-000002
替代性的,电子设备100可以通过陀螺仪传感器180B来确定各主体之间的角度。示例性的,电子设备可以包括多个陀螺仪传感器,分别设置于各主体中。电子设备可以通过各主体(如,主体302,主体303)中设置的陀螺仪传感器检测各主体的各个轴(如,x轴,y轴和z轴)的角速度,根据检测的各个轴上的角速度电子设备可以确定各主体的姿态(如,主体302的姿态和主体303的姿态),进而根据任一主体和另一主体的姿态确定该主体之间的角度(如,根据主体302的姿态和主体303的姿态确定主体302和主体303之间的角度)。Alternatively, the electronic device 100 may determine the angle between the subjects through the gyro sensor 180B. Exemplarily, the electronic device may include multiple gyroscope sensors, which are respectively disposed in each main body. The electronic device can detect the angular velocity of each axis (eg, x-axis, y-axis, and z-axis) of each main body (eg, main body 302, main body 303) through the gyro sensor provided in each main body (eg, main body 302, main body 303), according to the detected angular velocity on each axis The electronic device can determine the posture of each subject (e.g., the posture of the subject 302 and the posture of the subject 303), and then determine the angle between the subject according to the posture of any subject and the other subject (e.g., according to the posture of the subject 302 and the subject The posture of 303 determines the angle between the main body 302 and the main body 303).
以图3所述的双折叠手机为例,电子设备100可以包括第一陀螺仪传感器和第二陀螺仪传感器。其中,第一陀螺仪传感器设置于主体302;第二陀螺仪传感器设置于主体303。电子设备100可以通过第一陀螺仪传感器检测的角速度计算得到主体302的姿态,通过第二陀螺仪传感器检测的角速度计算得到主体303的姿态;然后,根据主体302的姿态和主体303的姿态,电子设备可以确定主体302和主体303之间的角度。Taking the double-folding mobile phone described in FIG. 3 as an example, the electronic device 100 may include a first gyroscope sensor and a second gyroscope sensor. Among them, the first gyroscope sensor is disposed on the main body 302; the second gyroscope sensor is disposed on the main body 303. The electronic device 100 can calculate the posture of the main body 302 by the angular velocity detected by the first gyro sensor, and calculate the posture of the main body 303 by the angular velocity detected by the second gyro sensor; then, according to the posture of the main body 302 and the posture of the main body 303, the electronic The device can determine the angle between the main body 302 and the main body 303.
需要说明是,本申请实施例中识别各主体之间的角度的方法包括但不限于上述例子。例如,电子设备100可以通过加速度传感器180E和陀螺仪传感器180B确定各主体之间的角度。又如,电子设备100还包括旋转传感器。电子设备100可以通过旋转传感器检测任一主体和另一主体的旋转角度来确定该各主体之间的角度。It should be noted that the method of identifying the angle between the subjects in the embodiments of the present application includes but is not limited to the above examples. For example, the electronic device 100 may determine the angle between the subjects through the acceleration sensor 180E and the gyro sensor 180B. For another example, the electronic device 100 further includes a rotation sensor. The electronic device 100 can determine the angle between any body and the other body by detecting the rotation angle of the body through the rotation sensor.
可以理解的是,当构成待测角的某一平面与某一主体平行,构成待测角的另一平面与另一主体平行,且待测角与两个主体之间的夹角朝向相同时,该待测角的角度等于两个主体之间的角度。示例性的,如图7所示,待测角为:平面501与平面502的夹角β。电子设备的主体302与物体500的平面501平行且电子设备的主体303与该物体的平面502平行,且第一平面501和第二平面502的夹角与主体302和主体303的夹角朝向相同,则物体的平面501与平面502的夹角β等于主体302和主体303之间的角度ɑ。故而,本申请实施例中,通过识别主体302平行于平面501且主体303平行于平面502时的主体302和主体303之间的角度ɑ,电子设备100可以确定平面501与平面502之间的夹角β。也就是说,当构成待测角的某一平面与某一主体平行,构成待测角的另一平面与另一主体平行时,电子设备100可以通过识别该主体之间的角度测量该待测角的角度。在以下实施例中,将会参考附图更加详细地说明与角度测量有关的电子设备的结构。It is understandable that when a plane forming the angle to be measured is parallel to a certain body, another plane forming the angle to be measured is parallel to the other body, and the angle between the angle to be measured and the two bodies is in the same direction , The angle of the angle to be measured is equal to the angle between the two main bodies. Exemplarily, as shown in FIG. 7, the angle to be measured is: the angle β between the plane 501 and the plane 502. The main body 302 of the electronic device is parallel to the plane 501 of the object 500 and the main body 303 of the electronic device is parallel to the plane 502 of the object, and the angle between the first plane 501 and the second plane 502 is the same as the angle between the main body 302 and the main body 303. , Then the angle β between the plane 501 and the plane 502 of the object is equal to the angle ɑ between the main body 302 and the main body 303. Therefore, in the embodiment of the present application, by identifying the angle ɑ between the main body 302 and the main body 303 when the main body 302 is parallel to the plane 501 and the main body 303 is parallel to the plane 502, the electronic device 100 can determine the clamp between the plane 501 and the plane 502. Angle β. In other words, when a plane constituting the angle to be measured is parallel to a certain main body, and another plane constituting the angle to be measured is parallel to another main body, the electronic device 100 can measure the angle to be measured by identifying the angle between the main bodies. Angle of angle. In the following embodiments, the structure of an electronic device related to angle measurement will be explained in more detail with reference to the accompanying drawings.
电子设备100包括平行传感器600。平行传感器600可以设置于电子设备100的某个主体上,用于检测构成待测角的某个平面与设置有该平行传感器600的主体的平行关系。例如,待测角为平面501与平面502的夹角β时,设置于主体上的平行传感器可以用于检测物体的平面502与主体的平行关系或用于检测平面501与主体的平行关系。下面结合图8对平行传感器600的工作原理进行说明。The electronic device 100 includes a parallel sensor 600. The parallel sensor 600 may be arranged on a certain main body of the electronic device 100 to detect the parallel relationship between a certain plane constituting the angle to be measured and the main body provided with the parallel sensor 600. For example, when the angle to be measured is the angle β between the plane 501 and the plane 502, the parallel sensor provided on the main body can be used to detect the parallel relationship between the plane 502 and the main body or the parallel relationship between the plane 501 and the main body. The working principle of the parallel sensor 600 will be described below in conjunction with FIG. 8.
根据反射定律可知,反射角等于入射角。如图8(a)所示,当设置有该平行传感器600的主体(如,主体303)与某平面(如,平面502)平行时,发射波垂直入射至该平面,反射 波沿原路径返回至平行传感器600(即、反射波的路径与发射波的路径相同、方向相反),反射波被接收器接收。反之,如图8(b)或图8(c)所示,当该主体不平行于该平面时,发射波以一定的角度入射至该平面(如,入射角为A),则反射波以偏离原路径的路径返回(反射波的路径与发射波的路径的夹角为入射角的两倍)。此时,反射波的路径偏离平行传感器600,接收器接收的反射波有所减少,少于平行时接收器接收的反射波。由此可知,通过检测接收器接收的反射波,电子设备100可以确定设置有该平行传感器600的主体(如,主体303)与某平面(如,平面502)的平行关系。例如,当接收器接收的反射波最多时,电子设备100就可以确定设置有该平行传感器600的主体(如,主体303)平行于反射该发射波的平面(如,平面502)。According to the law of reflection, the angle of reflection is equal to the angle of incidence. As shown in Figure 8(a), when the main body (for example, main body 303) provided with the parallel sensor 600 is parallel to a certain plane (for example, plane 502), the transmitted wave is incident on the plane perpendicularly, and the reflected wave returns along the original path To the parallel sensor 600 (that is, the path of the reflected wave is the same as the path of the transmitted wave but opposite in direction), the reflected wave is received by the receiver. On the contrary, as shown in Figure 8(b) or Figure 8(c), when the body is not parallel to the plane, the transmitted wave is incident on the plane at a certain angle (for example, the incident angle is A), and the reflected wave is The path deviating from the original path returns (the angle between the path of the reflected wave and the path of the transmitted wave is twice the incident angle). At this time, the path of the reflected wave deviates from the parallel sensor 600, and the reflected wave received by the receiver is reduced, which is less than the reflected wave received by the receiver when it is parallel. It can be seen that, by detecting the reflected wave received by the receiver, the electronic device 100 can determine the parallel relationship between the main body (for example, the main body 303) provided with the parallel sensor 600 and a certain plane (for example, the plane 502). For example, when the receiver receives the most reflected waves, the electronic device 100 can determine that the body (for example, the body 303) provided with the parallel sensor 600 is parallel to the plane (for example, the plane 502) that reflects the transmitted waves.
可以理解的是,如图7所示,当待测平面(如,平面501)和待测主体(如,主体302)被置于同一平面上(如,桌面)时,该待测平面平行于该待测主体。又如,如图8所示,当待测平面被置于某待测主体上时(如,以平面501为底将物体500放置在电子设备100的主体302上时),该待测平面平行于该待测主体。It is understandable that, as shown in FIG. 7, when the plane to be measured (for example, plane 501) and the subject to be measured (for example, main body 302) are placed on the same plane (for example, the desktop), the plane to be measured is parallel to The subject to be tested. For another example, as shown in FIG. 8, when the plane to be measured is placed on a subject to be measured (for example, when the object 500 is placed on the main body 302 of the electronic device 100 with the plane 501 as the base), the plane to be measured is parallel On the subject to be tested.
也就是说,本申请实施例中的角度检测方法,用户可以将构成待测角的一个平面置于电子设备的某一主体上,或者,将构成待测角的一个平面和电子设备的主体置于同一平面上,以使构成待测角的一个平面平行于一个主体。然后,用户可以转动电子设备的另一主体,以使被转动的另一主体与构成该待测角的另一平面平行。从而使得构成待测角的一个平面与电子设备的一个主体平行,构成待测角的另一平面与另一主体平行。此时,电子设备识别的两个主体之间的角度即为待测角的角度。That is to say, in the angle detection method in the embodiment of this application, the user can place a plane that forms the angle to be measured on a certain body of the electronic device, or place a plane that forms the angle to be measured on the body of the electronic device. On the same plane, so that a plane forming the angle to be measured is parallel to a main body. Then, the user can rotate the other main body of the electronic device so that the rotated other main body is parallel to the other plane constituting the angle to be measured. Thus, one plane constituting the angle to be measured is parallel to a main body of the electronic device, and another plane constituting the angle to be measured is parallel to the other main body. At this time, the angle between the two main bodies recognized by the electronic device is the angle to be measured.
示例性的,如图8所示,以平面501为底物体500被放置在电子设备100的主体302上。此时,平面501已然平行于主体302,电子设备100可以不检测平面501与主体302之间的平行关系。可以理解的是,当主体303与平面502平行时,物体的平面501与平面502的夹角β即等于主体302和主体303之间的角度ɑ。用户可以向内或向外弯折显示屏194以使主体303平行于平面502。示例性的,用户从电子设备的主体302和主体303之间的角度ɑ大于夹角β的第一状态(如图8(b)所示)向内弯折显示屏194。用户向内弯折显示屏194,主体302和主体303之间的角度随之减小,主体303和平面502趋于平行,接收器接收的反射波由少变多,直至主体303与平面502平行(如图8(a)所示)时,接收器接收的反射波最多。然后,继续向内弯折显示屏194,主体302和主体303之间的角度继续减小,主体302和主体303之间的角度ɑ小于夹角β(如图8(c)所示)。随着用户继续向内弯折显示屏194,主体303和平面502由平行趋于不平行,接收器接收的反射波由多变少。由此可知,当电子设备100的主体303平行于物体的平面502时,接收器接收的反射波最多。此时,主体302和主体303之间的角度等于平面501和平面502的夹角。也就是说,当接收器接收的反射波最多时,电子设备通过识别主体302和主体303之间的角度就可以得知平面501和平面502之间的夹角,由此实现对夹角β的角度测量。Exemplarily, as shown in FIG. 8, an object 500 with a plane 501 as a base is placed on the main body 302 of the electronic device 100. At this time, the plane 501 is already parallel to the main body 302, and the electronic device 100 may not detect the parallel relationship between the plane 501 and the main body 302. It can be understood that when the main body 303 is parallel to the plane 502, the angle β between the plane 501 of the object and the plane 502 is equal to the angle ɑ between the main body 302 and the main body 303. The user can bend the display screen 194 inward or outward so that the main body 303 is parallel to the plane 502. Exemplarily, the user bends the display screen 194 inward from the first state where the angle ɑ between the main body 302 and the main body 303 of the electronic device is greater than the included angle β (as shown in FIG. 8(b)). The user bends the display 194 inward, the angle between the main body 302 and the main body 303 decreases accordingly, the main body 303 and the plane 502 tend to be parallel, and the reflected wave received by the receiver changes from less to more, until the main body 303 is parallel to the plane 502 (As shown in Figure 8(a)), the receiver receives the most reflected waves. Then, continue to bend the display screen 194 inward, and the angle between the main body 302 and the main body 303 continues to decrease, and the angle ɑ between the main body 302 and the main body 303 is smaller than the included angle β (as shown in FIG. 8(c)). As the user continues to bend the display screen 194 inward, the main body 303 and the plane 502 change from parallel to non-parallel, and the reflected waves received by the receiver change from more to less. It can be seen that when the main body 303 of the electronic device 100 is parallel to the plane 502 of the object, the receiver receives the most reflected waves. At this time, the angle between the main body 302 and the main body 303 is equal to the angle between the plane 501 and the plane 502. That is to say, when the receiver receives the most reflected waves, the electronic device can know the angle between the plane 501 and the plane 502 by identifying the angle between the main body 302 and the main body 303, thereby achieving a difference in the angle β. Angle measurement.
上述实施例中以图8为例进行了说明,可以理解的是,本申请实施例包括但不限于上述例子。例如,如图9(a)所示,用户可以从电子设备处于主体之间的夹角小于待测角的第三状态向外弯折显示屏194,以使主体平行于构成待测角的平面。随着用户继续向外弯折显示屏194,主体303和平面502趋于平行,接收器接收的反射波由少变多。如图9(b)所示,当主体303和平面502平行时,接收器接收的反射波最多,识别主体302和主体303之间的角度就可以得知物体平面501和平面502之间的夹角,也就是待测角的角度。In the foregoing embodiment, FIG. 8 is taken as an example for description. It is understood that the embodiment of the present application includes but is not limited to the foregoing example. For example, as shown in FIG. 9(a), the user can bend the display screen 194 outward from the third state where the angle between the main body of the electronic device is smaller than the angle to be measured, so that the main body is parallel to the plane forming the angle to be measured. . As the user continues to bend the display screen 194 outward, the main body 303 and the plane 502 tend to be parallel, and the reflected wave received by the receiver changes from less to more. As shown in Figure 9(b), when the main body 303 and the plane 502 are parallel, the receiver receives the most reflected waves. By identifying the angle between the main body 302 and the main body 303, it is possible to know the clamping between the object plane 501 and the plane 502. Angle is the angle of the angle to be measured.
上述实施例中以图8和图9为例进行了说明,可以理解的是,平行传感器600可以为接近光传感器或超声波传感器。平行传感器600可以设置于与显示屏194相同的一侧,也可以设置于与显示屏194相反的一侧。例如,如图10(a)所示,平行传感器600可以设置于主体302上与显示屏相反的一侧。可以理解的是,如图10(a)所述的电子设备100可以根据上述实施例中所述的电子设备,实现角度的测量,在此不再赘述。电子设备100可以包括一个或多个平行传感器600。例如,如图10(b)所示,电子设备100包括两个平行传感器600a、600b。分别设置于主体302和主体303上。可以理解的是,如图10(b)所述的电子设备100可以向内或向外弯折显示屏194以使主体302平行于构成待测角的平面501,主体303平行于构成待测角的平面502。当主体302平行与构成待测角的平面501时,设置于主体302上的平行传感器600a的接收器接收的反射波最多。当主体303平行于构成待测角的平面502时,设置于主体303上的平行传感器600b的接收器接收的反射波最多。此时,电子设备100通过识别主体302和主体303之间的角度就可以得知待测角的角度。角度测量的具体方法,参见上述实施中的描述,在此不再赘述。In the foregoing embodiment, FIG. 8 and FIG. 9 are taken as examples for description. It can be understood that the parallel sensor 600 may be a proximity optical sensor or an ultrasonic sensor. The parallel sensor 600 can be arranged on the same side as the display screen 194 or on the opposite side of the display screen 194. For example, as shown in FIG. 10(a), the parallel sensor 600 may be disposed on the side of the main body 302 opposite to the display screen. It is understandable that the electronic device 100 as shown in FIG. 10(a) can implement angle measurement according to the electronic device described in the above-mentioned embodiment, which will not be repeated here. The electronic device 100 may include one or more parallel sensors 600. For example, as shown in FIG. 10(b), the electronic device 100 includes two parallel sensors 600a, 600b. They are respectively arranged on the main body 302 and the main body 303. It is understandable that the electronic device 100 as shown in FIG. 10(b) can bend the display screen 194 inward or outward so that the main body 302 is parallel to the plane 501 constituting the angle to be measured, and the main body 303 is parallel to the angle to be measured.的plane 502. When the main body 302 is parallel to the plane 501 forming the angle to be measured, the receiver of the parallel sensor 600a provided on the main body 302 receives the most reflected waves. When the main body 303 is parallel to the plane 502 constituting the angle to be measured, the receiver of the parallel sensor 600b provided on the main body 303 receives the most reflected waves. At this time, the electronic device 100 can know the angle of the angle to be measured by identifying the angle between the main body 302 and the main body 303. For the specific method of angle measurement, refer to the description in the above implementation, which will not be repeated here.
可选的,电子设备100可以在显示屏194上显示角度信息,以便用户查看。角度信息可以包括:电子设备识别的各主体之间的角度,电子设备的角度测量的结果。Optionally, the electronic device 100 may display angle information on the display screen 194 for the user to view. The angle information may include: the angle between the subjects recognized by the electronic device, and the result of the angle measurement of the electronic device.
例如,电子设备100可以识别主体302和主体303之间的角度,并将该角度信息显示在显示屏194上。例如,如图11(a)所示,当电子设备100识别的主体302和主体303之间的角度为60°时,电子设备可以在显示屏194上显示“60°”。当用户弯折显示屏194时,主体302和主体303之间的角度发生变化,此时显示屏上的显示的角度信息也随之变化。For example, the electronic device 100 may recognize the angle between the main body 302 and the main body 303 and display the angle information on the display screen 194. For example, as shown in FIG. 11(a), when the angle between the main body 302 and the main body 303 recognized by the electronic device 100 is 60°, the electronic device may display "60°" on the display screen 194. When the user bends the display screen 194, the angle between the main body 302 and the main body 303 changes, and the angle information displayed on the display screen also changes accordingly.
又如,电子设备100可以测量角度,并将该角度测量的结果显示在显示屏194上。例如,如图11(b)所示,当电子设备确定待测角的角度为52度时,电子设备可以在显示屏194上显示“52°”。For another example, the electronic device 100 can measure an angle, and display the result of the angle measurement on the display screen 194. For example, as shown in FIG. 11(b), when the electronic device determines that the angle to be measured is 52 degrees, the electronic device may display "52°" on the display screen 194.
可选的,为了方便用户查看或记录测量结果,该测量结果的显示可以不随着主体302和主体303之间的角度变化而消失。例如,如图11(c)所示,当电子设备100显示测量结果(52°)时,即使主体302和主体303之间的角度发生改变(65°),电子设备显示的角度信息仍为待测角的测量结果(52°)。可选的,电子设备100可以响应于用户的第一操作以结束该测量结果的显示。例如,如图11(c)所示,第一操作可以为:双击显示屏194。如图11(d)所示,响应于该第一操作,电子设备100结束该测量结果的显示,电子设备100显示当前电子设备识别的主体302和主体303之间的角度。Optionally, in order to facilitate the user to view or record the measurement result, the display of the measurement result may not disappear as the angle between the main body 302 and the main body 303 changes. For example, as shown in Figure 11(c), when the electronic device 100 displays the measurement result (52°), even if the angle between the main body 302 and the main body 303 changes (65°), the angle information displayed by the electronic device is still waiting Angle measurement result (52°). Optionally, the electronic device 100 may respond to the user's first operation to end the display of the measurement result. For example, as shown in FIG. 11(c), the first operation may be: double-click the display screen 194. As shown in FIG. 11(d), in response to the first operation, the electronic device 100 ends the display of the measurement result, and the electronic device 100 displays the angle between the main body 302 and the main body 303 currently recognized by the electronic device.
可以理解的是,电子设备可以显示一个或多个角度信息。例如,电子设备可以显示多个角度测量的结果,或者电子设备可以同时显示测量结果和各主体之间的角度。It is understandable that the electronic device can display one or more angle information. For example, the electronic device may display the results of multiple angle measurements, or the electronic device may simultaneously display the measurement results and the angles between the subjects.
可选的,电子设备100可以确定显示信息的显示位置,以使被显示的角度信息便于用户查看。示例性的,电子设备可以根据各主体的运动状态确定显示信息的显示位置。如图10(a)所示,电子设备以主体303为底放置在桌面上时,主体303的位置固定不变,用户向内或内外弯折主体302以使主体303平行于第二平面502,主体302处于运动状态,则电子设备可以优先在主体302所对应的部分显示屏194上显示信息,以便用户查看被显示的角度信息。Optionally, the electronic device 100 may determine the display position of the display information, so that the displayed angle information is convenient for the user to view. Exemplarily, the electronic device may determine the display position of the display information according to the motion state of each subject. As shown in Figure 10(a), when the electronic device is placed on the desktop with the main body 303 as the bottom, the position of the main body 303 is fixed, and the user bends the main body 302 inward or outward to make the main body 303 parallel to the second plane 502. If the main body 302 is in a motion state, the electronic device can preferentially display information on the part of the display screen 194 corresponding to the main body 302, so that the user can view the displayed angle information.
上述实施例中以双折叠手机为例进行了说明,可以理解的是,电子设备可以通过更多的连接单元连接更多的主体。例如,电子设备可以为三折叠手机。图12为本申请实施例提供的又一种电子设备100的结构示意图。如图12所示,电子设备100包括:连接单元401,连接单元402,主体403,主体404以及主体405。连接单元401用于连接主体403和主体404, 连接单元402用于连接主体404和主体405。显示屏194覆盖连接单元401,连接单元402,主体403,主体404以及主体405。主体403和主体404和主体405的大小可以相同,厚度也可以相同。显示屏194可以通过连接单元401向内或向外弯折以改变主体403和主体404之间的角度,通过连接单元402向内或向外弯折以改变主体404和主体405之间的角度。In the above embodiment, a double-folding mobile phone is taken as an example for description. It can be understood that the electronic device can be connected to more main bodies through more connection units. For example, the electronic device may be a three-folding mobile phone. FIG. 12 is a schematic structural diagram of yet another electronic device 100 provided by an embodiment of the application. As shown in FIG. 12, the electronic device 100 includes: a connection unit 401, a connection unit 402, a main body 403, a main body 404, and a main body 405. The connecting unit 401 is used for connecting the main body 403 and the main body 404, and the connecting unit 402 is used for connecting the main body 404 and the main body 405. The display screen 194 covers the connection unit 401, the connection unit 402, the main body 403, the main body 404, and the main body 405. The main body 403 and the main body 404 and the main body 405 may have the same size and thickness. The display screen 194 can be bent inward or outward through the connecting unit 401 to change the angle between the main body 403 and the main body 404, and the connecting unit 402 can be bent inward or outward to change the angle between the main body 404 and the main body 405.
上述实施例中以包括相同大小的主体的电子设备100为例进行了说明,可以理解的是,各主体的大小可以不同。例如,如图13(a)所示,主体302可以大于主体303。主体403,主体404和主体405的大小也可以不同。例如,如图13(b)所示,主体403和主体405的宽度之和等于主体404的宽度。In the foregoing embodiment, the electronic device 100 including main bodies of the same size is taken as an example for description. It is understandable that the sizes of the main bodies may be different. For example, as shown in FIG. 13(a), the main body 302 may be larger than the main body 303. The size of the main body 403, the main body 404 and the main body 405 may also be different. For example, as shown in FIG. 13(b), the sum of the width of the main body 403 and the main body 405 is equal to the width of the main body 404.
可以理解的是,类似地,电子设备100可以识别各主体之间的角度,如主体403和主体404之间的角度,主体404和主体405之间的角度,主体403和主体405之间的角度。识别主体403和主体404之间的角度的方法,识别主体404和主体405之间的角度的方法,或者识别主体403和主体405之间的角度的方法,参考图6中的说明,在此不在赘述。It can be understood that, similarly, the electronic device 100 can recognize the angles between the main bodies, such as the angle between the main body 403 and the main body 404, the angle between the main body 404 and the main body 405, and the angle between the main body 403 and the main body 405. . The method of identifying the angle between the main body 403 and the main body 404, the method of identifying the angle between the main body 404 and the main body 405, or the method of identifying the angle between the main body 403 and the main body 405, refer to the description in FIG. Repeat.
可以理解的是,类似地,如图15所示,电子设备100可以通过弯折显示屏194使得电子设备的其中任意的两个主体分别平行于构成待测角的两个平面,然后识别该任意两个主体之间的角度,以实现对待测角的角度测量,在此不再赘述。It is understandable that, similarly, as shown in FIG. 15, the electronic device 100 can bend the display screen 194 so that any two main bodies of the electronic device are respectively parallel to the two planes forming the angle to be measured, and then identify the arbitrary The angle between the two main bodies can be used to measure the angle to be measured, which will not be repeated here.
需要说明的是,当电子设备包括N个主体时,电子设备100可以同时对N-1个待测角进行角度测量。示例性的,如图15所示,当电子设备包括三个主体时,电子设备可以同时对两个待测角进行测量。如图15(a)所示,电子设备检测第一主体(如,主体403)与第一平面(如,平面501)是否平行;电子设备检测第三主体(如,主体405)与第三平面(如,平面503)是否平行;电子设备识别所述第一主体和所述第二主体之间的角度;电子设备识别的所述第一主体和所述第二主体(如,主体404)之间的角度。第一主体与第一平面平行时,电子设备识别的第二主体和第三主体之间的角度等于第一待测角的角度β 1;第三平面与第三主体平行时,电子设备识别的第二主体和第三主体之间的角度等于第二待测角的角度β 2。或者,如图15(b)所示,电子设备检测第二主体(如,主体404)与第二平面(如,平面502)是否平行;电子设备检测第三主体(如,主体405)与第三平面(如,平面503)是否平行;电子设备识别所述第一主体和所述第二主体之间的角度;电子设备识别的所述第一主体(如,主体403)和所述第二主体之间的角度。第二主体与第二平面平行时,电子设备识别的第一主体和第二主体之间的角度等于第一待测角的角度β 1;第三平面与第三主体平行且第二平面与第二主体平行时,电子设备识别的第二主体和第三主体之间的角度等于第二待测角的角度β 2It should be noted that when the electronic device includes N main bodies, the electronic device 100 can perform angle measurement on N-1 angles to be measured at the same time. Exemplarily, as shown in FIG. 15, when the electronic device includes three main bodies, the electronic device can simultaneously measure two angles to be measured. As shown in Figure 15(a), the electronic device detects whether the first body (eg, body 403) is parallel to the first plane (eg, plane 501); the electronic device detects whether the third body (eg, body 405) is parallel to the third plane (E.g., the plane 503) is parallel; the electronic device recognizes the angle between the first body and the second body; the electronic device recognizes the first body and the second body (e.g., the main body 404) The angle between. When the first body is parallel to the first plane, the angle between the second body and the third body recognized by the electronic device is equal to the angle β 1 of the first angle to be measured; when the third plane is parallel to the third body, the electronic device recognizes The angle between the second body and the third body is equal to the angle β 2 of the second angle to be measured. Or, as shown in FIG. 15(b), the electronic device detects whether the second body (eg, body 404) is parallel to the second plane (eg, plane 502); the electronic device detects whether the third body (eg, body 405) is parallel to the first Whether the three planes (eg, plane 503) are parallel; the electronic device recognizes the angle between the first body and the second body; the electronic device recognizes the first body (eg, the main body 403) and the second body The angle between the subjects. When the second body is parallel to the second plane, the angle between the first body and the second body recognized by the electronic device is equal to the angle β 1 of the first angle to be measured; the third plane is parallel to the third body and the second plane is parallel to the first When the two bodies are parallel, the angle between the second body and the third body recognized by the electronic device is equal to the angle β 2 of the second angle to be measured.
以下图16所示的实施例提供的方法应用于前述各实施例提供的电子设备中。The method provided by the embodiment shown in FIG. 16 below is applied to the electronic equipment provided by the foregoing embodiments.
如图16所示,本申请实施例提供的一种测量角度的方法,该方法包括:As shown in FIG. 16, an angle measurement method provided by an embodiment of the present application includes:
步骤1601、电子设备检测电子设备的至少一个主体与待测角的至少一个平面是否平行。Step 1601: The electronic device detects whether at least one main body of the electronic device is parallel to at least one plane of the angle to be measured.
假设,待测角为第一平面(如,平面501)与第二平面(如,平面502)的夹角。电子设备至少包括第一主体(如,主体302)和第二主体(主体303)。It is assumed that the angle to be measured is the angle between the first plane (eg, plane 501) and the second plane (eg, plane 502). The electronic device includes at least a first body (eg, body 302) and a second body (body 303).
电子设备检测电子设备的第一主体(如,主体302)与所述第一平面(如,平面501)是否平行,电子设备的第二主体(如,主体303)与所述第二平面(平面502)是否平行。或者,当第一主体与第一平面已平行时,电子设备可以仅检测第二主体与第二主体是否平行。当第二主体与第二平面已平行时,电子设备可以仅检测第一主体与第一主体是否平行。The electronic device detects whether the first body (eg, body 302) of the electronic device is parallel to the first plane (eg, plane 501), and the second body (eg, body 303) of the electronic device is parallel to the second plane (plane 501). 502) Is it parallel? Or, when the first body and the first plane are already parallel, the electronic device may only detect whether the second body and the second body are parallel. When the second body and the second plane are already parallel, the electronic device can only detect whether the first body and the first body are parallel.
具体地,电子设备通过平行传感器检测检测所述主体与所述平面是否平行。Specifically, the electronic device detects whether the main body is parallel to the plane through a parallel sensor.
示例性的,如果所述平行传感器接收的反射波大于预定的阈值,则电子设备确定所述主体与所述平面平行。反之,如果平行传感器接收的反射波小于预定的阈值,则电子设备确定所述主体与所述平面不平行。Exemplarily, if the reflected wave received by the parallel sensor is greater than a predetermined threshold, the electronic device determines that the main body is parallel to the plane. Conversely, if the reflected wave received by the parallel sensor is less than a predetermined threshold, the electronic device determines that the main body is not parallel to the plane.
或者,用户向内或向外弯折显示屏194转动主体以使所述主体平行于构成待测角的平面。随着用户向内或向外弯折显示屏194转动所述主体,设置于所述主体上的平行传感器接收的反射波的值由小变大至峰值(即、最大值)后,又由大变小。如果所述平行传感器接收的反射波为峰值,则电子设备确定所述主体与所述平面平行。反之,如果所述平行传感器接收的反射波小于所述峰值,则电子设备确定所述主体与所述平面不平行。Alternatively, the user bends the display screen 194 inward or outward to rotate the main body so that the main body is parallel to the plane constituting the angle to be measured. As the user turns the main body by bending the display screen 194 inward or outward, the value of the reflected wave received by the parallel sensor provided on the main body changes from a small value to a peak value (ie, a maximum value), and then from a large value. Become smaller. If the reflected wave received by the parallel sensor is a peak, the electronic device determines that the main body is parallel to the plane. Conversely, if the reflected wave received by the parallel sensor is less than the peak value, the electronic device determines that the main body is not parallel to the plane.
步骤1602、电子设备识别各主体之间的角度。 Step 1602, the electronic device recognizes the angle between the subjects.
具体地,电子设备识别第一主体和第二主体之间的角度。各主体之间的角度的识别方法参见上述实施例中的描述,在此不再赘述。Specifically, the electronic device recognizes the angle between the first body and the second body. For the method of identifying the angle between the subjects, refer to the description in the foregoing embodiment, and will not be repeated here.
步骤1603、电子设备输出所述主体与所述平面平行时,电子设备识别的所述主体之间的角度。Step 1603: The electronic device outputs the angle between the main body recognized by the electronic device when the main body is parallel to the plane.
具体地,当待测角为第一平面与第二平面的夹角时,所述待测角的角度为所述第一主体与所述第一平面平行且所述第二主体与所述第二平面平行时,所述电子设备识别的所述第一主体和所述第二主体之间的角度。Specifically, when the angle to be measured is the angle between the first plane and the second plane, the angle of the angle to be measured is that the first body is parallel to the first plane and the second body is parallel to the first plane. When the two planes are parallel, the angle between the first body and the second body recognized by the electronic device.
示例性的,电子设备可以在显示屏194上显示所述待测角的角度。需要说明的是,本申请实施例并不限定输出该待测角的角度的方式。例如,电子设备可以通过语音输出。Exemplarily, the electronic device may display the angle of the angle to be measured on the display screen 194. It should be noted that the embodiment of the present application does not limit the manner of outputting the angle of the angle to be measured. For example, the electronic device can output by voice.
需要说明的是,本申请实施例并不限定步骤1601和步骤1602的先后顺序,可以先执行步骤1601,也可以先执行步骤1602,还可以同时执行步骤1601和步骤1602。也就是说,电子设备可以实时地识别并记录第一主体和第二主体之间的角度,在电子设备检测到主体与构成待测角的平面平行之后,输出对应的第一主体和第二主体之间的角度;也可以先检测主体与构成待测角的平面是否平行,在检测到主体与构成待测角的平面平行之后,再识别第一主体和第二主体之间的角度。It should be noted that the embodiment of the present application does not limit the sequence of step 1601 and step 1602. Step 1601 may be performed first, or step 1602 may be performed first, or step 1601 and step 1602 may be performed simultaneously. In other words, the electronic device can recognize and record the angle between the first body and the second body in real time. After the electronic device detects that the body is parallel to the plane forming the angle to be measured, it outputs the corresponding first body and second body It is also possible to first detect whether the main body is parallel to the plane constituting the angle to be measured, and then identify the angle between the first main body and the second main body after detecting that the main body is parallel to the plane constituting the angle to be measured.
示例性的,如图10(a)所示,电子设备包括第一主体(如,主体302)、第二主体(如主体303)、用于连接所述第一主体和所述第二主体的第一连接单元(如,连接单元301)以及设置于第一主体的第一平行传感器600。用户以构成待测角的第二平面(如,平面501)为底,将待测物体500放置在电子设备100的第二主体(如,主体303)上。此时,第二平面平行于第二主体。电子设备可以不检测第二平面与第二主体之间的平行关系。电子设备检测第一主体(如,主体302)与构成待测角的第一平面(如,平面502)是否平行。如果第一平行传感器600接收的反射波小于预定的阈值,则电子设备确定第一主体与第一平面不平行,电子设备输出第一提示,提示第一主体不平行于第一平面,提示用户转动第一主体。用户转动第一主体,如果第一平行传感器600接收的反射波仍小于预定的阈值则继续输出第一提示,直到第一平行传感器600接收的反射波大于预定的阈值,电子设备确定所述第一主体与第一平面平行。电子设备识别第一主体和第二主体之间的角度。电子设备输出第一主体与第一平面平行时,第一主体和第二主体之间的角度。Exemplarily, as shown in FIG. 10(a), the electronic device includes a first body (eg, body 302), a second body (eg, body 303), and a device for connecting the first body and the second body The first connection unit (for example, the connection unit 301) and the first parallel sensor 600 provided on the first body. The user places the object 500 to be measured on the second main body (eg, main body 303) of the electronic device 100 with the second plane (eg, plane 501) constituting the angle to be measured as the bottom. At this time, the second plane is parallel to the second body. The electronic device may not detect the parallel relationship between the second plane and the second body. The electronic device detects whether the first body (for example, the body 302) is parallel to the first plane (for example, the plane 502) constituting the angle to be measured. If the reflected wave received by the first parallel sensor 600 is less than the predetermined threshold, the electronic device determines that the first body is not parallel to the first plane, and the electronic device outputs a first prompt, prompting that the first body is not parallel to the first plane, and prompting the user to rotate The first subject. The user rotates the first body, and if the reflected wave received by the first parallel sensor 600 is still less than the predetermined threshold, the first prompt will continue to be output until the reflected wave received by the first parallel sensor 600 is greater than the predetermined threshold, and the electronic device determines the first The main body is parallel to the first plane. The electronic device recognizes the angle between the first body and the second body. The electronic device outputs the angle between the first body and the second body when the first body is parallel to the first plane.
示例性的,如图10(b)所示,电子设备包括第一主体(如,主体302)、第二主体(如,主体303)、用于连接所述第一主体和所述第二主体的第一连接单元(如,连接单元301)、设置于第一主体的第一平行传感器(如,平行传感器600a)以及设置于第二主体的第二平行传感器(如,平行传感器600b)。电子设备检测第一主体302是否平行于第一平面501,第二主 体503是否平行与第二平面502。Exemplarily, as shown in FIG. 10(b), the electronic device includes a first body (eg, body 302), a second body (eg, body 303), and is used to connect the first body and the second body A first connection unit (eg, connection unit 301), a first parallel sensor (eg, parallel sensor 600a) disposed on the first body, and a second parallel sensor (eg, parallel sensor 600b) disposed on the second body. The electronic device detects whether the first body 302 is parallel to the first plane 501 and whether the second body 503 is parallel to the second plane 502.
当第一主体不平行于第一平面,电子设备输出第一提示,提示用户第一主体不平行于第一平面,提示用户转动第一主体。当第二主体不平行于第二平面时,电子设备输出第二提示,提示用户第二主体不平行于第二平面,提示用户转动第二主体。首先,用户可以向内或向外弯曲显示屏194以转动第一主体以使第一主体平行于第一平面。如果第一平行传感器接收的反射波小于预定的阈值,则电子设备确定第一主体不平行于第一平面,电子设备继续输出第一提示,直到第一平行传感器接收的反射波大于预定的阈值,电子设备确定第一主体与第一平面平行,电子设备输出第三提示,提示用户第一主体与第一平面平行。然后,保持第一主体不变,用户向内或向外弯曲显示屏194转动第二主体以使第二主体平行于第二平面。如果第二平行传感器接收的反射波小于预定的阈值,则电子设备确定第二主体不平行于第二平面,电子设备继续输出第二提示,直到第二平行传感器接收的反射波大于预定的阈值,电子设备确定第二主体与第二平面平行,电子设备输出第四提示,提示用户第二主体与第二平面平行。然后,电子设备识别第一主体与第二主体之间的角度,输出该第一主体与第二主体之间的角度、即待测角的角度。When the first body is not parallel to the first plane, the electronic device outputs a first prompt, prompting the user that the first body is not parallel to the first plane, and prompting the user to rotate the first body. When the second body is not parallel to the second plane, the electronic device outputs a second prompt, prompting the user that the second body is not parallel to the second plane, and prompting the user to rotate the second body. First, the user can bend the display screen 194 inward or outward to rotate the first body so that the first body is parallel to the first plane. If the reflected wave received by the first parallel sensor is less than the predetermined threshold, the electronic device determines that the first body is not parallel to the first plane, and the electronic device continues to output the first prompt until the reflected wave received by the first parallel sensor is greater than the predetermined threshold, The electronic device determines that the first body is parallel to the first plane, and the electronic device outputs a third prompt to prompt the user that the first body is parallel to the first plane. Then, keeping the first body unchanged, the user bends the display screen 194 inward or outward to rotate the second body so that the second body is parallel to the second plane. If the reflected wave received by the second parallel sensor is less than the predetermined threshold, the electronic device determines that the second body is not parallel to the second plane, and the electronic device continues to output a second prompt until the reflected wave received by the second parallel sensor is greater than the predetermined threshold, The electronic device determines that the second body is parallel to the second plane, and the electronic device outputs a fourth prompt to prompt the user that the second body is parallel to the second plane. Then, the electronic device recognizes the angle between the first body and the second body, and outputs the angle between the first body and the second body, that is, the angle to be measured.
可选的,当第一主体未平行于第一平面,电子设备输出第一提示,提示用户第一主体未平行于第一平面,提示用户转动第一主体。当第二主体未平行于第二平面时,电子设备输出第二提示,提示用户第二主体未平行于第二平面,提示用户转动第二主体。用户转动第一主体以使第一主体平行于第一平面。第一平行传感器接收的反射波大于预定的阈值,电子设备确定第一主体与第一平面平行,电子设备输出第三提示,提示用户第一主体与第一平面平行。电子设备开始识别并记录第一主体和第二主体之间的角度。然后,用户向内或向外弯曲显示屏194转动第二主体以使第二主体平行于第二平面。第二主体与第二平面平行时,记录的第一主体和第二主体之间的角度,即为待测角的角度。相比于上述实施例,此时无需用户保持第二平面与第二主体的平行状态。需要说明的是,上述实施例中以先转动第一主体,待第一主体与第一平面平行后,再转动第二主体为例进行了说明,可以理解的是,也可以先转动第二主体再转动第一主体,还可以一同转动第一主体和第二主体。Optionally, when the first body is not parallel to the first plane, the electronic device outputs a first prompt, prompting the user that the first body is not parallel to the first plane, and prompting the user to rotate the first body. When the second body is not parallel to the second plane, the electronic device outputs a second prompt, prompting the user that the second body is not parallel to the second plane, and prompting the user to rotate the second body. The user rotates the first body so that the first body is parallel to the first plane. The reflected wave received by the first parallel sensor is greater than a predetermined threshold, the electronic device determines that the first body is parallel to the first plane, and the electronic device outputs a third prompt to prompt the user that the first body is parallel to the first plane. The electronic device starts to recognize and record the angle between the first body and the second body. Then, the user bends the display screen 194 inward or outward to rotate the second body so that the second body is parallel to the second plane. When the second body is parallel to the second plane, the recorded angle between the first body and the second body is the angle to be measured. Compared with the foregoing embodiment, there is no need for the user to keep the second plane parallel to the second body at this time. It should be noted that in the above embodiment, the first body is first rotated, and the second body is rotated after the first body is parallel to the first plane. It is understood that the second body can also be rotated first. If you turn the first body again, you can also rotate the first body and the second body together.
综上所述,弯折显示屏194改变主体之间的角度,使得该主体与构成待测角的平面平行,然后通过识别该主体之间的角度就可以实现对于待测角的测量,方便用户通过可变形的电子设备测量角度。To sum up, bending the display 194 changes the angle between the main bodies so that the main body is parallel to the plane constituting the angle to be measured, and then by identifying the angle between the main bodies, the measurement of the angle to be measured can be realized, which is convenient for users. The angle is measured by a deformable electronic device.
本申请实施例公开了一种电子设备,包括:至少两个主体,显示屏;处理器;存储器;一个或多个传感器;应用程序以及计算机程序。上述各器件可以通过一个或多个通信总线连接。其中,该一个或多个计算机程序被存储在上述存储器中并被配置为被该一个或多个处理器执行,该一个或多个计算机程序包括指令,上述指令可以用于使电子设备执行上述实施例中的各个步骤。其中,上述一个或多个传感器可以包括触摸传感器,平行传感器或加速度传感器。The embodiment of the application discloses an electronic device, including: at least two main bodies, a display screen; a processor; a memory; one or more sensors; an application program and a computer program. The above devices can be connected through one or more communication buses. Wherein, the one or more computer programs are stored in the foregoing memory and configured to be executed by the one or more processors, and the one or more computer programs include instructions, and the foregoing instructions can be used to make an electronic device execute the foregoing implementation. The steps in the example. Wherein, the one or more sensors mentioned above may include a touch sensor, a parallel sensor or an acceleration sensor.
示例性的,上述处理器具体可以为图1所示的处理器110,上述存储器具体可以为图1所示的内部存储器和/或外部存储器120,上述显示屏具体可以为图1所示的显示屏194,上述传感器具体可以为图1所示的传感器模块180中的一个或多个传感器,上述触摸传感器可以为图1所示的触摸传感器180K,上述平行传感器可以为图1所示的平行传感器180N,上述加速度传感器可以为图1所示的加速度传感器180E。本申请实施例对此不做任何限制。Exemplarily, the foregoing processor may specifically be the processor 110 shown in FIG. 1, the foregoing memory may specifically be the internal memory and/or the external memory 120 shown in FIG. 1, and the foregoing display screen may specifically be the display shown in FIG. Screen 194, the above-mentioned sensor may specifically be one or more sensors in the sensor module 180 shown in FIG. 1, the above-mentioned touch sensor may be the touch sensor 180K shown in FIG. 1, and the above-mentioned parallel sensor may be the parallel sensor shown in FIG. 180N, the aforementioned acceleration sensor may be the acceleration sensor 180E shown in FIG. 1. The embodiments of the application do not impose any restriction on this.
另外,本申请实施例还提供一种电子设备上的图形用户界面(GUI),该图形用户界面具 体包括电子设备在执行所述方法时显示的图形用户界面。In addition, an embodiment of the present application also provides a graphical user interface (GUI) on an electronic device, and the graphical user interface specifically includes a graphical user interface displayed when the electronic device executes the method.
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it may appear in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited to this. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application shall be covered by this Within the protection scope of the application embodiments. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims (26)

  1. 一种应用于电子设备的测量角度的方法,其特征在于,所述电子设备包括第一主体和第二主体,所述第一主体和所述第二主体相连,且所述第一主体相对于所述第二主体可弯折;第一待测角为第一平面与第二平面的夹角;A method for measuring an angle applied to an electronic device, wherein the electronic device includes a first body and a second body, the first body and the second body are connected, and the first body is relative to The second body can be bent; the first angle to be measured is the angle between the first plane and the second plane;
    所述方法包括:The method includes:
    在所述第一主体相对于所述第二主体弯折的过程中,所述电子设备执行第一检测,所述第一检测用于检测所述第一主体与所述第一平面是否平行;When the first body is bent relative to the second body, the electronic device performs a first detection, and the first detection is used to detect whether the first body is parallel to the first plane;
    所述电子设备识别所述第一主体与所述第二主体的夹角;Identifying the angle between the first body and the second body by the electronic device;
    所述电子设备输出第一角度;其中,所述第一角度为所述第一主体与所述第一平面平行且所述第二主体与第二平面平行时,所述电子设备识别的所述第一主体与所述第二主体的夹角。The electronic device outputs a first angle; wherein, the first angle is the first angle recognized by the electronic device when the first body is parallel to the first plane and the second body is parallel to the second plane The angle between the first body and the second body.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    在所述第二主体相对于所述第一主体弯折的过程中,所述电子设备执行第二检测,所述第二检测用于检测所述第二主体与所述第二平面是否平行。During the bending of the second body relative to the first body, the electronic device performs a second detection, and the second detection is used to detect whether the second body is parallel to the second plane.
  3. 根据权利要求1所述的方法,其特征在于,其中所述第二平面被放置为与所述第二主体平行。The method according to claim 1, wherein the second plane is placed parallel to the second body.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,第二待测角为第二平面与第三平面的夹角;所述电子设备还包括第三主体,所述第三主体和所述第二主体相连,且所述第三主体相对于所述第二主体可弯折;The method according to any one of claims 1-3, wherein the second angle to be measured is the angle between the second plane and the third plane; the electronic device further comprises a third body, the third body Connected to the second body, and the third body is bendable relative to the second body;
    所述方法,还包括:The method further includes:
    在所述第三主体相对于所述第二主体弯折的过程中,所述电子设备执行第三检测,所述第三检测用于检测所述第三主体与所述第三平面是否平行;When the third body is bent relative to the second body, the electronic device performs a third detection, and the third detection is used to detect whether the third body is parallel to the third plane;
    所述电子设备识别所述第二主体与所述第三主体的夹角;Identifying the angle between the second body and the third body by the electronic device;
    所述电子设备输出第二角度,所述第二角度为所述第二平面与所述第二主体平行且所述第三平面与所述第三主体平行时,所述电子设备识别的所述第二主体与所述第三主体的夹角。The electronic device outputs a second angle, and the second angle is the identification of the electronic device when the second plane is parallel to the second body and the third plane is parallel to the third body. The angle between the second body and the third body.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一检测,所述第二检测,所述第三检测,包括:The method according to any one of claims 1-4, wherein the first detection, the second detection, and the third detection comprise:
    所述电子设备通过设置于主体上的平行传感器发送发射波;The electronic device transmits the emission wave through a parallel sensor arranged on the main body;
    所述电子设备通过设置于所述主体上的所述平行传感器接收反射波;The electronic device receives the reflected wave through the parallel sensor provided on the main body;
    若设置于所述主体的平行传感器接收的反射波大于第一阈值,则所述电子设备确定所述主体与所述平面平行;If the reflected wave received by the parallel sensor provided on the main body is greater than the first threshold, the electronic device determines that the main body is parallel to the plane;
    若设置于所述主体的平行传感器接收的反射波小于第二阈值,则所述电子设备确定所述主体与所述平面不平行。If the reflected wave received by the parallel sensor provided on the main body is less than the second threshold, the electronic device determines that the main body is not parallel to the plane.
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一检测,所述第二检测,所述第三检测,包括:The method according to any one of claims 1-4, wherein the first detection, the second detection, and the third detection comprise:
    所述电子设备通过设置于主体上的平行传感器发送发射波;The electronic device transmits the emission wave through a parallel sensor arranged on the main body;
    所述电子设备通过设置于所述主体上的所述平行传感器接收反射波;The electronic device receives the reflected wave through the parallel sensor provided on the main body;
    若设置于所述主体的平行传感器接收的反射波为最大值,则所述电子设备确定所述主体与所述平面平行。If the reflected wave received by the parallel sensor provided on the main body is at the maximum value, the electronic device determines that the main body is parallel to the plane.
  7. 根据权利要求5或6所述的方法,其特征在于,The method according to claim 5 or 6, characterized in that:
    所述识别所述第一主体与所述第二主体的夹角,包括:The identifying the angle between the first body and the second body includes:
    响应于所述电子设备确定所述第一主体与所述第一平面平行,电子设备识别所述第一主体与所述第二主体的夹角;或者In response to the electronic device determining that the first body is parallel to the first plane, the electronic device recognizes the angle between the first body and the second body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,电子设备识别所述第一主体与所述第二主体的夹角;或者In response to the electronic device determining that the second body is parallel to the second plane, the electronic device recognizes the angle between the first body and the second body; or
    响应于所述电子设备确定所述第一主体与所述第一平面平行且所述第二主体与所述第二平面平行,电子设备识别所述第一主体与所述第二主体的夹角。In response to the electronic device determining that the first body is parallel to the first plane and the second body is parallel to the second plane, the electronic device recognizes the angle between the first body and the second body .
  8. 根据权利要求5-7任一项所述的方法,其特征在于,The method according to any one of claims 5-7, wherein:
    所述识别所述第二主体与所述第三主体的夹角,包括:The identifying the angle between the second body and the third body includes:
    响应于所述电子设备确定所述第三主体与所述第三平面平行,电子设备识别所述第二主体与所述第三主体的夹角;或者In response to the electronic device determining that the third body is parallel to the third plane, the electronic device recognizes the angle between the second body and the third body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,电子设备识别所述第二主体与所述第三主体的夹角;或者In response to the electronic device determining that the second body is parallel to the second plane, the electronic device recognizes the angle between the second body and the third body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行且所述第三主体与所述第三平面平行,电子设备识别所述第二主体与所述第三主体的夹角。In response to the electronic device determining that the second body is parallel to the second plane and the third body is parallel to the third plane, the electronic device recognizes the angle between the second body and the third body .
  9. 根据权利要求5或6所述的方法,其特征在于,The method according to claim 5 or 6, characterized in that:
    所述电子设备输出第一角度包括:The electronic device outputting the first angle includes:
    响应于所述电子设备确定所述第一主体与所述第一平面平行,所述电子设备输出所述第一角度;或者In response to the electronic device determining that the first body is parallel to the first plane, the electronic device outputs the first angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,所述电子设备输出所述第一角度;或者In response to the electronic device determining that the second body is parallel to the second plane, the electronic device outputs the first angle; or
    响应于所述电子设备确定所述第一主体与所述第一平面平行且所述第二主体与所述第二平面平行,所述电子设备输出所述第一角度。In response to the electronic device determining that the first body is parallel to the first plane and the second body is parallel to the second plane, the electronic device outputs the first angle.
  10. 根据权利要求5-7所述的方法,其特征在于,The method according to claims 5-7, wherein:
    所述电子设备输出第二角度包括:The output of the second angle by the electronic device includes:
    响应于所述电子设备确定所述第三主体与所述第三平面平行,所述电子设备输出所述第二角度;或者In response to the electronic device determining that the third body is parallel to the third plane, the electronic device outputs the second angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,所述电子设备输出所述第二角度;或者In response to the electronic device determining that the second body is parallel to the second plane, the electronic device outputs the second angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行且所述第三主体与所述第三平面平行,所述电子设备输出所述第二角度。In response to the electronic device determining that the second body is parallel to the second plane and the third body is parallel to the third plane, the electronic device outputs the second angle.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-10, wherein the method further comprises:
    若所述平面与所述主体不平行,所述电子设备输出提示;If the plane is not parallel to the main body, the electronic device outputs a prompt;
    其中,所述提示用于提示用户所述平面与所述主体不平行。Wherein, the prompt is used to prompt the user that the plane is not parallel to the main body.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述电子设备识别所述第一主体与所述第二主体的夹角,或所述电子设备识别所述第二主体与所述第三主体的夹角,包括:The method according to any one of claims 1-11, wherein the electronic device recognizes the angle between the first body and the second body, or the electronic device recognizes the angle between the second body and the second body The included angle of the third body includes:
    所述电子设备获取设置于所述主体的第一加速度传感器检测的第一加速度和设置于所述另一主体的第二加速度传感器检测的第二加速度;Acquiring, by the electronic device, a first acceleration detected by a first acceleration sensor provided on the main body and a second acceleration detected by a second acceleration sensor provided on the other main body;
    所述电子设备根据所述第一加速度确定所述主体的第一姿态,根据所述第二加速度确定 所述另一主体的第二姿态;The electronic device determines the first posture of the main body according to the first acceleration, and determines the second posture of the other main body according to the second acceleration;
    所述电子设备根据所述第一姿态和所述第二姿态,电子设备确定所述主体与所述另一主体的夹角。The electronic device determines the angle between the main body and the other main body according to the first posture and the second posture.
  13. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    第一主体和第二主体,所述第一主体和所述第二主体相连,且所述第一主体相对于所述第二主体可弯折;A first body and a second body, the first body and the second body are connected, and the first body is bendable relative to the second body;
    至少一个平行传感器,每个平行传感器包括发射器和接收器,所述发射器用于发送发射波,所述接收器用于接收反射波;所述至少一个平行传感器设置在所述第一主体,或者设置在所述第二主体,或者设置在所述第一主体和所述第二主体;At least one parallel sensor, each of which includes a transmitter and a receiver, the transmitter is used to send the transmitted wave, and the receiver is used to receive the reflected wave; the at least one parallel sensor is arranged on the first body, or On the second body, or on the first body and the second body;
    处理器;processor;
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述电子设备执行以下步骤以测量第一平面与第二平面的夹角的角度:The computer program includes instructions that, when the instructions are executed by the processor, cause the electronic device to perform the following steps to measure the angle between the first plane and the second plane:
    在所述第一主体相对于所述第二主体弯折的过程中通过所述至少一个平行传感器执行第一检测,所述第一检测用于检测所述第一主体与所述第一平面是否平行;When the first body is bent relative to the second body, a first detection is performed by the at least one parallel sensor, and the first detection is used to detect whether the first body and the first plane are parallel;
    识别所述第一主体与所述第二主体的夹角;Identifying the angle between the first body and the second body;
    输出第一角度;其中,所述第一角度为所述第一主体与所述第一平面平行且所述第二主体与所述第二平面平行时,所述电子设备识别的所述第一主体与所述第二主体的夹角。Output a first angle; wherein, the first angle is the first recognized by the electronic device when the first body is parallel to the first plane and the second body is parallel to the second plane The angle between the main body and the second main body.
  14. 根据权利要求13所述的电子设备,其特征在于,当所述指令被所述处理器执行时,使得所述电子设备还执行以下步骤:The electronic device according to claim 13, wherein when the instruction is executed by the processor, the electronic device further executes the following steps:
    在所述第二主体相对于所述第一主体弯折的过程中通过所述至少一个平行传感器执行第二检测,所述第二检测用于检测所述第二主体与所述第二平面是否平行。During the bending of the second body relative to the first body, a second detection is performed by the at least one parallel sensor, and the second detection is used to detect whether the second body and the second plane are parallel.
  15. 根据权利要求13所述的电子设备,其特征在于,The electronic device according to claim 13, wherein:
    其中,所述第二平面被放置为与所述第二主体平行。Wherein, the second plane is placed parallel to the second body.
  16. 根据权利要求13-15任一项所述的电子设备,其特征在于,所述电子设备还包括第三主体,所述第三主体和所述第二主体相连,且所述第三主体相对于所述第二主体可弯折;The electronic device according to any one of claims 13-15, wherein the electronic device further comprises a third body, the third body and the second body are connected, and the third body is opposite to The second body can be bent;
    所述至少一个平行传感器设置在所述第三主体;The at least one parallel sensor is arranged on the third body;
    当所述指令被所述处理器执行时,使得所述电子设备还执行以下步骤以测量第二平面与第三平面的夹角的角度:When the instruction is executed by the processor, the electronic device further executes the following steps to measure the angle between the second plane and the third plane:
    在所述第三主体相对于所述第二主体弯折的过程中通过所述至少一个平行传感器执行第三检测,所述第三检测用于检测所述第三主体与所述第三平面是否平行;A third detection is performed by the at least one parallel sensor during the bending of the third body relative to the second body, and the third detection is used to detect whether the third body and the third plane are parallel;
    识别所述第二主体与所述第三主体的夹角;Identifying the angle between the second body and the third body;
    输出第二角度,所述第二角度为所述第二平面与所述第二主体平行且所述第三平面与所述第三主体平行时,所述电子设备识别的所述第二主体与所述第三主体的夹角。Output a second angle, and the second angle is when the second plane is parallel to the second body and the third plane is parallel to the third body, the second body recognized by the electronic device and The included angle of the third body.
  17. 根据权利要求13-16任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 13-16, wherein:
    所述第一检测,所述第二检测,所述第三检测,包括:The first detection, the second detection, and the third detection include:
    若设置于所述主体的所述平行传感器接收的反射波大于第一阈值,则所述电子设备确定所述主体与所述平面平行;If the reflected wave received by the parallel sensor provided on the main body is greater than a first threshold, the electronic device determines that the main body is parallel to the plane;
    若设置于所述主体的所述平行传感器接收的反射波小于第二阈值,则所述电子设备确定所述主体与所述平面不平行。If the reflected wave received by the parallel sensor provided on the main body is less than a second threshold, the electronic device determines that the main body is not parallel to the plane.
  18. 根据权利要求13-16任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 13-16, wherein:
    所述第一检测,所述第二检测,所述第三检测,包括:The first detection, the second detection, and the third detection include:
    若设置于所述主体的平行传感器接收的反射波为最大值,则所述电子设备确定所述主体与所述平面平行。If the reflected wave received by the parallel sensor provided on the main body is at the maximum value, the electronic device determines that the main body is parallel to the plane.
  19. 根据权利要求17或18所述的电子设备,其特征在于,The electronic device according to claim 17 or 18, wherein:
    所述识别所述第一主体与所述第二主体的夹角,包括:The identifying the angle between the first body and the second body includes:
    响应于所述电子设备确定所述第一主体与所述第一平面平行,识别所述第一主体与所述第二主体的夹角;或者In response to the electronic device determining that the first body is parallel to the first plane, identifying the angle between the first body and the second body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,识别所述第一主体与所述第二主体的夹角;或者In response to the electronic device determining that the second body is parallel to the second plane, identifying the angle between the first body and the second body; or
    响应于所述电子设备确定所述第一主体与所述第一平面平行且所述第二主体与第二平面平行,识别所述第一主体与所述第二主体的夹角。In response to the electronic device determining that the first body is parallel to the first plane and the second body is parallel to the second plane, identifying the angle between the first body and the second body.
  20. 根据权利要求17-19任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 17-19, wherein:
    所述识别所述第二主体与所述第三主体的夹角,包括:The identifying the angle between the second body and the third body includes:
    响应于所述电子设备确定所述第三主体与所述第三平面平行,识别所述第二主体与所述第三主体的夹角;或者In response to the electronic device determining that the third body is parallel to the third plane, identifying the angle between the second body and the third body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,识别所述第二主体与所述第三主体的夹角;或者In response to the electronic device determining that the second body is parallel to the second plane, identifying the angle between the second body and the third body; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行且所述第三主体与所述第三平面平行,识别所述第二主体与所述第三主体的夹角。In response to the electronic device determining that the second body is parallel to the second plane and the third body is parallel to the third plane, identifying an angle between the second body and the third body.
  21. 根据权利要求17或18所述的电子设备,其特征在于,The electronic device according to claim 17 or 18, wherein:
    所述电子设备输出第一角度包括:The electronic device outputting the first angle includes:
    响应于所述电子设备确定所述第一主体与所述第一平面平行,输出所述第一角度;或者In response to the electronic device determining that the first body is parallel to the first plane, output the first angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行输出所述第一角度;或者Output the first angle in response to the electronic device determining that the second body is parallel to the second plane; or
    响应于所述电子设备确定所述第一主体与所述第一平面平行且所述第二主体与所述第二平面平行,输出所述第一角度。In response to the electronic device determining that the first body is parallel to the first plane and the second body is parallel to the second plane, output the first angle.
  22. 根据权利要求17-19所述的电子设备,其特征在于,The electronic device according to claims 17-19, wherein:
    所述电子设备输出第二角度包括:The output of the second angle by the electronic device includes:
    响应于所述电子设备确定所述第三主体与所述第三平面平行,输出所述第二角度;或者In response to the electronic device determining that the third body is parallel to the third plane, output the second angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行,输出所述第二角度;或者In response to the electronic device determining that the second body is parallel to the second plane, output the second angle; or
    响应于所述电子设备确定所述第二主体与所述第二平面平行且所述第三主体与所述第三平面平行,输出所述第二角度。In response to the electronic device determining that the second body is parallel to the second plane and the third body is parallel to the third plane, output the second angle.
  23. 根据权利要求13-22任一项所述的电子设备,其特征在于,当所述指令被所述处理器执行时,使得所述电子设备还执行以下步骤:The electronic device according to any one of claims 13-22, wherein when the instruction is executed by the processor, the electronic device is caused to further execute the following steps:
    若所述平面与所述主体不平行,输出所述平面与所述主体不平行的提示。If the plane and the main body are not parallel, a prompt is output that the plane and the main body are not parallel.
  24. 根据权利要求13-23任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 13-23, wherein:
    所述电子设备还包括第一加速度传感器和第二加速度传感器;The electronic device further includes a first acceleration sensor and a second acceleration sensor;
    所述电子设备识别所述第一主体与所述第二主体的夹角,或所述电子设备识别所述第二主体与所述第三主体的夹角,包括:The electronic device recognizing the included angle between the first body and the second body, or the electronic device recognizing the included angle between the second body and the third body, includes:
    所述电子设备获取设置于所述主体的第一加速度传感器检测的第一加速度和设置于所述 另一主体的第二加速度传感器检测的第二加速度;Acquiring, by the electronic device, a first acceleration detected by a first acceleration sensor provided on the main body and a second acceleration detected by a second acceleration sensor provided on the other main body;
    所述电子设备根据所述第一加速度确定所述主体的第一姿态,根据所述第二加速度确定所述另一主体的第二姿态;The electronic device determines the first posture of the main body according to the first acceleration, and determines the second posture of the other main body according to the second acceleration;
    所述电子设备根据所述第一姿态和所述第二姿态,电子设备确定所述主体与所述另一主体的夹角。The electronic device determines the angle between the main body and the other main body according to the first posture and the second posture.
  25. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任一项所述的方法。A computer-readable storage medium having instructions stored in the computer-readable storage medium, wherein, when the instructions are executed on an electronic device, the electronic device is caused to execute any one of claims 1-12 The method described in the item.
  26. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任一项所述的方法。A computer program product containing instructions, wherein when the computer program product runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-12.
PCT/CN2020/090949 2019-05-20 2020-05-19 Angle measurement method and electronic device WO2020233554A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910418166.8 2019-05-20
CN201910418166.8A CN111966162A (en) 2019-05-20 2019-05-20 Angle measuring method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2020233554A1 true WO2020233554A1 (en) 2020-11-26

Family

ID=73358279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/090949 WO2020233554A1 (en) 2019-05-20 2020-05-19 Angle measurement method and electronic device

Country Status (2)

Country Link
CN (1) CN111966162A (en)
WO (1) WO2020233554A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612492A (en) * 2003-10-29 2005-05-04 乐金电子(中国)研究开发中心有限公司 Lid-turning type terminal with measuring function and its measuring method
CN103246324A (en) * 2012-02-07 2013-08-14 三星电子株式会社 Folding type apparatus and method of controlling the same
EP2757439A1 (en) * 2013-01-22 2014-07-23 Samsung Display Co., Ltd. Flexible display and method for measuring angle of the same
CN109682327A (en) * 2019-01-25 2019-04-26 Oppo广东移动通信有限公司 Angle measurement unit and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU1671497A (en) * 1996-02-13 1997-09-02 Amada Metrecs Company, Limited Angle detection method for bending machine, angle detection apparatus and angle sensor
CN102120230B (en) * 2010-12-03 2012-12-05 中联重科股份有限公司 Device and method for measuring bending angle of bent piece
CN104866073B (en) * 2014-02-21 2018-10-12 联想(北京)有限公司 The electronic equipment of information processing method and its system including the information processing system
KR102537922B1 (en) * 2015-09-11 2023-05-30 삼성전자 주식회사 Method for measuring angles between displays and Electronic device using the same
KR102570777B1 (en) * 2016-08-25 2023-08-25 삼성전자 주식회사 Electronic device including a plurality of touch displays and method for changing status thereof
KR20180116843A (en) * 2017-04-18 2018-10-26 삼성전자주식회사 Method for detecting motion and electronic device implementing the same
CN107741761B (en) * 2017-10-19 2020-04-17 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for measuring angle
CN109375889B (en) * 2018-09-10 2022-02-01 Oppo广东移动通信有限公司 Display control method and related product
CN109556537B (en) * 2018-11-09 2020-11-06 西安易朴通讯技术有限公司 Angle detection device and foldable electronic equipment
CN109671356B (en) * 2019-01-03 2021-04-27 京东方科技集团股份有限公司 Folding display device and control method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612492A (en) * 2003-10-29 2005-05-04 乐金电子(中国)研究开发中心有限公司 Lid-turning type terminal with measuring function and its measuring method
CN103246324A (en) * 2012-02-07 2013-08-14 三星电子株式会社 Folding type apparatus and method of controlling the same
EP2757439A1 (en) * 2013-01-22 2014-07-23 Samsung Display Co., Ltd. Flexible display and method for measuring angle of the same
CN109682327A (en) * 2019-01-25 2019-04-26 Oppo广东移动通信有限公司 Angle measurement unit and electronic equipment

Also Published As

Publication number Publication date
CN111966162A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
WO2021017889A1 (en) Display method of video call appliced to electronic device and related apparatus
WO2020182065A1 (en) Shortcut function activation method and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
WO2020000448A1 (en) Flexible screen display method and terminal
WO2021017901A1 (en) Screen display method and electronic device
WO2020253758A1 (en) User interface layout method and electronic device
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2022127787A1 (en) Image display method and electronic device
WO2021258814A1 (en) Video synthesis method and apparatus, electronic device, and storage medium
WO2021209047A1 (en) Sensor adjustingt method, appratus and electronic device
WO2021082815A1 (en) Display element display method and electronic device
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
WO2022042770A1 (en) Method for controlling communication service state, terminal device and readable storage medium
WO2021159746A1 (en) File sharing method and system, and related device
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
WO2022027972A1 (en) Device searching method and electronic device
WO2021104122A1 (en) Method and apparatus for responding to call request, and electronic device
CN113452945A (en) Method and device for sharing application interface, electronic equipment and readable storage medium
WO2022105702A1 (en) Method and electronic device for saving image
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
CN112437341B (en) Video stream processing method and electronic equipment
WO2020233581A1 (en) Height measuring method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20809420

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20809420

Country of ref document: EP

Kind code of ref document: A1