Method for determining relative direction and electronic equipment

By incorporating a rotatable millimeter-wave antenna within the electronic device to transmit and receive millimeter-wave signals and determine the rotation angle, the problem of determining the relative orientation between the target object and the electronic device is solved, enabling richer functional support.

CN121634077APending Publication Date: 2026-03-10ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively determine the relative orientation between the target object and the electronic device.

Method used

A rotatable millimeter-wave antenna is installed inside the electronic device. By transmitting and receiving millimeter-wave signals, the rotation angle of the millimeter-wave antenna is determined, thereby calculating the relative direction between the target object and the electronic device.

Benefits of technology

It enables accurate positioning of the relative orientation of target objects, supporting electronic devices to achieve more functions, such as screen control and communication performance optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121634077A_ABST
    Figure CN121634077A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a relative direction determination method and electronic equipment, the method is applied to the electronic equipment, a millimeter wave antenna is arranged in the electronic equipment, the method comprises the following steps: the millimeter wave antenna is rotated, and the millimeter wave antenna is used for transmitting a millimeter wave signal and receiving a reflected millimeter wave signal; determining a target object detected by the millimeter wave antenna based on the millimeter wave signal, and determining a rotation angle of the millimeter wave antenna; and determining the relative direction of the target object and the electronic equipment based on the rotation angle of the millimeter wave antenna.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of mobile communication technology, and in particular to a relative direction determination method and electronic device. BACKGROUND

[0002] At present, more and more sensing technologies are applied in electronic devices (such as mobile phones), which provide more and more available functions for electronic devices. For example, an electronic device equipped with an infrared sensor can be used for distance measurement and remote control; an electronic device equipped with a geomagnetic sensor can be used for accurate positioning; an electronic device equipped with a gyroscope can sense its own rotation, inclination and direction, and other motion states. However, there is currently little sensing technology that can sense the relative direction of a target object (such as a human body) and an electronic device. SUMMARY

[0003] The purpose of the embodiments of the present application is to provide a relative direction determination method and electronic device, which can at least solve the problem of being unable to determine the relative direction of a target object and an electronic device.

[0004] In a first aspect, the embodiments of the present application provide a relative direction determination method, applied to an electronic device, wherein a millimeter wave antenna is arranged in the electronic device, and the method comprises: rotating the millimeter wave antenna, the millimeter wave antenna being used for transmitting millimeter wave signals and receiving reflected millimeter wave signals; determining, based on the millimeter wave signals, that the millimeter wave antenna detects a target object, and determining a rotation angle of the millimeter wave antenna; and determining, based on the rotation angle of the millimeter wave antenna, a relative direction of the target object and the electronic device.

[0005] In a second aspect, the embodiments of the present application provide an electronic device, comprising: a rotatable millimeter wave antenna, used for transmitting millimeter wave signals and receiving reflected millimeter wave signals; a monitoring module, used for determining, based on the millimeter wave signals, that the millimeter wave antenna detects a target object, and determining a rotation angle of the millimeter wave antenna; and a data processing module, used for determining, based on the rotation angle of the millimeter wave antenna, a relative direction of the target object and the electronic device.

[0006] In a third aspect, the embodiments of the present application provide an electronic device, comprising at least one processor; and a memory storing computer executable instructions, which, when executed, cause the at least one processor to perform the steps of the method according to the first aspect.

[0007] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores at least one computer program, which, when executed by a processor, implements the steps of the method according to the first aspect.

[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising a computer program, the computer program being executed by a processor to implement the steps of the method according to the first aspect.

[0009] In the embodiment of the present application, a rotatable millimeter wave antenna is arranged in the electronic device, the millimeter wave antenna is used to emit millimeter wave signals and receive reflected millimeter wave signals, the millimeter wave antenna detects a target object based on the millimeter wave signals, the rotation angle of the millimeter wave antenna is determined, and the relative direction between the target object and the electronic device is determined based on the rotation angle of the millimeter wave antenna, which is beneficial to the electronic device to realize more functions. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0011] Figure 1 A flowchart of a method for determining a relative direction provided by an embodiment of the present application is shown;

[0012] Figure 2 A specific application diagram of the method for determining a relative direction provided by an embodiment of the present application is shown;

[0013] Figure 3 A partial structure diagram of an electronic device provided by an embodiment of the present application is shown;

[0014] Figure 4 A structure diagram of a base in an electronic device provided by an embodiment of the present application is shown;

[0015] Figure 5 A structure diagram of a base in an electronic device provided by an embodiment of the present application is shown;

[0016] Figure 6 A structure diagram of an electronic device provided by an embodiment of the present application is shown;

[0017] Figure 7 A structure diagram of an electronic device provided by an embodiment of the present application is shown;

[0018] Figure 8 A structure diagram of a millimeter wave antenna in an electronic device provided by an embodiment of the present application is shown;

[0019] Figure 9A hardware structure schematic diagram of an electronic device for performing the relative direction determination method provided by the embodiments of the present application. DETAILED DESCRIPTION

[0020] In order for those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0021] Figure 1 A flowchart schematic diagram of the relative direction determination method provided by the embodiments of the present application is shown, which can be applied to an electronic device provided with a millimeter wave antenna, such as shown in Figure 1 The method can include the following steps.

[0022] S102: Rotating the millimeter wave antenna, which is used to emit millimeter wave signals and receive the reflected millimeter wave signals.

[0023] In an embodiment, the millimeter wave antenna in the electronic device is periodically rotated (or rotated) after being started, emits millimeter wave signals and receives the reflected millimeter wave signals reflected by the obstacles, and a monitoring module in the electronic device analyzes the received millimeter wave signals to determine whether a target object is detected.

[0024] S104: Determining that the millimeter wave antenna detects a target object based on the millimeter wave signals, and determining the rotation angle of the millimeter wave antenna.

[0025] In an embodiment, it is determined that a target object is detected based on the signal strength of the millimeter wave signals that can be received by the obstacles. Of course, this embodiment can also be combined with other technical means, such as the time length during which the millimeter wave signals reflected by the obstacles can be received exceeds a first time length; at the same time, the distance between the electronic device and the obstacle is detected to be lower than a first threshold, it is determined that a target object is detected.

[0026] This embodiment can determine the rotation angle of the millimeter wave antenna after determining that a target object is detected, which is beneficial to reduce the resource overhead of continuously determining the rotation angle; of course, this embodiment can also determine the rotation angle of the millimeter wave antenna at the same time when the millimeter wave antenna is rotated, and then the rotation angle of the millimeter wave antenna at the time when the target object is detected can be determined.

[0027] S106: Determine the relative direction between the target object and the electronic device based on the rotation angle of the millimeter-wave antenna.

[0028] like Figure 2 and Figure 3 As shown, in one embodiment, assuming the millimeter-wave antenna 1 is installed inside an electronic device (such as a mobile phone) with a regular rectangular shape, the millimeter-wave antenna 1 can... Figure 2 The device rotates 360° within a two-dimensional plane, and the direction of its millimeter-wave signal transmission is parallel to the two-dimensional plane.

[0029] In one example, when the rotation angle of millimeter-wave antenna 1 is 0°, the line of sight of millimeter-wave antenna 1 and Figure 3 The arrows on the electrical connector 6 (specifically, a metal contact spring) are parallel to each other. This 0° direction can be visually marked on the base 5. When the rotatable millimeter-wave antenna 1 is applied to an electronic device, the direction of the visually marked arrows and... Figure 2 The direction A shown is parallel, meaning the above calibration is performed using the structural identification method.

[0030] Based on the rotation angle of millimeter-wave antenna 1, in Figure 2 In the example shown, the relative directions corresponding to the rotation angles of the millimeter-wave antenna 1 can be set as follows: at 0°, the transmission direction of the millimeter-wave antenna 1 is side A; at 90°, it is side B; at 180°, it is side C; at 270°, it is side D; and at 360°, it is side A. Thus, in a two-dimensional plane parallel to the side of the electronic device on which it is mounted, the transmission direction of the millimeter-wave antenna 1 has the ability to identify relative directions, that is, to determine which side of the electronic device the millimeter-wave signal is being transmitted towards.

[0031] Since the transmission speed of millimeter wave signals is equal to the speed of light, the rotation direction of the millimeter wave antenna 1 can be ignored during the time from when it transmits the millimeter wave signal to when it receives the millimeter wave signal reflected back from the obstacle. Therefore, the direction of the obstacle is the transmission direction of the millimeter wave signal, and the relative direction between the obstacle (i.e., the target object) and the electronic device can be determined.

[0032] The relative direction determination method provided in this application embodiment involves setting a rotatable millimeter-wave antenna within an electronic device. This millimeter-wave antenna is used to transmit millimeter-wave signals and receive reflected millimeter-wave signals. Based on the millimeter-wave signals, it is determined that the millimeter-wave antenna has detected a target object, and the rotation angle of the millimeter-wave antenna is determined. Based on the rotation angle of the millimeter-wave antenna, the relative direction between the target object and the electronic device can be determined, which is beneficial for the electronic device to achieve more functions.

[0033] In one embodiment, the method further includes at least one of the following:

[0034] 1) Determine the distance between the target object and the electronic device based on the time difference between the millimeter-wave signal transmitted and received by the millimeter-wave antenna.

[0035] For example, in this embodiment, the distance between the target object (the object being detected) and the electronic device is obtained by multiplying the time difference by the speed of light and then dividing by 2.

[0036] 2) Determine the material properties of the target object based on the energy and / or phase of the millimeter-wave signal transmitted and received by the millimeter-wave antenna.

[0037] This embodiment identifies the material properties of a target object by monitoring changes in relevant parameters of the reflected millimeter-wave signal, such as energy loss and phase change. For example, the energy loss range of the reflected millimeter-wave signal is: P n dB < PL < P n+1 dB, with a phase variation range of: ω n °<PC<ω n+1 ° By matching the aforementioned changes with the material property-related data in the electronic device's data storage module, the material properties of the target object can be determined, such as whether it is a human body or a metal. This determination of material properties can be performed after the millimeter-wave antenna 1 has stopped rotating. Since this action is performed electrically, its processing time should be very short, at the millisecond or even nanosecond level.

[0038] After determining the distance, material properties, or relative direction as described above, the millimeter-wave antenna 1 can continue to rotate and transmit and receive millimeter-wave signals, and then make relevant judgments and identifications on objects approaching the electronic device again. As long as the rotation speed of the millimeter-wave antenna 1 is fast enough, it can make relevant judgments on objects approaching the electronic device from different relative directions at the same time.

[0039] In one embodiment, the method further includes at least one of the following:

[0040] 1) Based on the relative direction, material properties and / or distance of the target object, determine the screen that needs to be lit or the screen that needs to be turned off, wherein the electronic device includes at least one screen.

[0041] For example, if the electronic device is a mobile phone with a dual-screen, the phone can sense and control the screen on the side closest to the human body to light up, thus realizing human-machine intelligent control to a certain extent. This example utilizes the relative direction of the target object, material characteristics (i.e., the human body), and distance.

[0042] 2) Adjust the communication performance of the communication antenna of the electronic device based on the relative direction, material properties and / or distance of the target object.

[0043] For example, in the application of antenna technology in electronic devices, the antenna module senses the material characteristics of the target object in contact with the electronic device from all directions. Then, through relevant mechanisms, the antenna module adaptively improves its performance, enriching the application scenarios of AI radio frequency signal enhancement technology, and to a certain extent, falling under the field of AI radio frequency signal enhancement technology. A specific example is reducing the transmission power of the antenna on the side of the electronic device closest to the human body, which helps reduce the impact of radiation on the human body, and so on.

[0044] In one embodiment, before rotating the millimeter-wave antenna, the method further includes: determining the wireless connection status of the electronic device; and determining that the wireless connection status matches the operating scenario requirements of the millimeter-wave antenna.

[0045] This embodiment makes the timing of the solution more reasonable by limiting the wireless connection status of the electronic device and the requirements of the operating scenario, which helps to reduce the resource consumption of the electronic device.

[0046] In one embodiment, such as Figure 3 As shown, the electronic device includes a base 5 and an electrical connector 6, the electrical connector 6 being slidably electrically connected to the base 5 to change the circuit parameter values ​​of the base 5; determining the rotation angle of the millimeter-wave antenna includes: determining the rotation angle of the millimeter-wave antenna based on the circuit parameter values ​​of the base 5 of the millimeter-wave antenna; wherein, there is a mapping relationship between multiple different circuit parameter values ​​corresponding to the base 5 and multiple different rotation angles of the millimeter-wave antenna 1.

[0047] like Figure 3 As shown, the electronic device may further include a rotating shaft 4, the bottom end of the electrical connector 6 is connected to the rotating shaft 4, the top end of the electrical connector 6 is slidably electrically connected to the first end of the base 5, the second end of the base 5 and the electrical connector 6 are both electrically connected to the circuit status module C2, and the circuit status module C2 is used to monitor the circuit parameter values.

[0048] In one embodiment, the base 5 includes a resistive element, and the circuit parameter values ​​of the base 5 include the resistance value of the resistive element, which increases as the rotation angle increases.

[0049] Figure 4This is a schematic diagram of the base 5 of the variable resistor. The resistance of this variable resistor is uniform per unit length. The total resistance of the base 5 divided by 360 is the increase in resistance of the millimeter-wave antenna 1 for every 1° rotation. Here, the negative terminal is set to the 0-resistance point, which is the 0° rotation angle of the millimeter-wave antenna 1. Therefore, the rotation angle of the millimeter-wave antenna 1 can be determined.

[0050] By measuring the change in resistance of the base 5, and then through a relevant calibration mechanism combined with the transmission direction of the millimeter-wave antenna 1, the electronic device can sense the approach of an object in its relative direction.

[0051] In one embodiment, the base 5 includes a capacitor element, and the circuit parameter values ​​of the base include the capacitance value of the capacitor element, which decreases as the rotation angle increases.

[0052] Figure 5 The diagram shows the structure of the base 5 of the variable capacitor. The total capacitance of the base 5 gradually decreases with the number of capacitors connected in series, rather than changing linearly. Therefore, a direct calibration method can be used. That is, when the rotation angle of the millimeter-wave antenna 1 is 0°, the measured capacitance is 0 pF and calibrated; when the rotation angle is 90°, the measured capacitance is K1 pF and calibrated; when the rotation angle is 180°, the measured capacitance is K2 pF and calibrated; when the rotation angle is 270°, the measured capacitance is K3 pF and calibrated; when the rotation angle is 360°, the measured capacitance is K4 pF and calibrated. Of course, the calibration granularity can be finer, for example, calibrated in 5° increments. Thus, the rotation angle of the millimeter-wave antenna 1 can be determined.

[0053] By measuring the change in capacitance of base 5, and then using a relevant calibration mechanism in conjunction with the transmission direction of millimeter-wave antenna 1, the electronic device can sense the approach of an object in its relative direction.

[0054] In one embodiment, the base includes a filter circuit, and the circuit parameter values ​​of the base include the path insertion loss value of the filter circuit, which increases with the increase of the rotation angle.

[0055] based on Figure 5In the example shown, each capacitor is replaced with a filter circuit unit consisting of resistors, inductors, and capacitors. The input and output terminals of the base 5 can be connected to the circuit status module C2 via an RF transmission line. The rotation angle of the millimeter-wave antenna 1 is calibrated by testing the insertion loss value of the entire path. For example: when the rotation angle of the millimeter-wave antenna 1 is 0°, the measured insertion loss value is 0dB and calibrated; when the rotation angle of the millimeter-wave antenna 1 is 90°, the measured insertion loss value is IL1dB and calibrated; when the rotation angle of the millimeter-wave antenna 1 is 180°, the measured insertion loss value is IL2dB and calibrated; when the rotation angle of the millimeter-wave antenna 1 is 270°, the measured insertion loss value is IL3dB and calibrated; when the rotation angle of the millimeter-wave antenna 1 is 360°, the measured insertion loss value is IL4dB and calibrated. Of course, the granularity of calibration can be finer, for example, calibrated in 5° increments.

[0056] By measuring the change in the circuit insertion loss value of the base 5, and then through a relevant calibration mechanism combined with the transmission direction of the millimeter-wave antenna 1, the electronic device can sense the approach of an object in its relative direction.

[0057] Figure 6 The diagram shows the structure of an electronic device 600 provided in an embodiment of this application. The electronic device 600 includes the following modules.

[0058] The rotatable millimeter-wave antenna 602 is used to transmit millimeter-wave signals and receive reflected millimeter-wave signals.

[0059] The monitoring module 604 is used to determine, based on the millimeter-wave signal, that the millimeter-wave antenna has detected a target object, and to determine the rotation angle of the millimeter-wave antenna.

[0060] The data processing module 606 is used to determine the relative direction between the target object and the electronic device based on the rotation angle of the millimeter-wave antenna.

[0061] In this embodiment, a rotatable millimeter-wave antenna is provided within an electronic device. This millimeter-wave antenna is used to transmit millimeter-wave signals and receive reflected millimeter-wave signals. Based on the millimeter-wave signals, it is determined that the millimeter-wave antenna has detected a target object, and the rotation angle of the millimeter-wave antenna is determined. Based on the rotation angle of the millimeter-wave antenna, the relative direction between the target object and the electronic device can be determined, which is beneficial for the electronic device to achieve more functions.

[0062] In one embodiment, the electronic device includes a base and an electrical connector, the electrical connector being slidably electrically connected to the base to change the circuit parameter values ​​of the base.

[0063] In one embodiment, the electronic device further includes a rotating shaft, the bottom end of the electrical connector is connected to the rotating shaft, the top end of the electrical connector is slidably electrically connected to the first end of the base, and the second end of the base and the electrical connector are both electrically connected to a circuit status module, which is used to monitor the circuit parameter values.

[0064] In one embodiment, the base includes a resistive element, and the circuit parameters of the base include the resistance value of the resistive element, which increases as the rotation angle increases; or, the base includes a capacitive element, and the circuit parameters of the base include the capacitance value of the capacitive element, which decreases as the rotation angle increases; or, the base includes a filter circuit, and the circuit parameters of the base include the insertion loss value of the filter circuit, which increases as the rotation angle increases.

[0065] The device 600 provided in this application embodiment can execute any of the embodiments described in the foregoing method embodiments and achieve the functions and beneficial effects of any of the embodiments described in the foregoing method embodiments, which will not be repeated here.

[0066] To illustrate in detail the method for determining relative direction and the electronic device provided in the embodiments of this application, a specific embodiment will be described below.

[0067] like Figure 7 As shown, the electronic device includes five main modules: a data storage module M1, a monitoring module M2, a data processing module M3, a control module M4, and a millimeter-wave module M5. The monitoring module M2 includes four sub-modules: an RRC monitoring module C1, a circuit status module C2, an object distance module C3, and a material properties module C4.

[0068] The data storage module M1 stores relevant data for comparison with the monitoring module M2, such as the operating scenario data and thresholds of the millimeter-wave antenna. The data processing module M3 is used to compare and analyze the data retrieved from the data storage module M1 and the monitoring module M2. The control module M4 retrieves the comparison and analysis data from the data processing module M3 and sends an operation command to the millimeter-wave module M5. After receiving the operation command from the control module M4, the millimeter-wave module M5 begins operation, monitoring the distance and characteristics of objects approaching the electronic device.

[0069] The following describes the monitoring module M2. The RRC monitoring module C1 monitors the wireless resource control status, i.e., whether the electronic device is connected to the wireless network. The circuit status module C2 monitors the circuit status of the base. The object distance module C3 monitors the distance to objects approaching the electronic device. The material properties module C4 monitors the material properties of the target object approaching the electronic device. The startup sequence of each submodule of the monitoring module M2 can be as follows: First, the RRC monitoring module C1 monitors the wireless connection status of the electronic device; second, after satisfying the first step, the circuit status module C2 begins monitoring the circuit status of the base; third, after satisfying the second step, the object distance module C3 begins monitoring the distance between the object moving towards the electronic device and the electronic device; fourth, after satisfying the third step, the material properties module C4 begins monitoring the material properties of the object approaching the electronic device. The order of steps three and four can be interchanged. Whether the conditions for each step are met is determined by the data processing module M3, and the result is then used by the detection module M2.

[0070] The following is an introduction to the M5 millimeter-wave module. Millimeter-wave modules possess the characteristics of distance measurement and energy identification, thus enabling them to test the distance to obstacles and identify the material properties of objects. For example... Figure 8 As shown, Figure 8 This is a schematic diagram of a commonly used millimeter-wave module. Its main components include a millimeter-wave antenna 1 and a millimeter-wave transceiver module 8. Of course, in other embodiments, the millimeter-wave transceiver module 8 can also be considered as part of the millimeter-wave antenna 1.

[0071] like Figure 2 As shown, the transmission direction of the millimeter-wave signal is along the line of sight of the millimeter-wave antenna 1, which is perpendicular to the two-dimensional plane composed of the millimeter-wave antenna array elements. The main components of the electronic device include: millimeter-wave antenna 1; flexible radio frequency coaxial cable 2; connecting bracket 3; rotating shaft 4; base 5; electrical connector 6, which may be a metal spring; rotary motor 7; millimeter-wave transceiver module 8; and test connection line 9.

[0072] Millimeter-wave antenna 1 and millimeter-wave transceiver module 8 work together to transmit and receive millimeter-wave signals. Millimeter-wave transceiver module 8 is fixed. Flexible RF coaxial cable 2 is used to connect millimeter-wave antenna 1 and millimeter-wave transceiver module 8. Connecting bracket 3 is used to fix millimeter-wave antenna 1 on rotating shaft 4. Rotating shaft 4 is used to drive millimeter-wave antenna 1 to rotate. Base 5 is used to identify the rotation angle of millimeter-wave antenna 1 and is fixed to the electronic device relative to millimeter-wave antenna 1. Electrical connector 6 is used for contact sliding on base 5. Rotary motor 7 is used to drive rotating shaft 4 to rotate and is mechanically connected and fixed to rotating shaft 4. Test connection cable 9 is used to connect base 5 and electrical connector 6 to circuit status module C2.

[0073] As described above, the millimeter-wave antenna 1 can rotate 360° around the rotation axis 4 in a two-dimensional plane, the base 5 can be installed in a two-dimensional plane on either side of the electronic device, and the transmission direction of the millimeter-wave antenna 1 has the ability to identify relative directions in this two-dimensional plane.

[0074] When an electronic device is in user mode, its operating steps can be as follows.

[0075] Step 1: The RRC monitoring module C1, a sub-module of monitoring module M2, starts up to monitor the wireless connection status of electronic devices, such as standard and frequency band. Its monitoring results are transmitted to data processing module M3. M3 retrieves relevant data on the operating scenario of the millimeter-wave antenna stored in data storage module M1 and compares it with the monitoring results of RRC monitoring module C1. If the results match the operating scenario of the millimeter-wave antenna, such as the connected electronic device being connected to GSM and using the Band 900 frequency band, then proceed to step 2.

[0076] Step 2: Millimeter-wave module M5 starts working. The millimeter-wave module, through the cascaded millimeter-wave transceiver module and millimeter-wave antenna, begins transmitting and receiving millimeter-wave signals. Simultaneously, control module M2 controls the rotary motor 7 to rotate, which synchronously drives the millimeter-wave antenna to rotate. Next, we proceed to step 3.

[0077] Step 3: Building upon Step 2, the circuit status module C2 of monitoring module M2 begins operation, monitoring the circuit parameters of the base in real time, such as the rotational resistance, capacitance, or insertion loss of the millimeter-wave antenna. Then proceed to Step 4.

[0078] Step 4: Based on Step 3, the object distance monitoring module C3, a sub-module of monitoring module M2, is activated to monitor the distance of the electronic device approaching the object, and then proceeds to Step 5.

[0079] Step 5: Based on Step 4, the material properties module C4 of M2 monitors the material properties of objects approaching the electronic device, and proceeds to Step 6.

[0080] Step 6: After completing the above five steps, the data processing module M3 calls the current resistance, capacitance, or insertion loss value 'a' of the base monitored by the circuit status module C2, and simultaneously calls the relevant calibration data 'b' from the data storage module. It then compares data 'a' and data 'b' to determine the relative direction of the object's approach to the electronic device, i.e., which side of the electronic device it is approaching. Based on the characteristics of the object approaching the electronic device, it performs the relevant scene-specific mechanism response actions.

[0081] It should be noted that this embodiment does not limit the order of steps four, five, and six described above.

[0082] Figure 9 The diagram illustrates the hardware structure of an electronic device implementing the embodiments of this application. Referring to the diagram, at the hardware level, the electronic device includes a processor, and may also include an internal bus, a network interface, and memory. The memory may include RAM, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for other services.

[0083] The processor, network interface, and memory can be interconnected via an internal bus, which can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be categorized as an address bus, data bus, control bus, etc. For ease of illustration, only a single bidirectional arrow is used in this diagram, but this does not imply that there is only one bus or one type of bus.

[0084] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0085] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a device at the logical level that locates the target user. The processor executes the program stored in memory and specifically performs the following: Figure 1 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.

[0086] The above is as stated in this application. Figure 1The methods disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0087] The electronic device can also execute any of the embodiments described in the foregoing method embodiments and achieve the functions and beneficial effects of any of the embodiments described in the foregoing method embodiments, which will not be repeated here.

[0088] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0089] This application also proposes a computer-readable storage medium that stores at least one computer program, which is implemented when executed by a processor. Figure 1 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the foregoing embodiments, and will not be repeated here.

[0090] The computer-readable storage medium may include, but is not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks, or key drives, etc.).

[0091] This application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, implement the following process: Figure 1 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.

[0092] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0093] The systems, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0094] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0095] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0096] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A method for determining relative direction, applied to an electronic device, wherein a millimeter wave antenna is arranged in the electronic device, and the method comprises: rotating the millimeter wave antenna, the millimeter wave antenna being configured to emit a millimeter wave signal and receive a reflected millimeter wave signal; determining that the millimeter wave antenna detects a target object based on the millimeter wave signal, and determining a rotation angle of the millimeter wave antenna; and determining a relative direction between the target object and the electronic device based on the rotation angle of the millimeter wave antenna. The method further comprises at least one of: determining a distance between the target object and the electronic device based on a time difference between the millimeter wave signal emitted by the millimeter wave antenna and the millimeter wave signal received by the millimeter wave antenna; and determining a material property of the target object based on energy and / or phase of the millimeter wave signal emitted by the millimeter wave antenna and the millimeter wave signal received by the millimeter wave antenna. The method further comprises at least one of: determining a screen that needs to be turned on or a screen that needs to be turned off based on the relative direction, the material property and / or the distance of the target object, the electronic device comprising at least one screen; and adjusting a communication performance of a communication antenna of the electronic device based on the relative direction, the material property and / or the distance of the target object. Before the rotating the millimeter wave antenna, the method further comprises: determining a wireless connection state of the electronic device; and determining that the wireless connection state matches a requirement of a running scenario of the millimeter wave antenna. The electronic device comprises a base and an electrical connector, the electrical connector being in sliding electrical connection with the base to change a circuit parameter value of the base; the determining the rotation angle of the millimeter wave antenna comprises determining the rotation angle of the millimeter wave antenna based on the circuit parameter value of the base of the millimeter wave antenna; and a mapping relationship exists between a plurality of different circuit parameter values of the base and a plurality of different rotation angles of the millimeter wave antenna. The electronic device further comprises a rotating shaft, a bottom end of the electrical connector being connected with the rotating shaft, a top end of the electrical connector being in sliding electrical connection with a first end of the base, a second end of the base and the electrical connector both being in electrical connection with a circuit state module, the circuit state module being configured to monitor the circuit parameter value.

7. The method of claim 6, wherein the base comprises a resistance element, the circuit parameter value of the base comprises a resistance value of the resistance element, and the resistance value of the resistance element increases with an increase of the rotation angle; or the base comprises a capacitance element, the circuit parameter value of the base comprises a capacitance value of the capacitance element, and the capacitance value of the capacitance element decreases with an increase of the rotation angle; or the base comprises a filter circuit, the circuit parameter value of the base comprises a pass-through insertion loss value of the filter circuit, and the pass-through insertion loss value of the filter circuit increases with an increase of the rotation angle. 8.An electronic device, comprising: a rotatable millimeter wave antenna configured to emit a millimeter wave signal and receive a reflected millimeter wave signal. ​ ​ ​ 2. The method of claim 1, wherein, ​ ​ ​ 3. The method of claim 2, wherein, ​ ​ ​ 4. The method of claim 1, wherein, ​ ​ ​ 5. The method according to any one of claims 1 to 4, wherein, ​ ​ ​ 6. The method of claim 5, wherein, ​ ​ ​ ​ ​ ​ ​ The monitoring module is configured to determine, based on the millimeter wave signal, that the millimeter wave antenna detects a target object and determine a rotation angle of the millimeter wave antenna. The data processing module is configured to determine, based on the rotation angle of the millimeter wave antenna, a relative direction between the target object and the electronic device.

9. The electronic device of claim 8, wherein, The electronic device comprises a base and an electrical connector, and the electrical connector is in sliding electrical connection with the base to change a circuit parameter value of the base.

10. The electronic device of claim 9, wherein, The electronic device further comprises a rotating shaft, a bottom end of the electrical connector is connected with the rotating shaft, and a top end of the electrical connector is in sliding electrical connection with a first end of the base. A second end of the base and the electrical connector are both in electrical connection with a circuit state module, and the circuit state module is configured to monitor the circuit parameter value.

11. The electronic device of claim 10, wherein the base comprises a resistance element, the circuit parameter value of the base comprises a resistance value of the resistance element, and the resistance value of the resistance element increases as the rotation angle increases; or the base comprises a capacitance element, the circuit parameter value of the base comprises a capacitance value of the capacitance element, and the capacitance value of the capacitance element decreases as the rotation angle increases; or the base comprises a filter circuit, the circuit parameter value of the base comprises a pass insertion loss value of the filter circuit, and the pass insertion loss value of the filter circuit increases as the rotation angle increases.