WO2020233581A1 - 一种测量高度的方法和电子设备 - Google Patents

一种测量高度的方法和电子设备 Download PDF

Info

Publication number
WO2020233581A1
WO2020233581A1 PCT/CN2020/091180 CN2020091180W WO2020233581A1 WO 2020233581 A1 WO2020233581 A1 WO 2020233581A1 CN 2020091180 W CN2020091180 W CN 2020091180W WO 2020233581 A1 WO2020233581 A1 WO 2020233581A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
measured
contact
distance
main body
Prior art date
Application number
PCT/CN2020/091180
Other languages
English (en)
French (fr)
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 WO2020233581A1 publication Critical patent/WO2020233581A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/02Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • G01B7/02Measuring arrangements characterised by the use of electric or magnetic techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C5/00Measuring height; Measuring distances transverse to line of sight; Levelling between separated points; Surveyors' levels
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Definitions

  • the embodiments of the present invention relate to the field of electronic technology, and in particular to a method and electronic equipment for measuring height.
  • a virtual measuring ruler 101 is displayed on the display screen of the electronic device.
  • the user can measure the height of the object 102 through the ruler 101.
  • the user aligns the "0" scale of the ruler 101 with the starting point of the measurement target, and reads the value corresponding to the end point of the measurement target to achieve height measurement.
  • the height of the measurement target is 8.5 cm.
  • the embodiments of the present application provide a method and an electronic device for measuring height, which facilitate users to measure the height of an object.
  • an embodiment of the present application provides a height measurement method applied to an electronic device.
  • the electronic device includes at least a first body, a second body, and a first connecting shaft connecting the first body and the second body.
  • the first body and the second body surround the first body.
  • the connecting shaft can be rotated.
  • a possible height measurement method The object to be measured is placed on the first body, and the user rotates the second body to make the second body contact the object to be measured.
  • the method specifically includes: electronic equipment detecting the object to be measured Whether the object is in contact with the second body; the electronic device recognizes the angle between the first body and the second body; when the object to be measured is in contact with the second body, the electronic device recognizes the contact point of the object to be measured and the second body to the first connection The distance of the axis; the electronic device obtains the height of the object to be measured according to the aforementioned included angle and the aforementioned distance; the electronic device outputs the height of the object to be measured.
  • Another possible height measurement method is to place the object to be measured between the first body and the second body, and the user rotates the first body and/or the second body to make the object to be measured and the first body and the second body respectively Contact
  • the method specifically includes: the electronic device detects whether the object to be measured is in contact with the first body; the electronic device detects whether the object to be measured is in contact with the second body; the electronic device detects the clip between the first body and the second body Angle; when the object to be measured is in contact with the first body, the electronic device recognizes the first distance from the first contact point of the object to be measured and the first body to the first connecting axis; between the object to be measured and the second body When making contact, the electronic device recognizes the second distance between the object to be measured and the second contact of the second body to the first connecting axis; the electronic device obtains the height of the object to be measured according to the included angle, the first distance and the second distance.
  • L 2 is the first distance from the first contact to the first connecting shaft
  • L 3 is the second distance from the second contact to the first connecting shaft
  • is the angle between the first body and the second body.
  • the user can conveniently measure the height of the object.
  • the angle between the subjects can be identified in different ways.
  • One possible way is to identify whether the object to be measured is in contact with the main body through a pressure sensor.
  • the electronic device can first detect whether it is in contact with the object to be measured, and after the electronic device detects contact with the object to be measured, the angle between the first body and the second body can be identified, specifically: The electronic device recognizes the included angle between the first body and the second body: in response to the object to be measured contacting the second body, 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 first body and the second body: in response to the object to be measured contacting the second body and the object to be measured contacts the first body, the electronic device recognizes the clip between the first body and the second body. angle.
  • the electronic device can trigger the detection of whether it is in contact with the object to be measured in response to the first input of the user, specifically: the electronic device receives the first input; in response to the first input, the electronic device detects Whether the object to be measured is in contact with the main body.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes a first body, a second body, a first connecting shaft, a processor, and a memory for storing computer programs.
  • the first connecting shaft is used to connect the first body and the second body, the first body and the second body can rotate around the first connecting shaft;
  • the computer program includes instructions, when the instructions are executed by the processor, the electronic device is executed The method of any one of the first 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.
  • 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.
  • 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.
  • 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
  • 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.
  • Figure 1 shows a method of measuring height in the prior art.
  • FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a software structure block diagram of an electronic device provided by an embodiment of the application.
  • FIG. 4 is a schematic structural diagram of another electronic device provided by an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of yet another electronic device provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of a scene of a method for measuring height according to an embodiment of this application.
  • FIG. 7 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of the application.
  • FIG. 9 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of this application.
  • FIG. 10 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of this application.
  • FIG. 11 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of yet another electronic device provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of another electronic device provided by an embodiment of this application.
  • FIG. 14 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of this application.
  • 15 is a schematic flowchart of a method for measuring height provided by an embodiment of this application.
  • FIG. 16 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of the application.
  • FIG. 17 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of this application.
  • FIG. 18 is a schematic diagram of a scene of yet another method for measuring height according to an embodiment of the application.
  • 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.
  • the character "/" in the embodiment of the present application generally indicates that the associated objects before and after are in an "or" relationship.
  • the method for measuring height can be applied to electronic equipment.
  • the electronic device may be, for example, a mobile phone, a tablet (Personal Computer), a laptop (Laptop Computer), a digital camera, a personal digital assistant (PDA for short), a navigation device, and a mobile Internet Device (Mobile Internet Device, MID), vehicle-mounted device or wearable device (Wearable Device), etc.
  • FIG. 2 shows a schematic diagram of the structure of the electronic device 100.
  • 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.
  • SIM Subscriber identification module
  • the sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • 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.
  • the processor 110 may include one or more processing units.
  • 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.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • 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.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • 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.
  • 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 integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous transmitter receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • 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.
  • 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.
  • the I2S interface can be used for audio communication.
  • 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.
  • 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.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • 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.
  • 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.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • 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.
  • 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.
  • 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.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • 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.
  • 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.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • 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.
  • 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 charging 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).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • 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.
  • 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.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • 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.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • 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.
  • 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 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).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • 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.
  • 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).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • 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.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • 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.
  • 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.
  • the ISP may be provided in the camera 193.
  • 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.
  • CMOS complementary metal-oxide-semiconductor
  • 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.
  • the electronic device 100 may include 1 or N cameras 193, and N is a positive integer greater than 1.
  • 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.
  • 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.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • 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.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • 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.
  • 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.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • 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.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • 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.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • the capacitance of that point changes.
  • the pressure sensor 180A can detect the touched position and output the coordinates of the touched point.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • 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.
  • the air pressure sensor 180C is used to measure air pressure.
  • 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.
  • 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.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • 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.
  • 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.
  • the proximity light sensor 180G 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 180G 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 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • 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 light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • 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.
  • 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.
  • 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.
  • the bone conduction sensor 180M can acquire vibration signals.
  • 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.
  • 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.
  • 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.
  • 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.
  • touch operations applied to different applications 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.
  • the touch vibration feedback effect can also support customization.
  • 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.
  • 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.
  • 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.
  • 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 invention takes a layered Android system as an example to illustrate the software structure of the electronic device 100.
  • FIG. 3 is a software structure block diagram of an electronic device 100 according to an embodiment of the present invention.
  • 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.
  • 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.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • 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.
  • 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.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • 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.
  • 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 includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • 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.
  • 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.
  • 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.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • 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.
  • 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.
  • 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.
  • 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.
  • the deformation may be any one of bending, twisting, curling, and combinations thereof.
  • 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.
  • FIG. 4 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the application.
  • 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 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.
  • the angle ⁇ between the main body 302 and the main body 303 is the included angle between the main body 302 and the main body 303 (ie, an angle less than 180 degrees).
  • the electronic device is in a flat state, which may also be referred to as an unfolded state.
  • 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.
  • the electronic device may change from a flat state to a folded state, or from a folded state to a flat state.
  • the electronic device is in a folded state.
  • 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.
  • the display screen 194 is bent inward from the flat state to the folded state, the main body 302 and/or the main body 303 rotates inwardly around the axis of the connecting unit (shown by the dotted line in Figure 5(a)), the angle between the main body 302 and the main body 303 It gradually becomes smaller, and the angle between the main body 302 and the main body 303 gradually decreases from 180 degrees to 0 degrees.
  • the main body 303 and/or the main body 303 rotate outwards around the axis of the connecting unit, the angle between the main body 302 and the main body 303 gradually increases, and the main body 302 and the main body 303 The angle increased from 0 degrees to 180 degrees.
  • the object 500 to be measured is placed on any main body of the electronic device (eg, main body 302), and the other main body of the electronic device (eg, main body) is bent inwardly. 303), so that the other main body rotates around the connecting unit (for example, the connecting unit 301) until the object 500 to be measured contacts the other main body.
  • the object 500 to be measured is in contact with the main body 303, and the contact point is a point 600.
  • the calculation formula for the height h of the object to be measured is shown in Equation 1:
  • is the angle between two main bodies (for example, the angle between main body 302 and main body 303).
  • FIG 6 (d) shown in FIG, L 1 is a contact point (e.g., point 600) to the connection unit (e.g., unit 301 is connected) distance.
  • the distance from the contact to the connecting unit refers to the distance from the contact to the axis of the connecting unit.
  • the axis of the connecting unit may be referred to as a connecting shaft.
  • the height h of the object to be measured can be calculated.
  • the electronic device 100 can detect the position of the contact point (eg, point 600) through the pressure sensor 180A.
  • the main body 303 rotates inward about the axis of the connecting unit 301 to contact the object 500, a force acts on the pressure sensor 180A.
  • the electronic device 100 can determine the position of the contact according to the capacitance change of each point detected by the pressure sensor, and output the coordinates of the contact.
  • the electronic device 100 may include a plurality of pressure sensors 180A, which are respectively disposed on each main body.
  • the electronic device may include a pressure sensor 700a and a pressure sensor 700b.
  • the pressure sensor 700a is disposed on the main body 302, and the pressure sensor 700b is disposed on the main body 303.
  • the capacitance of the point changes, and the pressure sensor 700a or the pressure sensor 700b determines the position of the point and outputs the coordinates of the point.
  • x 1 axis is the horizontal direction of the plane where the main body 302 is located; y 1 axis is the direction perpendicular to the x 1 axis in the plane where the main body 302 is located; 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 object 500 to be measured is placed on the main body 302, the main body 303 is bent inward, and the main body 303 rotates inwardly around the axis of the connecting unit 301 until it comes into contact with the object 500. 600, the capacitance at the point 600 changes, the pressure sensor 700b determines the position of the point 600, and outputs the coordinates (x, y) of the point 600. It can be understood that, at this time, the distance L 1 is the abscissa x of the touch point (eg, point 600).
  • the pressure sensor provided on the multiple main bodies may be one pressure sensor.
  • the electronic device may include a pressure sensor 701, and the pressure sensor 701 is disposed on the main body 302 and the main body 303.
  • the pressure sensor 701 determines the position of the point and outputs the coordinates of the point.
  • the coordinate system is shown in Fig. 8(a) and Fig. 8(c)
  • the x 3 axis is the horizontal direction of the plane where the display screen 194 is located
  • the y 3 axis is the direction perpendicular to the x 3 axis in the plane where the display screen 194 is located.
  • the object 500 to be measured is placed on the main body 302, the main body 303 is bent inward, and the main body 303 rotates inward around the axis of the connecting unit 301 until it comes into contact with the object, and a force acts on the point 600 ,
  • the capacitance at the point 600 changes, the pressure sensor 701 determines the position of the point 600, and outputs the coordinates (x, y) of the point 600.
  • the distance L 1 is the difference between the abscissa x of the touch point (eg, point 600) and the abscissa x of the touch point (eg, point 600).
  • the electronic device can identify the distance L 1 from the contact point to the connection unit through the pressure sensor.
  • 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.
  • 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 main body 302 and the posture of the main body 303), and then determine the angle between the subject according to the posture of any subject and another subject (e.g., according to the posture and The posture of the main body 303 determines the angle between the main body 302 and the main body 303).
  • the electronic device 100 may include a first acceleration sensor and a second acceleration sensor.
  • 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.
  • the x1, y1 and z1 axes are shown in Figure 9(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.
  • the x2, y2, and z2 axes are shown in Figure 9(a), and 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; and the z2 axis is the direction perpendicular to the main body 303. The direction perpendicular to the plane where 303 is located.
  • 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 2:
  • a z is the acceleration of the x-axis
  • a y is the acceleration of the y-axis
  • a z is the acceleration of the z-axis
  • ⁇ z is the angle between the z axis and the horizontal direction.
  • 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 9(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 3:
  • 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.
  • 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 shown in Equation 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 5:
  • the electronic device 100 may determine the angle between the subjects through the gyro sensor 180B.
  • 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).
  • the electronic device 100 may include a first gyroscope sensor and a second gyroscope sensor.
  • 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.
  • 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.
  • the electronic device 100 may determine the angle between the subjects through the acceleration sensor 180E and the gyro sensor 180B.
  • 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.
  • the electronic device can recognize the included angle between the main bodies (ie, an angle less than 180 degrees).
  • the electronic device can calculate the object to be measured (such as , The height h of the object 500), so as to realize the measurement of the height of the object.
  • the method for measuring the height provided by the embodiment of the present application uses a deformable electronic device to measure the height of an object, and the operation is simple.
  • the object to be measured is a cube as an example. It can be understood that the method for measuring height provided in the embodiments of the present application can be used to measure the height of objects of various shapes. For example, as shown in FIGS. 10(a) and 10(b), the object to be measured may also be a cone (for example, object 501), trapezoid (for example, object 502) and other irregularly shaped objects.
  • the object to be measured may also be a cone (for example, object 501), trapezoid (for example, object 502) and other irregularly shaped objects.
  • the description is made by taking the object to be measured on any main body of the electronic device and bending the other main body of the electronic device as an example.
  • the object to be measured can be clamped between any main body of the electronic device and another main body for measurement.
  • the object to be measured (e.g., object 503) is sandwiched between two main bodies (e.g., between the main body 302 and the main body 303), so that one end of the object to be measured is connected to any one of the electronic equipment
  • the main body (for example, main body 303) is in contact with the first contact (for example, point 602), and the other end of the object to be measured is in contact with another main body (for example, main body 302) of the electronic device, and the contact is the second contact Point (e.g. point 603).
  • the calculation formula for the height h of the object to be measured is shown in Equation 6:
  • is the angle between the two main bodies (for example, the angle between the main body 302 and the main body 303).
  • L 2 is the distance from the first contact point (for example, point 602) to the connecting unit (for example, connecting unit 301).
  • L 3 is the distance from the second contact point (for example, point 603) to the connection unit (for example, connection unit 301).
  • the distance from the first contact to the connecting unit refers to the distance from the first contact to the axis of the connecting unit
  • the distance from the second contact to the connecting unit refers to the distance from the second contact to the connecting unit The distance of the axis.
  • the electronic device can calculate the object to be measured (For example, the height h of the object 503), so as to realize the measurement of the height of the object.
  • the electronic device can identify the distance L 2 from the first contact to the connecting unit through the pressure sensor and the distance L 3 from the second contact to the connecting unit.
  • the electronic device can measure the object to be measured with a high height.
  • 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 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 402, the main body 403, and the main body 404 may have the same size and the same thickness.
  • the display screen 194 can be bent inward or outward through the connecting unit 401, so that the main body 403 and the main body 404 can rotate around the axis of the connecting unit 401 (shown by the dashed line on the left side of FIG. 12) to change the main body 403 and the main body 404.
  • the angle between the display screen 194 can be bent inward or outward through the connecting unit 402, so that the main body 404 and the main body 405 can rotate around the axis of the connecting unit 403 (shown by the dotted line on the right side of Figure 12) to change the main body 404 And the angle between the main body 405.
  • the electronic device 100 with the same size of the main body 301 and the main body 302 is taken as an example for description. It is understood that the size of the main body 302 and the main body 303 may be different. For example, as shown in FIG. 13(a), the size of 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.
  • the electronic device 100 can recognize the angle between any two 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 difference between the main body 403 and the main body 405.
  • the angle between. A method of identifying the angle between the main body 403 and the main body 404, a method of the angle between the main body 404 and the main body 405, and a method of the angle between the main body 403 and the main body 405. , Refer to the description in FIG. 9, which will not be repeated here.
  • the electronic device 100 includes one or more pressure sensors.
  • the electronic device 100 may include pressure sensors 700a, 700b, and 700c.
  • the pressure sensor 700a is disposed on the main body 403
  • the pressure sensor 700b is disposed on the main body 404
  • the pressure sensor 700c is disposed on the main body 405.
  • the electronic device 100 can identify the distance between any contact point and the connection unit through the pressure sensor. For a detailed method, refer to the description of the above-mentioned embodiment, which will not be repeated here.
  • the object to be measured is placed on any main body, and then the display screen 194 is bent to make the other main body contact the object to be measured.
  • the electronic device 100 recognizes the angle ⁇ between any two bodies and the distance L 1 from the contact to the connecting unit, and calculates the height of the object to be measured based on the angle ⁇ and the distance L 1 .
  • an embodiment of the present invention provides a method for measuring height, and the method includes:
  • Step 1501. The electronic device receives a user's first input.
  • the first input is used to instruct the electronic device to start measuring the height of the object.
  • the user touches the icon 801 to open the measurement application.
  • the electronic device opens the measurement application.
  • the electronic device may display interface 902 and/or interface 903.
  • the interface 902 or the interface 903 may include instructions for use to inform the user how to measure the height of the object using the electronic device.
  • the interface 902 or the interface 903 may include a start measurement button 802.
  • the measurement button 802 is used to instruct the electronic device to start measuring the height of the object.
  • the electronic device receives the user's first input.
  • the first input may be: the user touches the measurement start button 802.
  • Step 1502 in response to the first input, the electronic device triggers the pressure sensor.
  • Step 1503 The electronic device detects whether the object to be measured is in contact with the main body of the electronic device through the pressure sensor.
  • step 1504 If touched, go to step 1504; if not touched, go to step 1503 repeatedly.
  • the user places the object to be measured on the first body, bends the second body inward, and the second body rotates around the axis of the connecting unit until the apex of the object to be measured contacts the second body.
  • a force acts on the pressure sensor arranged on the second body, the capacitance between the electrodes of the pressure sensor changes, and the electronic device determines that the object to be measured is in contact with the second body.
  • the capacitance between the electrodes of the pressure sensor provided on the second body does not change, and the electronic device determines that the object to be measured is not in contact with the second body. If the electronic device determines that the object to be measured is in contact with the second body, step 1504 is executed. If the electronic device determines that the object to be measured is not in contact with the second body, step 1503 is repeated.
  • the user places the object 500 to be measured on the main body 302 and bends the main body 303 inward until the vertex A of the object 500 to be measured contacts the main body 303 .
  • a force acts on the pressure sensor 700b, the capacitance between the electrodes of the pressure sensor 700b changes, and the electronic device determines that the object to be measured is in contact with the main body 303.
  • the first body is the body 302
  • the second body is the body 303.
  • the user places the object 500 to be measured on the main body 404 and bends the main body 405 inward until the vertex A of the object 500 to be measured contacts the main body 405 .
  • the first body is the body 404
  • the second body is the body 405.
  • the user can place the object between the first body and the second body, and bend the first body and/or the second body inward until one end of the object to be measured contacts the first body , The other end of the object to be measured is in contact with the second body.
  • a force acts on the pressure sensor arranged on the first body, the capacitance between the electrodes of the pressure sensor changes, and the electronic device determines that the object to be measured is in contact with the first body.
  • the capacitance between the electrodes of the pressure sensor provided on the first body does not change, and the electronic device determines that the object to be measured is not in contact with the first body.
  • step 1504 is performed.
  • step 1503 is repeated.
  • Step 1504 The electronic device recognizes the angle ⁇ between the first body and the second body.
  • the angle between the first body and the second body is the angle between the main body 302 and the main body 303.
  • the angle between the first body and the second body is the angle between the main body 404 and the main body 405.
  • Step 1505 The electronic device recognizes the distance from the contact point to the connection unit connecting the first body and the second body.
  • the electronic device recognizes the distance L 1 from the contact point to the connection unit connecting the first body and the second body.
  • the distance from the contact point to the connecting unit connecting the first body and the second body is the distance from the point 604 to the connecting unit 301.
  • the distance from the contact point to the connection unit connecting the first body and the second body is the distance from the point 605 to the connection unit 402.
  • the electronic device recognizes the distance L 2 from the first contact to the connection unit and the distance L 3 from the second contact to the connection unit.
  • the distance L 2 from the first contact to the connection unit and the distance L 3 from the second contact to the connection unit.
  • Step 1506 The electronic device calculates the height of the object to be measured according to the angle and the distance.
  • the electronic device may calculate the height h of the object to be measured according to the angle ⁇ and the distance L 1 .
  • the electronic device can obtain the height h of the object to be measured according to formula 1.
  • the electronic device may calculate the height h of the object to be measured according to the angle ⁇ , the distance L 2 , and the distance L 3 . From the angle ⁇ , the distance L 2 , and the distance L 3, the electronic device can obtain the height h of the object to be measured according to formula 6.
  • Step 1507 The electronic device outputs the height h.
  • the electronic device may display the height h on the display screen 194.
  • the electronic device may display the height on the display screen 194 covering the second body; or, as shown in FIG. 17(f), the electronic device may The height is displayed on the display screen 194 covering other bodies (for example, the body 403) other than the first body and the second body.
  • the electronic device may voice output the height h.
  • the electronic device may output a voice message that "the height of the measured object is 5 cm".
  • the height measurement method described in FIG. 15 uses a pressure sensor to detect the position of the contact point to measure the height of the object. It can be understood that, alternatively, the electronic device may also detect the position of the contact through a touch sensor.
  • the electronic device may also display a reference line on the display screen, allowing the user to align the reference line and place the object to be measured.
  • the electronic device displays a reference line 1400 on the main body 303.
  • the distance between the reference line 1400 and the connecting unit 301 is D 1 .
  • the user bends the main body 303 inward so that the apex of the object 500 is in contact with the main body 303, and the contact point is on the reference line 1400.
  • the electronic device recognizes the angle ⁇ between the main body 302 and the main body 303.
  • the electronic device calculates the height h of the object according to the distance D 1 and the angle ⁇ , and the calculation formula is shown in Equation 7:
  • the electronic device may also display a reference line 1400 on the main body 302, the reference line 1400 and the connection unit The distance of 301 is D 2 .
  • the user bends the main body 303 inward so that the apex of the object 500 is in contact with the main body 303.
  • the electronic device recognizes the angle ⁇ between the main body 302 and the main body 303.
  • the electronic device calculates the height h of the object according to the distance D2 and the angle ⁇ , and the calculation formula is shown in Equation 8:
  • the reference line can be displayed on the display screen, and the step of detecting the contact point by the pressure sensor can be omitted.
  • This method can be used for electronic devices that do not have pressure sensors.
  • the embodiment of the application discloses an electronic device, including: 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.
  • 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 may be used to execute the foregoing application embodiments.
  • the one or more sensors mentioned above may include a touch sensor, a pressure sensor or an acceleration sensor.
  • 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
  • the foregoing display screen may specifically be the display shown in FIG. Screen 194
  • the above-mentioned sensor may 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
  • the above-mentioned pressure sensor may be the pressure sensor shown in FIG. 180A
  • 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 graphical user interface
  • the computer program product includes one or more computer instructions.
  • 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.
  • 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)).

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Telephone Function (AREA)

Abstract

一种应用于电子设备(100)的高度测量的方法,电子设备(100)至少包括第一主体(302)、第二主体(303)以及连接第一主体(302)和第二主体(303)的第一连接轴(301),第一主体(302)和第二主体(303)围绕第一连接轴(301)可旋转。用户将待测物体(500)置于第一主体(302)上,旋转第二主体(303)以测量待测物体(500)的高度。测量方法包括:电子设备(100)检测待测物体(500)是否与第二主体(303)接触;电子设备(100)识别第一主体(302)和第二主体(303)的夹角;在待测物体(500)与第二主体(303)接触时,电子设备(100)识别待测物体(500)与第二主体(303)的触点到第一连接轴(301)的距离;电子设备(100)根据夹角和距离计算待测物体(500)的高度;电子设备(100)输出待测物体(500)的高度。

Description

一种测量高度的方法和电子设备
本申请要求在2019年5月23日提交中国国家知识产权局、申请号为201910433040.8的中国专利申请的优先权,发明名称为“一种测量高度的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及电子技术领域,尤其涉及一种测量高度的方法和电子设备。
背景技术
随着电子技术的不断发展,手机等电子设备具备的功能越来越多、体验越来越丰富。比如,用户可以通过手机测量物体的尺寸。
现有技术中,一种长度测量的实现方案为:
如图1所示,电子设备的在显示屏上显示虚拟的测量直尺101。用户可以通过该直尺101测量物体102的高度。用户将直尺101的“0”刻度对准测量目标的起点,读取测量目标终点对应的数值,以实现对高度的测量。示例性的,如图1所示,测量目标的高度为8.5厘米。
现有技术中的长度测量方法,测量操作比较繁琐。
发明内容
本申请实施例提供了一种测量高度的方法和电子设备,方便用户测量物体的高度。
第一方面,本申请实施例提供一种应用于电子设备的高度测量方法。其中,该电子设备包括至少包括第一主体、第二主体以及连接所述第一主体和所述第二主体的第一连接轴,所述第一主体和所述第二主体围绕所述第一连接轴可旋转。
一种可能的高度测量方法,将待测物体置于所述第一主体上,用户转动所述第二主体以使第二主体与待测物体接触,所述方法具体包括:电子设备检测待测物体是否与第二主体接触;电子设备识别第一主体和第二主体的夹角;在待测物体与第二主体接触时,电子设备识别待测物体与第二主体的触点到第一连接轴的距离;电子设备根据上述夹角和上述距离得到待测物体的高度;电子设备输出所述待测物体的高度。其中,电子设备采用公式h=L 1×sinɑ计算得到所述待测物体的高度h,L 1是触点到第一连接轴的距离,ɑ是第一主体和第二主体的夹角。
另一种可能的高度测量方法,将待测物体置于第一主体和第二主体之间,用户转动第一主体和/或第二主体,使待测物体分别与第一主体和第二主体接触,所述方法具体包括:电子设备检测待测物体是否与第一主体接触;电子设备检测待测物体是否与第二主体接触;电子设备检测所述第一主体和所述第二主体的夹角;在待测物体与第一主体接触时,电子设备识别待测物体与第一主体的第一触点到第一连接轴的第一距离;在所述待测物体与所述第二 主体接触时,电子设备识别待测物体与第二主体的第二触点到第一连接轴的第二距离;电子设备根据夹角、第一距离以及第二距离得到待测物体的高度。其中,电子设备采用公式h 2=L 2 2+L 3 2-2L 2L 3cosɑ计算得到所述待测物体的高度h。其中,L 2是第一触点到第一连接轴的第一距离,L 3是第二触点到第一连接轴的第二距离,ɑ是第一主体和第二主体的夹角。
由此,通过旋转主体使之与待测物体接触,用户可以方便地测量物体的高度。
其中,可以通过不同的方式识别各主体之间的角度。一种可能的方式,可以通过压力传感器识别待测物体是否与主体接触。
在一种可能的设计方法中,电子设备可以先检测是否接触待测物体,在电子设备检测到与该待测物体接触后,再识别第一主体和第二主体的夹角,具体为:上述电子设备识别第一主体和第二主体的夹角为:响应于待测物体与第二主体接触,电子设备识别第一主体和第二主体的夹角。上述电子设备识别第一主体和第二主体之间的夹角为:响应于待测物体与第二主体接触且待测物体与第一主体接触,电子设备识别第一主体和第二主体的夹角。
在一种可能的设计方法中,电子设备可以响应于用户的第一输入,触发是否与待测物体接触的检测,具体为:电子设备接收第一输入;响应于该第一输入,电子设备检测待测物体是否与主体接触。
第二方面,本申请实施例提供一种电子设备。所述电子设备包括第一主体、第二主体、第一连接轴、处理器、以及用于存储计算机程序的存储器。其中,第一连接轴用于连接第一主体和第二主体,第一主体和第二主体可围绕第一连接轴旋转;计算机程序包括指令,当该指令被处理器执行时,使得电子设备执行如第一方面中任一项所述的方法。
第三方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的方法。
第四方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的方法。
第五方面,本申请提供一种图形用户界面,该图形用户界面具体包括电子设备在执行如第一方面中任一项方法时显示的图形用户界面。
可以理解地,上述提供的第二方面所述的电子设备、第三方面所述的计算机存储介质、第四方面所述的计算机程序产品以及第五方面所述的图形用户界面,均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为现有技术的一种测量高度的方法。
图2为本申请实施例提供的一种电子设备的结构示意图;
图3为本申请实施例提供的一种电子设备的软件结构框图;
图4为本申请实施例提供的又一种电子设备的结构示意图;
图5为本申请实施例提供的又一种电子设备的结构示意图;
图6为本申请实施例提供的一种测量高度的方法的场景示意图;
图7为本申请实施例提供的又一种测量高度的方法的场景示意图;
图8为本申请实施例提供的又一种测量高度的方法的场景示意图;
图9为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图10为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图11为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图12为本申请实施例提供的又一种电子设备的结构示意图;
图13为本申请实施例提供的又一种电子设备的结构示意图;
图14为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图15为本申请实施例提供的一种的测量高度的方法的流程示意图;
图16为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图17为本申请实施例提供的又一种的测量高度的方法的场景示意图;
图18为本申请实施例提供的又一种的测量高度的方法的场景示意图。
具体实施方式
需要说明的是,本申请实施例中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。
本申请实施例中的术语“A和/或B”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请实施例中字符"/",一般表示前后关联对象是一种"或"的关系。
本申请实施例中描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本申请实施例中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。
本申请实施例提供的一种测量高度的方法,可以应用于电子设备。示例性的,该电子设备例如可以为:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、数码相机、个人数字助理(personal digital assistant,简称PDA)、导航装置、移动上网装置(Mobile Internet Device,MID)、车载装置或可穿戴式设备(Wearable Device)等。
图2示出了电子设备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等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器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)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信 号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块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转为电磁波辐射出去。
在一些实施例中,电子设备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)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏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的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。
电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。当有力作用于压力传感器180A的某一点时,该点的电容发生变化。通过检测压力传感器180A各点的电容变化,压力传感器180A可以检测触摸的位置,输出所述触摸点的坐标。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁, 访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
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分离。
电子设备100的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android***为例,示例性说明电子设备100的软件结构。
图3是本发明实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传 感器驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
本申请实施例中,显示屏194可以为可变形的。可变形的显示屏194可以被称为“柔性屏”。变形,意指电子设备的显示屏194的一部分的曲率半径小于基准值。例如,变形可以是,弯折、扭曲、卷曲、以及其组合中的任意一个。在以下实施例中,将会参考附图更加详细地与显示屏194变形有关的电子设备的结构。
示例性的,以电子设备为双折叠手机为例进行说明。图4为本申请实施例提供的一种电子设备100的结构示意图。如图4(a)所示,电子设备100包括:连接单元301、主体302、主体303和显示屏194。其中,连接单元301用于连接主体302和主体303。主体302和主体303的大小可以相同也可以不同。主体302和主体的厚度可以相同。显示屏194覆盖连接单元301、主体302以及主体303。显示屏194可以通过连接单元向内或向外弯折,以改变各主体之间的角度。其中,如图4(b)所示,主体302和主体303之间的角度ɑ为主体302和主体303的夹角(即、小于180度的角)。
示例性的,如图5(a)和图5(b)所示,电子设备处于平坦状态,也可以称为展开状态。此时,主体302和主体303位于同一水平面上。主体302和主体303之间的角度ɑ为180度。随着用户弯折显示屏194,电子设备可以由平坦状态到折叠状态,或者由折叠状态到平坦状态。如图5(b)和图5(d)所示,电子设备处于折叠状态。此时,主体302与主体303相互平行,显示屏194朝向电子设备的内部,主体302和主体303之间的角度ɑ为0度。从平坦状态向内弯折显示屏194至折叠状态,主体302和/或主体303绕连接单元的轴线(如图5(a)虚线所示)向内转动,主体302和主体303之间的角度逐渐变小,主体302和主体303之间的角度由180度逐渐减小至0度。从折叠状态向外弯折显示屏194至平坦状态,主体303和/或主体303绕连接单元的轴线向外转动,主体302和主体303之间的角度逐渐增大,主体302和主体303之间的角度由0度增加到180度。
如图6(a)至图6(b)所示,将待测物体500放置在电子设备的任一主体上(如,主体302),向内弯折电子设备的另一主体(如,主体303),使得该另一主体绕连接单元(如,连接单元301)转动,直到待测物体500与另一主体接触。如,待测物体500与主体303接触,触点为点600。则如图6(c)所示,根据正弦定律,待测物体的高度h的计算公式如式1所示:
h=L 1×sinɑ(式1)
其中,ɑ为两个主体之间的角度(如,主体302和主体303之间的角度)。如图6(d)所示,L 1为触点(如,点600)到连接单元(如,连接单元301)的距离。需要说明的是,触点到连接单元的距离是指触点到连接单元的轴线的距离。为了方便说明,可以将连接单元的轴线称为连接轴。
也就是说,如果能够知晓两个主体之间的角度ɑ和触点到连接该两个主体的连接单元的距离L 1,就可以计算得出待测物体的高度h。
电子设备100可以通过压力传感器180A检测触点(如,点600)的位置。当用户向内弯折主体303,主体303绕连接单元301的轴线向内转动与物体500接触时,有力作用于压力传感器180A。电子设备100可以根据压力传感器检测各点的电容变化确定触点的位置,输出触点的坐标。
示例性的,电子设备100可以包括多个压力传感器180A,分别设置于各主体。示例性的,如图7(a)和图7(c)所示,电子设备可以包括压力传感器700a和压力传感器700b,压力传感器700a设置于主体302,压力传感器700b设置于主体303。当有力作用于压力传感器700a或压力传感器700b时,该点的电容发生变化,压力传感器700a或压力传感器700b确定该点的位置,输出该点的坐标。其中,坐标系如图7(a)和图7(c)所示,x 1轴为主体302所在平面的水平方向;y 1轴为主体302所在平面中与x 1轴垂直的方向;x2轴为主体303所在平面的水平方向;y2轴为主体303所在平面中与x2轴垂直的方向。
例如,如图7(b)所示,将待测物体500放置在主体302上,向内弯折主体303,主体303绕连接单元301的轴线向内转动直到与物体500接触,有力作用于点600,点600处的电容发生变化,压力传感器700b确定点600的位置,输出点600的坐标(x,y)。可以理解的是,此时,距离L 1即为触点(如,点600)的横坐标x。或者,如图7(d)所示,将待测物体500放置在主体303上,向内弯折主体302,主体302绕连接单元301的轴线向内转动直到与物体500接触,有力作用于点601,点601处的电容发生变化,压力传感器700a确定点601的位置,输出点601的坐标(x,y)。可以理解的是,此时,距离L 1即为主体302的宽度W 1与触点(如,点600)的横坐标x的差。
替代性的,设置于多个主体上的压力传感器可以为一个压力传感器。示例性的,如图8(a)和图8(c)所示,电子设备可以包括压力传感器701,压力传感器701设置于主体302和主体303。当有力作用于压力传感器701时,该点的电容发生变化,压力传感器701确定该点的位置,输出该点的坐标。其中,坐标系如图8(a)和图8(c)所示,x 3轴为显示屏194所在平面的水平方向;y 3轴为显示屏194所在平面中与x 3轴垂直的方向。
例如,如图8(b)所示,将待测物体500放置在主体302上,向内弯折主体303,主体303绕连接单元301的轴线向内转动直到与物体接触,有力作用于点600,点600处的电容发生变化,压力传感器701确定点600的位置,输出点600的坐标(x,y)。可以理解的是,此时,距离L 1即为触点(如,点600)的横坐标x与触点(如,点600)的横坐标x的差。或者,如图8(d)所示,将待测物体500放置在主体303上,向内弯折主体302,主体302绕连接单元301的轴线向内转动直到与物体500接触,有力作用于点601,点601处的电容发生变化,压力传感器701确定点601的位置,输出点601的坐标(x,y)。可以理解的是,此时,距离L 1即为主体302的宽度W 1与触点(如,点600)的横坐标x的差。
综上所述,电子设备可以通过压力传感器识别触点到连接单元的距离L 1
电子设备100可以识别各主体之间的角度(如,主体302和主体303之间的角度)。例如,电子设备100可以通过加速度传感器180E识别各主体之间的角度。示例性的,电子设备100包括多个加速度传感器180E,分别设置于各主体中。电子设备可以通过各主体(如,主体302,主体303)中设置的加速度传感器检测各主体的各个轴(如,x轴,y轴和z轴)的加速度大小,根据检测得到的各个轴的加速度大小电子设备可以确定各主体的姿态(如, 主体302的姿态和主体303的姿态),进而根据任一主体和另一主体的姿态确定该主体之间的角度(如,根据主体302的姿态和主体303的姿态确定主体302和主体303之间的角度)。
以图4所述的双折叠手机为例,电子设备100可以包括第一加速度传感器和第二加速度传感器。其中,第一加速度传感器设置于主体302;第二加速度传感器设置于主体303。第一加速度传感器检测主体302分别在x1,y1和z1轴的加速度。示例性的,x1,y1和z1轴如图9(a)所示,x1轴为主体302所在平面的水平方向;y1轴为主体302所在平面中与x1轴垂直的方向;z1轴为与主体302所在平面垂直的方向。第二加速度传感器检测主体303分别在x2,y2和z2轴的加速度。示例性的,x2,y2和z2轴如图9(a)所示,x2轴为主体303所在平面的水平方向;y2轴为主体303所在平面中与x2轴垂直的方向;z2轴为与主体303所在平面垂直的方向。
电子设备100可以根据设置在各主体中的加速度传感器检测的各个轴的加速度以确定各主体的姿态。例如,电子设备100可以根据x1,y1和z1轴的加速度确定主体302的姿态,根据x2,y2和z2轴的加速度确定主体303的姿态。示例性的,电子设备100可以根据x1,y1和z1轴的加速度计算得到z1轴与水平方向的夹角θ z1,根据x2,y2和z2轴的加速度计算得到z2轴与水平方向的夹角θ z2。其计算公式如式2所示:
Figure PCTCN2020091180-appb-000001
其中a z为x轴的加速度,a y为y轴的加速度,a z为z轴的加速度。θ z为z轴与水平方向的夹角。
电子设备100可以根据任一主体和另一主体的姿态确定两个主体之间的角度。例如,电子设备100可以根据主体302和主体303的姿态确定主体302和主体303之间的角度。可以理解的是,如图9(b)所示,电子设备可以根据z1轴与水平方向的夹角θ z1,z2轴与水平方向的夹角θ z2计算得到主体302和主体303之间的角度ɑ,其计算公式如式3所示:
ɑ=180+θ Z1Z2  (式3)
需要说明的是,本申请实施例中,以根据z1轴与水平方向的夹角和z2轴与水平方向的夹角计算主体302和主体303之间的角度为例进行了说明,可以理解的是,计算主体302和主体303之间角度的方法并不限于此。例如,电子设备100可以根据x1轴与水平方向的夹角θ x1,x2轴与水平方向的夹角θ x2计算得到主体302和主体303之间的角度,其计算公式如式4所示:
ɑ=180-(θ x1x2)  (式4)
其中,电子设备100可以根据x1,y1和z1轴的加速度计算得到x1轴与水平方向的夹角θ x1,根据x2,y2和z2轴的加速度计算得到x2轴与水平方向的夹角θ x2。其计算公式如式5所示:
Figure PCTCN2020091180-appb-000002
替代性的,电子设备100可以通过陀螺仪传感器180B来确定各主体之间的角度。示例性的,电子设备可以包括多个陀螺仪传感器,分别设置于各主体中。电子设备可以通过各主体(如,主体302,主体303)中设置的陀螺仪传感器检测各主体的各个轴(如,x轴,y轴和z轴)的角速度,根据检测的各个轴上的角速度电子设备可以确定各主体的姿态(如,主体302的姿态和主体303的姿态),进而根据任一主体和另一主体的姿态确定该主体之间的角度(如,根据主体302的姿态和主体303的姿态确定主体302和主体303之间的角度)。
以图4所述的双折叠手机为例,电子设备100可以包括第一陀螺仪传感器和第二陀螺仪传感器。其中,第一陀螺仪传感器设置于主体302;第二陀螺仪传感器设置于主体303。电子设备100可以通过第一陀螺仪传感器检测的角速度计算得到主体302的姿态,通过第二陀螺仪传感器检测的角速度计算得到主体303的姿态;然后,根据主体302的姿态和主体303的姿态,电子设备可以确定主体302和主体303之间的角度。
需要说明是,本申请实施例中识别各主体之间的角度的方法包括但不限于上述例子。例如,电子设备100可以通过加速度传感器180E和陀螺仪传感器180B确定各主体之间的角度。又如,电子设备100还包括旋转传感器。电子设备100可以通过旋转传感器检测任一主体和另一主体的旋转角度来确定该各主体之间的角度。
综上所述,电子设备可以识别各主体之间的夹角(即、小于180度的角)。
由此,根据电子设备识别的主体302和主体303之间的角度ɑ和触点(如,点600或点601)到连接单元301的距离L 1,电子设备可以计算得出待测物体(如,物体500)的高度h,从而实现对物体的高度的测量。本申请实施例提供的所述测量高度的方法,利用可变形的电子设备测量物体的高度,操作简单。
需要说明的,上述实施例中,以待测物体为立方体为例进行了说明。可以理解的是,本申请实施例提供的所述测量高度的方法可以用于测量各种形状的物体的高度。例如,如图10(a)和10(b)所示,待测物体也可以为锥形(如,物体501),梯形(如,物体502)等形状不规则的物体。
需要说明的是,上述实施例中,以将待测物体放置在电子设备的任一主体上向内弯折电子设备的另一主体为例进行的说明。可选的,本申请实施例提供的又一种测量高度的方法,可以将待测物体夹在电子设备的任一主体和另一主体之间进行测量。
如图11(a)所示,将待测物体(如,物体503)夹在两个主体之间(如,主体302和主体303之间),使得待测物体的一端与电子设备的任一主体(如,主体303)接触,触点为第一触点(如,点602),待测物体的另一端与电子设备的另一主体(如,主体302)接触,触点为第二触点(如,点603)。根据余弦定理可知,待测物体的高度h的计算公式如式6所示:
h 2=L 2 2+L 3 2-2L 2L 3cosɑ(式6)
其中,,ɑ为两个主体之间的角度(如,主体302和主体303之间的角度)。L 2为第一触点(如,点602)到连接单元(如,连接单元301)的距离。L 3为第二触点(如,点603)到连接单元(如,连接单元301)的距离。
需要说明的是,所述第一触点到连接单元的距离是指第一触点到连接单元的轴线的距离,所述第二触点到连接单元的距离是指第二触点到连接单元的轴线的距离。
由此,根据电子设备识别的两个主体之间的角度ɑ、第一触点到连接单元的距离L 1以及第二触点到连接单元的距离L 2,电子设备可以计算得出待测物体(如,物体503)的高度h, 从而实现对物体的高度的测量。其中,电子设备可以通过压力传感器识别第一触点到连接单元的距离L 2第二触点到连接单元的距离L 3。电子设备识别第一触点到连接单元的距离L 2、第二触点到连接单元的距离的方法L 3,参见上述实施例,在此不再赘述。
由此,电子设备可以测量高度较高的待测物体。
需要说明的是,上述实施例中,以双折叠手机为例进行了说明,可以理解的是,电子设备可以通过更多的连接单元连接更多的主体。例如,电子设备可以为三折叠手机。图12为本申请实施例提供的又一种电子设备100的结构示意图。如图12所示,电子设备100包括:连接单元401,连接单元402,主体403,主体404以及主体405。连接单元401用于连接主体403和主体404,连接单元402用于连接主体404和主体405。显示屏194覆盖于连接单元401,连接单元402,主体403,主体404以及主体405。主体402和主体403和主体404的大小可以相同,厚度也可以相同。显示屏194可以通过连接单元401向内或向外弯折弯折,由此主体403和主体404可以绕连接单元401的轴线(如图12左侧虚线所示)转动以改变主体403和主体404之间的角度;显示屏194可以通过连接单元402向内或向外弯折,由此主体404和主体405可以绕连接单元403的轴线(如图12右侧虚线所示)转动以改变主体404和主体405之间的角度。
上述实施例中,以主体301和主体302的大小相同的电子设备100为例进行了说明,可以理解的是,主体302和主体303的大小可以不同。例如,如图13(a)所示,主体302的大小可以大于主体303。主体403,主体404和主体405的大小也可以不同。例如,如图13(b)所示,主体403和主体405的宽度之和等于主体404的宽度。
可以理解的是,类似地,电子设备100可以识别任意两个主体之间的角度,如:主体403和主体404之间的角度,主体404和主体405之间的角度,主体403和主体405之间的角度。识别主体403和主体404之间的角度的方法,主体404和主体405之间的角度的方法,主体403和主体405之间的角度的方法。,参考图9中的说明,在此不再赘述。
可以理解的是,类似地,电子设备100包括一个或多个压力传感器。示例性的,电子设备100可以包括压力传感器700a、700b、700c。压力传感器700a设置于主体403,压力传感器700b设置于主体404,压力传感器700c设置于主体405。电子设备100可以通过压力传感器识别任一触点到连接单元的距离,详细方法参考上述实施例的说明,在此不再赘述。
可以理解的是,类似地,如图14所示,将待测物体放置在任一主体上,然后通过弯折显示屏194使得另一主体与待测物体接触。电子设备100识别该任意的两个主体之间的角度ɑ和触点到连接单元的距离L 1,根据所述角度ɑ和距离L 1计算得到待测物体的高度。尽管图中未示出,也可以将待测物体放置在任一的两个主体之间,然后弯折显示屏194使得该物体的一端与任一主体接触,该物体的另一端与另一主体接触,然后电子设备该主体之间的角度ɑ,第一触点到连接单元的距离L 2以及第二触点到连接单的距离L 3,根据角度ɑ,距离L 2以及距离L 3计算得到待测物体的高度。详细过程参见图6至图11的描述,在此不再赘述。
以下图15所示的实施例提供的方法应用于前述各实施例提供的电子设备中。如图15所示,本发明本申请实施例提供的一种测量高度的方法,该方法包括:
步骤1501、电子设备接收用户的第一输入。
其中,所述第一输入用于指示电子设备开始测量物体的高度。
示例性的,如图16(a)所示,用户触摸图标801以打开测量应用程序。响应于所述图标801被触摸,电子设备打开测量应用程序。如图16(b)和16(c)所示,电子设备可以 显示界面902和/或界面903。界面902或界面903可以包括使用说明,所述使用说明用于告知用户如何使用电子设备测量物体的高度。界面902或界面903可以包括开始测量按钮802。所述测量按钮802用于指示电子设备开始测量物体的高度。电子设备接收用户的第一输入。示例性的,第一输入可以为:用户触摸所述开始测量按钮802。
步骤1502、响应于所述第一输入,电子设备触发压力传感器。
步骤1503、电子设备通过压力传感器检测待测物体是否与电子设备的主体接触。
若接触,执行步骤1504;若未接触,重复执行步骤1503。
具体地,用户将待测物体放置在第一主体上,向内弯折第二主体,第二主体绕连接单元的轴线转动,直到待测物体的顶点与第二主体接触。当待测物体的顶点与第二主体接触时,有力作用于设置于第二主体的压力传感器,压力传感器的电极之间的电容改变,电子设备确定待测物体与第二主体接触。反之,未接触时,设置于第二主体的压力传感器的电极之间的电容不变,电子设备确定待测物体与第二主体未接触。若电子设备确定待测物体与第二主体接触,执行步骤1504。若电子设备确定待测物体与第二主体未接触,重复执行步骤1503。
示例性的,如图17(a)至图17(b)所示,用户将待测物体500放置在主体302上,向内弯折主体303,直到待测物体500的顶点A与主体303接触。有力作用于压力传感器700b,压力传感器700b的电极之间的电容变化,电子设备确定待测物体与主体303接触。可以理解的是,此时,第一主体为主体302,第二主体为主体303。
示例性的,如图17(d)至图17(e)所示,用户将待测物体500放置在主体404上,向内弯折主体405,直到待测物体500的顶点A与主体405接触。可以理解的是,此时,第一主体为主体404,第二主体为主体405。
或者,尽管图中未示出,用户可以将物体放置在第一主体和第二主体之间,向内弯折第一主体和/或第二主体,直到待测物体的一端与第一主体接触,待测物体的另一端与第二主体接触。当待测物体的一端与第一主体接触时,有力作用于设置于第一主体的压力传感器,压力传感器的电极之间的电容改变,电子设备确定待测物体与第一主体接触。反之,未接触时,设置于第一主体的压力传感器的电极之间的电容不变,电子设备确定待测物体与第一主体未接触。当待测物体的另一端与第二主体接触时,有力作用于设置于第二主体的压力传感器,压力传感器的电极之间的电容改变,电子设备确定待测物体与第二主体接触。反之,未接触时,设置于第二主体的压力传感器的电极之间的电容不变,电子设备确定待测物体与第二主体未接触。当电子设备确定物体与第一主体接触且物体与第二主体接触时,执行步骤1504。当电子设备确定物体与第一主体未接触或物体与第二主体未接触时,重复执行步骤1503。
步骤1504、电子设备识别第一主体和第二主体之间的角度ɑ。
示例性的,如图17(b)所示,第一主体和第二主体之间的角度为主体302与主体303之间的角度。或者,如图17(e)所示,第一主体和第二主体之间的角度为主体404与主体405之间的角度。电子设备识别第一主体和第二主体之间的角度的方法,参见上述实施例,在此不再赘述。
步骤1505、电子设备识别触点到连接第一主体和第二主体的连接单元的距离。
具体地,电子设备识别触点到连接第一主体和第二主体的连接单元的距离L 1
示例性的,如图16(b)所示,触点到连接第一主体和第二主体的连接单元的距离为点604到连接单元301的距离。或者,如图16(e)所示,触点到连接第一主体和第二主体的连接单元的距离为点605到连接单元402的距离。电子设备识别所述距离的方法,参见上述 实施例,在此不再赘述。
或者,电子设备识别第一触点到连接单元的距离L 2和第二触点到连接单元的距离L 3。电子设备所述距离的方法,参见上述实施例,在此不再赘述。
步骤1506、电子设备根据所述角度和所述距离计算待测物体的高度。
具体地,电子设备可以根据所述角度ɑ和所述距离L 1计算待测物体的高度h。
由角度ɑ和距离L 1,电子设备可以根据公式1求得待测物体的高度h。
或者,电子设备可以根据所述角度ɑ、所述距离L 2、所述距离L 3计算待测物体的高度h。由角度ɑ、所述距离L 2、所述距离L 3,电子设备可以根据公式6求得待测物体的高度h。
步骤1507、电子设备输出所述高度h。
示例性的,如图17(c)和17(f)所示,电子设备可以在显示屏194上显示所述高度h。可选的,为了方便用户查看,如图17(c)所示,电子设备可以在覆盖第二主体的显示屏194上显示所述高度;或者,如图17(f)所示,电子设备可以在覆盖于第一主体和第二主体以外的其他主体(如,主体403)的显示屏194上显示所述高度。
或者,电子设备可以语音输出所述高度h。示例性的,电子设备可以输出“测量物体的高度为5厘米”的语音消息。
需要说明的是,图15中所述的高度测量方法,通过压力传感器检测触点的位置方法以实现对物体高度的测量。可以理解的是,替代性的,电子设备也可以通过触摸传感器检测触点的位置。
或者,替代性的,如图18所示,电子设备也可以在显示屏上显示基准线,让用户对准所述基准线放置待测物体。
示例性的,如图18(a)所示,电子设备在主体303上显示基准线1400。所述基准线1400与连接单元301的距离为D 1。如图18(b)和图18(c)所示,用户向内弯折主体303,使得物体500的顶点与主体303接触,触点在基准线1400上。电子设备识别主体302和主体303之间的角度ɑ。电子设备根据所述距离D 1和角度ɑ计算物体的高度h,计算公式如式7所示:
h=D 1×sinɑ(式7)
可选的,为了方便用户的测量操作,当待测物体为立方体等规则物体时,如图18(d)所示,电子设备也可以在主体302上显示基准线1400,基准线1400与连接单元301的距离为D 2。如图18(e)和图18(f)所示,用户向内弯折主体303,使得物体500的顶点与主体303接触。电子设备识别主体302与主体303之间的角度ɑ。电子设备根据所述距离D2和角度ɑ计算物体的高度h,计算公式如式8所示:
h=D 2×tanɑ(式8)
综上所述,本申请实施例提供的又一种高度测量方法,可以通过在显示屏上显示基准线,省略通过压力传感器检测触点的步骤。该方法可以用于不具备压力传感器的电子设备。
本申请实施例公开了一种电子设备,包括:显示屏;处理器;存储器;一个或多个传感器;应用程序以及计算机程序。上述各器件可以通过一个或多个通信总线连接。其中,该一个或多个计算机程序被存储在上述存储器中并被配置为被该一个或多个处理器执行,该一个或多个计算机程序包括指令,上述指令可以用于执行上述应实施例中的各个步骤。其中,上述一个或多个传感器可以包括触摸传感器,压力传感器或加速度传感器。
示例性的,上述处理器具体可以为图1所示的处理器110,上述存储器具体可以为图1 所示的内部存储器和/或外部存储器120,上述显示屏具体可以为图1所示的显示屏194,上述传感器具体可以为图1所示的传感器模块180中的一个或多个传感器,上述触摸传感器可以为图1所示的触摸传感器180K,上述压力传感器可以为图1所示的压力传感器180A,上述加速度传感器可以为图1所示的加速度传感器180E。本申请实施例对此不做任何限制。
另外,本申请实施例还提供一种电子设备上的图形用户界面(GUI),该图形用户界面具体包括电子设备在执行所述方法时显示的图形用户界面。
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (22)

  1. 一种应用于电子设备的测量高度方法,其特征在于,
    所述电子设备至少包括第一主体、第二主体以及连接所述第一主体和所述第二主体的第一连接轴,所述第一主体和所述第二主体围绕所述第一连接轴可旋转;
    当待测物体置于所述第一主体上时,所述方法包括:
    所述电子设备检测所述待测物体是否与所述第二主体接触;
    所述电子设备识别所述第一主体和所述第二主体的夹角;
    在所述待测物体与所述第二主体接触时,所述电子设备识别所述待测物体与所述第二主体的触点到所述第一连接轴的距离;
    所述电子设备根据所述夹角和所述距离得到所述待测物体的高度
    所述电子设备输出所述待测物体的高度。
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备根据所述夹角和所述距离得到所述待测物体的高度,包括:
    所述电子设备采用公式h=L 1×sinɑ,计算得到所述待测物体的高度h;
    其中,L 1是所述距离,ɑ是所述第一主体和所述第二主体的夹角。
  3. 根据权利要求1或2所述的方法,其特征在于,所述电子设备识别所述第一主体和所述第二主体的夹角,包括:
    响应于所述电子设备检测所述待测物体与所述第二主体接触,所述电子设备识别所述第一主体和所述第二主体的夹角。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,
    所述电子设备还包括压力传感器;
    所述电子设备检测所述待测物体是否与所述第二主体接触包括:
    所述电子设备通过所述压力传感器检测所述待测物体是否与所述第二主体接触。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,在所述电子设备检测是否接触所述待测物体之前,所述方法还包括:
    电子设备接收第一输入
    响应于所述第一输入,所述电子设备检测所述待测物体是否与所述第二主体接触。
  6. 一种应用于电子设备的测量高度方法,其特征在于,
    所述电子设备至少包括第一主体、第二主体以及连接所述第一主体和所述第二主体的第一连接轴,所述第一主体和所述第二主体围绕所述第一连接轴可旋转;
    所述方法包括:
    所述电子设备检测所述待测物体是否与所述第一主体接触;
    所述电子设备检测所述待测物体是否与所述第二主体接触;
    所述电子设备检测所述第一主体和所述第二主体的夹角;
    在所述待测物体与所述第一主体接触时,所述电子设备识别所述待测物体与所述第一主体的第一触点到所述第一连接轴的第一距离;
    在所述待测物体与所述第二主体接触时,所述电子设备识别所述待测物体与所述第二主体的第二触点到所述第一连接轴的第二距离;
    所述电子设备根据所述夹角、所述第一距离以及所述第二距离得到所述待测物体的高度。
  7. 根据权利要求6所述的方法,其特征在于,所述电子设备根据所述夹角、所述第一距离以及所述第二距离得到所述待测物体的高度,包括:
    所述电子设备采用公式h 2=L 2 2+L 3 2-2L 2L 3cosɑ,计算得到所述待测物体的高度h;
    其中,L 2是所述第一距离,L 3是所述第二距离,ɑ是所述第一主体和所述第二主体的夹角。
  8. 根据权利要求6或7所述的方法,其特征在于,所述电子设备识别所述第一主体和所述第二主体的夹角,包括:
    响应于所述电子设备检测所述待测物体与所述第二主体接触且所述待测物体与所述第一主体接触,所述电子设备识别所述第一主体和所述第二主体的夹角。
  9. 根据权利要求6-8所述的方法,其特征在于,
    所述电子设备还包括压力传感器;
    所述电子设备检测所述待测物体是否与所述第一主体接触包括:
    所述电子设备通过所述压力传感器检测所述待测物体是否与所述第一主体接触;
    所述电子设备检测所述待测物体是否与所述第二主体接触包括:
    所述电子设备通过所述压力传感器检测所述待测物体是否与所述第二主体接触。
  10. 根据权利要求6-9任一项所述的方法,其特征在于,在所述电子设备检测是否接触所述待测物体之前,所述方法还包括:
    电子设备接收第一输入;
    响应于所述第一输入,所述电子设备检测所述待测物体是否与所述第二主体接触;或/和
    响应于所述第一输入,所述电子设备检测所述待测物体是否与所述第一主体接触。
  11. 一种测量高度的电子设备,其特征在于,包括:
    第一主体、第二主体以及连接所述第一主体和所述第二主体的第一连接轴,所述第一主体和所述第二主体围绕所述第一连接轴可旋转;
    处理器;
    存储器,用于存储计算机程序;
    所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述电子设备执行以下步骤以测量置于所述第一主体上的待测物体的高度:
    检测所述待测物体是否与所述第二主体接触;
    识别所述第一主体和所述第二主体的夹角;
    在所述待测物体与所述第二主体接触时,识别所述待测物体与所述第二主体的触点到所述第一连接轴的距离;
    根据所述夹角和所述距离得到所述待测物体的高度
    输出所述待测物体的高度。
  12. 根据权利要求11所述的电子设备,其特征在于,所述根据所述夹角和所述距离得到所述待测物体的高度,包括:
    采用公式h=L 1×sinɑ,计算得到所述待测物体的高度h;
    其中,L 1是所述距离,ɑ是所述第一主体和所述第二主体的夹角。
  13. 根据权利要求11或12所述的电子设备,其特征在于,所述识别所述第一主体和所述第二主体的夹角,包括:
    响应于所述待测物体与所述第二主体接触,识别所述第一主体和所述第二主体的夹角。
  14. 根据权利要求11-13任一项所述的电子设备,其特征在于,还包括压力传感器;
    所述检测所述待测物体是否与所述第二主体接触包括:
    通过所述压力传感器检测所述待测物体是否与所述第二主体接触。
  15. 根据权利要求11-14任一项的电子设备,其特征在于,当所述指令被所述处理器执行时,使得所述电子设备在检测是否接触所述待测物体之前,还执行以下步骤:
    接收第一输入;
    响应于所述第一输入,检测所述待测物体是否与所述第二主体接触。
  16. 一种测量高度的电子设备,其特征在于,
    所述电子设备至少包括第一主体、第二主体以及连接所述第一主体和所述第二主体的第一连接单元轴,所述第一主体和所述第二主体围绕所述第一连接轴可旋转;
    处理器;
    存储器,用于存储计算机程序;
    所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述电子设备执行以下步骤以测量待测物体的高度:
    检测所述待测物体是否与所述第一主体接触;
    检测所述待测物体是否与所述第二主体接触;
    识别所述第一主体和所述第二主体的夹角;
    在所述第一主体与所述待测物体接触时,识别所述待测物体与所述第一主体的第一触点到所述第一连接轴的第一距离;
    在所述第二主体与所述待测物体接触时,识别所述待测物体与所述第二主体的第二触点到所述第一连接轴的第二距离;
    所述电子设备根据所述夹角、所述第一距离以及所述第二距离得到所述待测物体的高度。
  17. 根据权利要求16所述的电子设备,其特征在于,所述电子设备根据所述夹角、所述第一距离以及所述第二距离得到所述待测物体的高度,包括:
    所述电子设备采用公式h 2=L 2 2+L 3 2-2L 2L 3cosɑ,计算得到所述待测物体的高度h;
    其中,L 2是所述第一距离,L 3是所述第二距离,ɑ是所述第一主体和所述第二主体的夹角。
  18. 根据权利要求16或17所述的电子设备,其特征在于,所述识别所述第一主体和所述第二主体之间的夹角,包括:
    响应于所述电子设备检测所述待测物体与所述第二主体接触且所述待测物体与所述第一主体接触,识别所述第一主体和所述第二主体之间的夹角。
  19. 根据权利要求16-18所述的电子设备,其特征在于,
    所述电子设备还包括压力传感器;
    所述检测所述待测物体是否与所述第一主体接触包括:
    通过所述压力传感器检测所述待测物体是否与所述第一主体接触;
    所述检测所述待测物体是否与所述第二主体接触包括:
    通过所述压力传感器检测所述待测物体是否与所述第二主体接触。
  20. 根据权利要求16-19任一项所述的电子设备,其特征在于,当所述指令被所述处理器执行时,使得所述电子设备在检测是否接触所述待测物体之前,还执行以下步骤:
    接收第一输入;
    响应于所述第一输入,检测所述待测物体是否与所述第二主体接触;或/和
    响应于所述第一输入,检测所述待测物体是否与所述第一主体接触。
  21. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-10中任一项所述的方法。
  22. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-10中任一项所述的方法。
PCT/CN2020/091180 2019-05-23 2020-05-20 一种测量高度的方法和电子设备 WO2020233581A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910433040.8 2019-05-23
CN201910433040.8A CN111982037B (zh) 2019-05-23 2019-05-23 一种测量高度的方法和电子设备

Publications (1)

Publication Number Publication Date
WO2020233581A1 true WO2020233581A1 (zh) 2020-11-26

Family

ID=73436451

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/091180 WO2020233581A1 (zh) 2019-05-23 2020-05-20 一种测量高度的方法和电子设备

Country Status (2)

Country Link
CN (1) CN111982037B (zh)
WO (1) WO2020233581A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151568A1 (zh) * 2022-02-08 2023-08-17 广州视源电子科技股份有限公司 检测物体尺寸的方法、存储介质以及电子设备

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11304466A (ja) * 1998-04-16 1999-11-05 Asahi Seimitsu Kk 測量機械の機械高測定方法
WO2013032041A1 (ko) * 2011-08-26 2013-03-07 Ryoo Min-Kyu 이동통신 단말기를 이용한 거리, 높이, 길이 측정 방법
CN103344216A (zh) * 2013-07-26 2013-10-09 李良杰 高度测量仪
CN103644879A (zh) * 2013-11-25 2014-03-19 无锡莱吉特信息科技有限公司 一种高度测量工具
CN104881109A (zh) * 2014-02-28 2015-09-02 联想(北京)有限公司 一种动作识别方法、装置及电子设备
CN204924220U (zh) * 2015-04-24 2015-12-30 华中科技大学 一种适用于大型螺旋桨叶片的测厚装置
CN106918815A (zh) * 2017-04-12 2017-07-04 李良杰 激光测量仪
CN206671550U (zh) * 2017-03-28 2017-11-24 昌邑市创通电子科技有限公司 一种激光测距仪

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003269955A (ja) * 2002-03-11 2003-09-25 Junko Suginaka 距離等測定装置
CN104374264B (zh) * 2013-08-16 2017-11-24 上海汽车集团股份有限公司 测量距离及角度的量具
CN105547215A (zh) * 2015-08-18 2016-05-04 东莞酷派软件技术有限公司 一种物体尺寸测量方法及终端设备
CN105526895A (zh) * 2015-11-30 2016-04-27 北京奇虎科技有限公司 电子设备测距方法和电子设备
CN105674897B (zh) * 2015-12-30 2018-09-14 广东欧珀移动通信有限公司 测量物体高度的方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11304466A (ja) * 1998-04-16 1999-11-05 Asahi Seimitsu Kk 測量機械の機械高測定方法
WO2013032041A1 (ko) * 2011-08-26 2013-03-07 Ryoo Min-Kyu 이동통신 단말기를 이용한 거리, 높이, 길이 측정 방법
CN103344216A (zh) * 2013-07-26 2013-10-09 李良杰 高度测量仪
CN103644879A (zh) * 2013-11-25 2014-03-19 无锡莱吉特信息科技有限公司 一种高度测量工具
CN104881109A (zh) * 2014-02-28 2015-09-02 联想(北京)有限公司 一种动作识别方法、装置及电子设备
CN204924220U (zh) * 2015-04-24 2015-12-30 华中科技大学 一种适用于大型螺旋桨叶片的测厚装置
CN206671550U (zh) * 2017-03-28 2017-11-24 昌邑市创通电子科技有限公司 一种激光测距仪
CN106918815A (zh) * 2017-04-12 2017-07-04 李良杰 激光测量仪

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151568A1 (zh) * 2022-02-08 2023-08-17 广州视源电子科技股份有限公司 检测物体尺寸的方法、存储介质以及电子设备

Also Published As

Publication number Publication date
CN111982037B (zh) 2022-07-29
CN111982037A (zh) 2020-11-24

Similar Documents

Publication Publication Date Title
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2021017889A1 (zh) 一种应用于电子设备的视频通话的显示方法及相关装置
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
WO2020134869A1 (zh) 电子设备的操作方法和电子设备
WO2020253758A1 (zh) 一种用户界面布局方法及电子设备
WO2021017901A1 (zh) 一种屏幕显示方法及电子设备
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2021063237A1 (zh) 电子设备的控制方法及电子设备
WO2022127787A1 (zh) 一种图像显示的方法及电子设备
WO2021082815A1 (zh) 一种显示要素的显示方法和电子设备
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
CN113704205B (zh) 日志存储的方法、芯片、电子设备和可读存储介质
WO2021052070A1 (zh) 一种帧率识别方法及电子设备
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
WO2020024108A1 (zh) 一种应用图标的显示方法及终端
WO2022105702A1 (zh) 保存图像的方法及电子设备
WO2022170856A1 (zh) 建立连接的方法与电子设备
WO2021104122A1 (zh) 呼叫需求响应方法、装置及电子设备
WO2022143180A1 (zh) 协同显示方法、终端设备及计算机可读存储介质
WO2022095744A1 (zh) Vr显示控制方法、电子设备及计算机可读存储介质
CN113452945A (zh) 分享应用界面的方法、装置、电子设备及可读存储介质
WO2022179495A1 (zh) 一种隐私风险反馈方法、装置及第一终端设备
CN112437341B (zh) 一种视频流处理方法及电子设备
WO2020233581A1 (zh) 一种测量高度的方法和电子设备
CN116048831B (zh) 一种目标信号处理方法和电子设备

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: 20810261

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: 20810261

Country of ref document: EP

Kind code of ref document: A1