Angle determination method, electronic device and chip system

By sending and receiving sound wave signals between electronic devices and combining time difference and signal strength, the problem of non-unique angle determination of multiple electronic devices is solved, and accurate position and angle measurement is achieved.

CN114839594BActive Publication Date: 2025-09-26HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110139651.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-30
Publication Date
2025-09-26
Estimated Expiration
2041-01-30

AI Technical Summary

Technical Problem

In the prior art, when determining the relative angles between multiple electronic devices, multiple audio receiving units need to be located in a straight line, resulting in non-unique position determination.

Method used

By sending at least two sound wave signals at the first electronic device, which are received and processed by the microphone, combined with feedback from the second electronic device, the actual angle between the first and second electronic devices is determined, and the angle is calculated using information such as time difference or signal strength.

Benefits of technology

The invention realizes accurate determination of relative angles and positions between electronic devices without requiring multiple audio receiving units to be located in a straight line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114839594B_ABST
    Figure CN114839594B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of terminal technology, and provides an angle determination method, electronic device and chip system. The above method includes: sending at least two sound wave signals through a speaker; receiving at least two sound wave signals sent by a second electronic device through a microphone, and determining a first reception result of receiving at least two sound wave signals; determining a first possible angle value between the second electronic device and the first electronic device based on the first reception result; receiving a second possible angle value between the first electronic device and the second electronic device sent by the second electronic device; determining the actual angle between the first electronic device and the second electronic device based on the first possible angle value and the second possible angle value; or, sending a first possible angle value to the second electronic device; receiving the actual angle between the first electronic device and the second electronic device sent by the second electronic device. The above method can determine the actual angle between the electronic devices, and then determine the actual positions between the electronic devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an angle determination method, electronic equipment, and chip system. Background Art

[0002] As the number and variety of electronic devices continue to grow, the need for interaction between multiple electronic devices is increasing. When establishing interaction between multiple electronic devices, it is usually necessary to determine the relative angles between the electronic devices, and then implement identification and interaction between the multiple electronic devices based on these relative angles. For example, in a scenario where multiple speakers are used to achieve stereo sound effects, the sound field of the speakers can be adjusted based on the relative angles between the speakers to achieve a variety of stereo sound effects.

[0003] The process of determining the relative angle between the first and second electronic devices is described using a first electronic device and a second electronic device as examples. For example, the first electronic device includes an audio transmitting unit (e.g., a speaker), and the second electronic device includes multiple audio receiving units (e.g., microphones). The audio transmitting unit transmits an ultrasonic signal, which is received by the multiple audio receiving units. The second electronic device determines the relative angle between the first and second electronic devices based on the time difference between the multiple audio receiving units receiving the ultrasonic signal.

[0004] However, the above process requires that the second electronic device has multiple audio receiving units, and the multiple audio receiving units should be located in a straight line. Otherwise, the position of the electronic device cannot be uniquely determined according to the determined relative angle. Summary of the Invention

[0005] The present application provides an angle determination method, electronic device, and chip system, which can determine the actual angle between electronic devices and further determine the exact position between the electronic devices.

[0006] To achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides an angle determination method, which is applied to a first electronic device, and the method includes: sending at least two sound wave signals through a speaker; receiving at least two sound wave signals sent by a second electronic device through a microphone, and determining a first reception result of receiving the at least two sound wave signals; determining a first possible angle value between the second electronic device and the first electronic device based on the first reception result; receiving a second possible angle value between the first electronic device and the second electronic device sent by the second electronic device, the second possible angle value being determined based on the second reception result, and the second reception result being the reception result of the microphone of the second electronic device receiving the at least two sound wave signals; determining the actual angle between the first electronic device and the second electronic device based on the first possible angle value and the second possible angle value; or, sending the first possible angle value to the second electronic device; receiving the actual angle between the first electronic device and the second electronic device sent by the second electronic device, the actual angle being determined by the second electronic device based on the first possible angle value and the second possible angle value, the second possible angle value being determined based on the second reception result, and the second reception result being the reception result of the microphone of the second electronic device receiving the sound wave signal sent by the first electronic device.

[0008] In the above-mentioned angle determination method, the first possible angle value is obtained based on the first electronic device. For a known first possible angle value, there are two relative positions between the second electronic device and the first electronic device. Similarly, the second possible angle value is obtained based on the second electronic device. For a known second possible angle value, there are two relative positions between the second electronic device and the first electronic device. Therefore, the actual position between the first and second electronic devices cannot be determined based on the first possible angle value or the second possible angle value. The first possible angle value is the angle value of the second electronic device relative to the first electronic device, and the second possible angle value is the angle value of the first electronic device relative to the second electronic device. Therefore, the first possible angle value and the second possible angle value are relative. Therefore, based on the first possible angle value and the second possible angle value, the actual angle between the first and second electronic devices can be determined, and based on the actual angle, the actual position between the first and second electronic devices can be determined.

[0009] In the embodiment of the present application, the acoustic wave signals may be acoustic wave signals with the same time sequence or acoustic wave signals with different time sequences. The acoustic wave signals may be infrasound signals with a frequency of 0 to 20 kHz or ultrasonic signals with a frequency of 20 kHz or higher. For example, the frequencies of the acoustic wave signals may be 1 kHz, 2 kHz, 3 kHz, 5 kHz, 10 kHz, 15 kHz, 20 kHz, 30 kHz, etc.

[0010] In some embodiments, the acoustic wave signal may be an ultrasonic wave signal.

[0011] In combination with the first aspect, in some embodiments, the first reception result includes: a first time difference when the microphone of the first electronic device receives the at least two sound wave signals; or a first signal strength when the microphone of the first electronic device receives the at least two sound wave signals.

[0012] Exemplarily, the at least two sound wave signals include a first sound wave signal and a second sound wave signal. The first time difference is the difference between the time when the microphone of the first electronic device receives the first sound wave signal and the time when the microphone receives the second sound wave signal.

[0013] The first time difference can be expressed as the difference τ between the number of sampling points of the first sound wave signal and the second sound wave signal by the microphone of the first electronic device. * After the first sound wave signal and the second sound wave signal reach the microphone of the first electronic device, the microphone samples the sound at a fixed sampling frequency f. s The first sound wave signal and the second sound wave signal are sampled, for example, the sampling frequency f s Therefore, in time t, the number of sampling points collected by the microphone is t*f s For example, if the first sound wave signal arrives at the microphone first and the second sound wave signal arrives at the microphone later, the number of sampling points of the microphone for the first sound wave signal is greater than the number of sampling points for the second sound wave signal. The difference between the two sampling points is τ * It is the product of the sampling frequency and the time difference: Δt·f s , Δt is the above-mentioned first time difference.

[0014] Exemplarily, the at least two sound wave signals mentioned above include a first sound wave signal and a second sound wave signal. The first signal strength may be: the average power of the first sound wave signal and the average power of the second sound wave signal within a preset time period. Wherein, the time length of the first sound wave signal is the first time length, and the time length of the second sound wave signal is the second time length, then the preset time period may be: any value that is less than or equal to the minimum of the first time length and the second time length. Wherein, the time length of the first sound wave signal may be: the time length corresponding to the start time when the electronic device starts sending the first sound wave signal and the end time when the sending of the first sound wave signal ends. The time length of the second sound wave signal may be: the time length corresponding to the start time when the electronic device starts sending the first sound wave signal and the end time when the sending of the first sound wave signal ends.

[0015] In combination with the first aspect, in some embodiments, the above-mentioned determining the first possible angle value between the second electronic device and the first electronic device based on the first reception result includes: determining the first direction from the second electronic device to the first electronic device based on the first time difference or the first signal strength; determining the first angle between the first direction and the orientation of the first electronic device; and determining two first possible angle values ​​between the second electronic device and the first electronic device based on the first angle and the orientation of the first electronic device.

[0016] Among them, the first direction is the direction from the second electronic device to the first electronic device. For example, the first direction can be the direction from the center point of the second electronic device to the center point of the first electronic device. The first direction can be obtained by calculating the first angle of the second electronic device relative to the first electronic device. In the coordinate system of the first electronic device, the first electronic device and the second electronic device can be regarded as two mass points, and the mass point corresponding to the first electronic device is the origin of the coordinate system of the first electronic device. The first angle of the second electronic device relative to the first electronic device is: the first angle formed by the first side corresponding to 0° in the coordinate system of the first electronic device and the second side composed of the mass point corresponding to the first electronic device and the mass point corresponding to the second electronic device.

[0017] The orientation of the first electronic device may be a direction from the center point of the screen of the first electronic device to the midpoint of any side of the screen of the first electronic device. Alternatively, if the screen of the first electronic device is rectangular, the orientation of the first electronic device may be a direction perpendicular to the plane of a side wall of the first electronic device and extending from the inside of the side wall to the outside of the side wall.

[0018] The orientation of the first electronic device corresponds to an angle value in the earth coordinate system. For example, if the first electronic device is oriented toward the corresponding geomagnetic north pole, the orientation of the first electronic device can be defined as 0°; if the first electronic device is oriented toward the corresponding geomagnetic south pole, the orientation of the first electronic device can be defined as 180°. For the angle corresponding to any orientation between the geomagnetic north pole and the geomagnetic south pole in the clockwise direction, 0° to 180° can be obtained by equally dividing. For the angle corresponding to any orientation between the geomagnetic south pole and the geomagnetic north pole in the clockwise direction, 180° to 360° can be obtained by equally dividing. The two sides of an angle value in the earth coordinate system corresponding to the orientation of the first electronic device are: the side corresponding to the geomagnetic north pole from the center point of the first electronic device 100 (i.e., the side corresponding to 0°), and the side corresponding to the orientation of the first electronic device.

[0019] Exemplarily, the two sides forming the first angle are: the side corresponding to the direction from the second electronic device to the first electronic device (i.e., the first direction), and the side corresponding to the orientation of the first electronic device. The first electronic device can determine the first angle based on the first angle, the reference angle in the coordinate system of the first electronic device, and the orientation of the first electronic device. For example, the first angle is the angle formed by the line corresponding to the first angle and the line corresponding to the angle corresponding to the orientation of the first electronic device.

[0020] In one scenario, when the reference angles are 90°, 0°, and -90°, the orientation of the first electronic device is consistent with -90° in the reference angle. If the first angle is 60°, then the first angle θ 10 The angle between the line corresponding to the first angle 60° and the line corresponding to the reference angle -90° is θ 10 =|60°-(-90°)|=150°. In another scenario, for the reference angles of 90°, 0°, and -90°, if the orientation of the first electronic device is consistent with 90° in the reference angle. If the first angle is 60°, the first included angle θ 10 The angle between the line corresponding to the first angle of 60° and the line corresponding to the reference angle of 90° is θ 10 =|60°-90°|=30°.

[0021] In combination with the first aspect, in some embodiments, the first possible angle value and the second possible angle value each include two, and the above-mentioned determining the actual angle between the first electronic device and the second electronic device based on the first possible angle value and the second possible angle value includes: inverting the two second possible angle values; calculating the difference between the two inverted second possible angle values ​​and the two first possible angle values, each difference corresponding to two angle values; and determining the actual angle between the first electronic device and the second electronic device based on the two angle values ​​corresponding to the minimum value of the difference.

[0022] Exemplarily, negating the target angle may be as follows: calculating the angle corresponding to the opposite direction of the second side of the target angle. For example, the first side of angle α is the side corresponding to 0°, and the second side is the side corresponding to ray A. Then negating angle α is as follows: calculating angle β corresponding to ray B in the opposite direction of ray A. The first side of angle β is the side corresponding to 0°, and the second side is the side corresponding to ray B. Ray A and ray B are located on a straight line. Therefore, the calculation formula for angle β obtained by negating angle α is β = mod (α + 180°, 360°). If (α + 180°) < 360°, the result of (α + 180°) is used as angle β; if (α + 180°) ≥ 360°, the result of (α + 180°) - 360° is used as angle β.

[0023] The first electronic device may set the second possible angle value θ21 and θ 22 Take the inverse process and get θ′ 21 and θ′ 22 , where θ′ 21 =mod(θ 21 +180°,360°),θ′ 22 =mod(θ 22 +180°, 360°). Afterwards, the first electronic device calculates θ 11 and θ′ 21 The difference between |θ 11 -θ′ 21 |,θ 11 and θ′ 22 The difference between |θ 11 -θ′ 22 |,θ 12 and θ′ 21 The difference between |θ 12 -θ′ 21 |, and θ 12 and θ′ 22 The difference between |θ 12 -θ′ 22 |. Two second possible angle values ​​θ 21 and θ 22 Only one second angle value is the actual angle of the first electronic device relative to the second electronic device, and the other second angle value is not the actual angle of the first electronic device relative to the second electronic device. 11 and θ 12 Only one of the first angle values ​​is the actual angle of the second electronic device relative to the first electronic device; the other first angle value is not the actual angle of the second electronic device relative to the first electronic device. Furthermore, in the same coordinate system, the actual angle of the first electronic device relative to the second electronic device and the actual angle of the second electronic device relative to the first electronic device are inversely proportional to each other.

[0024] Therefore, the second possible angle value θ can be 21 and θ 22 The angle value θ′ is obtained by inverting the process. 21 and θ′ 22 There is an angle value (θ′ 21 or θ′ 22 ) and the first possible angle value θ 11 and θ 12 An angle value (θ 11 or θ 12) are substantially the same. These two substantially identical angle values ​​are the actual angles of the second electronic device relative to the first electronic device. Therefore, the first electronic device may use the two angles corresponding to the smallest difference in the differences as the actual angles of the second electronic device relative to the first electronic device. Alternatively, the first electronic device may use the average of the two angles corresponding to the smallest difference in the differences as the actual angle of the second electronic device relative to the first electronic device.

[0025] In combination with the first aspect, in some embodiments, the first electronic device has a first speaker and a second speaker, and a first microphone; the sending of at least two sound wave signals through the speaker includes: sending a first sound wave signal through the first speaker at a first moment, and sending a second sound wave signal through the second speaker at a second moment; wherein the first moment is different from the second moment, and / or the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics; the receiving of at least two sound wave signals sent by the second electronic device through the microphone includes: receiving at least two sound wave signals sent by the second electronic device through the first microphone.

[0026] In one scenario, a first electronic device has a first speaker, a second speaker, and a first microphone, and a second electronic device has a third speaker, a fourth speaker, and a second microphone. The first electronic device transmits a sound wave signal to the second electronic device via the first and second speakers. The second microphone of the second electronic device receives the sound wave signal transmitted by the first electronic device. The second electronic device transmits a sound wave signal to the first electronic device via the third and fourth speakers, and the first electronic device receives the sound wave signal transmitted by the second electronic device via the first microphone.

[0027] In one scenario, a first electronic device has a first speaker, a second speaker, and two first microphones, and a second electronic device has a third speaker and a second microphone. The first electronic device transmits a sound wave signal to the second electronic device via the first and second speakers. The second microphone of the second electronic device receives the sound wave signal transmitted by the first electronic device. The second electronic device transmits a sound wave signal to the first electronic device via the third speaker, and the first electronic device receives the sound wave signal transmitted by the second electronic device via the two first microphones.

[0028] In combination with the first aspect, in some embodiments, the first electronic device has a first speaker and a first microphone; the sending of at least two sound wave signals through the speaker includes: sending the first sound wave signal and the second sound wave signal through the first speaker; the receiving of at least two sound wave signals sent by the second electronic device through the microphone includes: the first electronic device receives at least two sound wave signals sent by the second electronic device through the first microphone.

[0029] In one scenario, a first electronic device has a first speaker and a first microphone. A second electronic device has a third speaker, a fourth speaker, and two second microphones. The first electronic device transmits a sound wave signal to the second electronic device via the first speaker. The two second microphones of the second electronic device receive the sound wave signal transmitted by the first electronic device. The second electronic device transmits a sound wave signal to the first electronic device via the third speaker and the fourth speaker, and the first electronic device receives the sound wave signal transmitted by the second electronic device via the first microphone.

[0030] In one scenario, a first electronic device has a first speaker and two first microphones. A second electronic device has a third speaker and two second microphones. The first electronic device transmits a sound wave signal to the second electronic device via the first speaker. The two second microphones of the second electronic device receive the sound wave signal transmitted by the first electronic device. The second electronic device transmits a sound wave signal to the first electronic device via the third speaker, and the first electronic device receives the sound wave signal transmitted by the second electronic device via the two first microphones.

[0031] In combination with the first aspect, in some embodiments, the above method also includes: detecting a first operation on the first target content displayed on the first electronic device; determining whether the first operation corresponds to the actual angle; if the first operation corresponds to the actual angle, the first electronic device sends the first target content to the display interface of the second electronic device for display.

[0032] The above-mentioned sending of the first target content to the display interface of the second electronic device for display may include: if the above-mentioned actual angle is that the second electronic device is located on the left side of the first electronic device, sending the first target content to the display interface of the second electronic device for display in response to the first operation; or, if the above-mentioned actual angle is that the second electronic device is located on the right side of the first electronic device, sending the first target content to the display interface of the second electronic device for display in response to the first operation; or, if the above-mentioned actual angle is that the second electronic device is located in the front and back sides of the first electronic device, not responding to the first operation, and not sending the first target content to the display interface of the second electronic device for display.

[0033] In combination with the first aspect, in some embodiments, the second electronic device includes a second electronic device located on the left side of the first electronic device and a second electronic device located on the right side of the first electronic device, and the above method also includes: detecting a second operation on the first target content displayed on the first electronic device; if the second operation is an operation to expand the first target content to the left, the first electronic device sends the first target content to the display interface of the second electronic device located on the left side of the first electronic device for display; if the second operation is an operation to expand the first target content to the right, the first electronic device sends the first target content to the display interface of the second electronic device located on the right side of the first electronic device for display.

[0034] In one scenario, the method may further include: the first electronic device generating first guidance information for guiding a user to drag the first target content to the left or right; the first electronic device receiving a drag operation on the target content; and the first electronic device responding to the drag operation by sending the first target content to a display interface of the second electronic device for display.

[0035] For example, if the second electronic device includes a second electronic device located to the left of the first electronic device, the first guidance information is used to guide the user to drag the first target content to the left. If the second electronic device includes a second electronic device located to the right of the first electronic device, the first guidance information is used to guide the user to drag the first target content to the right. If the second electronic device includes a second electronic device located to the left of the first electronic device and a second electronic device located to the right of the first electronic device, the first guidance information is used to guide the user to drag the first target content to the left or to the right.

[0036] Exemplarily, the first guidance information may be displayed in the display interface of the first electronic device in the form of text; or, the first guidance information may be displayed in the display interface of the first electronic device in the form of animation; or, the first guidance information may be displayed in the display interface of the first electronic device in the form of a combination of animation and text.

[0037] In one scenario, the first electronic device responds to a user operation and moves the first target content in a direction corresponding to the user operation. If the first target content moves to a first preset position on the display interface of the first electronic device and remains there for a first preset time, it means that the first portion of the first target content has been moved out of the display interface of the first electronic device. The second electronic device displays the first portion of the first target content, and the first electronic device displays the second portion of the first target content. The first portion and the second portion of the first target content constitute the first target content. At this point, the first electronic device and the second electronic device jointly display the first target content.

[0038] In one scenario, a first electronic device responds to a user operation by moving first target content in a direction corresponding to the user operation. If the first target content moves to a second preset position on the display interface of the first electronic device and remains there for a second preset time, it indicates that the first target content has been completely moved off the display interface of the first electronic device. At this point, the second electronic device displays the first target content, and the first electronic device no longer displays the first target content.

[0039] In combination with the first aspect, in some embodiments, if the actual angle between the second electronic device and the first electronic device changes, and the actual angle after the change is that the second electronic device is located in the front and back sides of the first electronic device, the expansion direction between the first electronic device and the second electronic device does not change; wherein the expansion direction includes expansion to the right and expansion to the left.

[0040] Here, rightward expansion may be: the user drags the first target content to the right in the display interface of the first electronic device, and the first target content is expanded to be displayed on the second electronic device located in the right area of ​​the first electronic device. Leftward expansion may be: the user drags the first target content to the left in the display interface of the first electronic device, and the first target content is expanded to be displayed on the second electronic device located in the left area of ​​the first electronic device.

[0041] For example, the second electronic device is located in the right area of ​​the first electronic device. At this time, the first electronic device sends the first target content to the display interface of the second electronic device for display. Afterwards, if the first electronic device and / or the second electronic device moves so that the second electronic device is located in the front and back area of ​​the first electronic device, the expansion direction remains unchanged to the right. At this time, the user can still send the target content to the display interface of the second electronic device for display by dragging the target content to the right. The movement of the first electronic device and / or the second electronic device includes: the movement of the second electronic device, or the movement of the first electronic device, or the movement of the first electronic device and the second electronic device.

[0042] In conjunction with the second aspect, in some embodiments, when an extended display is initiated between a first electronic device and a second electronic device, if the second electronic device is located in front of or behind the first electronic device, the first electronic device does not transmit the first target content to the second electronic device. Furthermore, the first electronic device may generate a first prompt message, the first prompt message being used to inform the user that the second electronic device is located in the front or back area of ​​the first electronic device and that the first electronic device cannot transmit the first target content to the display interface of the second electronic device for display.

[0043] In one scenario, if the first electronic device detects the third operation and the relative position information at this time indicates that the second electronic device is located in the front or back area of ​​the first electronic device, the first electronic device sends the first target content to the display interface of the second electronic device for display according to the default expansion direction or the expansion direction used by the user. The default expansion direction can be expansion to the left or expansion to the right.

[0044] In combination with the first aspect, in some embodiments, the method further includes: after the position of the first electronic device and / or the second electronic device changes, re-determining the actual angle between the second electronic device and the first electronic device.

[0045] For example, the first electronic device and the second electronic device can each detect whether their respective positions have changed using a built-in accelerometer sensor, gyroscope sensor, or magnetometer sensor. If the position of the first electronic device and / or the second electronic device changes, the actual angle between the second electronic device and the first electronic device may change. Therefore, after the position of the first electronic device and / or the second electronic device changes, the relative position information between the second electronic device and the first electronic device needs to be re-determined.

[0046] In one scenario, a first electronic device detects a change in its position using a built-in accelerometer, gyroscope, or magnetometer sensor, and notifies a second electronic device that it needs to re-determine the actual angle. The first electronic device then transmits at least two acoustic signals through a speaker, along with subsequent steps, to re-determine the actual angle between the second electronic device and the first electronic device.

[0047] In another scenario, the second electronic device detects a change in its position using a built-in accelerometer, gyroscope, or magnetometer sensor, and the second electronic device notifies the first electronic device that it needs to re-determine the actual angle. The first electronic device then performs the step of transmitting at least two acoustic wave signals through a speaker and subsequent steps to re-determine the actual angle between the second electronic device and the first electronic device.

[0048] In combination with the first aspect, in some embodiments, the above method may also include: detecting a third operation on the first target content displayed on the first sub-device, the third operation being an operation of projecting the second target content; judging whether the above actual angle meets the preset position requirements; if the above actual angle meets the preset position requirements, the first electronic device sends the second target content to the display interface of the second electronic device for display.

[0049] The preset position requirement may be that the second electronic device is located in front of or behind the first electronic device. Alternatively, the preset screen projection condition may be that the second electronic device is located to the left of the first electronic device. Alternatively, the preset screen projection condition may be that the second electronic device is located to the right of the first electronic device.

[0050] In conjunction with the first aspect, in some embodiments, the method may include: the first electronic device generating a second prompt message, the second prompt message being used to prompt a user to place the second electronic device in a target area of ​​the first electronic device, where the second target is one or more of the front, back, left, and right areas. The second prompt message can help the user place the second electronic device in the correct area to quickly achieve screen projection.

[0051] The second target content may or may not have privacy requirements. For the second target content with privacy requirements, the privacy leakage should be prevented or the risk of privacy leakage should be reduced.

[0052] In one scenario, for the second target content with privacy requirements, if the above-mentioned actual angle meets the preset position requirements and the distance between the first electronic device and the second electronic device is less than a threshold, the first electronic device sends the second target content to the display interface of the second electronic device for display. When the above-mentioned actual angle meets the preset position requirements and the distance between the first electronic device and the second electronic device is less than a threshold, the second target content with privacy requirements is sent to the second electronic device for screen projection display, which can prevent the second target content from being leaked or reduce the risk of the second target content being leaked.

[0053] In the case where a screen projection display has been established between the first electronic device and the second electronic device, if the actual angle between the second electronic device and the first electronic device changes, and the changed actual angle does not meet the preset position requirement, and / or the distance between the first electronic device and the second electronic device is greater than a threshold, the first electronic device sends a request message to the second electronic device to request the second electronic device to stop displaying the second target content.

[0054] In another scenario, for the second target content that does not have privacy requirements, if the actual angle meets the preset position requirement, the first electronic device sends the second target content to the display interface of the second electronic device for display.

[0055] In addition, for the second target content that does not have privacy requirements, when a screen projection display has been established between the first electronic device and the second electronic device, if the actual angle between the second electronic device and the first electronic device changes, and the changed actual angle does not meet the preset position requirements, and / or the distance between the first electronic device and the second electronic device is greater than the threshold, the second electronic device continues to display the second target content.

[0056] In a second aspect, an embodiment of the present application provides an angle determination method, which is applied to a first electronic device. The method includes: sending at least two sound wave signals through a first group of speakers at a first moment, and sending at least two sound wave signals through a second group of speakers at a second moment; wherein the first moment and the second moment are different, and / or the characteristics of the at least two sound wave signals sent through the first group of speakers are different from the characteristics of the at least two sound wave signals sent through the second group of speakers; receiving an actual angle between the first electronic device and the second electronic device sent by the second electronic device, the actual angle being determined by the second electronic device based on a first possible angle value and a second possible angle value, the first possible angle value being determined based on a reception result of the second electronic device's microphone receiving the at least two sound wave signals sent through the first group of speakers, and the second possible angle value being determined by the second electronic device based on a reception result of the second electronic device's microphone receiving the at least two sound wave signals sent through the second group of speakers.

[0057] In the above-mentioned angle determination method, the first possible angle value is obtained based on the first set of speakers of the first electronic device. For a known first possible angle value, there are two relative positions of the second electronic device with respect to the first electronic device. Similarly, the second possible angle value is obtained based on the first set of speakers of the first electronic device. For a known second possible angle value, there are two relative positions of the second electronic device with respect to the first electronic device. Therefore, the actual position between the first and second electronic devices cannot be determined based on the first possible angle value or the second possible angle value. However, one of the first possible angle values ​​is the actual angle between the first and second electronic devices, and one of the first possible angle values ​​is the actual angle between the first and second electronic devices. Therefore, based on the first possible angle value and the second possible angle value, the actual angle between the first and second electronic devices can be determined, and based on this actual angle, the actual position between the first and second electronic devices can be determined.

[0058] In the embodiment of the present application, the above-mentioned sound wave signals can be sound wave signals with the same time sequence, or sound wave signals with different time sequences. The above-mentioned sound wave signals can be infrasound signals with a frequency of 0 to 20 kHz, or ultrasonic signals with a frequency of 20 kHz or above. For example, the frequency of the above-mentioned sound wave signals can be 1 kHz, 2 kHz, 3 kHz, 5 kHz, 10 kHz, 15 kHz, 20 kHz, 30 kHz, etc.

[0059] In some embodiments, the acoustic wave signal may be an ultrasonic wave signal.

[0060] In one scenario, a first electronic device has a first speaker, a second speaker, and a third speaker that are not located in a straight line, the first group of speakers and the second group of speakers each include any two speakers from the first speaker, the second speaker, and the third speaker, and the speakers in the first group of speakers and the second group of speakers are not all the same.

[0061] For example, the first speaker and the second speaker constitute a first group of speakers, and the first speaker and the second speaker constitute a second group of speakers. The first electronic device can first send a sound wave signal to the second electronic device through the first group of speakers, and after completing the sending of the sound wave signal to the second electronic device through the first group of speakers, send the sound wave signal to the second electronic device through the second group of speakers. The second electronic device has a first microphone. The second electronic device receives the sound wave signal from the first electronic device through the first microphone. Since the sound wave signals sent by the two groups of speakers are sent at different times, the second electronic device can distinguish whether the received sound wave signal is a sound wave signal sent by the first group of speakers or a sound wave signal sent by the second group of speakers based on the time when the sound wave signal is received.

[0062] In one scenario, a first electronic device has a first speaker, a second speaker, a third speaker and a fourth speaker distributed in a quadrilateral, the first speaker and the third speaker are located at two opposite corners of the quadrilateral, the second speaker and the fourth speaker are located at two opposite corners of the quadrilateral, the first group of speakers includes the first speaker and the third speaker, and the first group of speakers includes the second speaker and the fourth speaker.

[0063] For example, a first electronic device may first send a sound wave signal to a second electronic device through a first set of speakers. After sending the sound wave signal to the second electronic device through the first set of speakers, the first electronic device may send the sound wave signal to the second electronic device through a second set of speakers. The second electronic device has a first microphone. The second electronic device receives the sound wave signal from the first electronic device through the first microphone. Because the sound wave signals sent by the two sets of speakers are sent at different times, the second electronic device can distinguish whether the received sound wave signal is sent by the first set of speakers or the second set of speakers based on the time of receipt of the sound wave signal.

[0064] For another example, a first electronic device simultaneously transmits a sound wave signal to a second electronic device through a first set of speakers and a second set of speakers, and the characteristics of the sound wave signal transmitted through the first set of speakers are different from those of the sound wave signal transmitted through the second set of speakers. The second electronic device includes a first microphone. The second electronic device receives the sound wave signal from the first electronic device through the first microphone. Because the characteristics of the sound wave signals transmitted by the two sets of speakers are different, the second electronic device can distinguish whether the received sound wave signal is transmitted by the first set of speakers or the second set of speakers based on the characteristics of the received sound wave signal.

[0065] In one scenario, a first electronic device has a first speaker and a second speaker, a first group of speakers includes the first speaker and the second speaker, and a second group of speakers includes the first speaker or the second speaker.

[0066] For example, the first electronic device has a first speaker and a second speaker, but may not have a microphone. The second electronic device has a first microphone, but may not have a speaker. The first electronic device first sends a sound wave signal to the second electronic device through the first speaker and the second speaker, and after the sending is completed, it sends the sound wave signal to the second electronic device through the first speaker or the second speaker. The second electronic device receives the sound wave signal from the first electronic device through the first microphone. Since the time when the sound wave signals are sent by the two groups of speakers is different, the second electronic device can distinguish whether the received sound wave signal is the sound wave signal sent by the first group of speakers or the sound wave signal sent by the second group of speakers according to the time when the sound wave signal is received.

[0067] In combination with the first aspect, in some embodiments, the above method also includes: detecting a first operation on the first target content displayed on the first electronic device; determining whether the first operation corresponds to the actual angle; if the first operation corresponds to the actual angle, the first electronic device sends the first target content to the display interface of the second electronic device for display.

[0068] In combination with the first aspect, in some embodiments, the second electronic device includes a second electronic device located on the left side of the first electronic device and a second electronic device located on the right side of the first electronic device, and the above method also includes: detecting a second operation on the first target content displayed on the first electronic device; if the second operation is an operation to expand the first target content to the left, the first electronic device sends the first target content to the display interface of the second electronic device located on the left side of the first electronic device for display; if the second operation is an operation to expand the first target content to the right, the first electronic device sends the first target content to the display interface of the second electronic device located on the right side of the first electronic device for display.

[0069] In combination with the first aspect, in some embodiments, the method further includes: after the position of the first electronic device and / or the second electronic device changes, re-determining the actual angle between the second electronic device and the first electronic device.

[0070] In a third aspect, an embodiment of the present application provides an angle determination method, which is applied to a first electronic device. The method includes: receiving at least four sound wave signals sent by a second electronic device through a microphone, the at least four sound wave signals including a first group of sound wave signals and a second group of sound wave signals, the first group of sound wave signals and the second group of sound wave signals each including at least two sound wave signals, at least two sound wave signals in each group of sound wave signals being sound wave signals with similar reception times or identical characteristics; determining a second reception result of receiving the first group of sound wave signals and a third reception result of receiving the second group of sound wave signals; based on the second reception result, determining a third possible angle value between the second electronic device and the first electronic device; based on the third reception result, determining a fourth possible angle value between the second electronic device and the first electronic device; and determining the actual angle between the first electronic device and the second electronic device according to the third possible angle value and the fourth possible angle value.

[0071] In the above-mentioned angle determination method, the third possible angle value is obtained based on the first set of sound wave signals transmitted by the second electronic device. For a known third possible angle value, there are two relative positions of the second electronic device and the first electronic device. Similarly, the second possible angle value is obtained based on the second set of speakers transmitted by the second electronic device. For a known second possible angle value, there are two relative positions of the second electronic device and the first electronic device. Therefore, the actual position between the first and second electronic devices cannot be determined based on the first or second possible angle values. However, one of the first possible angle values ​​is the actual angle between the first and second electronic devices, and another of the first possible angle values ​​is the actual angle between the first and second electronic devices. Therefore, based on the first and second possible angle values, the actual angle between the first and second electronic devices can be determined, and based on this actual angle, the actual position between the first and second electronic devices can be determined.

[0072] In combination with the third aspect, in some embodiments, the above-mentioned second reception result includes: the second time difference when the microphone of the first electronic device receives the first group of sound wave signals; or, the second signal strength when the microphone of the first electronic device receives the first group of sound wave signals; the above-mentioned third reception result includes: the third time difference when the microphone of the first electronic device receives the second group of sound wave signals; or, the third signal strength when the microphone of the first electronic device receives the second group of sound wave signals.

[0073] In combination with the third aspect, in some embodiments, the above-mentioned determination of the third possible angle value between the second electronic device and the first electronic device based on the second reception result includes: determining the second direction from the second electronic device to the first electronic device based on the second time difference or the second signal strength; determining the second angle between the second direction and the orientation of the first electronic device; and determining two second possible angle values ​​between the second electronic device and the first electronic device based on the second angle and the orientation of the first electronic device.

[0074] In combination with the third aspect, in some embodiments, the above-mentioned determination of the fourth possible angle value between the second electronic device and the first electronic device based on the third reception result includes: determining the third direction from the second electronic device to the first electronic device based on the third time difference or the third signal strength; determining the third angle between the third direction and the orientation of the first electronic device; and determining two third possible angle values ​​between the second electronic device and the first electronic device based on the third angle and the orientation of the first electronic device.

[0075] In combination with the third aspect, in some embodiments, the third possible angle value and the fourth possible angle value each include two, and the above-mentioned determining the actual angle between the first electronic device and the second electronic device based on the third possible angle value and the fourth possible angle value includes: inverting the two third possible angle values; calculating the difference between the two inverted third possible angle values ​​and the two fourth possible angle values, each difference corresponding to two angle values; and determining the actual angle between the first electronic device and the second electronic device based on the two angle values ​​corresponding to the minimum value of the difference.

[0076] In combination with the third aspect, in some embodiments, the above method also includes: detecting a first operation on the first target content displayed on the first electronic device; determining whether the first operation corresponds to the actual angle; if the first operation corresponds to the actual angle, the first electronic device sends the first target content to the display interface of the second electronic device for display.

[0077] In combination with the third aspect, in some embodiments, the second electronic device includes a second electronic device located on the left side of the first electronic device and a second electronic device located on the right side of the first electronic device, and the above method also includes: detecting a second operation on the first target content displayed on the first electronic device; if the second operation is an operation to expand the first target content to the left, the first electronic device sends the first target content to the display interface of the second electronic device located on the left side of the first electronic device for display; if the second operation is an operation to expand the first target content to the right, the first electronic device sends the first target content to the display interface of the second electronic device located on the right side of the first electronic device for display.

[0078] In combination with the third aspect, in some embodiments, the above method further includes: after the position of the first electronic device and / or the second electronic device changes, re-determining the actual angle between the second electronic device and the first electronic device.

[0079] In a fourth aspect, an embodiment of the present application provides an audio playback method, applied to a first electronic device, the method comprising: determining a first actual angle between the first electronic device and the first audio playback device, and a second actual angle between the first electronic device and the second audio playback device, using the angle determination method described in the first to third aspects; determining relative position information between the first audio playback device and the second audio playback device based on the first actual angle and the second actual angle; the relative position information including that the first audio playback device is located on a first side of the second audio playback device and the second audio playback device is located on a second side of the first audio playback device, where the first side is the left side or the right side; sending left-channel audio information to the audio playback device located on the left of the first and second audio playback devices, and sending right-channel audio information to the audio playback device located on the right of the first and second audio playback devices.

[0080] In an embodiment of the present application, the first electronic device can automatically determine the third relative position information between the first audio playback device and the second audio playback device, and then send the left channel audio information to the audio playback device located on the left, and send the right channel audio information to the audio playback device located on the right, without manually setting the positional relationship between the first audio playback device and the second audio playback device.

[0081] It should be noted that the relative position information may be: position information of the first audio playback device relative to the second audio playback device, or position information of the second audio playback device relative to the first audio playback device, which is not limited in this embodiment of the present application.

[0082] In conjunction with the fourth aspect, in some embodiments, determining the relative position information between the first audio playback device and the second audio playback device may include: determining the relative position information between the first audio playback device and the second audio playback device based on a relationship between the first actual angle and the second actual angle.

[0083] In conjunction with the fourth aspect, in some embodiments, determining the relative position information between the first audio playback device and the second audio playback device may include: determining, based on the first actual angle and the second actual angle, that the first audio playback device and the second audio playback device are respectively located in specific areas of the first electronic device; if the first audio playback device and the second audio playback device are located in two areas of the first electronic device, then the first electronic device determines third relative position information based on the positional relationship between the two areas; if the first audio playback device and the second audio playback device are located in the same area of ​​the first electronic device, then the first electronic device determines the third relative position information between the first audio playback device and the second audio playback device based on the first angle and the second angle; wherein the first angle is the angle of the first audio playback device relative to the first electronic device, and the second angle is the angle of the second audio playback device relative to the first electronic device.

[0084] In one scenario, if the first audio playback device is located in the left area of ​​the first electronic device, and the second audio playback device is located in the front, back, or right area of ​​the first electronic device, it means that the first audio playback device is located to the left of the second audio playback device. Then, the first electronic device sends the left channel audio information to the first audio playback device and sends the right channel audio information to the second audio playback device.

[0085] In one scenario, if the first audio playback device is located in the right area of ​​the first electronic device, and the second audio playback device is located in the front or back area or the left area of ​​the first electronic device, it means that the first audio playback device is located on the right side of the second audio playback device. Then the first electronic device sends the left channel audio information to the second audio playback device and sends the right channel audio information to the first audio playback device.

[0086] In one scenario, if the first audio playback device and the second audio playback device are located in the same side area of ​​the first electronic device, the first electronic device may determine the third relative position information based on the first angle and the second angle.

[0087] For example, if both the first audio playback device and the second audio playback device are located to the left of the first electronic device, the angle of the first audio playback device relative to the first electronic device is α1, the angle of the second audio playback device relative to the first electronic device is α2, and α1 is greater than α2, the first electronic device determines that the first audio playback device is to the right of the second audio playback device based on α1 and α2. The first electronic device then sends the right-channel audio information to the first audio playback device and the left-channel audio information to the second audio playback device.

[0088] If both the first audio playback device and the second audio playback device are located to the left of the first electronic device, the angle between the first audio playback device and the first electronic device is α1, the angle between the second audio playback device and the first electronic device is α2, and α1 is less than α2, the first electronic device determines, based on α1 and α2, that the first audio playback device is to the left of the second audio playback device. The first electronic device then transmits the right-channel audio information to the second audio playback device and the left-channel audio information to the first audio playback device.

[0089] In a fifth aspect, an embodiment of the present application provides an audio playback method, which is applied to a first electronic device. The method includes: determining the actual angle between the first electronic device and the second electronic device through the angle determination method in the first to third aspects; the second electronic device plays audio in a direction corresponding to the actual angle based on the actual angle.

[0090] In the above audio playback method, the second electronic device can play audio in the direction corresponding to the actual angle between the first electronic device and the second electronic device, that is, the audio sound is louder in the direction of the first electronic device and smaller in the area outside the first electronic device.

[0091] In some embodiments, the second electronic device may include an audio playback unit capable of adjusting the direction of audio playback. For example, the audio playback unit may include a directional speaker and a rotation mechanism that can rotate the directional speaker. The processor of the second electronic device may determine the target direction based on the actual angle, and then control the rotation mechanism to rotate the directional speaker so that the directional speaker plays sound toward the target direction.

[0092] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors, a memory, and a display screen; the memory and the display screen are coupled to the one or more processors, the memory is used to store computer program code, and the computer program code includes computer instructions; when the one or more processors execute the computer instructions, the electronic device executes a method as described in any one of the first aspect, or the method as described in any one of the second aspect, or the method as described in any one of the third aspect, or the method as described in any one of the fourth aspect, or the method as described in any one of the fifth aspect.

[0093] In a seventh aspect, an embodiment of the present application provides a chip system, comprising a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement the method described in any one of the first aspect, the method described in any one of the second aspect, the method described in any one of the third aspect, the method described in any one of the fourth aspect, or the method described in any one of the fifth aspect. The chip system may be a single chip or a chip module composed of multiple chips.

[0094] In an eighth aspect, an embodiment of the present application provides a chip system, comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the method described in any one of the first aspect, or the method described in any one of the second aspect, or the method described in any one of the third aspect, or the method described in any one of the fourth aspect, or the method described in any one of the fifth aspect. The chip system may be a single chip or a chip module composed of multiple chips.

[0095] In the ninth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the electronic device executes any method in the first aspect, or any method in the second aspect, or any method in the third aspect, or any method in the fourth aspect, or any method in the fifth aspect.

[0096] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method as described in any one of the first aspect, or the method as described in any one of the second aspect, or the method as described in any one of the third aspect, or the method as described in any one of the fourth aspect, or the method as described in any one of the fifth aspect.

[0097] It can be understood that the electronic device described in the sixth aspect, the chip system described in the seventh and eighth aspects, the computer program product described in the ninth aspect, and the computer-readable storage medium described in the tenth aspect are all used to execute the method provided in the first aspect, or the method provided in the second aspect, or the method provided in the third aspect, or the method provided in the third aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 A schematic diagram of a scenario of an algorithm for determining the angle between electronic devices provided in related technology 1;

[0099] Figure 2 is a schematic diagram of the angle of the electronic device 11 relative to the electronic device 12;

[0100] Figure 3 is another schematic diagram showing the angle of the electronic device 11 relative to the electronic device 12;

[0101] Figure 4 A schematic diagram of an area for electronic equipment;

[0102] Figure 5 A schematic diagram of a scenario for an algorithm for determining an angle between electronic devices provided in related technology 2;

[0103] Figure 6 A schematic diagram of a scenario for determining the position of the electronic device 11;

[0104] Figure 7 A schematic diagram of a system architecture applicable to the angle determination method provided in an embodiment of the present application;

[0105] Figure 8 A schematic structural diagram of a first electronic device provided in an embodiment of the present application;

[0106] Figure 9 A schematic diagram of the structure of a second electronic device provided in an embodiment of the present application;

[0107] Figure 10 A schematic diagram illustrating an angle between a first electronic device and a second electronic device provided in an embodiment of the present application;

[0108] Figure 11 A schematic diagram of a coordinate system and orientation of a first electronic device provided in an embodiment of the present application;

[0109] Figure 12 A schematic diagram of a coordinate system and orientation of a second electronic device provided in an embodiment of the present application;

[0110] FIG13( a ) and FIG13( b ) are schematic diagrams of angle reversal provided in an embodiment of the present application;

[0111] Figure 14 A schematic diagram of the division of various areas of a laptop computer provided in an embodiment of the present application;

[0112] Figure 15 A schematic diagram of the relationship between area division and angle of a first electronic device provided in an embodiment of the present application;

[0113] Figure 16 Schematic diagram of the extended screen application scenario provided in the embodiment of the present application;

[0114] Figure 17Schematic diagram of a secure screen projection application scenario provided in an embodiment of the present application;

[0115] Figure 18 A schematic diagram of a stereo application scenario provided in an embodiment of the present application;

[0116] Figure 19 A schematic diagram of a directional sound playback application scenario provided in an embodiment of the present application;

[0117] Figure 20 A schematic diagram of a process for determining the angle between electronic devices provided in an embodiment of the present application;

[0118] Figure 21(a) and Figure 21(b) are the same as Figure 17 Schematic diagram of the corresponding scenario;

[0119] Figure 22 A schematic diagram of a scenario for determining a first angle provided in an embodiment of the present application;

[0120] Figure 23 A schematic diagram of another scenario for determining the first angle provided in an embodiment of the present application;

[0121] FIG24( a ) and FIG24 ( b ) are schematic diagrams of scenarios for determining angles between electronic devices according to an embodiment of the present application;

[0122] FIG25( a ) and FIG25( b ) are schematic diagrams of scenarios for determining angles between electronic devices according to an embodiment of the present application;

[0123] FIG26( a ) and FIG26( b ) are schematic diagrams of scenarios for determining angles between electronic devices according to an embodiment of the present application;

[0124] FIG27( a ) and FIG27 ( b ) are schematic diagrams of scenarios for determining angles between electronic devices according to an embodiment of the present application;

[0125] FIG28( a ) and FIG28( b ) are schematic diagrams of scenarios for determining angles between electronic devices according to an embodiment of the present application;

[0126] Figures 29(a) and 29(b) are schematic diagrams of scenarios for determining angles between electronic devices provided in an embodiment of the present application. DETAILED DESCRIPTION

[0127] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0128] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0129] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0130] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0131] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0132] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0133] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.

[0134] The steps involved in the angle determination method provided in the embodiments of the present application are merely examples. Not all steps must be performed, or not all information or content in a message is mandatory. They can be increased or decreased as needed during use.

[0135] In the embodiments of the present application, the same step or steps or messages with the same function in different embodiments can be referenced to each other.

[0136] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field will know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0137] Figure 1 This is a schematic diagram of a scenario of an algorithm for determining the angle between electronic devices provided in the related art 1, wherein the scenario includes electronic device 11 and electronic device 12. Among them, electronic device 11 has at least one speaker, and electronic device 12 has at least two microphones ( Figure 1 Two microphones are shown in the figure, but the present invention is not limited thereto). A speaker of the electronic device 11 can transmit an ultrasonic signal, and each microphone of the electronic device 12 can receive the ultrasonic signal.

[0138] See also Figure 1 The algorithm for determining the angle between electronic devices may be: a speaker of electronic device 11 transmits an ultrasonic signal to electronic device 12, and two microphones of electronic device 12 receive the ultrasonic signal. Electronic device 12 determines the angle of electronic device 11 relative to electronic device 12 based on the time difference between the two microphones receiving the ultrasonic signal.

[0139] The algorithm for determining the angle between electronic devices is described in detail below using a specific example.

[0140] Electronic device 11 has a speaker, and electronic device 12 has microphones M1 and M2. For example, electronic device 11 transmits an ultrasonic signal through its speaker. Microphone M1 of electronic device 12 receives the ultrasonic signal at time T1, and microphone M2 receives the ultrasonic signal at time T2. In this case, electronic device 12 can determine the angle of electronic device 11 relative to electronic device 12 based on the difference between T1 and T2.

[0141] For example, both microphone M1 and microphone M2 can use a fixed sampling frequency f s The ultrasonic signal is sampled, for example, at a sampling frequency f s is 48KHz. That is, within time t, the number of sampling points collected by the microphone is t*f s Therefore, the time difference between the ultrasonic signal reaching the microphone M1 and the microphone M2 can be expressed as the difference between the number of sampling points of the ultrasonic signal by the microphone M1 and the number of sampling points of the ultrasonic signal by the microphone M2.

[0142] For example, the ultrasonic signal reaches microphone M1 first and then reaches microphone M2. The number of sampling points of the ultrasonic signal by microphone M1 is τ1, and the number of sampling points of the ultrasonic signal by microphone M2 is τ2, where τ1 is greater than τ2. The difference between the two sampling points is τ * =τ1-τ2. Among them, the difference in the number of sampling points τ * The time difference between the ultrasonic signal reaching the microphone M1 and the microphone M2 can be expressed as Δt·f s , Δt is the above time difference.

[0143] Assume that the distance between microphone M1 and microphone M2 is D, the distance from the speaker to microphone M1 is D1, and the distance from the speaker to microphone M2 is D2, then Then there is v is the propagation speed of the ultrasonic signal.

[0144] The following describes how to determine the angle of the electronic device 11 relative to the electronic device 12 .

[0145] In some embodiments, the position corresponding to the reference angle may be set first.

[0146] For example, the reference angle may be 90°, -90°, and 0°. Figure 2 As shown, microphone M1 is located to the left of microphone M2, and the angle of electronic device 11 relative to electronic device 12 is 90°. This means that electronic device 11 is located to the right of electronic device 12, and electronic device 11 is located on the line connecting the two microphones of electronic device 12, and D1-D2=D. The angle of electronic device 11 relative to electronic device 12 is -90°. This means that electronic device 11 is located to the left of electronic device 12, and electronic device 11 is located on the line connecting the two microphones of electronic device 12, and D1-D2=-D. The angle of electronic device 11 relative to electronic device 12 is 0°. This means that electronic device 11 is located on the perpendicular bisector of the line connecting the two microphones of electronic device 12, and D1-D2=0.

[0147] For another example, the reference angle may be 0°, 90°, and 180°. Figure 3As shown, microphone M1 is located to the left of microphone M2, and the angle of electronic device 11 relative to electronic device 12 is 0°. It can be that electronic device 11 is located in the right area of ​​electronic device 12, and electronic device 11 is located on the line connecting the two speakers of electronic device 12, and D1-D2=D. The angle of electronic device 11 relative to electronic device 12 is 90°. It can be that electronic device 11 is located in the front and back areas of electronic device 12, and electronic device 11 is located on the perpendicular bisector of the line connecting the two speakers of electronic device 12, and D1-D2=D. The angle of electronic device 11 relative to electronic device 12 is 180°. It can be that electronic device 11 is located to the left area of ​​electronic device 12, and electronic device 11 is located on the line connecting the two speakers of electronic device 12, and D1-D2=D.

[0148] Afterwards, the angle θ of the electronic device 11 relative to the electronic device 12 may be determined based on the reference angle and the relationship between D1 - D2 and D.

[0149] For example, when the reference angles are 90°, 0°, and -90°, the angle θ of the electronic device 11 relative to the electronic device 12 can be approximately By the formula It can be seen that Therefore, the angle θ can be approximated as

[0150] For another example, when the reference angles are 0°, 90°, and 180°, the angle θ of the electronic device 11 relative to the electronic device 12 can be approximately: By the formula It can be seen that Therefore, the angle θ can be approximated as

[0151] In this embodiment, the angle of the electronic device 11 relative to the electronic device 12 can be determined based on the time difference between the two microphones of the electronic device 12 receiving the ultrasonic signal.

[0152] To illustrate the problems existing in the related art 1, the area of ​​the electronic device 12 is first described.

[0153] See also Figure 4 In some embodiments, the areas of the electronic device 12 may include a left area, a right area, and front and back areas.

[0154] For example, the electronic device 11 transmits a sound wave signal through a speaker, the microphone M1 of the electronic device 12 receives the sound wave signal at time T1, and the microphone M2 receives the sound wave signal at time T2, and the microphone M1 is located to the left of the microphone M2. Then, according to |T1-T2| and the threshold The position of the electronic device 11 relative to the electronic device 12 is determined based on the relationship between the two, where D is the distance between the microphone M1 and the microphone M2.

[0155] For example, if T1 is earlier than T2 and |T1-T2|>t1, then electronic device 11 is located in the left area of ​​electronic device 12. If T1 is later than T2 and |T1-T2|>t1, then electronic device 11 is located in the right area of ​​electronic device 12. If |T1-T2|≤t1, that is, the sound wave signals arrive at microphone M1 and microphone M2 almost simultaneously, then electronic device 11 is located in the front and back areas of electronic device 12.

[0156] It should be noted that, in different application scenarios, the area of ​​the electronic device 12 can be divided into two areas or four or more areas according to actual needs, and is not limited to three areas.

[0157] like Figure 2 As shown, if the angle of electronic device 11 relative to electronic device 12 is 45°, electronic device 11 can be located in the right area of ​​electronic device 12, and the angle between the line connecting electronic device 11 and electronic device 12 and the line connecting microphones M1 and M2 is 45°. Similarly, if the angle of electronic device 11 relative to electronic device 12 is -45°, electronic device 11 can be located in the left area of ​​electronic device 12, and the angle between the line connecting electronic device 11 and electronic device 12 and the line connecting microphones M1 and M2 is 45°. If the angle of electronic device 11 relative to electronic device 12 is 0°, electronic device 11 can be located at two symmetrical positions on the perpendicular bisector of the line connecting the two microphones of electronic device 12.

[0158] Therefore, it can be seen that the angle of electronic device 11 relative to electronic device 12 determined according to the first related art cannot uniquely determine the position of electronic device 11 relative to electronic device 12. If the position of electronic device 11 relative to electronic device 12 is to be uniquely determined, electronic device 12 needs to have at least three microphones that are not in a straight line.

[0159] Figure 5 This is a schematic diagram of a scenario for the algorithm for determining the angle between electronic devices provided in Related Art 2. The scenario includes electronic device 21 and electronic device 22. Electronic device 21 has at least one speaker, and electronic device 22 has at least three microphones, and the three microphones are not located in a straight line. One speaker of electronic device 21 can emit ultrasonic signals, and each microphone of electronic device 22 can receive the ultrasonic signals.

[0160] See also Figure 5The algorithm for determining the angle between electronic devices in the second related art may be: the speaker of electronic device 21 transmits an ultrasonic signal to electronic device 22, each microphone of electronic device 22 receives the ultrasonic signal, and electronic device 22 determines the angle of electronic device 21 relative to electronic device 22 based on the time difference between the three microphones receiving the ultrasonic signal. The three microphones should not be located in a straight line.

[0161] The algorithm for determining the angle between electronic devices is described in detail below using a specific example.

[0162] Electronic device 21 has a speaker, and electronic device 22 has microphones M3, M4, and M5, and microphones M3, M4, and M5 are not located in a straight line. For example, electronic device 21 transmits an ultrasonic signal through its speaker, and microphone M3 of electronic device 22 receives the ultrasonic signal at time T3, microphone M4 receives the ultrasonic signal at time T4, and microphone M5 receives the ultrasonic signal at time T5. In this case, electronic device 22 or electronic device 21 can determine the angle of electronic device 21 relative to electronic device 22 based on the difference between T3, T4, and T5.

[0163] For example, the microphones M3, M4 and M5 can each be configured to receive a fixed sampling frequency f s The ultrasonic signal is sampled. That is, within time t, the number of sampling points collected by the microphone is t*f s Therefore, the time difference between the ultrasonic signal reaching microphone M3 and microphone M4 can be expressed as the difference between the number of sampling points for the ultrasonic signal at microphone M3 and the number of sampling points for the ultrasonic signal at microphone M4. The time difference between the ultrasonic signal reaching microphone M4 and microphone M5 can be expressed as the difference between the number of sampling points for the ultrasonic signal at microphone M4 and the number of sampling points for the ultrasonic signal at microphone M5. The time difference between the ultrasonic signal reaching microphone M3 and microphone M5 can be expressed as the difference between the number of sampling points for the ultrasonic signal at microphone M3 and the number of sampling points for the ultrasonic signal at microphone M5.

[0164] For the relationship between the above time difference and the difference in the number of sampling points, please refer to the related technology 1, which will not be repeated here.

[0165] After obtaining the three time differences, the position of electronic device 21 relative to electronic device 22 can be determined based on the three time differences. Then, the angle of electronic device 21 relative to electronic device 22 can be determined based on the position of electronic device 21 relative to electronic device 22.

[0166] For example, Figure 6As shown, based on the time difference between the ultrasonic signal reaching the microphone M3 and the microphone M4, a curve L1 in the hyperbola with the microphone M3 and the microphone M4 as the focus can be obtained. That is, the curve L1 is the possible position of the electronic device 21. The electronic device 21 is located at each point on the curve L1, and the time difference between the ultrasonic signal sent by the electronic device 21 and the arrival of the microphone M3 and the microphone M4 is a fixed value. Similarly, based on the time difference between the ultrasonic signal reaching the microphone M4 and the microphone M5, the curve L2 can be obtained. Based on the time difference between the ultrasonic signal reaching the microphone M3 and the microphone M5, the curve L3 can be obtained. The intersection of the curves L1, L2 and L3 ( Figure 6 The position of the electronic device 21 relative to the electronic device 22 is represented by the dotted line in FIG.

[0167] In this embodiment, the angle of the electronic device 21 relative to the electronic device 22 can be uniquely determined based on the time difference between the three microphones of the electronic device 22 receiving the ultrasonic signal.

[0168] However, the related art 2 requires that the electronic device 22 has three microphones that are not in a straight line, while among existing electronic devices, there are very few electronic devices that have three microphones that are not in a straight line.

[0169] Figure 7 FIG. 1 shows a schematic diagram of a system architecture applicable to the angle determination method provided in the embodiment of the present application. Figure 7 As shown, the system architecture may include: a first electronic device 100 and a second electronic device 200.

[0170] The first electronic device 100 and the second electronic device 200 may each include an audio transmitting unit and / or an audio receiving unit. The audio transmitting unit is a unit capable of transmitting sound wave signals, such as a speaker. The audio receiving unit is a unit capable of receiving sound wave signals, such as a microphone.

[0171] The acoustic wave signal may be an infrasonic signal with a frequency of 0 to 20 kHz, or an ultrasonic signal with a frequency of 20 kHz or higher, which is not limited in the present embodiment. For example, the frequency of the acoustic wave signal may be 1 kHz, 2 kHz, 3 kHz, 5 kHz, 10 kHz, 15 kHz, 20 kHz, 30 kHz, etc.

[0172] In some embodiments, the audio transmitting unit of the first electronic device 100 may be a speaker, and the audio receiving unit may be a microphone. Figure 8, the first electronic device 100 may include a first speaker unit 110 and / or a first microphone unit 120, a first memory 140, a first processor 130, and a computer program stored in the first memory 140 and executable on the first processor 130. The first speaker unit 110 includes a speaker Y 11 To speaker Y 1n The first microphone unit 120 includes a microphone M 11 To microphone M 1m , m and n are natural numbers.

[0173] For example, the computer program may be divided into one or more modules / units, one or more modules / units being stored in the first memory 140 and executed by the first processor 130 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the first electronic device 100.

[0174] For example, the first memory 140 is used to store first instructions, audio files, etc. The first speaker unit 110, the first microphone unit 120, and the first memory 140 can be connected to the first processor 130 via a bus to exchange data. The first processor 130 is used to call the first instructions and audio files in the first memory 140, and control one or more speakers in the first speaker unit 110 to transmit sound wave signals based on the first instructions and audio files. The first processor 130 is used to call the first instructions and audio files in the first memory 140, and control one or more microphones in the first microphone unit 110 to receive sound wave signals based on the first instructions and audio files.

[0175] In some embodiments, the audio transmitting unit of the second electronic device 200 may be a speaker, and the audio receiving unit may be a microphone. Figure 9 The second electronic device 200 may include a second speaker unit 210 and / or a second microphone unit 220, a second memory 240, a second processor 230, and a computer program stored in the second memory 240 and executable on the second processor 230. The second speaker unit 210 includes a speaker Y 21 To speaker Y 2p The second microphone unit 220 includes a microphone M 21 To microphone M 2q , p and q are natural numbers.

[0176] For example, the computer program may be divided into one or more modules / units, one or more modules / units being stored in the second memory 240 and executed by the second processor 230 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the second electronic device 200.

[0177] For example, the second memory 240 is used to store a second instruction, an audio file, etc. The second speaker unit 210, the second microphone unit 220, and the second memory 240 can be connected to the second processor 230 via a bus to exchange data. The second processor 230 is used to call the second instruction in the second memory 240 and control one or more speakers in the second speaker unit 210 to transmit sound wave signals based on the second instruction and the audio file. The second processor 230 is used to call the second instruction in the second memory 240 and control one or more microphones in the second microphone unit 220 to receive sound wave signals based on the second instruction and the audio file.

[0178] It should be noted that the first electronic device 100 may have only the first speaker unit 110, or only the first microphone unit 120, or the first speaker unit 110 and the first microphone unit 120. Similarly, the second electronic device 200 may have only the second speaker unit 210, or only the second microphone unit 220, or the second speaker unit 210 and the second microphone unit 220.

[0179] In some embodiments, the audio transmitting unit and the audio receiving unit of the first electronic device 100 and the second electronic device 200 can be divided into two audio transceiver units. Each audio transceiver unit includes at least one audio transmitting unit of the first electronic device 100 and at least one audio receiving unit of the second electronic device 200. Alternatively, each audio transceiver unit includes at least one audio receiving unit of the first electronic device 100 and at least one audio transmitting unit of the second electronic device 200.

[0180] Taking two audio transceiver units, namely a first audio transceiver unit and a second audio transceiver unit, as an example, how to determine the angle of the first electronic device 100 relative to the second electronic device 200 is described.

[0181] See also Figure 10, the first electronic device 100 determines the first angle between the first direction and the orientation of the first electronic device. The first direction is the direction from the second electronic device 200 to the first electronic device 100. For example, the first direction can be the direction from the center point of the second electronic device 200 to the center point of the first electronic device 100. The first direction can be obtained by calculating the first angle of the second electronic device 200 relative to the first electronic device 100. The first angle of the second electronic device 200 relative to the first electronic device 100 can be referenced Figure 2 and Figure 3 The algorithm in is determined.

[0182] See also Figure 2 and Figure 3 In the coordinate system of the first electronic device, the first electronic device 100 and the second electronic device 200 can be regarded as two mass points, the mass point corresponding to the first electronic device 100 is the origin of the coordinate system of the first electronic device, and the first angle of the second electronic device 200 relative to the first electronic device 100 is: the first angle formed by the first side corresponding to 0° in the coordinate system of the first electronic device, the second side composed of the mass point corresponding to the first electronic device 100 and the mass point corresponding to the second electronic device 200.

[0183] For reference angles of 90°, 0°, and -90°, if the first side is rotated clockwise by the first angle with respect to the origin of the coordinate system, the first angle formed by the first side and the second side is positive; if the first side is rotated counterclockwise by the first angle with respect to the origin of the coordinate system, the first angle formed by the first side and the second side is negative. For reference angles of 0°, 90°, and 180°, if the first side is rotated clockwise by the first angle with respect to the origin of the coordinate system, or if the first side is rotated counterclockwise by the first angle with respect to the origin of the coordinate system, the first angle formed by the first side and the second side is positive.

[0184] The orientation of the first electronic device can be the direction from the center point of the screen of the first electronic device to the midpoint of any side of the screen. Alternatively, if the screen of the first electronic device is rectangular, the orientation of the first electronic device can be the direction perpendicular to the plane of a side wall of the first electronic device and extending from the inside of the side wall to the outside of the side wall. The orientation of the first electronic device corresponds to an angle value in the Earth coordinate system. For example, if the first electronic device is oriented toward the Earth's magnetic north pole, the orientation of the first electronic device can be defined as 0°; if the first electronic device is oriented toward the Earth's magnetic south pole, the orientation of the first electronic device can be defined as 180°. For the clockwise angle corresponding to any orientation between the Earth's magnetic north pole and the Earth's magnetic south pole, the angle between 0° and 180° can be obtained by dividing evenly. For the clockwise angle corresponding to any orientation between the Earth's magnetic south pole and the Earth's magnetic north pole, the angle between 180° and 360° can be obtained by dividing evenly. The two sides corresponding to the angle value in the Earth coordinate system corresponding to the orientation of the first electronic device are the side from the center point of the first electronic device 100 to the Earth's magnetic north pole (i.e., the side corresponding to 0°) and the side corresponding to the orientation of the first electronic device.

[0185] like Figure 11 As shown, in the coordinate system of the first electronic device 100, if the reference angle is 90°, 0°, or -90°, the direction in which the first electronic device faces corresponds to the side corresponding to the reference angle -90°, and the direction opposite to the direction in which the first electronic device faces corresponds to the side corresponding to the reference angle 90°. If the reference angle is 0°, 90°, or 180°, the direction in which the first electronic device faces corresponds to the side corresponding to the reference angle 180°, and the direction opposite to the direction in which the first electronic device faces corresponds to the side corresponding to the reference angle 0°.

[0186] In this embodiment, the two sides forming the first angle are: a side corresponding to the direction from the second electronic device 200 to the first electronic device 100 (ie, the first direction), and a side corresponding to the direction of the first electronic device.

[0187] In some embodiments, the first electronic device 100 can determine the first angle by using the method in the related art 1 through the first audio transceiver unit. The first electronic device 100 can determine the first angle θ according to the first angle, the reference angle and the orientation of the first electronic device. 10 The specific process is referred to the following embodiment 2, which will not be described in detail here. Then, the first electronic device 100 is configured to adjust the first angle θ according to the first angle θ. 10 and the orientation of the first electronic device, two first possible angle values ​​θ of the second electronic device 200 relative to the first electronic device 100 can be determined. 11 and θ 12 For example, θ 11 =θ1+θ 10 ,θ 12 =θ1-θ10 , the angle θ1 corresponding to the orientation of the first electronic device is an angle based on the earth coordinate system. Therefore, by the formula θ 11 =θ1+θ 10 and θ 12 =θ1-θ 10 The first possible angle value θ calculated 11 and θ 12 is the angle value in the Earth coordinate system.

[0188] Similarly, see Figure 10 , the second electronic device 200 determines the second angle between the second direction and the orientation of the second electronic device. The second direction is the direction from the first electronic device 100 to the second electronic device 200. For example, the second direction can be the direction from the center point of the first electronic device 100 to the center point of the second electronic device 200. The second direction can be obtained by calculating the second angle of the first electronic device 100 relative to the second electronic device 200. The second angle of the first electronic device 100 relative to the second electronic device 200 can be referenced Figure 2 and Figure 3 The algorithm in is determined.

[0189] See also Figure 2 and Figure 3 In the coordinate system of the second electronic device, the first electronic device 100 and the second electronic device 200 can be regarded as two mass points, the mass point corresponding to the second electronic device 200 is the origin of the coordinate system of the second electronic device, and the second angle of the first electronic device 100 relative to the second electronic device 200 is: the third side corresponding to 0° in the coordinate system of the second electronic device, the fourth side formed from the mass point corresponding to the second electronic device 200 to the mass point corresponding to the first electronic device 100, forming the second angle.

[0190] For base angles of 90°, 0°, and -90°, if the third side is rotated clockwise by the second angle with respect to the origin of the coordinate system, the second angle formed by the third and fourth sides is positive; if the third side is rotated counterclockwise by the second angle with respect to the origin of the coordinate system, the second angle formed by the third and fourth sides is negative. For base angles of 0°, 90°, and 180°, if the third side is rotated clockwise by the second angle with respect to the origin of the coordinate system, or if the third side is rotated counterclockwise by the second angle with respect to the origin of the coordinate system, the second angle formed by the third and fourth sides is positive.

[0191] The orientation of the second electronic device may be the direction corresponding to the axis of symmetry in the length or width direction of the second electronic device 200. For example, the orientation of the second electronic device may be the direction corresponding to the midpoint of the bottom of the second electronic device 200 to the midpoint of the top of the second electronic device 200. The orientation of the second electronic device corresponds to an angle value in the Earth coordinate system. For example, if the second electronic device is oriented toward the Earth's magnetic north pole, the orientation of the second electronic device may be defined as 0°; if the second electronic device is oriented toward the Earth's magnetic south pole, the orientation of the second electronic device may be defined as 180°. For the angle corresponding to any orientation between the Earth's magnetic north pole and the Earth's magnetic south pole in the clockwise direction, the angle between 0° and 180° can be obtained by dividing the angle equally. For the angle corresponding to any orientation between the Earth's magnetic south pole and the Earth's magnetic north pole in the clockwise direction, the angle between 180° and 360° can be obtained by dividing the angle equally. The two sides corresponding to an angle value in the Earth coordinate system corresponding to the orientation of the second electronic device are: the side corresponding to the center point of the second electronic device 200 and the Earth's magnetic north pole (i.e., the side corresponding to 0°), and the side corresponding to the orientation of the second electronic device.

[0192] The orientation of the second electronic device corresponds to an angle value θ2 in the earth coordinate system, and also corresponds to an angle value θ2′ in the coordinate system of the second electronic device ( Figure 10 (not shown). θ2 is formed by the side corresponding to the direction of the second electronic device and the side corresponding to 0° in the earth coordinate system, and Figure 10 The side corresponding to 0° in the earth coordinate system is omitted. θ2′ is composed of the side corresponding to the direction of the second electronic device and the side corresponding to the reference angle 0° in the coordinate system of the second electronic device.

[0193] like Figure 12 As shown, in the coordinate system of the second electronic device 200, if the reference angle is 90°, 0°, or -90°, the direction in which the second electronic device faces corresponds to the side corresponding to the reference angle -90°, and the direction opposite to the direction in which the second electronic device faces corresponds to the side corresponding to the reference angle 90°. If the reference angle is 0°, 90°, or 180°, the direction in which the second electronic device faces corresponds to the side corresponding to the reference angle 180°, and the direction opposite to the direction in which the second electronic device faces corresponds to the side corresponding to the reference angle 0°.

[0194] In this embodiment, the two sides forming the second angle are: a side corresponding to the direction from the first electronic device 100 to the second electronic device 200 (ie, the second direction), and a side corresponding to the direction of the second electronic device.

[0195] In some embodiments, the second electronic device 200 can determine the second angle by using the method in the related art 1 through the second audio transceiver unit. The second electronic device 200 can determine the second angle θ according to the second angle, the reference angle and the orientation of the second electronic device. 20The specific process is referred to the following embodiment 2, which will not be described in detail here. Then, the second electronic device 200 is configured to adjust the angle θ according to the second angle θ. 20 and the orientation of the second electronic device, two second possible angle values ​​θ of the first electronic device 100 relative to the second electronic device 200 can be determined. 21 and θ 22 For example, θ 21 =θ2+θ 20 ,θ 22 =θ2-θ 20 , the angle θ2 corresponding to the direction of the second electronic device 200 is an angle based on the earth coordinate system. Therefore, by the formula and θ 21 =θ2+θ 20 and θ 22 =θ2-θ 20 The calculated second possible angle value θ 21 and θ 22 is the angle value in the Earth coordinate system.

[0196] Through the above calculation process, two first possible angle values ​​θ of the second electronic device 200 relative to the first electronic device 100 are obtained. 11 and θ 12 , and two second possible angle values ​​θ of the first electronic device 100 relative to the second electronic device 200 21 and θ 22 Among them, the first possible angle value θ 11 and θ 12 is calculated based on the first electronic device 100 and the angle θ1 corresponding to its orientation, and the second possible angle value θ 21 and θ 22 is calculated based on the angle θ2 corresponding to the second electronic device 200 and its orientation, that is, the first possible angle value θ 11 and θ 12 and the second possible angle value θ 21 and θ 22 is calculated based on different reference objects. Moreover, the first possible angle value θ 11 and θ 12 and the second possible angle value θ 21 and θ 22 The first possible angle value θ is based on the same coordinate system. 11 and θ 12 After negation, the second possible angle value θ 21 and θ 22 The first electronic device 100 is compared with the second electronic device 200, and the actual angle of the first electronic device 100 relative to the second electronic device 200 is determined according to the comparison result. Alternatively, the second possible angle value may be and After negation, the first possible angle value and A comparison is performed, and the actual angle of the second electronic device 200 relative to the first electronic device 100 is determined according to the comparison result.

[0197] In this case, negating the target angle can be performed by calculating the angle corresponding to the opposite direction of the second side of the target angle. Referring to Figure 13(a), the first side of angle α is the side corresponding to 0°, and the second side is the side corresponding to ray A. Then, negating angle α is performed by calculating angle β corresponding to ray B in the opposite direction of ray A. As shown in Figure 13(b), the first side of angle β is the side corresponding to 0°, and the second side is the side corresponding to ray B. Rays A and B lie on a straight line. The formula for calculating angle β by negating angle α is β = mod(α + 180°, 360°). If (α + 180°) < 360°, the result of (α + 180°) is used as angle β; if (α + 180°) ≥ 360°, the result of (α + 180°) - 360° is used as angle β.

[0198] Specifically, the second electronic device 200 may determine the two second possible angle values ​​θ 21 and θ 22 The first electronic device 100 sends the two second possible angle values ​​θ to the first electronic device 100. 21 and θ 22 After negation, the difference between the first possible angle value and the negated second possible angle value is calculated. The first electronic device 100 determines the actual angle of the second electronic device 200 relative to the first electronic device 100 based on the first possible angle value and the negated second possible angle value corresponding to the minimum difference.

[0199] For example, the first electronic device 100 may set the second possible angle value θ 21 and θ 22 Take the inverse process and get θ′ 21 and θ′ 22 , where θ′ 21 =mod(θ 21 +180°,360°),θ′ 22 =mod(θ 22 +180°, 360°). Afterwards, the first electronic device 100 calculates θ 11 and θ′ 21 The difference between |θ 11 -θ′ 21 |,θ 11 and θ′ 22 The difference between |θ 11 -θ′ 22 |,θ 12 and θ′ 21The difference between |θ 12 -θ′ 21 |, and θ 12 and θ′ 22 The difference between |θ 12 -θ′ 22 |. Two second possible angle values ​​θ 21 and θ 22 There is only one second angle value (for example Figure 10 θ in 22 ) is the actual angle of the first electronic device 100 relative to the second electronic device 200, and another second angle value (eg Figure 10 θ in 21 ) is not the actual angle of the first electronic device 100 relative to the second electronic device 200. Similarly, the two first possible angle values ​​θ 11 and θ 12 There is only one first angle value (for example Figure 10 θ in 12 ) is the actual angle of the second electronic device 200 relative to the first electronic device 100, and another first angle value (eg Figure 10 θ in 11 ) is not the actual angle of the second electronic device 200 relative to the first electronic device 100. Figure 10 13(a) and 13(b), in the same coordinate system, the actual angle of the first electronic device 100 relative to the second electronic device 200 (eg Figure 10 θ in 22 ), and the actual angle of the second electronic device 200 relative to the first electronic device 200 (eg Figure 10 θ in 12 ), the two actual angles are inversely related to each other. Therefore, the second possible angle value θ 21 and θ 22 The angle value θ′ is obtained by inverting the process. 21 and θ′ 22 There is an angle value (θ′ 21 or θ′ 22 ) and the first possible angle value θ 11 and θ 12 An angle value (θ 11 or θ 12) are substantially the same. These two substantially identical angle values ​​are the actual angles of the second electronic device 200 relative to the first electronic device 100. Therefore, the first electronic device 100 may use the two angles corresponding to the minimum difference as the actual angles of the second electronic device 200 relative to the first electronic device 100. Alternatively, the first electronic device 100 may use the average of the two angles corresponding to the minimum difference as the actual angle of the second electronic device 200 relative to the first electronic device 100.

[0200] Alternatively, the first electronic device 100 may determine the two first possible angle values ​​θ 11 and θ 12 The second electronic device 200 sends the two first possible angle values ​​θ to the second electronic device 200. 11 and θ 12 After negation, the difference between the second possible angle value and the negated first possible angle value is calculated. The second electronic device 200 determines the actual angle of the first electronic device 100 relative to the second electronic device 200 based on the second possible angle value corresponding to the smallest difference and the negated first possible angle value.

[0201] For example, the second electronic device 200 may set the first possible angle value θ 11 and θ 12 Take the inverse process and get θ′ 11 and θ′ 12 , where θ′ 11 =mod(θ 11 +180°,360°),θ′ 12 =mod(θ 12 +180°, 360°). Afterwards, the second electronic device 200 calculates θ 21 and θ′ 11 The difference between |θ 21 -θ′ 11 |,θ 21 and θ′ 12 The difference between |θ 21 -θ′ 12 |,θ 22 The difference between θ1′1 and θ1′1 |θ 22 -θ′ 11 |, and θ 22 and θ′ 12 The difference between |θ 22 -θ′ 12 The second electronic device 200 uses the two angles corresponding to the minimum difference as the actual angle of the first electronic device 100 relative to the second electronic device 200. Alternatively, the second electronic device 200 uses the average of the two angles corresponding to the minimum difference as the actual angle of the first electronic device 100 relative to the second electronic device 200.

[0202] In the embodiment of the present application, the first possible angle value θ 11 and θ 12 and the second possible angle value θ 21 and θ 22 These are four possible angles of the first electronic device 100 relative to the second electronic device 200 calculated based on different reference objects. Moreover, the four possible angles are angles in the same coordinate system and can be compared with each other. The difference between the first possible angle and the second possible angle is calculated, and the actual angle of the first electronic device 100 relative to the second electronic device 200 can be determined based on the two possible angles with the smallest difference. This actual angle is an angle in the earth's coordinate system and is unique. Therefore, compared with related art one, the embodiment of the present application can determine the actual position of the first electronic device 100 relative to the second electronic device 200. Moreover, compared with related art two, the embodiment of the present application only requires one microphone or two microphones, and does not require at least three microphones that are not in a straight line, so it is easier to implement.

[0203] In addition, since the actual angles are unique, the specific area where the first electronic device 100 is located in the left area, right area, front area, and rear area of ​​the second electronic device 200 can be determined based on the actual angle of the first electronic device 100 relative to the second electronic device 200. Alternatively, the specific area where the second electronic device 200 is located in the left area, right area, front area, and rear area of ​​the first electronic device 100 can be determined based on the actual angle of the second electronic device 200 relative to the first electronic device 100. The left area, right area, front area, and rear area of ​​the first electronic device 100 are as follows: Figure 14 shown.

[0204] In some embodiments, the angles corresponding to the boundary lines of the left area, the right area, the front area, and the rear area can be pre-set, and then the area in which the actual angle is located can be determined based on the pre-set areas. For example, see Figure 15The angles corresponding to the boundary lines of the left, right, front, and rear areas can be preset to 70°, 110°, 250°, and 290°. That is, if the angle of the second electronic device 200 relative to the first electronic device 100 is within the range of [70°, 110°], the second electronic device 200 is located in the front area of ​​the first electronic device 100; if the angle of the second electronic device 200 relative to the first electronic device 100 is within the range of [250°, 290°], the second electronic device 200 is located in the rear area of ​​the first electronic device 100; if the angle of the second electronic device 200 relative to the first electronic device 100 is within the range of (290°, 70°), the second electronic device 200 is located in the right area of ​​the first electronic device 100; and if the angle of the second electronic device 200 relative to the first electronic device 100 is within the range of (110°, 250°), the second electronic device 200 is located in the left area of ​​the first electronic device 100.

[0205] It should be noted that the above uses only two audio transceiver units as an example to illustrate how to determine the actual angle of the first electronic device 100 relative to the second electronic device 200, but the present invention is not limited to this. For example, the audio transmitting unit and audio receiving unit of the first electronic device 100 and the second electronic device 200 can be divided into three or more audio transceiver units. By combining any two of the three or more audio transceiver units, the actual angle of the first electronic device 100 relative to the second electronic device 200 can be determined.

[0206] Exemplarily, the first processor 130 or the second processor 230 may include one or more processing units. For example, the first processor 130 or the second processor 230 may include one or more processing units such as a central processing unit (CPU), a modem processing unit, a graphics processing unit (GPU), an image signal processing unit (ISP), a video codec unit, a digital signal processing unit (DSP), a baseband processing unit, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0207] The first processor 130 or the second processor 230 may be a central processing unit, or may be other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0208] Exemplarily, the first processor 130 or the second processor 230 may include one or more interfaces. For example, the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a secure digital input and output (SDIO) interface, a serial peripheral interface (SPI) interface, a mobile industry processor interface (MIPI), a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0209] Exemplarily, the first memory 140 and / or the second memory 240 may be an internal storage unit of the electronic device, or an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card, etc. The first memory 140 and the second memory 240 are both used to store computer programs and other programs and data required by the electronic device. The first memory 140 and the second memory 240 may also be used to temporarily store data that has been output or is about to be output.

[0210] The above bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or a Universal Serial Bus (USB). Buses can be divided into address buses, data buses, and control buses.

[0211] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100 and the second electronic device 200. In other embodiments of the present application, the first electronic device 100 and / or the second electronic device 200 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware. For example, the first electronic device 100 and / or the second electronic device 200 may also include a universal serial bus (USB) interface, a battery, a mobile communication unit, an audio unit, a speaker, a receiver, a microphone, a button, a camera, and a subscriber identification module (SIM) card interface, a pressure sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0212] For example, the first electronic device and the second electronic device may be a laptop computer, a television, a display screen, a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other electronic device. In the embodiments of the present application, there is no limitation on the specific types of the first electronic device and the second electronic device.

[0213] The following introduces four application scenarios of the angle determination method provided in the embodiments of the present application: extended screen application scenario, secure screen projection application scenario, stereo application scenario and directional playback application scenario.

[0214] 1. Extended screen application scenarios

[0215] Figure 16 This is a schematic diagram of an extended screen application scenario provided by an embodiment of the present application. The following describes this extended screen application scenario, taking a laptop as the first electronic device and a tablet as the second electronic device. In this extended screen application scenario, the content displayed on the laptop's display interface can be expanded to be displayed on the tablet's display interface.

[0216] First, pair the laptop and tablet.

[0217] In some embodiments, before establishing a pairing connection between a laptop and a tablet, the process may further include launching an extended display application. For example, a user may perform a first preset operation on the laptop, and the laptop, in response to the first preset operation, launches the extended display application. The first preset operation may be a touch operation or an operation input by the user via a mouse or keyboard.

[0218] For example, a user may perform a second preset operation in an extended display application on a laptop. In response to the second preset operation, the laptop sends a first request message to the tablet. The first request message is used to request that the laptop and the tablet establish a pairing connection. The tablet displays the first request message and receives a third preset operation input by the user. The tablet responds to the third operation and establishes a pairing connection with the laptop.

[0219] Alternatively, the extended display application in the laptop computer may not be enabled. After detecting the second preset operation, the laptop computer may determine that extended display is required, and thus send the first request information to the tablet computer.

[0220] Alternatively, before the extended display application in the laptop is started, the laptop and the tablet have already established a pairing connection. Then, after the laptop runs the extended display application, it is not necessary to send the first request information to the tablet.

[0221] For example, the laptop computer and the tablet computer may be paired and connected via a wired connection. For example, the first electronic device and the second electronic device may be paired and connected via an HDMI (High Definition Multimedia Interface).

[0222] Exemplarily, a pairing connection can be established between the laptop computer and the tablet computer via a wireless method. For example, the laptop computer and the tablet computer can establish a pairing connection by sharing an AP (Access Point). Alternatively, the laptop computer and the tablet computer can establish a pairing connection via a wireless method such as a WIFI (Wireless-Fidelity) direct connection or Bluetooth. The embodiments of the present application do not limit the specific connection method for establishing a pairing connection between the laptop computer and the tablet computer.

[0223] In one scenario, the process of establishing a pairing connection between a laptop and a tablet by sharing a same AP may include: the laptop and the tablet establishing a WIFI connection with the same AP; the laptop obtaining address information of each electronic device connected to the AP; the laptop obtaining operation information input by the user, which operation information may be a selection of an electronic device for the user to establish a pairing connection with the laptop; the laptop responds to the operation information and initiates a pairing connection establishment request to the tablet based on the address information of the tablet, the pairing connection establishment request including the address information of the laptop; the tablet responds to the pairing connection establishment request and establishes a pairing connection with the laptop based on the address information of the laptop.

[0224] In one scenario, the process of establishing a pairing connection between a laptop and a tablet computer via Wi-Fi direct connection may include: the laptop computer establishes a Wi-Fi link layer connection with the tablet computer through channel search; after the Wi-Fi link layer connection is established, the laptop computer establishes a TCP (Transmission Control Protocol) data connection with the tablet computer; the laptop computer initiates a pairing connection establishment request to the tablet computer via the TCP data connection, the pairing connection establishment request including the address information of the laptop computer; the tablet computer responds to the pairing connection establishment request and establishes a pairing connection with the laptop computer based on the address information of the laptop computer.

[0225] In one scenario, the process of establishing a pairing connection between a laptop and a tablet computer via Bluetooth may include: the laptop computer broadcasts outward via Bluetooth; the tablet computer generates a Bluetooth device list based on the received broadcast packet; the tablet computer calculates the signal strength of each Bluetooth device in the Bluetooth device list and sends a Bluetooth pairing connection request to the Bluetooth device with the largest signal strength; the laptop computer automatically pops up a pairing connection request dialog box and receives operation information input by the user, which operation information may be the user's consent to the pairing connection between the laptop computer and the tablet computer; the laptop computer responds to the operation information and establishes a Bluetooth pairing connection with the tablet computer.

[0226] Afterwards, the angle of the tablet computer relative to the laptop computer is determined using the angle determination method in the embodiment of the present application.

[0227] In this embodiment, the angle of the tablet computer relative to the laptop computer can be 0° to 360°. Figure 10 The relevant contents and subsequent Examples 1 to 7 will not be repeated here.

[0228] In the case where the laptop computer needs to extend its display onto the tablet computer, the angle between the tablet computer and the laptop computer needs to be determined. During the extended display process, if the position of the tablet computer and / or the laptop computer changes, the angle between the tablet computer and the laptop computer also needs to be re-determined. For example, if the accelerometer sensor, gyroscope sensor, or magnetometer sensor of the tablet computer detects a change in the position of the tablet computer, or if the accelerometer sensor, gyroscope sensor, or magnetometer sensor of the laptop computer detects a change in the position of the laptop computer, the laptop computer and the tablet computer may adjust the angle of the tablet computer to the same angle as the laptop computer. Figure 10 The method in is used to redefine the new angle between the tablet and the laptop.

[0229] Finally, the laptop computer sends the content displayed on the display interface of the laptop computer to the display interface of the tablet computer for display according to the angle of the tablet computer relative to the laptop computer.

[0230] In some embodiments, after obtaining the angle between the tablet computer and the laptop computer, the display can be expanded directly according to the angle. For example, the leftward or rightward expansion can be determined based on the angle and a preset angle range, with leftward expansion corresponding to one preset angle range and rightward expansion corresponding to another preset angle range. Here, rightward expansion can be: the user drags a document, web page, window, or other content to the right on the laptop computer's display interface, and the document, web page, window, or other content is sent to the tablet computer located to the right of the laptop computer for display. Leftward expansion can be: the user drags a document, web page, window, or other content to the left on the laptop computer's display interface, and the document, web page, window, or other content is sent to the tablet computer located to the left of the laptop computer for display.

[0231] Alternatively, the angle can be converted to the orientation of the tablet computer relative to the laptop computer, and the extended display can be performed based on the orientation. In the extended screen application scenario, the orientation of the tablet computer relative to the laptop computer can include: the tablet computer is located in the left area of ​​the laptop computer, the tablet computer is located in the right area of ​​the laptop computer, the tablet computer is located in the front area of ​​the laptop computer, and the tablet computer is located in the back area of ​​the laptop computer.

[0232] In some embodiments, reference may be made to Figure 14 and Figure 15 The content in is divided into the front area, back area, left area and right area of ​​the laptop.

[0233] In some embodiments, the laptop computer may have a left speaker and a right speaker. The laptop computer transmits a first sound wave signal through the left speaker and a second sound wave signal through the right speaker. The tablet computer's microphone receives the first sound wave signal at time T3 and the second sound wave signal at time T4. The laptop computer can then determine the boundary between the left area, the right area, the front area, and the back area based on T3, T4, and a threshold value t2. For example, a curve that satisfies the conditions that T3 is earlier than T4 and |T3-T4|=t2 can be used as the boundary between the right area, the front area, and the back area. A curve that satisfies the conditions that T3 is later than T4 and |T3-T4|=t2 can be used as the boundary between the left area, the front area, and the back area.

[0234] It should be noted that in the extended screen application scenario, the area around the laptop is divided into Figure 14 and Figure 15 The four regions shown are, but are not limited to, these regions. In other application scenarios, the area around the first electronic device can be divided into three regions or five or more regions based on actual needs. For example, multiple thresholds can be set, and the area around the first electronic device can be divided into five or more regions based on the relationship between |T3-T4| and each threshold.

[0235] The following uses orientation as an example to explain how to expand the content displayed on the display interface of a laptop computer to the display interface of a tablet computer.

[0236] In the embodiment of the present application, the user only needs to operate the laptop computer to expand the content displayed on the display interface of the laptop computer to be displayed on the display interface of the tablet computer.

[0237] The following describes how to extend a window from the laptop to the tablet computer, taking the tablet computer located on the right side of the laptop computer as an example.

[0238] The user drags the window to the right in the laptop display interface, and the laptop moves the first target content to the right in response to the user operation. As the user drags the window, the window moves to the right in the laptop display interface. If the window moves to the first preset position of the laptop display interface and remains there for the first preset time, it means that the first part of the window content has been moved out of the laptop display interface. The tablet computer displays the first part of the window content, and the laptop computer displays the second part of the first target content. The first part of the window content and the second part of the window content constitute the entire window. At this time, the laptop and the tablet computer display the window together. If the window moves to the second preset position of the laptop display interface and remains there for the second preset time, it means that the window has been completely moved out of the laptop display interface. At this time, the tablet computer displays all the contents of the window, and the laptop computer no longer displays the window.

[0239] In one scenario, the laptop computer may also generate first guidance information for guiding a user to drag a document, webpage, window, or other content to the left or right. The laptop computer receives a drag operation on the document, webpage, window, or other content; in response to the drag operation, the laptop computer sends the document, webpage, window, or other content to the display interface of the tablet computer for display.

[0240] For example, if the relative position information indicates that the tablet computer is located in the left area of ​​the laptop computer, the laptop computer generates the first guidance information. The first guidance information is used to guide the user: the document, web page, window and other contents displayed on the display interface of the laptop computer can be dragged to the left. Exemplarily, the first guidance information can be displayed in the display interface of the laptop computer in the form of text. For example, the first guidance information can be displayed in the display interface of the laptop computer in the form of animation. For example, the first guidance information can be displayed in a certain window, showing an animation of a person's hand dragging the window to the left. Exemplarily, the first guidance information can be displayed in the display interface of the laptop computer in the form of a combination of animation and text. For example, the laptop computer can simulate an animation of a person's hand dragging the window to the left and related text instructions on a certain window.

[0241] After the laptop computer's display interface displays the first guidance information, the user can use a mouse or touch screen to drag the document, web page, window, or other content displayed on the laptop computer's display interface to the right. In response to the leftward dragging operation, the laptop computer sends the document, web page, window, or other content to the tablet computer. The tablet computer receives the document, web page, window, or other content and displays it on its display interface. This allows the document, web page, window, or other content in the laptop computer to be expanded and displayed on the tablet computer's display interface located to the left of the laptop computer.

[0242] Of course, during the specific implementation process, the first guidance information may not be displayed, and the embodiment of the present application does not limit this.

[0243] In another scenario, during the process of expanding the display, if the laptop computer and / or the tablet computer moves, causing the position information of the tablet computer relative to the laptop computer to change, and the changed position information indicates that the tablet computer is located in the front area or the rear area of ​​the laptop computer, then the expansion direction between the laptop computer and the tablet computer may not be changed.

[0244] The expansion direction may include rightward expansion and leftward expansion. Rightward expansion may include: a user drags a document, webpage, window, or other content to the right on the display interface of the laptop computer, and the document, webpage, window, or other content is expanded and displayed on the tablet computer located to the right of the laptop computer. Leftward expansion may include: a user drags a document, webpage, window, or other content to the left on the display interface of the laptop computer, and the document, webpage, window, or other content is expanded and displayed on the tablet computer located to the left of the laptop computer.

[0245] For example, if the tablet is positioned to the right of the laptop, the laptop will expand the document, webpage, window, and other content to the right onto the tablet. If the tablet and / or laptop are moved so that the tablet is positioned in front of or behind the laptop, the expansion direction remains rightward. In this case, the user can drag the document, webpage, window, and other content to the right on the laptop's display interface to expand the document, webpage, window, and other content onto the tablet.

[0246] The movement of the tablet computer and / or laptop computer includes: movement of the tablet computer, movement of the laptop computer, or movement of the tablet computer and the laptop computer together.

[0247] In another scenario, if the laptop and / or tablet moves, causing the relative position information between the tablet and the laptop to change, and the changed relative position information indicates that the tablet is located in the left area of ​​the laptop, then the extension direction between the laptop and the tablet may not change.

[0248] In another scenario, if the laptop and / or tablet moves, causing the relative position information between the tablet and the laptop to change, and the changed relative position information indicates that the tablet is located in the right area of ​​the laptop, then the extension direction between the laptop and the tablet may not change.

[0249] In one scenario, if the expansion direction between the laptop and the tablet is changed, the laptop may generate a prompt message indicating that the expansion direction has changed to alert the user.

[0250] In one scenario, if the laptop detects a preset operation, and the location information at this time indicates that the tablet computer is located in the front area or the rear area of ​​the laptop computer, the laptop computer can send the content displayed in the display interface to the tablet computer when the preset operation is a screen projection operation. The tablet computer displays the content, and the laptop computer continues to display the content. Alternatively, when the preset operation is an extended screen operation, the laptop computer can expand the content displayed in the display interface to the display interface of the tablet computer in the default expansion direction or the expansion direction to which the user is accustomed. The above-mentioned default expansion direction can be to the left or to the right, and the expansion direction to which the user is accustomed is to the left or to the right.

[0251] For example, the tablet computer is located in the right area of ​​the laptop computer, and the laptop computer is extended to the right. If the tablet computer and / or the laptop computer are moved so that the tablet computer is located in the front area or the rear area of ​​the laptop computer, the laptop computer can send the content displayed on its display interface to the tablet computer and request the tablet computer to display the content. The tablet computer responds to the request and displays the content sent by the laptop computer, and the laptop computer continues to display the content, so that the display interface of the tablet computer and the display interface of the laptop computer are the same.

[0252] In another scenario, when the extended display between the laptop and the tablet begins, if the tablet is located in the front area or the back area of ​​the laptop, the laptop does not send content such as documents, web pages, windows, etc. to the tablet.

[0253] Specifically, if the user drags a document, web page, window, or other content in any direction on the laptop computer display interface, the laptop computer does not respond to the operation, does not send the document, web page, window, or other content to the tablet computer, and does not expand the document, web page, window, or other content to be displayed on the tablet computer.

[0254] In addition, the laptop computer may also generate a first prompt message for notifying the user that the tablet computer is located in the front or rear area of ​​the laptop computer and that the content displayed on the laptop computer's display interface cannot be expanded to be displayed on the tablet computer's display interface.

[0255] In one scenario, there may be multiple tablet computers, distributed on the left and right sides of a laptop computer. If a user drags a document, webpage, window, or other content to the left on the laptop computer, the laptop computer responds to the drag operation and sends the document, webpage, window, or other content to the tablet computer on the left side of the laptop computer for display. If a user drags the document, webpage, window, or other content to the right on the laptop computer, the laptop computer responds to the drag operation and sends the document, webpage, window, or other content to the tablet computer on the right side of the laptop computer for display.

[0256] 2. Application Scenarios of Secure Screen Mirroring

[0257] Figure 17 This is a schematic diagram of a secure screen projection application scenario provided by an embodiment of the present application. The following describes this secure screen projection application scenario, taking a laptop as the first electronic device and a mobile phone as the second electronic device as an example. In this secure screen projection application scenario, the content displayed on the mobile phone's display interface can be projected onto the laptop's display interface for display, and the mobile phone can be operated on the laptop.

[0258] First, pair the laptop and mobile phone. Please refer to the relevant description in the extended screen application scenario, which will not be repeated here.

[0259] Next, the angle of the mobile phone relative to the laptop is determined using the angle determination method in the embodiment of the present application.

[0260] In this embodiment, the angle of the tablet computer relative to the laptop computer can be 0° to 360°. Figure 10 The relevant contents and subsequent Examples 1 to 7 will not be repeated here.

[0261] Finally, when the angle meets the preset position requirements, the mobile phone sends the files, pictures or display interface content to the display interface of the laptop for display, or the laptop sends the files, pictures or display interface content to the display interface of the mobile phone for display.

[0262] In some embodiments, the preset position requirement may be a preset angle range of the mobile phone relative to the laptop computer. If the angle is within the above-mentioned preset angle range, and the distance between the mobile phone and the laptop computer is less than a threshold value, the mobile phone sends the files, pictures, or display interfaces and other contents to the laptop computer. The laptop computer displays the above-mentioned files, pictures, or display interfaces and other contents, and realizes the projection of the files, pictures, or display interfaces and other contents in the mobile phone onto the display interface of the laptop computer for display. Alternatively, the laptop computer sends the files, pictures, or display interfaces and other contents to the mobile phone. The mobile phone displays the above-mentioned files, pictures, or display interfaces and other contents, and realizes the projection of the files, pictures, or display interfaces and other contents in the laptop computer onto the display interface of the mobile phone for display.

[0263] In some embodiments, the preset position requirement may be that the mobile phone is located in one of the front area, rear area, left area, and right area of ​​the laptop computer. Correspondingly, the angle can be converted into the orientation of the mobile phone relative to the laptop computer by referring to the method in the extended screen application scenario. In the secure screen projection application scenario, the orientation of the mobile phone relative to the laptop computer may include: the mobile phone is located in the left area of ​​the laptop computer, the mobile phone is located in the right area of ​​the laptop computer, and the mobile phone is located in the front area and the rear area of ​​the laptop computer.

[0264] For example, if a mobile phone is located in the front or rear area of ​​a laptop computer and the distance between the mobile phone and the laptop computer is less than a threshold, the mobile phone sends the file, picture, or display interface to the laptop computer. The laptop computer displays the aforementioned file, picture, or display interface, thereby projecting the file, picture, or display interface on the mobile phone to the laptop computer's display interface. Alternatively, the laptop computer sends the file, picture, or display interface to the mobile phone. The mobile phone displays the aforementioned file, picture, or display interface, thereby projecting the file, picture, or display interface on the laptop computer to the mobile phone's display interface.

[0265] In some embodiments, when a mobile phone is projecting its screen onto a laptop, the laptop may generate a second prompt. This second prompt prompts the user to place the phone at a specific angle / orientation relative to the laptop, as well as the distance between the phone and the laptop. Based on this second prompt, the user can conveniently project content such as files, images, or the display interface on the mobile phone onto the laptop's display interface.

[0266] In some embodiments, when a laptop computer is projecting its screen onto a mobile phone, the mobile phone may generate the aforementioned second prompt message, allowing the user to conveniently project files, images, or display interfaces from the laptop computer onto the mobile phone's display interface.

[0267] The following uses direction as an example to explain the process of projecting files, pictures, or display interfaces from a computer to the display interface of a laptop.

[0268] For example, the process of projecting a file or image from a mobile phone onto a laptop's display interface can be as follows: If the mobile phone is located in front of or behind the laptop, and the distance between the two is less than a threshold, the mobile phone sends file A or image B to the laptop for projection. After receiving file A or image B, the laptop opens file A or image B and displays it on its display interface.

[0269] Alternatively, the process of projecting a file or image from a mobile phone onto a laptop's display interface can be as follows: if the mobile phone is located to the left of the laptop and the distance between the mobile phone and the laptop is less than a threshold, the mobile phone sends file A or image B to be projected to the laptop. After receiving file A or image B, the laptop opens file A or image B and displays it on the display interface.

[0270] Alternatively, the process of projecting a file or image from a mobile phone onto a laptop's display interface can be as follows: if the mobile phone is located to the right of the laptop and the distance between the mobile phone and the laptop is less than a threshold, the mobile phone sends file A or image B to be projected to the laptop. After receiving file A or image B, the laptop opens file A or image B and displays it on the display interface.

[0271] For example, the process of projecting the display interface of a mobile phone onto the display interface of a laptop computer can be as follows: if the mobile phone is located in the front or back area of ​​the laptop computer and the distance between the mobile phone and the laptop computer is less than a threshold, the mobile phone sends the content of the mobile phone display interface and the aspect ratio of the mobile phone display interface to the laptop computer. The laptop computer then displays the content of the mobile phone display interface on its display interface based on the aspect ratio of the mobile phone display interface.

[0272] The aspect ratio of a mobile phone display interface is typically different from that of a laptop display interface. Therefore, in order to display the mobile phone display interface within the laptop display interface, the laptop needs to determine a display area based on the aspect ratio of the mobile phone display interface. The aspect ratio of this display area is equal to that of the mobile phone display interface, and the display area should be as large as possible. For example, the length of the display area should be the same as the width of the laptop display interface. After determining the display area, the laptop displays the content of the mobile phone display interface within this display area.

[0273] After the content of the mobile phone display interface changes, the mobile phone sends the content displayed on the new mobile phone interface to the laptop computer, and the laptop computer displays the content displayed on the new mobile phone interface in the display area.

[0274] In some embodiments, the above-mentioned files, pictures, or display interfaces may or may not have privacy requirements. For files, pictures, or display interfaces with privacy requirements, the occurrence of privacy leaks should be prevented or reduced.

[0275] For example, for files, pictures, or display interfaces with privacy requirements, if the angle meets the preset position requirements and the distance between the mobile phone and the laptop is less than a threshold, the mobile phone can project the files, pictures, or display interfaces with privacy requirements onto the laptop's display interface for display, or the laptop can project the files, pictures, or display interfaces with privacy requirements onto the mobile phone's display interface for display. If the distance between the mobile phone and the laptop is greater than or equal to the threshold, the mobile phone stops sending files, pictures, or display interfaces with privacy requirements to the laptop, or the laptop stops sending files, pictures, or display interfaces with privacy requirements to the mobile phone.

[0276] For example, for files, images, or display interfaces that do not require privacy, the distance between the phone and the laptop may not be required to be less than a threshold. For example, if the angle meets the preset position requirement, regardless of whether the distance between the phone and the laptop is less than the threshold, the phone can project files, images, or display interfaces that do not require privacy onto the laptop's display interface, and vice versa.

[0277] In some embodiments, when screen projection has been established between a mobile phone and a laptop computer, if the angle of the mobile phone relative to the laptop computer changes so that the changed angle does not meet the preset position requirement, and / or the distance between the mobile phone and the laptop computer is greater than a threshold, the laptop computer stops displaying files, pictures, display interfaces, and other content with privacy requirements sent by the mobile phone, and ends the screen projection that has been established between the mobile phone and the laptop computer.

[0278] For example, a laptop computer can generate a screen projection end control, and a user can touch the control. In response to the touch, the laptop computer stops displaying the privacy-relevant files, images, or display interface content sent by the mobile phone, thus ending the screen projection established between the mobile phone and the laptop computer.

[0279] For example, a mobile phone can generate a control to end screen projection, and the user can touch this control. In response to the touch, the mobile phone sends a request to the laptop to end screen projection. The laptop responds to the request by stopping displaying the privacy-relevant files, images, or display interface sent by the mobile phone, thus ending the screen projection established between the mobile phone and the laptop.

[0280] In one scenario, after terminating screen mirroring between a mobile phone and a laptop, the mobile phone can generate a continue screen mirroring control. When the user touches this control, the mobile phone responds by sending a continue screen mirroring command to the laptop. The laptop responds to this continue screen mirroring command by continuing to display the privacy-sensitive files, images, or display interface content sent by the mobile phone.

[0281] In some embodiments, when screen projection has been established between a mobile phone and a laptop computer, if the angle of the mobile phone relative to the laptop computer changes so that the changed angle does not meet the preset position requirement, and / or the distance between the mobile phone and the laptop computer is greater than a threshold, the laptop computer may continue to display content such as files, pictures or display interfaces sent by the mobile phone that do not have privacy requirements, and may not terminate the screen projection that has been established between the mobile phone and the laptop computer.

[0282] Whether the distance between the mobile phone and the laptop is less than a threshold value can be determined by a distance measurement algorithm.

[0283] In one embodiment, a distance measurement algorithm for determining the distance between a mobile phone and a laptop computer may include: the mobile phone transmits an acoustic signal to the laptop computer and receives the acoustic signal reflected back from the laptop computer. The mobile phone determines the distance between the mobile phone and the laptop computer based on the propagation time and propagation speed of the acoustic signal.

[0284] For example, at a first moment, a mobile phone transmits a sound wave signal through its speaker. The sound wave signal is blocked by a laptop and then reflected back to the mobile phone. At a second moment, the mobile phone receives the reflected sound wave signal through its microphone. The distance the sound wave signal travels from the mobile phone to the laptop is the same as the distance the sound wave signal travels from the laptop back to the mobile phone. Therefore, the distance between the mobile phone and the laptop can be calculated as half the product of the difference between the second moment and the first moment and the propagation speed of the sound wave signal.

[0285] In one embodiment, the distance measurement algorithm for determining the distance between the mobile phone and the laptop computer can be: the laptop computer transmits an acoustic wave signal to the mobile phone, and the mobile phone determines the distance between the mobile phone and the laptop computer based on the propagation time and propagation speed of the acoustic wave signal; or, the mobile phone transmits an acoustic wave signal to the laptop computer, and the laptop computer determines the distance between the mobile phone and the laptop computer based on the propagation time and propagation speed of the acoustic wave signal.

[0286] For example, at a third moment, the laptop transmits a sound wave signal through its speaker. The sound wave signal carries information from the first moment. At a fourth moment, the mobile phone receives the sound wave signal through its microphone and parses the time when the laptop transmitted the sound wave signal (i.e., the third moment). Based on the time when the sound wave signal was received (i.e., the fourth moment), the distance between the mobile phone and the laptop is determined as the product of the difference between the fourth moment and the third moment and the propagation speed of the sound wave signal.

[0287] 3. Stereo Application Scenarios

[0288] Figure 18 This is a schematic diagram of a stereo application scenario provided by an embodiment of the present application. The following describes the stereo application scenario by taking a first electronic device as a television and a second electronic device as two speakers (speaker 1 and speaker 2) as an example. In this stereo application scenario, the television determines the correspondence between speakers 1 and 2 and the left-channel audio information and the right-channel audio information based on the angle of speaker 1 relative to the television and the angle of speaker 2 relative to the television, and then transmits the audio information to speakers 1 and 2 to achieve stereo playback without the need for manual operation to select the channels of the two speakers.

[0289] First, pair the TV with speakers 1 and 2. Please refer to the relevant description in the extended screen application scenario and will not be repeated here.

[0290] Afterwards, the angles between the TV and speakers 1 and 2 are determined using the angle determination method in the embodiment of the present application.

[0291] In this embodiment, the angles of the speakers 1 and 2 relative to the TV can be 0° to 360°. Figure 10 The relevant contents and subsequent Examples 1 to 7 will not be repeated here.

[0292] If the TV needs to determine the left and right channel audio signals played by two speakers, the relative positions of the two speakers must be determined. If the positions of the speakers and / or the TV change during audio playback, the relative angles of the two speakers must also be determined.

[0293] For example, the accelerometer sensor, gyroscope sensor or magnetometer sensor of the first speaker (for example, any one of speaker 1 and speaker 2) detects that the position of the first speaker has changed, or the accelerometer sensor, gyroscope sensor or magnetometer sensor of the TV detects that the position of the TV has changed, then the TV and the first speaker are connected through Figure 10It should be noted that if the first speaker is speaker 1 or speaker 2, only the angle of speaker 1 or speaker 2 with a changed position relative to the TV needs to be re-determined, or the angles of both speakers relative to the TV need to be re-determined.

[0294] Finally, the TV sends the audio information to speaker 1 and speaker 2 according to the angle, so as to achieve stereo playback through speaker 1 and speaker 2.

[0295] In some embodiments, the TV can determine the relative position information between speaker 1 and speaker 2 based on the angles of speaker 1 and speaker 2 relative to the TV. Then, based on the relative position information, the TV sends the left channel audio information to the speaker on the left and the right channel audio information to the speaker on the right.

[0296] For example, if the angle of speaker 1 relative to the TV is 60° and the angle of speaker 2 relative to the TV is 210°, the TV can determine that speaker 1 is to the right of speaker 2 and speaker 2 is to the left of speaker 1. In this case, the TV can send the left channel audio information to speaker 2 on the left and send the right channel audio information to speaker 1 on the right.

[0297] In some embodiments, the television can determine the orientation of speaker 1 relative to the television based on the angle of speaker 1 relative to the television, and determine the orientation of speaker 2 relative to the television based on the angle of speaker 2 relative to the television. The television then sends audio information to speaker 1 and speaker 2 based on the orientations of speaker 1 and speaker 2 relative to the television.

[0298] For example, if speaker 1 is at an angle of 60° relative to the TV and speaker 2 is at an angle of 210° relative to the TV, the TV can determine that speaker 1 is on the right side of the TV and speaker 2 is on the left side. In this case, the TV can send the left channel audio information to speaker 2 on the left side of the TV and send the right channel audio information to speaker 1 on the right side of the TV.

[0299] Among them, how to convert the angles of speaker 1 and speaker 2 relative to the TV into the orientations of speaker 1 and speaker 2 relative to the TV, please refer to the relevant description in the extended screen application scenario, which will not be repeated here.

[0300] In some embodiments, if speaker 1 is located in the left area of ​​the TV and speaker 2 is located in the right area, front area, or rear area of ​​the TV, the TV determines that speaker 1 is located to the left of speaker 2, and the TV sends the left channel audio information to speaker 1 and the right channel audio information to speaker 2. If speaker 1 is located in the right area of ​​the TV and speaker 2 is located in the left area, front area, or rear area of ​​the TV, the TV determines that speaker 1 is located to the right of speaker 2, and the TV sends the right channel audio information to speaker 1 and the left channel audio information to speaker 2.

[0301] In some embodiments, if the speaker 1 and the speaker 2 are both located on the same side of the TV, the TV can determine the orientation of the two speakers based on the angle information of the two speakers relative to the TV. The specific process can be: after obtaining the angles of the two speakers relative to the TV, the TV can refer to Figure 15 The content determines the orientation between the two speakers based on the size relationship between the two angles.

[0302] For example, if speaker 1 and speaker 2 are both located on the left side of the TV, the angle of speaker 1 relative to the TV is α1, and the angle of speaker 2 relative to the TV is α2, then the TV can determine the relative position information between speaker 1 and speaker 2 based on the first absolute value of the difference between α1 and 180°, and the second absolute value of the difference between α2 and 180°. For example, if the first absolute value is greater than the second absolute value, the TV can determine that speaker 1 is located to the right of speaker 2. The TV then sends the right channel audio information to speaker 1 and the left channel audio information to speaker 2. For another example, if the first absolute value is less than the second absolute value, the TV can determine that speaker 1 is located to the left of speaker 2. The TV then sends the right channel audio information to speaker 2 and the left channel audio information to speaker 1.

[0303] 4. Application Scenarios of Directional Announcement

[0304] Figure 19 This is a schematic diagram of a directional sound playback application scenario provided by an embodiment of the present application. This directional sound playback application scenario is described below, using the example of a television as the first electronic device and a remote control as the second electronic device. In this stereo application scenario, the television plays sound in the direction corresponding to the remote control's position based on the relative angle between the television and the remote control.

[0305] First, pair the TV with the remote control. Please refer to the relevant description in the extended screen application scenario and will not be repeated here.

[0306] Afterwards, the angle of the remote control relative to the TV is determined using the angle determination method in the embodiment of the present application.

[0307] In this embodiment, the angle of the remote control relative to the TV can be 0° to 360°. Figure 10 The relevant contents and subsequent Examples 1 to 7 will not be repeated here.

[0308] At the start of a directional audio playback scenario, the relative angle between the TV and remote control must be determined. If the remote's position changes during directional audio playback, the angle relative to the TV must also be re-determined. For example, if the remote's sensor detects a change in position, the TV will re-determine the remote's angle relative to the TV.

[0309] Finally, the TV plays the sound in the direction of the remote control based on the angle.

[0310] In some embodiments, a television may include an audio playback unit capable of adjusting the direction of audio playback. For example, the audio playback unit may include a directional speaker and a rotation mechanism that drives the directional speaker to rotate. The television's processor may determine the remote control's location based on the angle, and then control the rotation mechanism to rotate the directional speaker so that the directional speaker plays sound in the direction of the remote control.

[0311] Directional speakers can focus sound using a parabolic reflector, similar to a flashlight, to produce directional audible sound. Alternatively, they can utilize the nonlinear interaction of ultrasound waves in the air to produce highly directional audible sound.

[0312] As you can understand, when watching TV, users often keep the remote control nearby for easy viewing. The relative angle between the TV and the remote control corresponds to the user's angle relative to the TV. Therefore, the TV can play sound in a directionally directed toward the user based on the angle of the remote control relative to the TV. Because the TV plays sound in a directionally directed toward the user and rarely plays sound in directions other than the user's, the sound in directions other than the user's is relatively quiet.

[0313] Taking ultrasonic signals as an example, the method for determining the angle between electronic devices provided in an embodiment of the present application is described in detail below.

[0314] Example 1

[0315] Figure 20 This is a flow chart of determining the angle between electronic devices provided by an embodiment of the present application. Figure 20 The above process of determining the angle between the electronic devices may include steps 201 to 207. The first electronic device has at least two speakers and at least one microphone, and the second electronic device has at least two speakers and at least one microphone.

[0316] In step 201 , a second electronic device sends a first ultrasonic signal and a second ultrasonic signal with different characteristics to a first electronic device through two speakers.

[0317] The first ultrasonic signal and the second ultrasonic signal may be two ultrasonic signals with different characteristics. For example, the first ultrasonic signal and the second ultrasonic signal may be ultrasonic signals in different frequency bands, or ultrasonic signals in different orthogonal sequences. Alternatively, the second electronic device may transmit the first ultrasonic signal and the second ultrasonic signal through two speakers at different times. Alternatively, the first ultrasonic signal and the second ultrasonic signal may be two ultrasonic signals with different characteristics, and the second electronic device may transmit the first ultrasonic signal and the second ultrasonic signal through two speakers at different times.

[0318] In one scenario, a second electronic device generates a baseband sequence s with a bandwidth of B. The second electronic device up-converts the baseband sequence s to obtain a first ultrasonic signal x1(t) and a second ultrasonic signal x2(t). The frequency band of the first ultrasonic signal x1 is [f1, f2], and the frequency band of the second ultrasonic signal x2 is [f3, f4], and there is no overlap between the frequency bands [f1, f2] and [f3, f4]. The scenario of step 201 is shown in Figure 21(a). The second electronic device transmits the first ultrasonic signal x1(t) and the second ultrasonic signal x2(t) to the first electronic device through two speakers.

[0319] Among them, the process of up-converting the baseband sequence s by the second electronic device can be: modulating the baseband sequence s on a low-frequency carrier and mixing it with a high-frequency signal, and then taking the two upper sideband signals after mixing to obtain the first ultrasonic signal x1(t) and the second ultrasonic signal x2(t).

[0320] In another scenario, the second electronic device can generate two baseband sequences, and up-convert the two baseband sequences respectively to obtain a first ultrasonic signal x1(t) with a frequency band of [f1, f2] and a second ultrasonic signal x2(t) with a frequency band of [f3, f4], and there is no overlapping part between the frequency band [f1, f2] and the frequency band [f3, f4].

[0321] In this embodiment, the two speakers are a first speaker and a second speaker. For example, the first speaker may be a left-channel speaker of the second electronic device, and the second speaker may be a right-channel speaker of the second electronic device. For example, after obtaining the first ultrasonic signal x1(t) and the second ultrasonic signal x2(t), the second electronic device transmits the first ultrasonic signal x1(t) to the first electronic device via the left-channel speaker, and simultaneously transmits the second ultrasonic signal x2(t) to the first electronic device via the right-channel speaker.

[0322] For the first ultrasonic signal and the second ultrasonic signal of different orthogonal sequences, the second electronic device may generate an ultrasonic signal and transmit the ultrasonic signal to the first electronic device through the first speaker. After the first speaker completes transmitting the ultrasonic signal to the first electronic device, the second electronic device may transmit the ultrasonic signal to the first electronic device through the second speaker.

[0323] In step 202 , the first electronic device determines a first angle of the second electronic device relative to the first electronic device based on a time difference between the first ultrasonic signal and the second ultrasonic signal received by the microphone, and determines a first angle between the first angle and the orientation of the first electronic device.

[0324] Regarding the process of determining the first angle, please refer to Example 2 and will not be described in detail here.

[0325] Step 203: The first electronic device determines two first possible angles of the second electronic device relative to the first electronic device based on the first included angle and the orientation of the first electronic device.

[0326] The orientation θ1 of the first electronic device can be measured by a magnetometer in the first electronic device.

[0327] Since the two positions of the second electronic device can be determined according to the first angle, the first included angle θ determined according to the first angle 10 There are two situations, such as Figure 10 The θ shown 11 and θ corresponding to θ1 10 , and θ 12 and θ corresponding to θ1 10 Since the angle θ1 corresponding to the orientation of the first electronic device is an angle in the earth coordinate system, the first angle θ can be converted to 10 Converted to the angle in the earth coordinate system. 11 =θ1+θ 10 ,θ 12 =θ1-θ 10 The first angle θ 10 Converted into angles in the earth coordinate system, two first possible angles θ of the second electronic device relative to the first electronic device are obtained. 11 and θ 12 .

[0328] In step 204 , the first electronic device sends a third ultrasonic signal and a fourth ultrasonic signal with different characteristics to the second electronic device through two speakers.

[0329] Among them, the scenario of step 204 is shown in Figure 21(b). Please refer to step 201 for the specific process, which will not be repeated here.

[0330] It should be noted that the first electronic device and the second electronic device may send ultrasonic signals simultaneously or at different times, and this embodiment of the present application does not limit this.

[0331] Additionally, the first ultrasonic signal and the second ultrasonic signal may be ultrasonic signals of different frequency bands, and the third ultrasonic signal and the fourth ultrasonic signal may be ultrasonic signals of different frequency bands. Alternatively, the first ultrasonic signal and the second ultrasonic signal may be ultrasonic signals of different frequency bands, and the third ultrasonic signal and the fourth ultrasonic signal may be ultrasonic signals of different orthogonal sequences. Alternatively, the first ultrasonic signal and the second ultrasonic signal may be ultrasonic signals of different orthogonal sequences, and the third ultrasonic signal and the fourth ultrasonic signal may be ultrasonic signals of different assessments.

[0332] In step 205 , the second electronic device determines a second angle of the first electronic device relative to the second electronic device based on the time difference between the microphone receiving the third ultrasonic signal and the fourth ultrasonic signal, and determines a second angle between the second angle and the orientation of the second electronic device.

[0333] Determine the second angle θ 20 Please refer to step 202 for the specific process, which will not be described here.

[0334] Step 206: The second electronic device determines two second possible angles of the first electronic device relative to the second electronic device according to the second included angle and the orientation of the second electronic device.

[0335] Determine two second possible angles θ 21 and θ 22 Please refer to step 203 for the specific process, which will not be described here.

[0336] Step 207: The first electronic device or the second electronic device determines a true relative angle between the first electronic device and the second electronic device based on the two first possible angles and the two second possible angles.

[0337] For a detailed process of determining the true relative angle between the first electronic device and the second electronic device, please refer to Figure 10 The relevant content in will not be elaborated here.

[0338] Example 2

[0339] This embodiment takes the first electronic device and the second electronic device as examples to illustrate how the first electronic device determines the first angle.

[0340] First, the process of determining the first angle is described with an example.

[0341] In some embodiments, the first angle may be determined using two speakers of the second electronic device and one microphone of the first electronic device.

[0342] After the first electronic device receives the ultrasonic signal transmitted by the two speakers of the second electronic device, it filters the ultrasonic signal through the first filter and the second filter to obtain the first ultrasonic signal and the second ultrasonic signal. The filtering bandwidth of the first filter is the same as the frequency band of the first ultrasonic signal, and the filtering bandwidth of the second filter is the same as the frequency band of the second ultrasonic signal.

[0343] It should be noted that the first ultrasonic signal x1(t) and the second ultrasonic signal x2(t) are affected by channel information and time delay during channel transmission. Therefore, after the first electronic device receives the two ultrasonic signals, the first ultrasonic signal x1(t) is converted into the first ultrasonic signal y1(t), and the second ultrasonic signal x2(t) is converted into the second ultrasonic signal y2(t). The frequency band of the first ultrasonic signal y1(t) is the same as the frequency band of the first ultrasonic signal x1(t), which is [f1, f2]. The frequency band of the first ultrasonic signal y1(t) is the same as the frequency band of the second ultrasonic signal x2(t), which is [f3, f4].

[0344] The first electronic device converts the first ultrasonic signal and the second ultrasonic signal obtained by filtering into the same frequency band. Exemplarily, the first electronic device may perform frequency conversion processing on the first ultrasonic signal y1(t) so that the first ultrasonic signal y1(t) and the second ultrasonic signal y2(t) are converted into the same frequency band. Alternatively, the first electronic device may perform frequency conversion processing on the second ultrasonic signal y2(t) so that the first ultrasonic signal y1(t) and the second ultrasonic signal y2(t) are converted into the same frequency band. Alternatively, the first electronic device may perform frequency conversion processing on both the first ultrasonic signal y1(t) and the second ultrasonic signal y2(t) so that the first ultrasonic signal y1(t) and the second ultrasonic signal y2(t) are converted into the same frequency band.

[0345] The first electronic device performs correlation calculation on the first ultrasonic signal and the second ultrasonic signal converted into the same frequency band, and determines the time difference between the first ultrasonic signal and the second ultrasonic signal arriving at the microphone of the first electronic device.

[0346] For example, the time difference between the first ultrasonic signal and the second ultrasonic signal arriving at the microphone of the first electronic device can be expressed as the difference in the number of sampling points of the first ultrasonic signal and the second ultrasonic signal by the microphone of the first electronic device. s Sample the ultrasonic signal, for example, the sampling frequency f sTherefore, in time t, the number of sampling points collected by the microphone is t*f s .

[0347] For example, if the first ultrasonic signal arrives at the microphone first and the second ultrasonic signal arrives at the microphone later, the number of sampling points of the microphone for the first ultrasonic signal is greater than the number of sampling points for the second ultrasonic signal. The difference between the two sampling points is the product of the sampling frequency and the time difference: Δt·f s , Δt is the above time difference.

[0348] In one scenario, the first electronic device converts the frequency band of the second ultrasonic signal to the frequency band of the first ultrasonic signal, and performs correlation calculation on the first ultrasonic signal y1(t) and the second ultrasonic signal y'2(t).

[0349] In the case where the first sound wave signal reaches the microphone first and the second sound wave signal reaches the microphone later, the relevant calculation formula can be: y1(t) represents the value of the first ultrasonic signal y1(t) at sampling time t, and y'2(t-τ) represents the value of the second ultrasonic signal y'2(t) at sampling time t-τ. When the peak values ​​of y1(t) and y'2(t-τ) coincide, the peak value of z(τ) and the number of sampling points τ corresponding to the time difference between the first ultrasonic signal and the second ultrasonic signal arriving at the microphone of the first electronic device can be obtained. * .

[0350] In the case where the second ultrasonic signal reaches the microphone first and the first ultrasonic signal reaches the microphone later, the relevant calculation formula can be: y1(t-τ) represents the value of the first ultrasonic signal y1(t) at sampling time t-τ, and y'2(t) represents the value of the second ultrasonic signal y'2(t) at sampling time t. When the peak values ​​of y1(t-τ) and y'2(t) coincide, the peak value of z(τ) and the number of sampling points τ corresponding to the time difference between the first ultrasonic signal and the second ultrasonic signal arriving at the microphone of the first electronic device can be obtained. * .

[0351] The first electronic device determines the first angle based on the time difference (ie, the difference in the number of sampling points), the first distance, and the sampling frequency of the microphone, wherein the first distance is the distance between the two speakers of the second electronic device.

[0352] See Stereo Application Scenario Figure 2 and Figure 3 For the reference angles of 90°, 0°, and -90°, the first angle can be approximated as For the cases where the reference angles are 0°, 90°, and 180°, the first angle can be approximated as

[0353] In some embodiments, the first angle may also be determined by two microphones of the second electronic device and a speaker of the first electronic device. Detailed procedures are described in detail in Related Art 1, which will not be described in detail here.

[0354] The following describes the process of determining the first angle by taking the first electronic device as an example.

[0355] See also Figure 22 In one scenario, for reference angles of 90°, 0°, and -90°, the orientation of the first electronic device is consistent with -90° in the reference angle. If the first angle is 60°, according to Figure 10 The definition of the first angle in the relevant content shows that: the first angle θ 10 The angle between the line corresponding to the first angle 60° and the line corresponding to the reference angle -90° is θ 10 =|60°-(-90°)|=150°.

[0356] In another scenario, for the reference angles of 90°, 0°, and -90°, if the orientation of the first electronic device is consistent with 90° in the reference angle. If the first angle is 60°, according to Figure 10 The definition of the first angle in the relevant content shows that: the first angle θ 10 The angle between the line corresponding to the first angle of 60° and the line corresponding to the reference angle of 90° is θ 10 =|60°-90°|=30°.

[0357] See also Figure 23 In one scenario, for reference angles of 0°, 90°, and 180°, the orientation of the first electronic device is consistent with 180° in the reference angle. If the first angle is 60°, according to Figure 10 The definition of the first angle in the relevant content shows that: the first angle θ 10 The angle between the line corresponding to the first angle of 60° and the line corresponding to the reference angle of 180° is θ 10 =|60°-180°|=120°.

[0358] In another scenario, when the reference angle is 0°, 90°, and 180°, the orientation of the first electronic device is consistent with 0° in the reference angle. If the first angle is 60°, according to Figure 10 The definition of the first angle in the relevant content shows that: the first angle θ 10 The angle between the line corresponding to the first angle 60° and the line corresponding to the reference angle 0° is θ 10=|60°-0°|=60°.

[0359] It should be noted that, for the second angle of the first electronic device relative to the second electronic device, and the second angle between the second angle and the orientation of the second electronic device, the second angle and the second angle can be determined by referring to the above process of determining the first angle, which will not be repeated here.

[0360] Example 3

[0361] Unlike Example 1, in this embodiment of the present application, the first electronic device may have at least one speaker and at least two microphones, and the second electronic device may have at least one speaker and at least two microphones. The following describes this embodiment of the present application using the example of the first electronic device having one speaker and two microphones, and the second electronic device having one speaker and two microphones.

[0362] Referring to Figure 24(a), the speaker of the second electronic device transmits an ultrasonic signal, which is received by the two microphones of the first electronic device. The first electronic device determines two first possible angles of the second electronic device relative to the first electronic device based on the time difference between the two microphones receiving the ultrasonic signal.

[0363] Referring to Figure 24(b), the speaker of the first electronic device transmits an ultrasonic signal, which is received by two microphones of the second electronic device. The second electronic device determines two second possible angles of the first electronic device relative to the second electronic device based on the time difference between the two microphones receiving the ultrasonic signal.

[0364] The first electronic device or the second electronic device determines a true relative angle between the first electronic device and the second electronic device according to the two first possible angles and the two second possible angles.

[0365] Example 4

[0366] Unlike Example 1, in this embodiment of the present application, the first electronic device may have at least two speakers and at least two microphones, and the second electronic device may have at least one speaker and at least one microphone. The following describes this embodiment of the present application using the example of a first electronic device having two speakers and two microphones, and a second electronic device having one speaker and one microphone.

[0367] Referring to Figure 25(a), a speaker of the second electronic device transmits an ultrasonic signal, which is received by two microphones of the first electronic device. The first electronic device determines two first possible angles of the second electronic device relative to the first electronic device based on the time difference between the two microphones receiving the ultrasonic signal.

[0368] Referring to Figure 25(b), two speakers of the first electronic device transmit two ultrasonic signals, which are received by a microphone of the second electronic device. The second electronic device determines two second possible angles of the first electronic device relative to the second electronic device based on the time difference between the two ultrasonic signals received by the microphone.

[0369] The first electronic device or the second electronic device determines a true relative angle between the first electronic device and the second electronic device according to the two first possible angles and the two second possible angles.

[0370] Example 5

[0371] Unlike Example 4, in this embodiment of the present application, the first electronic device may have at least one speaker and at least one microphone, and the second electronic device may have at least two speakers and at least two microphones. The following describes this embodiment of the present application using the example of a first electronic device having one speaker and one microphone, and a second electronic device having two speakers and two microphones.

[0372] Referring to Figure 26(a), two speakers of the second electronic device transmit two ultrasonic signals, which are received by a microphone of the first electronic device. The first electronic device determines two first possible angles of the second electronic device relative to the first electronic device based on the time difference between the two ultrasonic signals received by the microphone.

[0373] Referring to Figure 26(b), a speaker of the first electronic device transmits an ultrasonic signal, which is received by two microphones of the second electronic device. The second electronic device determines two second possible angles of the first electronic device relative to the second electronic device based on the time difference between the two microphones receiving the ultrasonic signal.

[0374] The first electronic device or the second electronic device determines a true relative angle between the first electronic device and the second electronic device according to the two first possible angles and the two second possible angles.

[0375] Example 6

[0376] Different from Example 1, in this embodiment of the present application, the first electronic device has at least three speakers, and the three speakers are not located in a straight line, and the second electronic device has at least one microphone.

[0377] The following describes the embodiments of the present application by taking an example in which the first electronic device has three speakers and the second electronic device has one microphone.

[0378] Referring to Figure 27(a), speakers 1 and 3 of the first electronic device transmit two ultrasonic signals, and the microphone of the second electronic device receives the two ultrasonic signals. The second electronic device determines two possible angles θ of the first electronic device relative to the second electronic device based on the time difference between the two ultrasonic signals received by the microphone. 31 and θ 32 .

[0379] Referring to Figure 27(b), speakers 2 and 3 of the first electronic device transmit two ultrasonic signals, which are received by the microphone of the second electronic device. The second electronic device determines two possible angles θ of the first electronic device relative to the second electronic device based on the time difference between the two ultrasonic signals received by the microphone. 41 and θ 42 .

[0380] The second electronic device determines the actual angle of the first electronic device relative to the second electronic device based on the four possible angles. For example, the first electronic device calculates |θ 31 -θ 41 |、|θ 31 -θ 42 |、|θ 32 -θ 41 | and |θ 32 -θ 42 |, the two angles corresponding to the minimum difference are used as the actual angle of the first electronic device relative to the second electronic device. Alternatively, the first electronic device uses the average of the two angles corresponding to the minimum difference as the actual angle of the first electronic device relative to the second electronic device.

[0381] It should be noted that, in other embodiments, the speaker 1 and the speaker 2 of the first electronic device may transmit two ultrasonic signals, and the speaker 2 and the speaker 3 of the first electronic device may transmit two ultrasonic signals.

[0382] In some embodiments, in the case where the first electronic device or the second electronic device has four or more speakers, an ultrasonic signal can be emitted by a combination of the first speaker and any second speaker, where the second speakers are multiple speakers located in a straight line, and the first speaker is a speaker that is not located in a straight line with the second speaker.

[0383] For example, the first electronic device has four speakers, and no three of the speakers are located in a straight line. Referring to Figure 28(a), the first electronic device transmits two ultrasonic signals through speakers 1 and 4, and the microphone of the second electronic device receives the two ultrasonic signals. Referring to Figure 28(b), the first electronic device transmits two ultrasonic signals through speakers 2 and 3, and the microphone of the second electronic device receives the two ultrasonic signals.

[0384] Example 7

[0385] Different from Example 1, in this embodiment of the present application, the first electronic device has at least one microphone, and the second electronic device has at least three speakers, and the three speakers are not located in a straight line.

[0386] The second electronic device transmits an ultrasonic signal to the first electronic device via a speaker, and the first electronic device receives the ultrasonic signal via a microphone. The first electronic device determines the actual angle of the second electronic device relative to the first electronic device based on the time difference between when the microphone receives the ultrasonic signal. The specific process is described in Example 6 and will not be repeated here.

[0387] The first electronic device may request the second electronic device to send an ultrasonic signal to the first electronic device; or the second electronic device may directly send an ultrasonic signal to the first electronic device through a speaker.

[0388] Example 8

[0389] Unlike Example 1, in this embodiment of the present application, the first electronic device may have at least two speakers, and the second electronic device may have at least two microphones. The following describes this embodiment of the present application using the example of a first electronic device having two speakers and a second electronic device having two microphones.

[0390] Referring to Figure 29(a), the two speakers of the first electronic device transmit two ultrasonic signals, and the microphone of the second electronic device receives the two ultrasonic signals. The second electronic device determines two possible angles θ of the first electronic device relative to the second electronic device based on the time difference between the two ultrasonic signals received by one of the microphones. 51 and θ 52 .

[0391] Referring to Figure 29(b), a speaker of the first electronic device transmits an ultrasonic signal, and two microphones of the second electronic device receive the ultrasonic signal. The second electronic device determines two possible angles θ of the first electronic device relative to the second electronic device based on the time difference between the two microphones receiving the ultrasonic signal. 61 and θ 62 .

[0392] The second electronic device determines the actual angle of the first electronic device relative to the second electronic device based on the four possible angles. For example, the first electronic device calculates |θ 51 -θ 61 |、|θ 51 -θ 62 |、|θ 52 -θ 61 | and |θ52 -θ 62 |, the two angles corresponding to the minimum difference are used as the actual angle of the first electronic device relative to the second electronic device. Alternatively, the first electronic device uses the average of the two angles corresponding to the minimum difference as the actual angle of the first electronic device relative to the second electronic device.

[0393] It should be noted that in other embodiments, the second electronic device may have at least two speakers, and the first electronic device may have at least two microphones. The two speakers of the second electronic device transmit two ultrasonic signals, and the microphone of the first electronic device receives the two ultrasonic signals. Alternatively, one speaker of the second electronic device transmits an ultrasonic signal, and the two microphones of the first electronic device receive the ultrasonic signal.

[0394] Example 9

[0395] Different from Example 8, in this embodiment of the present application, the first electronic device may have at least two microphones, and the second electronic device may have at least two speakers.

[0396] The second electronic device transmits an ultrasonic signal to the first electronic device via a speaker, and the first electronic device receives the ultrasonic signal via a microphone. The first electronic device determines the actual angle of the second electronic device relative to the first electronic device based on the time difference between when the microphone receives the ultrasonic signal. The specific process is described in Example 8 and will not be repeated here.

[0397] The first electronic device may request the second electronic device to send an ultrasonic signal to the first electronic device; or the second electronic device may directly send an ultrasonic signal to the first electronic device through a speaker.

[0398] Optionally, an embodiment of the present application further provides an electronic device comprising: one or more processors, a memory, and two speakers. The memory and the two speakers are coupled to the one or more processors, the memory being configured to store computer program code, and the two speakers being configured to transmit ultrasonic signals, wherein the computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the electronic device performs one or more steps of any of the aforementioned methods.

[0399] Optionally, an embodiment of the present application further provides an electronic device comprising: one or more processors, a memory, and a microphone. The memory and the microphone are coupled to the one or more processors, the memory being configured to store computer program code, the microphone being configured to receive ultrasonic signals, and the computer program code comprising computer instructions. When the one or more processors execute the computer instructions, the electronic device performs one or more steps of any of the aforementioned methods.

[0400] Optionally, an embodiment of the present application further provides a computer-readable storage medium, which stores instructions that, when executed on a computer or processor, enable the computer or processor to execute one or more steps in any of the above methods.

[0401] Optionally, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer or processor, enables the computer or processor to execute one or more steps in any of the above methods.

[0402] Optionally, an embodiment of the present application further provides a chip system, which may include a memory and a processor, wherein the processor executes a computer program stored in the memory to implement one or more steps in any of the above methods. The chip system may be a single chip or a chip module composed of multiple chips.

[0403] Optionally, an embodiment of the present application further provides a chip system, which may include a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement one or more steps in any of the above methods. The chip system may be a single chip or a chip module composed of multiple chips.

[0404] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0405] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0406] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for determining an angle, characterized in that: Applied to a first electronic device, the method includes: sending at least two sound wave signals through a speaker of a second electronic device; receiving, through a microphone of the first electronic device, at least two sound wave signals sent by the second electronic device, and determining a first reception result of receiving the at least two sound wave signals; determining, based on the first receiving result, a first possible angle value between the second electronic device and the first electronic device; receiving a second possible angle value between the first electronic device and the second electronic device sent by the second electronic device, where the second possible angle value is determined based on a second reception result, where the second reception result is a reception result of at least two sound wave signals sent by the speaker of the first electronic device being received by the microphone of the second electronic device; determining an actual angle between the first electronic device and the second electronic device based on the first possible angle value and the second possible angle value; or sending the first possible angle value to the second electronic device; and receiving an actual angle between the first electronic device and the second electronic device sent by the second electronic device, the actual angle being determined by the second electronic device based on the first possible angle value and the second possible angle value, the second possible angle being determined based on a second reception result, the second reception result being a reception result of a microphone of the second electronic device receiving the sound wave signal sent by the first electronic device; The first electronic device sends at least two sound wave signals through the same speaker, and the second electronic device receives at least two sound waves through different microphones; The second electronic device sends at least two sound wave signals through the same speaker, and the first electronic device receives at least two sound wave signals through different microphones; Or the first electronic device sends at least two sound wave signals through different speakers, and the second electronic device receives at least two sound waves through the same microphone; The second electronic device sends at least two sound wave signals through different speakers, and the first electronic device receives at least two sound wave signals through the same microphone; Or the first electronic device receives at least two sound wave signals through the same microphone, and the second electronic device sends at least two sound waves through different speakers; The first electronic device sends at least two sound wave signals through the same speaker, and the second electronic device receives at least two sound waves through different microphones; Or the first electronic device receives at least two sound wave signals through different microphones, and the second electronic device sends at least two sound waves through the same speaker; The first electronic device sends at least two sound wave signals through different speakers, and the second electronic device receives at least two sound waves through the same microphone.

2. The method according to claim 1, characterized in that The first reception result includes: a first time difference when the microphone of the first electronic device receives at least two sound wave signals sent by the second electronic device; or a first signal strength when the microphone of the first electronic device receives at least two sound wave signals sent by the second electronic device.

3. The method according to claim 2, characterized in that The determining, based on the first receiving result, a first possible angle value between the second electronic device and the first electronic device includes: determining a first direction from the second electronic device to the first electronic device according to the first time difference or the first signal strength; determining a first angle between the first direction and an orientation of the first electronic device; Two first possible angle values ​​between the second electronic device and the first electronic device are determined according to the first angle and the orientation of the first electronic device.

4. The method according to claim 1, wherein The first possible angle value and the second possible angle value each include two, and determining the actual angle between the first electronic device and the second electronic device according to the first possible angle value and the second possible angle value includes: Negate the two first possible angle values; Calculating the difference between the two first possible angle values ​​and the two second possible angle values ​​after negation, each of the differences corresponding to two angle values; The actual angle between the first electronic device and the second electronic device is determined according to the two angle values ​​corresponding to the minimum value of the differences.

5. The method according to claim 1, wherein The first electronic device has a first speaker and a second speaker; A first sound wave signal is sent through the first speaker, and a second sound wave signal is sent through the second speaker; wherein, the sending time of the first sound wave signal is different from the sending time of the second sound wave signal, and / or the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics.

6. The method according to claim 1, characterized in that The first sound wave signal and the second sound wave signal are sent through the same speaker of the first electronic device and / or the second electronic device.

7. The method according to claim 1, characterized in that The method further comprises: detecting a first operation on first target content displayed by the first electronic device; determining whether the first operation corresponds to the actual angle; If the first operation corresponds to the actual angle, the first electronic device sends the first target content to a display interface of the second electronic device for display.

8. The method according to claim 1, wherein The second electronic device includes a second electronic device located on the left side of the first electronic device and a second electronic device located on the right side of the first electronic device. The method further includes: detecting a second operation on the first target content displayed by the first electronic device; If the second operation is an operation of expanding the first target content to the left, the first electronic device sends the first target content to a display interface of a second electronic device located to the left of the first electronic device for display; If the second operation is an operation of expanding the first target content to the right, the first electronic device sends the first target content to a display interface of a second electronic device located to the right of the first electronic device for display.

9. The method according to any one of claims 1 to 8, characterized in that The method comprises: After the positions of the first electronic device and / or the second electronic device change, the actual angle between the second electronic device and the first electronic device is re-determined.

10. A method for determining an angle, characterized in that: Applied to a first electronic device, the method includes: sending at least two sound wave signals through a first group of speakers and sending at least two sound wave signals through a second group of speakers; wherein the time when the first group of speakers sends the at least two sound wave signals is different from the time when the second group of speakers sends the at least two sound wave signals, and / or the at least two sound wave signals sent through the first group of speakers have different characteristics from the at least two sound wave signals sent through the second group of speakers; receiving an actual angle between the first electronic device and the second electronic device sent by a second electronic device, the actual angle being determined by the second electronic device based on a first possible angle value and a second possible angle value, the first possible angle value being determined based on a result of receiving, by a microphone of the second electronic device, at least two sound wave signals sent through the first group of speakers, and the second possible angle value being determined by the second electronic device based on a result of receiving, by the microphone of the second electronic device, at least two sound wave signals sent through the second group of speakers; The first electronic device has a first speaker, a second speaker, and a third speaker that are not located in a straight line, the first group of speakers and the second group of speakers each include any two speakers from the first speaker, the second speaker, and the third speaker, and the speakers in the first group of speakers and the second group of speakers are not all the same; or The first electronic device has a first speaker, a second speaker, a third speaker, and a fourth speaker distributed in a quadrilateral, the first speaker and the third speaker are located at two opposite corners of the quadrilateral, the second speaker and the fourth speaker are located at two opposite corners of the quadrilateral, the first group of speakers includes the first speaker and the third speaker, and the second group of speakers includes the second speaker and the fourth speaker; or The first electronic device has a first speaker and a second speaker, the first group of speakers includes the first speaker and the second speaker, and the second group of speakers includes the first speaker or the second speaker; The second electronic device has two microphones, the first possible angle value is determined based on the reception result of one of the microphones of the second electronic device receiving at least two sound wave signals sent through the first group of speakers, and the second possible angle value is determined by the second electronic device based on the reception result of the other microphone of the second electronic device receiving at least two sound wave signals sent through the second group of speakers.

11. The method according to claim 10, characterized in that The method further comprises: detecting a first operation on first target content displayed by the first electronic device; determining whether the first operation corresponds to the actual angle; If the first operation corresponds to the actual angle, the first electronic device sends the first target content to a display interface of the second electronic device for display.

12. The method according to claim 10, wherein The second electronic device includes a second electronic device located on the left side of the first electronic device and a second electronic device located on the right side of the first electronic device. The method further includes: detecting a second operation on the first target content displayed by the first electronic device; If the second operation is an operation of expanding the first target content to the left, the first electronic device sends the first target content to a display interface of a second electronic device located to the left of the first electronic device for display; If the second operation is an operation of expanding the first target content to the right, the first electronic device sends the first target content to a display interface of a second electronic device located to the right of the first electronic device for display.

13. The method according to claim 10 or 12, characterized in that The method comprises: After the positions of the first electronic device and / or the second electronic device change, the actual angle between the second electronic device and the first electronic device is re-determined.

14. An electronic device, characterized in that: include: one or more processors, memory, and display screens; The memory and the display screen are coupled to the one or more processors, the memory being configured to store computer program codes, the computer program codes comprising computer instructions; When the one or more processors execute the computer instructions, the electronic device is caused to perform the method according to any one of claims 1 to 9, or the method according to any one of claims 10 to 13.

15. A chip system, characterized in that: The chip system includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement the method according to any one of claims 1 to 9, or the method according to any one of claims 10 to 13.

Citation Information

Patent Citations

  • Device and method for device-to-device angle detection with ultrasound and wireless signal

    CN104981983A

  • Methods and devices to provide common user interface mode based on sound

    US20130201097A1