WO2022156566A1 - 设备交互方法、位置确定方法、电子设备及芯片系统 - Google Patents

设备交互方法、位置确定方法、电子设备及芯片系统 Download PDF

Info

Publication number
WO2022156566A1
WO2022156566A1 PCT/CN2022/071403 CN2022071403W WO2022156566A1 WO 2022156566 A1 WO2022156566 A1 WO 2022156566A1 CN 2022071403 W CN2022071403 W CN 2022071403W WO 2022156566 A1 WO2022156566 A1 WO 2022156566A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
sound wave
wave signal
speaker
position information
Prior art date
Application number
PCT/CN2022/071403
Other languages
English (en)
French (fr)
Inventor
王琪
黎建辉
王宇行
杜振国
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202111595950.XA external-priority patent/CN114895244A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US18/262,801 priority Critical patent/US20240085555A1/en
Priority to EP22742045.2A priority patent/EP4258006A4/en
Publication of WO2022156566A1 publication Critical patent/WO2022156566A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/18Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using ultrasonic, sonic, or infrasonic waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/02Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
    • G01S15/06Systems determining the position data of a target
    • G01S15/08Systems for measuring distance only
    • G01S15/10Systems for measuring distance only using transmission of interrupted, pulse-modulated waves
    • G01S15/102Systems for measuring distance only using transmission of interrupted, pulse-modulated waves using transmission of pulses having some particular characteristics
    • G01S15/104Systems for measuring distance only using transmission of interrupted, pulse-modulated waves using transmission of pulses having some particular characteristics wherein the transmitted pulses use a frequency- or phase-modulated carrier wave
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S1/00Beacons or beacon systems transmitting signals having a characteristic or characteristics capable of being detected by non-directional receivers and defining directions, positions, or position lines fixed relatively to the beacon transmitters; Receivers co-operating therewith
    • G01S1/72Beacons or beacon systems transmitting signals having a characteristic or characteristics capable of being detected by non-directional receivers and defining directions, positions, or position lines fixed relatively to the beacon transmitters; Receivers co-operating therewith using ultrasonic, sonic or infrasonic waves
    • G01S1/76Systems for determining direction or position line
    • G01S1/80Systems for determining direction or position line using a comparison of transit time of synchronised signals transmitted from non-directional transducers or transducer systems spaced apart, i.e. path-difference systems
    • G01S1/805Systems for determining direction or position line using a comparison of transit time of synchronised signals transmitted from non-directional transducers or transducer systems spaced apart, i.e. path-difference systems the synchronised signals being pulses or equivalent modulations on carrier waves and the transit times being compared by measuring the difference in arrival time of a significant part of the modulations
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/18Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using ultrasonic, sonic, or infrasonic waves
    • G01S5/26Position of receiver fixed by co-ordinating a plurality of position lines defined by path-difference measurements
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2356/00Detection of the display position w.r.t. other display screens

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a device interaction method, a position determination method, an electronic device, and a chip system.
  • the demand for interaction between multiple electronic devices is increasing.
  • the sound field of some speakers can be adjusted according to the relative position information between the speakers, so as to achieve various stereo sound effects.
  • the first electronic device includes an audio transmitting unit (eg, a speaker), and the second electronic device includes a plurality of audio receiving units (eg, microphones).
  • the audio transmitting unit transmits the sound wave signal, and the plurality of audio receiving units receive the sound wave signal.
  • the second electronic device determines relative position information between the first electronic device and the second electronic device according to the time difference between the plurality of audio receiving units receiving the sound wave signals.
  • the above process requires that the second electronic device has multiple audio receiving units, and the distances between the multiple audio receiving units are large enough, otherwise the accuracy of the determined relative position will be affected.
  • the present application provides a device interaction method, a position determination method, an electronic device and a chip system, which can accurately determine relative position information between electronic devices.
  • an embodiment of the present application provides a device interaction method, including: establishing a connection between a first electronic device and a second electronic device; the first electronic device sends a first sound wave signal to the second electronic device through a first speaker, The second speaker sends a second sound wave signal to the second electronic device; wherein the first speaker is different from the second speaker, and the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics; the second electronic device passes The first microphone receives the first sound wave signal and the second sound wave signal; the second electronic device determines the difference between the second electronic device and the first electronic device based on the time difference between the two sound wave signals received by the first microphone or the strength of the two sound wave signals.
  • the relative position information between the two, the relative position information includes that the second electronic device is located on the left side of the first electronic device, or the second electronic device is located on the right side of the first electronic device; location information for information exchange.
  • the embodiments of the present application can more accurately determine the relative position information between the second electronic device and the first electronic device. After the relative position information is determined, the first electronic device and the second electronic device may perform information interaction based on the relative position information.
  • the information interaction that can be performed between the first electronic device and the second electronic device includes: the first electronic device sends the first target content to the display interface of the second electronic device for display, and the first electronic device sends audio information to Audio playback device to achieve stereo playback of audio information, etc.
  • an embodiment of the present application provides a method for determining a position, including: a first electronic device sends a first sound wave signal to a second electronic device through a first speaker, and sends a second sound wave to the second electronic device through the second speaker signal, the first speaker is different from the second speaker, and the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics; the first electronic device receives the second electronic device and the first electronic device sent by the second electronic device.
  • the relative position information between the devices is determined by the first microphone of the second electronic device receiving the first sound wave signal and the receiving result of the second sound wave signal; or, the first electronic device receives the data sent by the second electronic device
  • the receiving result is the receiving result of the first microphone of the second electronic device receiving the first sound wave signal and the second sound wave signal; the first electronic device determines the relative position information based on the receiving result.
  • the embodiments of the present application when the relative position information between the second electronic device and the first electronic device is determined, there is only one placement mode of the two speakers of the first electronic device relative to the first electronic device. Regardless of where the second electronic device is located in the first electronic device, the arrangement of the two speakers will not affect the determined relative position information. Therefore, compared with the prior art, the embodiments of the present application can more accurately determine the relative position information between the second electronic device and the first electronic device. In addition, the embodiment of the present application can be implemented only if the first electronic device has a first speaker and a second speaker, and the second electronic device has one microphone, which is relatively easy to implement.
  • the relative position information between the second electronic device and the first electronic device may be: the position information of the second electronic device relative to the first electronic device, or the relative position information of the first electronic device relative to the second electronic device location information, which is not limited in this embodiment of the present application.
  • the first sound wave signal and the second sound wave signal may be sound wave signals with the same time series, or may be sound wave signals with different time series.
  • the above-mentioned acoustic wave signal may be an infrasound wave signal with a frequency of 0-20KHz, or may be an ultrasonic signal with a frequency of 20KHz or more.
  • the frequency of the above-mentioned sound wave signal may be 1KHz, 2KHz, 3KHz, 5KHz, 10KHz, 15KHz, 20KHz, 30KHz and so on.
  • the above-mentioned acoustic wave signal may be an ultrasonic wave signal.
  • the distance between the first speaker and the second speaker is greater than a predetermined distance.
  • the preset distance may be any value greater than or equal to 10 centimeters.
  • the preset distance is 10 cm, 15 cm, 20 cm, 30 cm, 40 cm, 50 cm, 60 cm, 70 cm, 80 cm, and so on.
  • the distance between the two microphones of the electronic device is usually small, for example, the distance between the two microphones of the mobile phone or the tablet computer is about 10 centimeters.
  • the distance between the two speakers of a laptop computer can be about 30 cm
  • the distance between the two speakers of a TV or display screen can be about 40 cm to 50 cm
  • the distance between the two speakers of some TVs or display screens can be about 40 cm to 50 cm.
  • the distance can even reach 70 cm to 80 cm, which is much larger than 10 cm.
  • the embodiments of the present application can more accurately determine the relative position information between the second electronic device and the first electronic device.
  • the above-mentioned position determination method may further include: A pairing connection is established between the first electronic device and the second electronic device.
  • a pairing connection may be established between the first electronic device and the second electronic device in a wired manner.
  • a pairing connection can be established between the first electronic device and the second electronic device through an HDMI interface.
  • a pairing connection can be established wirelessly between the first electronic device and the second electronic device.
  • a pairing connection can be established between the first electronic device and the second electronic device by jointly connecting an AP, WIFI direct connection, and Bluetooth wireless methods.
  • the above position further includes: in response to an extended display operation, the first electronic device generates a first sound wave signal and a second sound wave signal, and the extended display operation is used to extend the first target content to be displayed on a display interface of the second electronic device.
  • the determination method further includes: the first electronic device generates a first baseband sequence; the first electronic device performs frequency conversion processing on the first baseband sequence to generate a first acoustic wave signal and a second acoustic wave signal.
  • the first electronic device generates a baseband sequence s with a bandwidth of B.
  • the first electronic device up-converts the baseband sequence s to obtain a first acoustic wave signal x 1 (t) and a second acoustic wave signal x 2 (t).
  • the first acoustic wave signal x 1 (t) and the second acoustic wave signal x 2 (t) are acoustic wave signals with different time series.
  • the frequency band of the first acoustic wave signal x 1 (t) is [f 1 , f 2 ]
  • the frequency band of the second acoustic wave signal x 2 is [f 3 , f 4 ].
  • the first electronic device can send the first sound wave signal x 1 (t) to the second electronic device through the first speaker at the same time, and send the second sound wave signal x 2 (t) to the second electronic device through the second speaker. t).
  • the first electronic device may send the first sound wave signal x 1 (t) to the second electronic device through the first speaker at the first moment, and send the second sound wave to the second electronic device through the second speaker at the second moment For the signal x 2 (t), the first moment is different from the second moment.
  • the process of up-converting the baseband sequence s by the first electronic device may be as follows: the first electronic device modulates the baseband sequence s on the low-frequency carrier, and mixes the low-frequency carrier with the high-frequency signal; Two upper sideband signals, the first acoustic wave signal x 1 (t) and the second acoustic wave signal x 2 (t) can be obtained.
  • first acoustic wave signal x 1 (t) and the second acoustic wave signal x 2 (t) will be affected by channel information or time delay during channel transmission. Therefore, when the second electronic device receives After two acoustic wave signals, the first acoustic wave signal x 1 (t) is transformed into the first acoustic wave signal y 1 (t), and the second acoustic wave signal x 2 (t) is transformed into the second acoustic wave signal y 2 (t).
  • the first electronic device generates a baseband sequence s with a bandwidth of B.
  • the first electronic device up-converts the baseband sequence s to obtain a first acoustic wave signal and a second acoustic wave signal.
  • the first sound wave signal and the second sound wave signal are sound wave signals with the same time series.
  • the first electronic device can send the first sound wave signal to the second electronic device through the first speaker at the first moment, and send the second sound wave signal to the second electronic device through the second speaker at the second moment. Unlike the second moment. For example, after the first electronic device sends the first sound wave signal to the second electronic device through the first speaker, it can send the second sound wave signal to the second electronic device through the second speaker.
  • the first electronic device may send the second sound wave signal to the second electronic device through the second speaker after a preset time after the completion of sending the first sound wave signal through the first speaker.
  • the preset time can be any time greater than or equal to 0.
  • the length of the preset time is T 10
  • the moment when the first electronic device completes sending the first sound wave signal to the second electronic device through the first speaker is T 11
  • the first electronic device can be at (T 11 +T 10 ) ) sends a second sound wave signal to the second electronic device through the second speaker at all times.
  • the determination method further includes: the first electronic device generates two orthogonal baseband sequences; the first electronic device performs frequency conversion processing on the two orthogonal baseband sequences to generate the first acoustic wave signal and the second acoustic wave signal.
  • the first electronic device generates a first baseband sequence and a second baseband sequence.
  • the first electronic device up-converts the first baseband sequence and the second baseband sequence to the same frequency band to obtain the first acoustic wave signal and the second acoustic wave signal.
  • the first electronic device generates the first baseband sequence and the second baseband sequence.
  • the first electronic device up-converts the first baseband sequence and the second baseband sequence to different frequency bands to obtain the first acoustic wave signal and the second acoustic wave signal.
  • the above receiving result includes: a time difference between the first microphone receiving the first sound wave signal and the second sound wave signal; and/or, the first microphone receiving the first sound wave signal and the second sound wave The signal strength of each acoustic signal in the signal.
  • the receiving result is a time difference
  • the first electronic device determines the relative position information based on the receiving result, including: calculating the time difference obtained by subtracting the fourth time from the third time, and the third time is when the first microphone receives the first time.
  • the moment of the sound wave signal, the fourth moment is the moment when the first microphone receives the second sound wave signal, the first speaker is located on the first side of the second speaker, the second speaker is located on the second side of the first speaker, and the first side is left or right; if the time difference is greater than or equal to the first time difference threshold, the second electronic device is located on the second side of the first electronic device; wherein, the first time difference threshold is a positive number; if the time difference is less than or equal to the second time difference threshold , the second electronic device is located on the first side of the first electronic device; wherein, the second time difference threshold is a negative number; if the time difference is less than the first time difference threshold and greater than the second time difference threshold, then the second electronic device is located on the first side of the first electronic device front and rear.
  • the above-mentioned time difference may be expressed as the difference ⁇ * between the number of sampling points of the first acoustic wave signal and the second acoustic wave signal by the first microphone.
  • the first microphone samples the first sound wave signal and the second sound wave signal at a fixed sampling frequency f s , for example, the sampling frequency f s is 48KHz. Therefore, in time t, the number of sampling points collected by the first microphone is t*f s .
  • the number of sampling points for the first sound wave signal by the first microphone is greater than the number of sampling points for the first sound wave signal.
  • the difference ⁇ * of the number of two sampling points is the product of the sampling frequency and the time difference: ⁇ t ⁇ f s , where ⁇ t is the above time difference.
  • the time difference threshold may be expressed as a preset sampling point value.
  • the preset sampling point value is positively correlated with the first spacing and the sampling frequency of the first microphone, and the first spacing is the distance between the first speaker and the second speaker.
  • the preset sampling point value Th may be positively correlated with the first interval D and the sampling frequency f s , and the larger the first interval D and the sampling frequency f s are, the larger the preset sampling point value Th may be.
  • the relationship between the preset sampling point value Th and the first distance D and the sampling frequency f s may be:
  • the coefficient a is an arbitrary value in (-1,1). Among them, a can take values such as ⁇ 0.2, ⁇ 0.3, ⁇ 0.4, ⁇ 0.5, ⁇ 0.6, ⁇ 0.7, etc.
  • ⁇ * >Th it means that the second sound wave signal reaches the first microphone of the second electronic device first, and the second electronic device is located on the second side of the first electronic device.
  • ⁇ * ⁇ -Th it means that the first sound wave signal reaches the first microphone of the second electronic device first, and the second electronic device is located on the first side of the first electronic device.
  • ⁇ Th it means that the first sound wave signal and the second sound wave signal reach the first microphone of the second electronic device almost simultaneously, and the second electronic device is located on the front and rear sides of the first electronic device.
  • the receiving result is the signal strength
  • the first electronic device determines the relative position information based on the receiving result, including: comparing the first power and the second power, where the first power is the signal strength of the first sound wave signal, and the first power is the signal strength of the first acoustic wave signal.
  • the second power is the signal strength of the second sound wave signal, the first speaker is located on the first side of the second speaker, the second speaker is located on the second side of the first speaker, and the first side is the left or right side; if the first power and The second power satisfies the first preset relationship, and the second electronic device is located on the first side of the first electronic device; wherein, the first preset relationship is that the result of subtracting the second power from the first power is greater than or equal to the first power threshold , the first power threshold is a positive number; or, the first preset relationship is that the result of dividing the first power by the second power is greater than or equal to the first ratio, and the first ratio is greater than 1; if the first power and the second power satisfy the first power Two preset relationships, the second electronic device is located on the second side of the first electronic device; wherein, the second preset relationship is that the result of subtracting the second power from the first power is less than or equal to a second power threshold, and the second power threshold is a negative number; or
  • the first power may be: the first average power of the first acoustic wave signal y 1 (t) within a preset time period.
  • the second power may be: the second average power of the second acoustic wave signal y 2 (t) within a preset time period.
  • the time length of the first acoustic wave signal y 1 (t) is the first time length
  • the time length of the second acoustic wave signal y 2 (t) is the second time length
  • the preset time period may be: less than or equal to Either value of the smallest value of the first duration and the second duration.
  • the time length of the first sound wave signal y 1 (t) can be: the start time when the first electronic device starts to send the first sound wave signal y 1 (t), and the end of sending the first sound wave signal y 1 ( t) end time, the corresponding length of time.
  • the time length of the second acoustic wave signal y 2 (t) can be: the start time when the first electronic device starts to send the first acoustic wave signal y 2 (t), and the time at which the first acoustic wave signal y 2 (t) ends. End time, the corresponding length of time.
  • the first ratio and the second ratio may be reciprocals of each other.
  • the relative position information between the second electronic device and the first electronic device includes at least one of the following: the second electronic device is located on the left side of the first electronic device, the second electronic device The device is located on the right side of the first electronic device, and the second electronic device is located on the front and rear sides of the first electronic device.
  • the above-mentioned position determination method may further include: detecting a first operation for the first target content displayed by the first sub-device; judging whether the first operation corresponds to the relative position information; if The first operation corresponds to the relative position information, and the first electronic device sends the first target content to the display interface of the second electronic device for display.
  • the above-mentioned sending the first target content to the display interface of the second electronic device for display may include: if the above-mentioned relative position information is that the second electronic device is located on the left side of the first electronic device, in response to the first operation, the first target The content is sent to the display interface of the second electronic device for display; or, if the relative position information is that the second electronic device is located on the right side of the first electronic device, the first target content is sent to the second electronic device in response to the first operation. or, if the above relative position information indicates that the second electronic device is located on the front and rear sides of the first electronic device, the first target content is not sent to the display interface of the second electronic device to display in response to the first operation.
  • 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 above-mentioned position determination method further includes: detecting A second operation for the first target content displayed by the first sub-device; if the second operation is an operation of extending the first target content to the left, the first electronic device sends the first target content to the left side of the first electronic device is displayed in the display interface of the second electronic device; if the second operation is an operation of extending the first target content to the right, the first electronic device sends the first target content to the second electronic device located on the right side of the first electronic device displayed on the display interface.
  • the above position determination method may further include: the first electronic device generates first guide information, where the first guide information is used to guide the user to drag the first target content to the left or to the right.
  • the first electronic device acquires the drag operation acting on the target content; the first electronic device responds to the drag operation and sends the first target content to the display interface of the second electronic device for display.
  • the first guide 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 on the right side of the first electronic device, the first guide 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 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 first guide information is used to guide the user to drag the first target content to the left move or drag to the right.
  • the above-mentioned first guidance information may be displayed in the display interface of the first electronic device in the form of text; or, the above-mentioned first guidance information may be displayed in the display interface of the first electronic device in the form of animation;
  • the first guide information may be displayed on the display interface of the first electronic device in the form of a combination of animation and text.
  • the first electronic device moves the first target content in a direction corresponding to the user operation in response to the user operation. If the first target content moves to the first preset position on the display interface of the first electronic device and remains for the first preset time, it means that the first part of the first target content has moved out of the display interface of the first electronic device.
  • the second electronic device displays the first part of the first target content, the first electronic device displays the second part of the first target content, and the first part and the second part of the first target content constitute the first target content. At this time, the first electronic device and the second electronic device jointly display the first target content.
  • the first electronic device moves the first target content in a direction corresponding to the user operation in response to the user operation. If the first target content moves to the second preset position on the display interface of the first electronic device and remains for the second preset time, it means that the first target content has been completely moved out of the display interface of the first electronic device. At this time, the second electronic device displays the first target content, and the first electronic device no longer displays the first target content.
  • the first electronic device determines relative position information based on the received result, including: determining the angle of the second electronic device relative to the first electronic device according to the time difference, the first interval and the sampling frequency.
  • the first distance is the distance between the first speaker and the second speaker
  • the sampling frequency is the sampling frequency of the microphone of the second electronic device.
  • the above-mentioned time difference may be expressed as the difference ⁇ * between the number of sampling points of the first acoustic wave signal and the second acoustic wave signal by the first microphone of the second electronic device.
  • the above-mentioned determination of the angle of the second electronic device relative to the first electronic device includes: determining the angle of the second electronic device relative to the first electronic device by a preset formula according to the difference ⁇ * between the reference angle, the first distance and the number of sampling points. angle.
  • the reference angles can be 90°, 0° and -90°.
  • D4 is the distance from the first speaker to the first microphone
  • D5 is the distance from the second speaker to the first microphone
  • D is the first distance
  • the first speaker is located on the left side of the second speaker.
  • the difference in the number of sampling points The angle ⁇ of the second electronic device relative to the first electronic device can be approximated as by formula know Therefore the angle ⁇ can be approximated as Among them, ⁇ is the angle of the second electronic device relative to the first electronic device, ⁇ * is the difference in the number of sampling points, v is the propagation speed of the acoustic signal, and f s is the sampling frequency of the first microphone.
  • the reference angles are 0°, 90° and 180°.
  • D4 is the distance from the first speaker to the first microphone
  • D5 is the distance from the second speaker to the first microphone
  • D is the first distance
  • the first speaker is located on the left side of the second speaker.
  • the difference in the number of sampling points The angle ⁇ of the second electronic device relative to the first electronic device can be approximated as by formula know Therefore the angle ⁇ can be approximated as Among them, ⁇ is the angle of the second electronic device relative to the first electronic device, ⁇ * is the difference in the number of sampling points, v is the propagation speed of the acoustic signal, and f s is the sampling frequency of the first microphone.
  • the orientation corresponding to the angle can be determined according to the area boundary.
  • the area boundary line may be set in a preset manner; or, the area boundary line may be calculated by the time when the first sound wave signal and the second sound wave signal are collected by the first microphone.
  • the boundary line between the left area, the right area, and the front and rear areas of the first electronic device may be preset.
  • the angle corresponding to the boundary line between the left area, the right area, and the front and rear areas is preset to be ⁇ 20°. That is, if the angle of the speaker relative to the TV is within the range of [-20°, 20°], the speaker is located in the front and rear areas of the TV; if the angle of the speaker relative to the TV is within the range of (20°, 90°), the speaker is located in the front and rear areas of the TV.
  • the right area of the TV if the angle of the speaker relative to the TV is within the range of [-90°, -20°), the speaker is located in the left area of the TV.
  • the left area and the right area may be determined according to the time T7 when the first microphone of the second electronic device collects the first sound wave signal, the time T8 when the second sound wave signal is collected, and the threshold t2 . and the demarcation line between the front and rear areas.
  • t 2 condition serves as the boundary between the left area and the front and rear areas.
  • the expansion direction does not change between the first electronic device and the second electronic device; wherein, the expansion direction includes right expansion and left expansion.
  • extending to the right may be: the user drags the first target content to the right on the display interface of the first electronic device to expand the first target content to display in the second electronic device located in the right area of the first electronic device.
  • Extending to the left may be: the user drags the first target content to the left on the display interface of the first electronic device to expand the first target content to display in the second electronic device located in the left area of the first electronic device.
  • the second electronic device is located in the right 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.
  • the expansion direction remains unchanged at rightward expansion.
  • the user can still drag the target content to the right to send the target content to the display interface of the second electronic device for display.
  • 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.
  • the extended display when the extended display is started between the first electronic device and the second electronic device, if the second electronic device is located on the front and rear sides of the first electronic device, the first electronic device does not display to the first electronic device.
  • the second electronic device transmits the first target content.
  • the first electronic device can generate first prompt information, and the first prompt information is used to prompt the user: the second electronic device is located in the front and rear areas of the first electronic device, and the first electronic device cannot send the first target content to the second electronic device displayed on the display interface of the device.
  • 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 and rear areas of the first electronic device, then the first electronic device follows the default expansion direction or the user.
  • the customary expansion direction the first target content is sent to the display interface of the second electronic device for display.
  • the default expansion direction can be left expansion or right expansion.
  • the above method may include: after the position of the first electronic device and/or the second electronic device is changed, re-determining the relative position between the second electronic device and the first electronic device information.
  • both the first electronic device and the second electronic device can detect whether their respective positions have changed through built-in accelerometer sensors, gyroscope sensors or magnetometer sensors. If 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 may change. For example, the second electronic device is located in the left area of the first electronic device. After the position of the first electronic device and/or the second electronic device is changed, the second electronic device may be located in the front and rear areas of the first electronic device. 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.
  • the first electronic device detects a change in the position of the first electronic device through the built-in accelerometer sensor, gyroscope sensor or magnetometer sensor, and executes sending the first sound wave signal to the second electronic device through the first speaker. , the step of sending a second sound wave signal to the second electronic device through the second speaker and the subsequent steps, so as to re-determine the relative position information between the second electronic device and the first electronic device.
  • the second electronic device detects a change in the position of the second electronic device through the built-in accelerometer sensor, gyroscope sensor or magnetometer sensor, then the second electronic device sends relative position information to the first electronic device to determine ask.
  • the first electronic device executes the steps of sending the first sound wave signal to the second electronic device through the first speaker, and sending the second sound wave signal to the second electronic device through the second speaker and subsequent steps, so as to Re-determine relative position information between the second electronic device and the first electronic device.
  • the first electronic device when any one of the following is detected, sends a first sound wave signal to the second electronic device through the first speaker, and sends a second sound wave to the second electronic device through the second speaker
  • the first electronic device establishes a pairing connection with the second electronic device, and the extended display application in the first electronic device is activated; or, the first electronic device establishes a pairing connection with the second electronic device, and the first electronic device detects to the second preset operation; or, the first electronic device detects the second preset operation; or, the extended display application in the first electronic device is activated.
  • the first electronic device performs the steps of sending the first sound wave signal to the second electronic device through the first speaker, and sending the second sound wave signal to the second electronic device through the second speaker.
  • the above-mentioned position determination method may further include: detecting a third operation on the first target content displayed by the first sub-device, where the third operation is an operation of projecting the second target content on the screen ; judging whether the relative position information meets the preset position requirement; if the relative position information 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.
  • the preset position requirement may be that the second electronic device is located on the front and rear sides of the first electronic device.
  • the preset screen projection condition may be that the second electronic device is located on the left side of the first electronic device.
  • the preset screen projection condition may be that the second electronic device is located on the right side of the first electronic device.
  • the above-mentioned location determination method may include: the first electronic device generates second prompt information, and the second prompt information is used to prompt the user: place the second electronic device on the target of the first electronic device area, and the second target is one or more of the front and rear side area, the left side area and the right side area.
  • the user can help the user to place the second electronic device in the correct area according to the second prompt information, so as to quickly realize the screen projection.
  • the above-mentioned second target content may or may not have privacy requirements.
  • the situation of privacy leakage should be prevented, or the risk of privacy leakage should be reduced.
  • the first electronic device will The second target content is sent to the display interface of the second electronic device for display.
  • the second target content with privacy requirements is sent to the second electronic device for screen projection display, It is possible to prevent the second target content from leaking privacy, or reduce the risk of privacy leaking of the second target content.
  • the first electronic device sends a request to the second electronic device for requesting the second electronic device to stop displaying the second target content information.
  • the first electronic device sends the second target content to the display interface of the second electronic device for display.
  • the second electronic device continues to display the second target content.
  • an embodiment of the present application provides a method for determining a position, including: a second electronic device receives, through a first microphone, a first sound wave signal and a second sound wave signal sent by the first electronic device, the first sound wave signal and the first sound wave signal
  • the second sound wave signal is two sound wave signals with different characteristics; the second electronic device obtains the reception results of the first sound wave signal and the second sound wave signal received by the first microphone; the second electronic device determines the first sound wave signal according to the reception result of the first microphone.
  • the embodiments of the present application when the relative position information between the second electronic device and the first electronic device is determined, there is only one placement mode of the two speakers of the first electronic device relative to the first electronic device. Regardless of where the second electronic device is located in the first electronic device, the arrangement of the two speakers will not affect the determined relative position information. Therefore, compared with the prior art, the embodiments of the present application can more accurately determine the relative position information between the second electronic device and the first electronic device. In addition, the embodiment of the present application can be implemented only if the first electronic device has a first speaker and a second speaker, and the second electronic device has one microphone, which is relatively easy to implement.
  • the relative position information between the second electronic device and the first electronic device may be: the position information of the second electronic device relative to the first electronic device, or the relative position information of the first electronic device relative to the second electronic device location information, which is not limited in this embodiment of the present application.
  • the first sound wave signal and the second sound wave signal may be sound wave signals with the same time series, or may be sound wave signals with different time series.
  • the above-mentioned acoustic wave signal may be an infrasound wave signal with a frequency of 0-20KHz, or may be an ultrasonic signal with a frequency of 20KHz or more.
  • the frequency of the above-mentioned sound wave signal may be 1KHz, 2KHz, 3KHz, 5KHz, 10KHz, 15KHz, 20KHz, 30KHz and so on.
  • the above-mentioned acoustic wave signal may be an ultrasonic wave signal.
  • the above-mentioned position determination method may further include: the first electronic device and the second electronic device. Establish a pairing connection between them.
  • the above receiving result includes: the time difference between the first sound wave signal and the second sound wave signal received by the first microphone; and/or the first sound wave signal and the second sound wave received by the first microphone The signal strength of each acoustic signal in the signal.
  • the above receiving result is a time difference
  • the second electronic device obtains the receiving result of the first microphone receiving the first sound wave signal and the second sound wave signal, including: combining the first sound wave signal with the second sound wave signal.
  • the two sound wave signals are transformed into the same frequency band; the first sound wave signal and the second sound wave signal transformed into the same frequency band are subjected to correlation calculation to determine the time difference between the first sound wave signal and the second sound wave signal received by the first microphone.
  • the sound wave signal can be filtered by a filter to obtain the first sound wave signal and the second sound wave signal.
  • Two sound waves It should be noted that the first acoustic wave signal x 1 (t) and the second acoustic wave signal x 2 (t) will be affected by channel information or time delay during channel transmission.
  • the second electronic device receives After two acoustic wave signals, the first acoustic wave signal x 1 (t) is transformed into the first acoustic wave signal y 1 (t), and the second acoustic wave signal x 2 (t) is transformed into the second acoustic wave signal y 2 (t).
  • the second electronic device may perform frequency conversion processing on the first acoustic wave signal y 1 (t), so that the first acoustic wave signal y 1 (t) and the second acoustic wave signal y 2 (t) are transformed into the same frequency band.
  • the second electronic device may perform frequency conversion processing on the second acoustic wave signal y 2 (t), so that the first acoustic wave signal y 1 (t) and the second acoustic wave signal y 2 (t) are converted to the same frequency band.
  • the second electronic device may perform frequency conversion processing on both the first acoustic wave signal y 1 (t) and the second acoustic wave signal y 2 (t), so that the first acoustic wave signal y 1 (t) and the second acoustic wave signal y 2 (t) is transformed to the same frequency band.
  • the above-mentioned time difference may be expressed as the difference ⁇ * between the number of sampling points of the first microphone for the first acoustic wave signal and the second acoustic wave signal
  • the time difference threshold may be expressed as a preset sampling point value.
  • the preset sampling point value is positively correlated with the first spacing and the sampling frequency of the first microphone, and the first spacing is the distance between the first speaker and the second speaker.
  • the relevant calculation formula can be: y 1 (t) represents the value of the first acoustic wave signal y 1 (t) at the sampling time t, and y' 2 (t- ⁇ ) represents the value of the second acoustic wave signal y' 2 (t) at the sampling time t- ⁇ .
  • the peak value of y 1 (t) coincides with the peak value of y' 2 (t- ⁇ )
  • the peak value of z( ⁇ ) and the time difference between the first acoustic wave signal and the second acoustic wave signal reaching the first microphone can be obtained.
  • the relevant calculation formula can be: y 1 (t- ⁇ ) represents the value of the first acoustic wave signal y 1 (t) at the sampling time t- ⁇ , and y' 2 (t) represents the value of the second acoustic wave signal y' 2 (t) at the sampling time t .
  • the peak value of y 1 (t- ⁇ ) coincides with the peak value of y' 2 (t)
  • the peak value of z( ⁇ ) and the time difference between the first acoustic wave signal and the second acoustic wave signal reaching the first microphone can be obtained.
  • the first electronic device sends the first sound wave signal through the first speaker at the first moment, and sends the second sound wave signal through the second speaker at the second moment , the first moment is different from the second moment.
  • the second electronic device performs correlation calculation between the received sound wave signal and the first sound wave signal or the second sound wave signal, and determines the time difference between the first sound wave signal and the second sound wave signal received by the first microphone.
  • a correlation calculation is performed between the received acoustic wave signal and the first acoustic wave signal or the second acoustic wave signal, and time values corresponding to the two peaks in the correlation calculation result are determined. Then, according to the time values corresponding to the two peaks and the time length of the first sound wave signal or the time length of the second sound wave signal, determine the time difference between the first sound wave signal and the second sound wave signal received by the first microphone.
  • ⁇ 1 is the time value corresponding to the peak value of the acoustic wave signal received by the second electronic device in the correlation calculation
  • ⁇ 2 is the time corresponding to the peak value of the first acoustic wave signal in the correlation calculation
  • T 9 is the first acoustic wave signal or The time length of the second sound wave signal
  • T10 is the time length between the end time when the first speaker sends the first sound wave signal and the start time when the second speaker sends the second sound wave signal.
  • the first electronic device may notify the second electronic device of the time series information of the first sound wave signal or the second sound wave signal by means of WIFI or Bluetooth.
  • the second electronic device may pre-store the time series information of the first sound wave signal or the second sound wave signal, and the first electronic device does not need to inform the second electronic device of the time series information of the first sound wave signal or the second sound wave signal .
  • the above-mentioned relative position information includes at least one of the following: the second electronic device is located on the left side of the first electronic device, the second electronic device is located on the right side of the first electronic device, and the second electronic device is located on the left side of the first electronic device.
  • the device is located on the front and rear sides of the first electronic device.
  • the above receiving result is a time difference
  • the second electronic device determines the relative position information between the first electronic device and the second electronic device according to the receiving result of the first microphone, including: calculating The time difference obtained by subtracting the fourth moment from the third moment, the third moment is the moment when the first microphone receives the first sound wave signal, the fourth moment is the moment when the first microphone receives the second sound wave signal, and the first speaker is located at the second speaker If the time difference is greater than or equal to the first time difference threshold, the second electronic device is located on the second side of the first electronic device.
  • the first time difference threshold is a positive number; if the time difference is less than or equal to the second time difference threshold, the second electronic device is located on the first side of the first electronic device; wherein, the second time difference threshold is a negative number; if the time difference is less than or equal to the second time difference threshold When a time difference threshold is greater than the second time difference threshold, the second electronic device is located on the front and rear sides of the first electronic device.
  • the above-mentioned reception result is the signal strength
  • the second electronic device determines the relative position information between the first electronic device and the second electronic device according to the reception result of the first microphone, including: Compare the first power and the second power, the first power is the signal strength of the first sound wave signal, the second power is the signal strength of the second sound wave signal, the first speaker is located on the first side of the second speaker, and the second speaker is located on the first side of the second speaker.
  • the second electronic device is located on the first side of the first electronic device;
  • the first preset relationship is that the result of subtracting the second power from the first power is greater than or equal to the first power threshold, and the first power threshold is a positive number; or, the first preset relationship is that the first power is divided by the second power
  • the result is greater than or equal to the first ratio, and the first ratio is greater than 1; if the first power and the second power satisfy the second preset relationship, the second electronic device is located on the second side of the first electronic device; wherein, the second preset Let the relationship be that the result of subtracting the second power from the first power is less than or equal to the second power threshold, and the second power threshold is a negative number; or, the second preset relationship is that the result of dividing the first power by the second power is less than or equal to the second power threshold.
  • the first ratio is less than 1; if the first power and the second power satisfy a third preset relationship, the second electronic device is located on the front and rear sides of the first electronic device; wherein, the third preset relationship is the first power minus the first power.
  • the result of removing the second power is less than the first power threshold and greater than the second power threshold; or, the third preset relationship is that the result of dividing the first power by the second power is less than the first ratio and greater than the second ratio.
  • the first ratio and the second ratio are reciprocals of each other.
  • the second electronic device determines the relative position information between the first electronic device and the second electronic device according to the reception result of the first microphone, including: according to the time difference, the first distance and the The sampling frequency determines the angle of the second electronic device relative to the first electronic device.
  • the first distance is the distance between the first speaker and the second speaker
  • the sampling frequency is the sampling frequency of the microphone of the second electronic device.
  • the above-mentioned time difference may be expressed as the difference ⁇ * between the number of sampling points of the first acoustic wave signal and the second acoustic wave signal by the first microphone of the second electronic device.
  • the above-mentioned determination of the angle of the second electronic device relative to the first electronic device includes: determining the angle of the second electronic device relative to the first electronic device by a preset formula according to the difference ⁇ * between the reference angle, the first distance and the number of sampling points. angle.
  • a request for redetermining the relative position information is sent to the first electronic device.
  • the first electronic device performs the steps of sending the first sound wave signal to the second electronic device through the first speaker, and sending the second sound wave signal to the second electronic device through the second speaker and subsequent steps.
  • the second electronic device performs the steps of receiving the first sound wave signal and the second sound wave signal through the first microphone and subsequent steps.
  • the first microphone may include one first microphone, or may include multiple first microphones.
  • the first microphone is a plurality of first microphones, there may be various ways of collecting the sound wave signal.
  • the second electronic device determines the time difference between receiving the first sound wave signal and the second sound wave signal, including: the second electronic device controls a first microphone to collect two sound wave signals; The collected first acoustic wave signal and the second acoustic wave signal determine the above-mentioned time difference.
  • the second electronic device determines the time difference between receiving the first sound wave signal and the second sound wave signal, including: the second electronic device controls each of the plurality of first microphones to collect the first sound wave signal and the second sound wave signal; the second electronic device takes the first sound wave signal and the second sound wave signal collected by any one of the first microphones, and determines the above-mentioned time difference.
  • the second electronic device determines the time difference between receiving the first sound wave signal and the second sound wave signal, including: the second electronic device controls each of the plurality of first microphones to collect the first sound wave signal and second sound wave signal; the second electronic device calculates the first sound wave signal and the second sound wave signal collected by each first microphone to obtain a plurality of initial time differences, and each first microphone corresponds to an initial time difference; the second electronic device The device determines the above time difference according to a plurality of initial time differences.
  • an embodiment of the present application provides an audio playback method, including: a first electronic device sends a first sound wave signal to the first audio playback device and the second audio playback device through a first speaker, respectively, and sends a first sound wave signal to the second audio playback device through the second speaker.
  • the second audio playback device and the second audio playback device respectively send a second sound wave signal, the first speaker is different from the second speaker, and the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics;
  • the electronic device receives the first relative position information between the first audio playback device and the first electronic device sent by the first audio playback device, and the information between the second audio playback device and the first electronic device sent by the second audio playback device.
  • the second relative position information, the first relative position information is determined by the first microphone of the first audio playback device receiving the first sound wave signal and the reception result of the second sound wave signal, and the second relative position information is determined by the second audio playback device.
  • the receiving results of the first sound wave signal and the second sound wave signal received by the two microphones are determined; or, the first electronic device receives the first receiving result sent by the first audio playback device, and the second receiving result sent by the second audio playback device,
  • the first reception result is that the first microphone of the first audio playback device receives the first sound wave signal and the second sound wave signal
  • the second reception result is that the second microphone of the second audio playback device receives the first sound wave signal and the second sound wave signal.
  • the location information determines third relative location information between the first audio playback device and the second audio playback device; the third relative location information includes that the first audio playback device is located on the third side of the second audio playback device, and the second audio playback device is located on the fourth side of the first audio playback device, and the third side is the left or right side; the first electronic device sends the audio information of the left channel to the audio on the left in the first audio playback device and the second audio playback device The playback device sends the audio information of the right channel to the audio playback device where the first audio playback device and the second audio playback device are located on the right side.
  • 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 on the left side, The audio information of the right channel is sent to the audio playback device located on the right side without manually setting the positional relationship between the first audio playback device and the second audio playback device.
  • first relative position information may be: position information of the first audio playback device relative to the first electronic device, or may be position information of the first electronic device relative to the first audio playback device, the embodiment of the present application This is not limited.
  • second relative position information may be: the position information of the second audio playback device relative to the first electronic device, or may be the position information of the first electronic device relative to the second audio playback device. Not limited.
  • the above-mentioned first receiving result includes: the time difference between the first sound wave signal and the second sound wave signal received by the first microphone; and/or the first sound wave signal and the second sound wave signal received by the first microphone.
  • the signal strength of each of the two acoustic signals includes: the time difference between the first sound wave signal and the second sound wave signal received by the first microphone; and/or the first sound wave signal and the second sound wave signal received by the first microphone.
  • the above-mentioned second receiving result includes: a time difference between the second microphone receiving the first sound wave signal and the second sound wave signal; and/or, the second microphone receiving the first sound wave signal and the first sound wave signal The signal strength of each of the two acoustic signals.
  • determining the third relative position information between the first audio playback device and the second audio playback device may include: if the first audio playback device and the second audio playback device are located in the first two regions of the electronic device, the first electronic device determines the third relative position information according to the positional relationship between the two regions; if the first audio playback device and the second audio playback device are located in the same region of the first electronic device, the third An electronic device determines third relative position information between the first audio playback device and the second audio playback device according to the first angle and the second angle; wherein the first angle is the relative position of the first audio playback device to the first electronic device The second angle is the angle of the second audio playback device relative to the first electronic device.
  • the first audio playback device 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 and rear or right side area of the first electronic device, it means that the first audio playback device is located in the second audio playback device.
  • the first electronic device On the left side of the playback device, 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.
  • the first audio playback device 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 and rear or left area of the first electronic device, it means that the first audio playback device is located in the second audio playback device.
  • 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.
  • the first electronic device may determine the third relative position information according to the first angle and the second angle.
  • 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 ⁇ 1.
  • the angle of the electronic device is ⁇ 2, and ⁇ 1 is greater than ⁇ 2, then the first electronic device determines that the first audio playback device is located on the right side of the second audio playback device according to ⁇ 1 and ⁇ 2. Afterwards, the first electronic device sends the audio information of the right channel to the first audio playback device, and sends the audio information of the left channel to the second audio playback device.
  • the angle of the first audio playback device relative to the first electronic device is ⁇ 1, and the angle of the second audio playback device relative to the first electronic device is ⁇ 1.
  • the angle of ⁇ 2 is ⁇ 2, and ⁇ 1 is smaller than ⁇ 2, then the first electronic device determines that the first audio playback device is located on the left side of the second audio playback device according to ⁇ 1 and ⁇ 2. Afterwards, the first electronic device sends the audio information of the right channel to the second audio playing device, and sends the audio information of the left channel to the first audio playing device.
  • embodiments of the present application provide an electronic device, including: one or more processors, a memory, and a display screen; the memory and the display screen are coupled to the one or more processors, and the memory for storing computer program code, the computer program code comprising computer instructions; when executed by the one or more processors, the computer instructions cause the electronic device to perform the method according to any one of the first aspects , or the method of any one of the second aspects, or the method of any one of the third aspects, or the method of any one of the fourth aspects.
  • an embodiment of the present application provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the first aspect The method of any one of the method, or the method of any one of the second aspect, or the method of any one of the third aspect, or the method of any one of the fourth aspect .
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • an embodiment of the present application provides a chip system, the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement any one of the first aspects.
  • the chip system may be a single chip or a chip module composed of multiple chips.
  • an embodiment of the present application provides a computer program product, which, when the computer program product runs on a terminal device, enables the electronic device to execute the method described in any one of the first aspect, or any one of the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements any one of the first aspect The method, or the method of any one of the second aspect, or the method of any one of the third aspect, or the method of any one of the fourth aspect.
  • the electronic device according to the fifth aspect, the chip system according to the sixth and seventh aspects, the computer program product according to the eighth aspect, and the computer-readable storage medium according to the ninth aspect are provided above. , are used to perform 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, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.
  • Fig. 1 is the scene schematic diagram of a kind of ranging algorithm provided by related art one;
  • Fig. 2 is the scene schematic diagram of another ranging algorithm provided in related art two;
  • Fig. 3 is the scene schematic diagram of the algorithm for determining the relative position between electronic devices provided in the related art three;
  • Figure 5(a) and Figure 5(b) are schematic diagrams of the placement directions of the two microphones of the electronic device
  • FIG. 6(a) and FIG. 6(b) are schematic diagrams of the placement directions of two microphones of the electronic device
  • FIG. 7(a) and FIG. 7(b) are schematic diagrams of the placement directions of the two speakers of the first electronic device
  • FIG. 8(a) and FIG. 8(b) are schematic diagrams showing the orientation of the two speakers of the first electronic device
  • FIG. 9 is a schematic diagram of a system architecture to which the position determination method provided by the embodiment of the present application is applicable.
  • FIG. 10 is a schematic structural diagram of a first electronic device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a second electronic device provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of an extended screen application scenario to which the position determination method provided by the embodiment of the present application is applicable;
  • FIG. 13 is a schematic diagram of the division of each area of a notebook computer according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a secure screen projection application scenario to which the location determination method provided by the embodiment of the present application is applicable;
  • FIG. 15 is a schematic diagram of a stereo application scenario to which the position determination method provided by the embodiment of the present application is applicable;
  • 16 is a schematic diagram of an angle between a TV and a sound box provided by an embodiment of the application.
  • 17 is a schematic diagram of an angle between a TV and a sound box provided by an embodiment of the application.
  • 19 is a schematic diagram of relative position information between a first electronic device and a second electronic device provided by an embodiment of the application;
  • FIG. 21 is a schematic flowchart of determining relative position information according to an embodiment of the present application.
  • 22 is a schematic diagram of relative position information between a first electronic device and a second electronic device provided by an embodiment of the present application;
  • FIG. 24 is a schematic flowchart of determining relative position information according to an embodiment of the present application.
  • FIG. 25 is a schematic flowchart of determining relative position information according to an embodiment of the present application.
  • 26 is a schematic flowchart of determining relative position information provided by an embodiment of the present application.
  • FIG. 27 is a schematic flowchart of determining relative position information according to an embodiment of the present application.
  • FIG. 28 is a schematic diagram of the time difference between the ultrasonic signal reaching the microphone of the second electronic device according to the embodiment of the application;
  • FIG. 29 is a schematic flowchart of determining relative position information according to an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the steps involved in the device interaction method and the location determination method provided in the embodiments of this application are only examples, and not all steps are required to be performed, or not all information or contents in the message are required. During use, it can be increased or decreased as needed.
  • FIG. 1 is a schematic diagram of a scene of a ranging algorithm provided in the first related art, and the scene includes an electronic device 10 and an object 20 .
  • the electronic device 10 is located at the target position, and the distance between the target position and the object 20 is determined by measuring the distance between the electronic device 10 and the object 20 .
  • the ranging algorithm for determining the distance between the target position and the object 20 may be: the electronic device 10 transmits a sound wave signal to the object 20, and receives the sound wave signal reflected by the object 20, and the electronic device 10 according to the propagation of the sound wave signal Time and propagation velocity, determine the distance from the target location to the object 20 .
  • the electronic device 10 transmits a sound wave signal through a speaker at time T1, the sound wave signal is blocked by the object 20 and then reflected back to the electronic device 10, and the electronic device 10 receives the reflected sound wave signal through a microphone at time T2.
  • the distance that the sound wave signal is transmitted from the electronic device 10 to the object 20 is the same as the distance that the sound wave signal is reflected from the object 20 back to the electronic device 10 . Therefore, the sound wave signal is transmitted from the electronic device 10 to the object 20 , and then reflected back to the electronic device 10 by the object 20 , which is equivalent to twice the distance between the electronic device 10 and the object 20 .
  • D 1 is the distance between the electronic device 100 and the object 200
  • c is the propagation speed of the sound wave signal, and is the speed of sound.
  • the distance between the electronic device 10 and the object 20 is the distance between the target position and the object 20 .
  • the distance between the target position and the object 20 can be measured by one electronic device 10 .
  • the ranging algorithm can only be used for ranging objects with large areas such as walls and human bodies. For objects with a small area, since the object cannot provide a reflective surface for the sound wave signal to be reflected back to the electronic device 10, the distance between the target position and the object with a small area cannot be measured using this ranging algorithm.
  • FIG. 2 is a schematic diagram of a scenario of another ranging algorithm provided in the related art 2, and the scenario includes an electronic device 21 and an electronic device 22 .
  • the electronic device 21 is located in the first position
  • the electronic device 22 is located in the second position
  • the electronic device 21 has at least one speaker
  • the electronic device 22 has at least one microphone.
  • a loudspeaker of the electronic device 21 can transmit a sound wave signal
  • a microphone of the electronic device 22 can receive the sound wave signal.
  • the ranging algorithm for determining the distance between the first position and the second position may be: the electronic device 21 transmits a sound wave signal to the electronic device 22, and the electronic device 22 determines the first position according to the propagation time and propagation speed of the sound wave signal.
  • the distance between the position and the second position; or, the electronic device 22 at the second position transmits a sound wave signal to the electronic device 21 at the first position, and the electronic device 21 determines the first position according to the propagation time and propagation speed of the sound wave signal distance to the second location.
  • the electronic device 21 transmits a sound wave signal through a speaker, and the sound wave signal carries the information at time T3.
  • the distance between the electronic device 21 and the electronic device 22 is the distance between the first position and the second position.
  • the electronic device 22 can send the time T 4 when the sound wave signal is received and the time T 3 when the electronic device 21 transmits the sound wave signal to other electronic devices.
  • FIG. 3 is a schematic diagram of a scenario of an algorithm for determining relative positions between electronic devices provided in the third related art.
  • the scenario includes: an electronic device 31 and an electronic device 32 .
  • the electronic device 31 is located in the first position, the electronic device 32 is located in the second position, the electronic device 31 has at least one speaker, and the electronic device 32 has at least two microphones (two microphones are shown in FIG. limit).
  • a loudspeaker of the electronic device 31 can transmit a sound wave signal, and each microphone of the electronic device 32 can receive the sound wave signal.
  • the algorithm for determining the relative position between electronic devices may be: a speaker of the electronic device 31 transmits a sound wave signal to the electronic device 32, two microphones of the electronic device 32 receive the sound wave signal, and the electronic device 32 receives the sound wave signal according to the two microphones. By the time of the above-mentioned acoustic wave signal, the relative position between the electronic device 32 and the electronic device 31 is determined.
  • the electronic device 31 has a speaker, the electronic device 32 has a microphone M1 and a microphone M2, and the microphone M2 is located on the right side of the microphone M1.
  • the electronic device 31 transmits a sound wave signal through a speaker, the microphone M1 of the electronic device 32 receives the sound wave signal at time T5, and the microphone M2 receives the sound wave signal at time T6 .
  • the electronic device 32 can determine the relative position between the electronic device 31 and the electronic device 32 according to T 5 and T 6 .
  • T 5 is earlier than T 6 , indicating that the sound wave signal first reaches the microphone M1 and then reaches the microphone M2, the electronic device 32 can determine that the electronic device 32 is located in the right area of the electronic device 31, as shown in FIG. 4 . If T 5 is later than T 6 , it means that the sound wave signal reaches the microphone M2 first and then the microphone M1 , and the electronic device 32 can determine that the electronic device 32 is located in the left area of the electronic device 31 , as shown in FIG. 4 .
  • T5 and T6 are almost the same, it means that the sound wave signal reaches the microphone M1 and the microphone M2 almost simultaneously, and the electronic device 32 can determine that the electronic device 32 is located in the front and rear areas of the electronic device 31, as shown in FIG. 4 .
  • the relative position between the electronic device 31 and the electronic device 32 can be determined through one speaker of the electronic device 31 and two microphones of the electronic device 32 .
  • the distance between the two microphones of the electronic device 32 is small, the accuracy of the algorithm in the third related art will be greatly affected.
  • the distance between the two microphones of the electronic device 32 is D 3
  • between T 5 and T 6 is D 3 /c, where the two microphones of the electronic device 32
  • the distance D 3 between the microphones is proportional to the maximum value D 3 /c of
  • the distance D 3 between the two microphones of the existing electronic device is usually small, and the corresponding D 3 /c is also small.
  • the threshold can be determined according to
  • the threshold t 1 is proportional to D 3 , for example, if T5 is earlier than T6 , and Then the electronic device 32 is located in the right area of the electronic device 31; if T 5 is later than T 6 , and Then the electronic device 32 is located in the left area of the electronic device 31; if Then the electronic device 32 is located in the front and rear areas of the electronic device 31 .
  • T5 is earlier than T6 , and Then the electronic device 32 is located in the right area of the electronic device 31; if T 5 is later than T 6 , and Then the electronic device 32 is located in the left area of the electronic device 31; if Then the electronic device 32 is located in the front and rear areas of the electronic device 31 .
  • the electronic device 32 determines T 5 according to the time when the microphone M1 collects the sound wave signal, and determines T 6 according to the time when the microphone M2 collects the sound wave signal.
  • this requires relatively high time synchronization between the microphone M1 and the microphone M2, otherwise, the algorithm in the third related art will be affected to a certain extent. In actual situations, the time synchronization between the microphone M1 and the microphone M2 may not meet the requirements, and there may be some deviations. In addition, the propagation process of the sound wave signal and other aspects of the electronic device 32 may also affect the time synchronization between the microphone M1 and the microphone M2, resulting in some deviations in the time synchronization.
  • the smaller D3 corresponds to the interval and interval The range of , respectively, is smaller than the interval corresponding to the larger D 3 and interval range. Therefore, for the case where D3 is small, the interval and interval The range is relatively small, and the deviation caused by the time synchronization between the microphone M1 and the microphone M2 has a great influence on the electronic device 32 determining the position information of the electronic device 32 relative to the electronic device 31 . And for the larger case of D3 , the interval and interval The range is relatively large, and the deviation caused by the time synchronization between the microphone M1 and the microphone M2 has relatively little influence on the electronic device 32 determining the position information of the electronic device 32 relative to the electronic device 31 .
  • the position information determined by the electronic device 32 may be: the electronic device 32 is located in the front and rear areas of the electronic device 31 , and the position information is not the real position of the electronic device 32 relative to the electronic device 31 . If the distance D3 between the two microphones of the electronic device 32 is large, the position information determined by the electronic device 32 may be: the electronic device 32 is located in the left area or the right area of the electronic device 31, and the position information is the electronic device 32. The actual position of the device 32 relative to the electronic device 31 .
  • the electronic device 32 may be located in various directions of the electronic device 31 , and the placement of the two microphones of the electronic device 32 relative to the electronic device 31 may be various. For example, as shown in FIG. 3 , the two microphones of the electronic device 32 are placed laterally relative to the electronic device 31 . For another example, as shown in FIG. 5( a ), FIG. 5( b ), FIG. 6( a ) and FIG. 6( b ), the two microphones of the electronic device 32 are placed vertically relative to the electronic device 31 . In addition, the two microphones of the electronic device 32 may be inclined at any angle relative to the electronic device 31 .
  • the sound wave signal of the electronic device 31 first reaches the microphone M1 and then reaches the microphone M2 .
  • FIG. 5( b ) when the electronic device 32 is located in the left area of the electronic device 31 , the sound wave signal of the electronic device 31 first reaches the microphone M1 and then reaches the microphone M2 . It can be seen from this that, regardless of whether the electronic device 32 is located in the left area or the right area of the electronic device 31 , the sound wave signal of the electronic device 31 may reach the microphone M1 first and then the microphone M2 .
  • the first electronic device has two speakers, and the second electronic device has at least one microphone.
  • the first electronic device transmits the first sound wave and the second sound wave with different characteristics respectively through two speakers, and the second electronic device receives the first sound wave and the second sound wave through a microphone.
  • the second electronic device After receiving the first sound wave signal and the second sound wave signal, the second electronic device determines according to the time difference between the microphone receiving the first sound wave and the second sound wave, or the signal strength between the first sound wave and the second sound wave Relative position information between the second electronic device and the first electronic device.
  • the electronic device 32 needs to have at least two microphones.
  • the second electronic device only needs to have one microphone.
  • the embodiment of the present application is easier to implement.
  • the electronic device 31 when determining the position information of the electronic device 32 relative to the electronic device 31 , the electronic device 31 is used as a reference to determine which area of the electronic device 32 is located in the electronic device 31 .
  • the two microphones of the electronic device 32 may be placed in various ways relative to the electronic device 31 (reference).
  • the position of the first electronic device when determining the relative position information between the second electronic device and the first electronic device, the position of the first electronic device is used as a reference, and it is to determine whether the second electronic device is located in the first electronic device. in what area. At this time, there is only one arrangement manner of the two speakers of the first electronic device relative to the first electronic device (reference).
  • the speaker Y1 on the left side of the first electronic device 100 transmits the first sound wave signal
  • the speaker Y2 on the right side transmits the first sound wave signal
  • a microphone of the second electronic device 200 receives the first sound wave signal and the second sound wave signal.
  • FIG. 7( a ) when the second electronic device 200 is located in the right area of the first electronic device 100 , the second sound wave signal of the speaker Y2 reaches the microphone first, and the first sound wave signal of the speaker Y1 reaches the microphone later.
  • FIG. 7(b) when the second electronic device 200 is located in the left area of the first electronic device 100, the first sound wave signal of the speaker Y1 reaches the microphone first, and the second sound wave signal of the speaker Y2 reaches the microphone later. It can be seen that, with respect to FIG. 5( a ) and FIG. 5( b ), the embodiment of the present application can accurately determine that the second electronic device 200 is located in the left area or the right area of the first electronic device 100 .
  • FIG. 8( a ) when the second electronic device 200 is located below the right area of the first electronic device 100 , the second sound wave signal of the speaker Y2 reaches the microphone first, and the first sound wave signal of the speaker Y1 arrives later microphone.
  • FIG. 8( b ) when the second electronic device 200 is located above the right area of the first electronic device 100 , the second sound wave signal of the speaker Y2 reaches the microphone first, and the first sound wave signal of the speaker Y1 arrives later microphone. It can be seen that, with respect to FIG. 6( a ) and FIG. 6( b ), the embodiment of the present application can accurately determine that the second electronic device 200 is located in the right area of the first electronic device 100 .
  • the arrangement of the two speakers of the first electronic device in the embodiment of the present application does not appear as shown in FIGS. 5(a), 5(b), 6(a) and 6(a). Therefore, the relative position information between the second electronic device and the first electronic device can be accurately determined.
  • the first electronic device may be any electronic device with two speakers, such as a notebook computer, a television, a display screen, and the like.
  • the second electronic device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a laptop, an ultra-mobile personal computer (ultra-mobile personal computer) , UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and other electronic devices.
  • the specific types of the first electronic device and the second electronic device are not limited.
  • the distance between the two microphones of the electronic device 32 in the related art 3 is generally small, for example, the distance between the two microphones of the mobile phone or the tablet computer is about 10 cm.
  • the distance between the two speakers of the first electronic device is relatively large.
  • the distance between the two speakers of some notebook computers is about 30 cm
  • the distance between the two speakers of the TV or display screen is about 30 cm.
  • the distance is about 40 cm to 50 cm, and the distance between the two speakers of some TVs or displays can even reach 70 cm to 80 cm, which is much larger than 10 cm.
  • the distance between the two speakers in the embodiment of the present application may be greater than the preset distance, and the preset distance may be any value greater than 10 cm, such as 15 cm, 20 cm, 30 cm, 40 cm, 50 cm centimeters, 60 centimeters, 70 centimeters, 80 centimeters, etc. Therefore, compared with the third related art, the embodiment of the present application can more accurately determine the relative position information between the second electronic device and the first electronic device.
  • FIG. 9 shows a schematic diagram of a system architecture to which the method for determining relative position information between electronic devices provided by an embodiment of the present application is applicable.
  • the system architecture includes: a first electronic device 100 and a second electronic device 200 .
  • the first electronic device 100 includes at least two audio sending units
  • the second electronic device 200 includes at least one audio receiving unit.
  • the above-mentioned audio sending unit is a unit capable of sending sound wave signals to the outside, such as a speaker. And the distance between the two audio transmission units is greater than the threshold.
  • the above-mentioned audio receiving unit is a unit capable of receiving sound wave signals, such as a microphone.
  • the above-mentioned acoustic wave signal may be an infrasound wave signal with a frequency of 0 to 20 KHz, or may be an ultrasonic signal with a frequency of 20 KHz or higher, which is not limited in the embodiment of the present application.
  • the frequency of the above-mentioned sound wave signal may be 1KHz, 2KHz, 3KHz, 5KHz, 10KHz, 15KHz, 20KHz, 30KHz and so on.
  • the first electronic device 100 can respectively transmit sound wave signals with different characteristics through the above at least two audio transmission units.
  • the acoustic wave signals of different characteristics may be acoustic wave signals of different frequency bands, or acoustic wave signals of different orthogonal sequences.
  • the second electronic device 200 can receive the above-mentioned sound wave signals with different characteristics through the first audio receiving unit, and the first audio receiving unit is any one of the above-mentioned at least one audio receiving unit.
  • the second electronic device 200 calculates the time difference when the first audio receiving unit receives the sound wave signal with different characteristics, or the intensity of the sound wave signal with different characteristics, and then determines the relative position information between the second electronic device 200 and the first electronic device 100 .
  • the relative position information may be information such as azimuth or angle.
  • the audio sending unit of the first electronic device 100 may be a speaker.
  • the first electronic device 100 may include a first speaker 110 , a second speaker 120 , a first memory 140 , a first processor 130 , and a Computer program.
  • the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the first memory 140 and executed by the first processor 130 to complete the present application.
  • One or more modules/units may be a series of computer program segments capable of accomplishing specific functions, and the program segments are used to describe the execution process of the computer program in the first electronic device 100 .
  • the first memory 140 is used to store first instructions, audio files, and the like.
  • the first speaker 110, the second speaker 120 and the first memory 140 may be connected with the first processor 130 through a bus to realize data exchange.
  • the first processor 130 is configured to call the first instruction and the audio file in the first memory 140, and control the first speaker 110 and the second speaker 120 to respectively send sound wave signals with different characteristics based on the first instruction and the audio file.
  • the audio receiving unit of the second electronic device 100 may be a microphone.
  • the second electronic device 200 may include a microphone 210 , a second memory 230 , a second processor 220 , and a computer program stored in the second memory 230 and executable on the second processor 220 .
  • the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the second memory 230 and executed by the second processor 220 to complete the present application.
  • One or more modules/units may be a series of computer program segments capable of accomplishing specific functions, and the program segments are used to describe the execution process of the computer program in the second electronic device 200 .
  • the second memory 230 is used to store second instructions and the like.
  • the microphone 210 and the second memory 230 may be connected with the second processor 220 through a bus to realize data exchange.
  • the second processor 220 is configured to call the second instruction in the second memory 230, and based on the second instruction, calculate the intensity or the arrival time difference of the acoustic wave signals of different characteristics, and then determine the difference between the first electronic device and the second electronic device.
  • relative location information may be information such as azimuth or angle.
  • the number of speakers shown in FIG. 10 is two, and the number of microphones shown in FIG. 11 is one, which are only exemplary descriptions, and the embodiments of the present application are not limited thereto.
  • the number of speakers in FIG. 10 may be three or more, and the number of microphones in FIG. 11 may be two or more.
  • either the first processor 130 or the second processor 220 may include one or more processing units.
  • either the first processor 130 or the second processor 220 may include a central processing unit (Central Processing Unit, CPU), a modulation and demodulation processing unit, a graphics processing unit (graphics processing unit, GPU), an image signal processing unit (image signal processing unit) one or more of signal processor, ISP), video codec unit, digital signal processing unit (Digital Signal Processor, DSP), baseband processing unit, and/or neural-network processing unit (NPU), etc. processing unit.
  • different processing units may be independent devices, or may be integrated in one or more processors.
  • the first processor 130 or the second processor 220 may be a central processing unit, or other general-purpose processors, digital signal processors, application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays ( Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or any conventional processor, or the like.
  • the first processor 130 or the second processor 220 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a secure digital input and output (Secure Digital Input and Output, SDIO) interface, serial external Device (Serial Peripheral Interface, SPI) interface, mobile industry processor interface (Mobile Industry Processor Interface, MIPI), subscriber identity module (subscriber identity module, SIM) interface, and/or universal serial bus (universal serial bus, USB) interface, etc.
  • the first processor 130 or the second processor 220 may be coupled with the power management unit through the SDIO interface, and coupled with the display screen through the MIPI interface and the I2C interface.
  • the first memory 140 and/or the second memory 230 may be an internal storage unit of the electronic device, or may be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC) , Secure Digital (Secure Digital, SD) card, flash memory card (Flash Card) and so on. Both the first memory 140 and the second memory 230 are used to store computer programs and other programs and data required by the electronic device. The first memory 140 and the second memory 230 may also be used to temporarily store data that has been output or will be output.
  • a plug-in hard disk such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC) , Secure Digital (Secure Digital, SD) card, flash memory card (Flash Card) and so on. Both the first memory 140 and the second memory 230 are used to store computer programs and other programs and data required by the electronic device. The first memory 140 and the second memory 230 may also be used to temporarily store data that has been output or will be output.
  • the above-mentioned bus can be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral device interconnect (Peripheral Component, PCI) bus, an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus or universal serial bus (universal serial bus) serial bus, USB), etc.
  • ISA Industry Standard Architecture
  • PCI peripheral device interconnect
  • EISA Extended Industry Standard Architecture
  • USB universal serial bus
  • the bus can be divided into address bus, data bus, control bus and so on.
  • first electronic device 100 and the second electronic device 200 may include more or less components than those shown in the figure, or combine some components, or separate some components, or different component layout.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the first electronic device 100 and/or the second electronic device 200 may further include a universal serial bus (USB) interface, a battery, a mobile communication unit, an audio unit, a speaker, a receiver, a microphone, a key, a camera, And subscriber identification module (SIM) card interface, pressure sensor, air pressure sensor, magnetic sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, bone conduction sensor, etc.
  • USB universal serial bus
  • SIM subscriber identification module
  • Three application scenarios of the device interaction method and the display method provided by the embodiments of the present application are respectively introduced below: an extended screen application scenario, a secure screen projection application scenario, and a stereo application scenario.
  • FIG. 12 is a schematic diagram of an application scenario of an extended screen provided by an embodiment of the present application.
  • the following describes the application scenario of the extended screen by taking the first electronic device as a notebook computer and the second electronic device as a tablet computer as an example.
  • the content displayed on the display interface of the notebook computer can be extended to the display interface of the tablet computer for display.
  • the method may further include: starting an extended display application.
  • the user may apply a first preset operation in the notebook computer, and the notebook computer runs the extended display application in response to the preset operation.
  • the preset operation may be a touch operation, or an operation input by the user through a mouse or a keyboard.
  • the user may apply a second preset operation in the extended display application of the notebook computer, and the notebook computer sends the first request information to the tablet computer in response to the second preset operation.
  • the first request information is used to request the laptop computer to establish a pairing connection with the tablet computer.
  • the tablet computer displays the first request information, and obtains a third preset operation input by the user.
  • the tablet computer establishes a pairing connection with the notebook computer in response to the third preset operation.
  • the extended display application in the notebook computer may not be opened, and after the notebook computer detects the second preset operation, it may be determined that extended display is required, so as to send the first request information to the tablet computer.
  • the notebook computer and the tablet computer have established a pairing connection, and the notebook computer may not need to send the first request information to the tablet computer after running the extended display application.
  • a pairing connection can be established between the notebook computer and the tablet computer in a wired manner.
  • a pairing connection may be established between the first electronic device and the second electronic device through HDMI (High Definition Multimedia Interface, high-definition multimedia interface).
  • a pairing connection can be established between the notebook computer and the tablet computer in a wireless manner.
  • a paired connection can be established between a laptop and a tablet by sharing an AP (Access Point, wireless access node).
  • the notebook computer and the tablet computer can establish a pairing connection through a wireless method such as WIFI (Wireless-Fidelity, wireless fidelity) direct connection or Bluetooth.
  • WIFI Wireless-Fidelity, wireless fidelity
  • the process of establishing a pairing connection between the notebook computer and the tablet computer by sharing one AP may include: the notebook computer and the tablet computer establish a WIFI connection with the same AP; the notebook computer obtains the address information of each electronic device that establishes a connection with the AP; The notebook computer obtains the operation information input by the user, and the operation information can establish a pairing connection for the user to select an electronic device with the notebook computer; the notebook computer responds to the operation information and initiates a pairing connection establishment request to the tablet computer based on the address information of the tablet computer,
  • the pairing connection establishment request includes the address information of the notebook computer; in response to the pairing connection establishment request, the tablet computer establishes a pairing connection with the notebook computer based on the address information of the notebook computer.
  • the process of establishing a pairing connection between the notebook computer and the tablet computer through the WIFI direct connection may include: the notebook computer establishes a WIFI link layer connection with the tablet computer through channel search; after the WIFI link layer connection is established, the notebook computer and the tablet computer are connected.
  • the computer establishes a TCP (Transmission Control Protocol, Transmission Control Protocol) data connection; the laptop initiates a pairing connection establishment request to the tablet computer through the TCP data connection, and the pairing connection establishment request includes the address information of the laptop; the tablet computer responds to the pairing connection establishment request , establishes a pairing connection with the laptop based on the address information of the laptop.
  • TCP Transmission Control Protocol, Transmission Control Protocol
  • the process of establishing a pairing connection between the notebook computer and the tablet computer through Bluetooth may include: the notebook computer broadcasts to the outside through Bluetooth; the tablet computer generates a Bluetooth device list according to the received broadcast packet; the tablet computer calculates the list of Bluetooth devices. the signal strength of each Bluetooth device, and send a Bluetooth pairing connection request to the Bluetooth device with the highest signal strength; the notebook computer automatically pops up a pairing connection request dialog box, and receives the operation information input by the user, which can be used for the user to agree The tablet computer establishes a pairing connection; the notebook computer responds to the operation information and establishes a Bluetooth pairing connection with the tablet computer.
  • the relative position information between the tablet computer and the notebook computer is determined by the position determination method in the embodiment of the present application.
  • the notebook computer when the notebook computer needs to perform extended display on the tablet computer, the notebook computer transmits the first sound wave signal and the second sound wave signal with different characteristics through two speakers respectively.
  • the tablet computer receives the first sound wave signal and the second sound wave signal through the microphone.
  • the tablet computer determines the relative position information between the tablet computer and the notebook computer according to the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave.
  • the tablet sends this relative position information to the laptop. How to determine the relative position information between the tablet computer and the notebook computer will be described in detail in the following embodiments, and will not be repeated here.
  • the relative position information between the tablet computer and the laptop computer may 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, and the tablet computer is located in the front and rear areas of the laptop computer , as shown in Figure 13.
  • the relative position information orientation between the tablet computer and the notebook computer can be determined through the solutions in the following Embodiment 1, Embodiment 2, Embodiment 5, Embodiment 6 and Embodiment 7.
  • the left area, the right area, and the front and rear areas of the notebook computer may be determined by referring to the method for dividing each area in FIG. 4 in the third related art. The division of each area as shown in FIG. 13 will be described below.
  • the notebook computer transmits the first sound wave signal through the left speaker and the second sound wave signal through the right speaker
  • the microphone of the tablet computer receives the first sound wave signal at time T7
  • the threshold can be determined according to
  • the threshold t 2 is proportional to D, for example, if T7 is earlier than T8 , and then the tablet is in the left area of the laptop; if T7 is later than T8 , and The tablet is located in the right area of the laptop; if The tablet computer is located on the front and rear side areas of the notebook computer.
  • each area shown in FIG. 13 may be determined according to the method in step 205 in Embodiment 1 below. For specific methods, please refer to Embodiment 1, which will not be repeated here.
  • the area around the notebook computer is divided into three areas as shown in FIG. 13 , but it is not limited thereto.
  • the area around the first electronic device may be divided into four or more areas according to actual needs. For example, multiple thresholds may be set, and according to the relationship between
  • the tablet computer can also send the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave, to the notebook computer, and the notebook computer determines the difference between the tablet computer and the notebook computer. relative position information between.
  • the tablet computer can also send the time difference between the microphone receiving the first sound wave and the second sound wave, or the signal strength between the first sound wave and the second sound wave, to other electronic devices, and the other electronic devices can determine the difference between the tablet computer and the second sound wave. Relative position information between laptops.
  • the relative position information between the tablet computer and the notebook computer needs to be determined.
  • the relative position information between the tablet computer and the notebook computer also needs to be determined.
  • the tablet's accelerometer sensor, gyroscope sensor, or magnetometer sensor detects a change in the tablet's position, and the tablet sends a request to the laptop to re-determine relative position information.
  • the relative position information re-determination request is used to request the notebook computer to retransmit the first sound wave signal and the second sound wave signal with different characteristics through the two speakers.
  • the tablet computer determines the new relative position information between the tablet computer and the notebook computer, it sends the new relative position information to the notebook computer.
  • the notebook computer sends the content displayed on the display interface of the notebook computer to the display interface of the tablet computer for display according to the relative position information.
  • the user only needs to operate the notebook computer, and the content displayed on the display interface of the notebook computer can be sent to the display interface of the tablet computer for display.
  • the window moves to the right in the notebook computer display interface.
  • the window moves to the first preset position on the display interface of the notebook computer and remains for the first preset time, it means that the first part of the content of the window has moved out of the display interface of the notebook computer.
  • the tablet computer displays the content of the first part of the window, the notebook computer displays the content of the second part of the first target content, and the content of the first part and the content of the second part of the window constitute the entire window. At this point, the laptop and tablet display the window together.
  • the window moves to the second preset position on the display interface of the notebook computer and remains for the second preset time, it means that the window has been completely moved out of the display interface of the notebook computer.
  • the tablet displays all of the window's contents, and the laptop no longer displays the window.
  • the notebook computer may also generate first guide information, where the first guide information is used to guide the user to drag the content of documents, web pages, windows, etc. to the left or to the right.
  • the laptop computer obtains the drag operation acting on the document, web page, window and other content; the laptop computer responds to the above drag operation and sends the document, web page, window and other content to the display interface of the tablet computer for display.
  • the relative position information indicates that the tablet computer is located in the left area of the notebook computer, and the notebook computer generates the first guide information.
  • the first guide information is used to guide the user to drag the contents of the document, web page, window, etc. displayed in the display interface of the notebook computer to the left.
  • the first guidance information may be displayed on the display interface of the notebook computer in the form of text.
  • the first guide information may be "Please drag XX to the left" displayed in the display interface.
  • the first guidance information may be displayed on the display interface of the notebook computer in the form of animation.
  • a laptop can simulate an animation of a human hand dragging the window to the left on a window.
  • the first guide information may be displayed on the display interface of the notebook computer in the form of a combination of animation and text.
  • a laptop can simulate an animation of a human hand dragging the window to the left and related text on a window.
  • the user can use a mouse or a touch screen to drag the contents of the document, web page, window, etc. displayed on the display interface of the notebook computer to the right.
  • the laptop responds to this drag to the left, sending documents, web pages, windows, etc. to the tablet.
  • the tablet computer receives the above documents, web pages, windows and other contents, and displays the above documents, web pages, windows and other contents on the display interface. In this way, contents such as documents, web pages, windows and the like in the notebook computer are extended to be displayed on the display interface of the tablet computer located in the left area of the notebook computer.
  • the notebook computer and/or the tablet computer moves, so that the relative position information between the tablet computer and the notebook computer changes, and the changed relative position information indicates that the tablet computer is located in the front and rear areas of the notebook computer, then
  • the expansion direction can be unchanged between the laptop and the tablet.
  • the expansion direction may include expansion to the right and expansion to the left.
  • Extending to the right can be: the user drags the document, web page, window, etc. to the right in the display interface of the laptop, and the document, web page, window, etc. are expanded to the tablet located in the right area of the laptop for display.
  • Extending to the left can be: the user drags contents such as documents, web pages, and windows to the left on the display interface of the notebook computer, and expands the contents such as documents, webpages, and windows to the tablet computer located in the left area of the notebook computer for display.
  • the tablet computer is located in the right area of the notebook computer, and the notebook computer expands the contents of documents, web pages, windows, etc. to the right to display on the tablet computer. If the tablet computer and/or the notebook computer is moved such that the tablet computer is located in the front and rear side regions of the notebook computer, the expansion direction remains unchanged as expanding to the right. At this time, the user can drag the contents of the document, web page, window, etc. to the right on the display interface of the notebook computer, so as to extend the contents of the document, web page, window, etc. to the tablet computer for display.
  • the movement of the tablet computer and/or the notebook computer includes: the movement of the tablet computer, or the movement of the notebook computer, or the movement of the tablet computer and the notebook computer together.
  • the expansion direction can be unchanged between the laptop and the tablet.
  • the expansion direction can be unchanged between the laptop and the tablet.
  • the notebook computer can perform the fourth preset operation when the screen projection operation is performed. to send the content displayed in the display interface to the tablet.
  • the tablet displays the content
  • the laptop continues to display the content.
  • the notebook computer may expand the content displayed in the display interface to the display interface of the tablet computer according to the default expansion direction or the expansion direction used by the user.
  • the above-mentioned default expansion direction may be left expansion or right expansion, and the expansion direction used by the user is left expansion or right expansion.
  • the tablet computer is located in the right area of the notebook computer, and at this time, the expansion direction of the notebook computer is to expand to the right. If the tablet computer and/or the notebook computer is moved so that the tablet computer is located in the front and rear areas of the notebook computer, the notebook computer can send the content displayed in the display interface to the tablet computer, and request the tablet computer to display the content. The tablet computer displays the content sent by the notebook computer in response to the request, and the notebook computer continues to display the content, so that the display interface of the tablet computer is the same as the display interface of the notebook computer.
  • the notebook computer when the extended display between the notebook computer and the tablet computer starts, if the tablet computer is located in the front and rear areas of the notebook computer, the notebook computer does not send content such as documents, web pages, windows, etc. to the tablet computer.
  • the laptop computer does not respond to the operation, and does not send the content such as the document, web page, window, etc. to the tablet computer. Extend documents, web pages, windows, and more to display on your tablet.
  • the notebook computer may also generate the first prompt information.
  • the first prompt information is used to prompt the user that the tablet computer is located in the front and rear areas of the notebook computer, and the content displayed on the display interface of the notebook computer cannot be extended to the display interface of the tablet computer for display.
  • FIG. 14 is a schematic diagram of a secure screen projection application scenario provided by an embodiment of the present application.
  • the following describes the application scenario of the secure screen projection by taking the first electronic device as a notebook computer and the second electronic device as a mobile phone as an example.
  • the content displayed on the display interface of the mobile phone can be projected onto the display interface of the notebook computer for display, and the mobile phone can be operated on the notebook computer.
  • the relative position information between the mobile phone and the notebook computer is determined by the position determination method in the embodiment of the present application.
  • the laptop computer transmits the first sound wave signal and the second sound wave signal with different characteristics respectively through two speakers.
  • the mobile phone receives the first sound wave signal and the second sound wave signal through the microphone.
  • the mobile phone determines the relative position information between the mobile phone and the notebook computer according to the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave.
  • the mobile phone can also send the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave, to the notebook computer, and the notebook computer can determine the difference between the mobile phone and the notebook computer. relative position information.
  • the mobile phone can also send the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave, to other electronic devices, and the other electronic devices can determine the difference between the mobile phone and the laptop. relative position information between.
  • the relative position information between the mobile phone and the laptop 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 and rear areas of the laptop computer.
  • the relative position information between the mobile phone and the notebook computer can be determined through the solutions in the following Embodiment 1, Embodiment 2, Embodiment 5, Embodiment 6 and Embodiment 7.
  • the mobile phone projects the files, pictures or display interface and other content to the display interface of the notebook computer for display, or the notebook computer converts the files, pictures or the content in the display interface to the display interface.
  • the content is projected to the display interface of the mobile phone for display.
  • the preset position requirement may be that the mobile phone is located in one of the front and rear area, the left area and the right area of the notebook computer.
  • the mobile phone sends content such as files, pictures or display interfaces to the notebook computer.
  • the notebook computer displays the above-mentioned content such as the files, pictures or display interface, so as to realize the screen projection of the files, pictures or display interface and other content in the mobile phone to the display interface of the notebook computer for display.
  • the laptop sends content such as files, pictures or displays to the phone.
  • the mobile phone displays the above-mentioned content such as files, pictures or display interfaces, and realizes projecting the files, pictures or display interfaces and other contents in the notebook computer to the display interface of the mobile phone for display.
  • the laptop computer when the mobile phone projects the screen to the laptop computer, the laptop computer can generate the second prompt information.
  • the second prompt information is used to prompt the user: the specific orientation of placing the mobile phone on the notebook computer, and the distance from the mobile phone to the notebook computer. According to the second prompt information, the user can conveniently realize the content such as files, pictures or display interfaces in the mobile phone, and display them on the display interface of the notebook computer.
  • the mobile phone in the case where the laptop computer projects the screen to the mobile phone, the mobile phone can generate the above-mentioned second prompt information.
  • the second prompt information the user can conveniently realize the content such as files, pictures or display interfaces in the notebook computer, and display them on the display interface of the mobile phone.
  • the following describes the process of projecting files, pictures, or display interface from the computer to the display interface of the notebook computer.
  • the process of projecting files or pictures in the mobile phone to the display interface of the laptop computer can be as follows: if the mobile phone is located in the front and rear areas of the laptop computer, and the distance between the mobile phone and the laptop computer is less than the threshold, the mobile phone will The file A or picture B that needs to be projected to the laptop to be displayed is sent to the laptop. After the laptop computer obtains the file A or the picture B, it opens the file A or the picture B and displays it on the display interface.
  • the process of projecting the file or picture in the mobile phone to the display interface of the laptop computer may be as follows: if the mobile phone is located in the left area of the laptop computer, and the distance between the mobile phone and the laptop computer is less than the threshold, the mobile phone will The file A or picture B that needs to be projected to the laptop to be displayed is sent to the laptop. After the laptop computer obtains the file A or the picture B, it opens the file A or the picture B and displays it on the display interface.
  • the process of projecting the file or picture in the mobile phone to the display interface of the laptop computer can be as follows: if the mobile phone is located in the right area of the laptop computer, and the distance between the mobile phone and the laptop computer is less than the threshold, the mobile phone will The file A or picture B that needs to be projected to the laptop to be displayed is sent to the laptop. After the laptop computer obtains the file A or the picture B, it opens the file A or the picture B and displays it on the display interface.
  • the process of projecting the display interface of the mobile phone to the display interface of the notebook computer may be as follows: if the mobile phone is located in the front and rear areas of the notebook computer, and the distance between the mobile phone and the notebook computer is less than the threshold, the mobile phone will convert the mobile phone to the notebook computer.
  • the content of the display interface and the aspect ratio of the display interface of the mobile phone are sent to the notebook computer.
  • the notebook computer displays the content of the display interface of the mobile phone in the display interface according to the aspect ratio of the display interface of the mobile phone.
  • the aspect ratio of the mobile phone display interface is usually different from that of the notebook computer display interface. Therefore, in order to display the mobile phone display interface on the notebook computer display interface, the notebook computer needs to determine the display area according to the aspect ratio of the mobile phone display interface.
  • the aspect ratio of the display area is equal to the aspect ratio of the display interface of the mobile phone, and the display area should be as large as possible.
  • the length of the display area is the same as the width of the laptop display interface.
  • the mobile phone After the content of the display interface of the mobile phone changes, the mobile phone sends the content displayed on the new interface of the mobile phone to the notebook computer.
  • the laptop displays what the new phone interface shows in the display area.
  • the above-mentioned contents such as files, pictures or display interfaces may or may not have privacy requirements.
  • the leakage of privacy should be prevented or reduced.
  • the mobile phone can store the files, pictures or display interfaces that have privacy requirements.
  • the content such as the display interface is projected to the display interface of the notebook computer for display, or the notebook computer will project the contents such as files, pictures or display interfaces that have privacy requirements to the display interface of the mobile phone 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 documents, pictures or display interfaces that require privacy to the laptop, or the laptop stops sending files, pictures or displays that require privacy to the mobile phone. interface, etc.
  • the distance between the mobile phone and the laptop computer may not be required to be smaller than the threshold.
  • the mobile phone can project files, pictures or display interfaces without privacy requirements to the display of the laptop. It can be displayed in the interface, or the notebook computer can project files, pictures or content in the display interface without privacy requirements to the display interface of the mobile phone for display.
  • the laptop computer stops displaying the files, pictures or display interface and other content with privacy requirements sent by the mobile phone, and ends the screen projection established between the mobile phone and the laptop computer.
  • the notebook computer may generate a screen projection end control, and the user performs a touch operation on the control.
  • the notebook computer stops displaying the files, pictures or display interface and other contents with privacy requirements sent by the mobile phone, and ends the screen projection established between the mobile phone and the notebook computer.
  • the mobile phone may generate a screen projection end control, and the user performs a touch operation on the control.
  • the mobile phone sends a screen projection end request to the notebook computer.
  • the laptop computer stops displaying the files, pictures or display interface and other content with privacy requirements sent by the mobile phone, and ends the screen projection established between the mobile phone and the laptop computer.
  • the mobile phone can generate a screencasting continuation control. After the user applies a touch operation to the control, the mobile phone responds to the touch operation and sends an instruction to continue screen projection to the notebook computer. In response to the continuing screen projection instruction, the laptop computer continues to display the files, pictures or display interface and other content sent by the mobile phone with privacy requirements.
  • the laptop computer in the case where screen projection has been established between the mobile phone and the notebook computer, if the relative position information between the mobile phone and the notebook computer changes, so that the changed relative position information does not meet the preset position requirements, and/ Or the distance between the mobile phone and the laptop computer is greater than the threshold, then the laptop computer continues to display the files, pictures or display interface and other content sent by the mobile phone without privacy requirements, and the screen projection established between the mobile phone and the laptop computer may not end.
  • whether the distance between the mobile phone and the notebook computer is smaller than the threshold value can be determined by the algorithm in the related art 1 or the related art 2, which is not repeated here.
  • FIG. 15 is a schematic diagram of a stereo application scenario provided by an embodiment of the present application.
  • the stereo application scenario will be described below by taking the first electronic device as a TV and the second electronic device as two speakers (speaker 1 and speaker 2 ) as an example.
  • the TV determines the correspondence between speaker 1 and speaker 2 and the left channel audio information and right channel audio information, and then transmits the audio information to speaker 1 and speaker 2.
  • Speaker 2 to achieve stereo playback without manual operation to select the channels of the two speakers.
  • the relative position information between the TV and the speaker 1 and the speaker 2 is determined by the position determination method in the embodiment of the present application.
  • the TV has two speakers, and both the speaker 1 and the speaker 2 have at least one microphone.
  • the TV transmits the first sound wave signal and the second sound wave signal with different characteristics respectively through the two speakers.
  • the speaker 1 receives the first sound wave signal and the second sound wave signal through the microphone.
  • the sound box 1 determines the first relative position information between the sound box 1 and the TV according to the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave.
  • the speaker 1 sends the first relative position information to the television.
  • the speaker 2 receives the first sound wave signal and the second sound wave signal through the microphone.
  • the sound box 2 determines the second relative position information between the sound box 2 and the TV according to the time difference between the first sound wave and the second sound wave received by the microphone, or the signal strength between the first sound wave and the second sound wave.
  • the speaker 2 sends the second relative position information to the television.
  • the relative position information between the two speakers and the TV needs to be determined. After the positions of the speakers are changed, the relative position information between the two speakers and the TV needs to be determined again.
  • the accelerometer sensor, gyroscope sensor or magnetometer sensor of the first speaker detects that the position of the first speaker has changed, and the first speaker sends the third request information to the TV .
  • the third request information is used to request the television to retransmit the first sound wave signal and the second sound wave signal with different characteristics through the two speakers.
  • the new relative position information is sent to the TV. It should be noted that, if the first speaker is speaker 1 or speaker 2, you can simply re-determine the new relative position information between speaker 1 or speaker 2 whose position has changed and the TV, or re-determine the distance between the two speakers and the TV. New relative position information.
  • the first speaker can also send the time difference between the microphone receiving the first sound wave and the second sound wave, or the signal strength between the first sound wave and the second sound wave, to the TV, and the TV determines the speaker 1 and the speaker 2 respectively. Relative position information to the TV.
  • the first speaker can also send the time difference between the microphone receiving the first sound wave and the second sound wave, or the signal strength between the first sound wave and the second sound wave, to other electronic devices, and the other electronic devices determine the two The relative position information between the speakers and the TV.
  • the TV sends audio information to speaker 1 and speaker 2 according to the relative position information, so as to realize stereo playback through speaker 1 and speaker 2 .
  • the TV can determine the third relative position information between the speaker 1 and the speaker 2 according to the first relative position information between the speaker 1 and the TV, and the second relative position information between the speaker 2 and the TV. After that, according to the third relative position information, the TV sends the audio information of the left channel to the speaker located on the left, and sends the audio information of the right channel to the speaker located on the right.
  • the TV determines the third relative position information according to the positional relationship between the two areas; if speaker 1 and speaker 2 are located in the same area of the TV, the TV determines Two angles, determine the third relative position information between the speaker 1 and the speaker 2; wherein, the first angle is the angle of the speaker 1 relative to the first electronic device, and the second angle is the angle of the speaker 2 relative to the first electronic device.
  • speaker 1 is located on the left side of the TV and speaker 2 is located on the right side or front and rear side of the TV, indicating that speaker 1 is located on the left side of speaker 2, the TV will send the audio information of the left channel to speaker 1. to send the audio information of the right channel to speaker 2.
  • speaker 1 is located on the right side of the TV, and speaker 2 is located on the front, rear or left side of the TV, indicating that speaker 1 is located on the right side of speaker 2, the TV will send the audio information of the right channel to speaker 1, and send the audio information of the left channel to speaker 1. Audio information is sent to Speaker 2.
  • the TV can determine the third relative position information according to the first angle and the second angle. After that, the TV sends the audio information of the right channel to the speaker located on the right, and the audio information of the left channel to the speaker located on the left.
  • the angle information between the TV and the speaker will be described in detail in the following embodiments, and will not be repeated here.
  • the following first describes the positions of the speakers corresponding to the angles of the speakers relative to the TV.
  • the position of the sound box corresponding to the angle of the sound box relative to the television is shown in FIG. 16 .
  • the position of the speaker corresponding to the reference angle can be set.
  • the reference angle may be 90°, -90° and 0°.
  • the angle of the sound box relative to the TV is 90°
  • the position of the sound box is: the sound box is located in the right area of the TV, and the sound box is located on the connection line between the two speakers of the TV.
  • the angle of the sound box relative to the TV is -90°
  • the position of the sound box is: the sound box is located in the left area of the TV, and the sound box is located on the connection line between the two speakers of the TV.
  • the angle of the sound box relative to the TV is 0°
  • the position of the sound box is: the sound box is located in the front and rear areas of the TV, and the sound box is located on the vertical line of the connection between the two speakers of the TV.
  • the position of the sound box corresponding to any angle between 90° ⁇ 0° and 0° ⁇ 90° can be determined according to the reference angle. For example, if the angle of the speaker relative to the TV is 45°, the position of the speaker is: the speaker is located in the right area of the TV, and the angle between the connection between the speaker and the TV and the connection between the two speakers of the TV is 45°, two positions as shown in Figure 16. For example, if the angle of the sound box relative to the TV is -45°, the position of the sound box is: the sound box is located in the left area of the TV, and the connection between the sound box and the TV is connected with the two speakers of the TV. The angle is 45°, as shown in Figure 16 for the two positions.
  • the reference angle may be 0°, 90° and 180°.
  • the angle of the sound box relative to the TV is 0°
  • the position of the sound box is: the sound box is located in the right area of the TV set, and the sound box is located on the connection line between the two speakers of the TV set.
  • the angle of the sound box relative to the TV is 180°
  • the position of the sound box is: the sound box is located in the left area of the TV, and the sound box is located on the connection line between the two speakers of the TV.
  • the angle of the sound box relative to the TV is 90°
  • the position of the sound box is: the sound box is located in the front and rear areas of the TV, and the sound box is located on the vertical line of the connection between the two speakers of the TV.
  • the position of the sound box corresponding to any angle between 90°-0° and 90°-180° can be determined according to the reference angle. For example, if the angle of the speaker relative to the TV is 45°, the position of the speaker is: the speaker is located in the right area of the TV, and the angle between the connection between the speaker and the TV and the connection between the two speakers of the TV is 45°, two positions as shown in Figure 17. For example, if the angle of the speaker relative to the TV is 135°, the position of the speaker is: the speaker is located in the left area of the TV, and the angle between the connection between the speaker and the TV and the connection between the two speakers of the TV is 45°, two positions as shown in Figure 17.
  • the orientation between the two speakers can be determined according to the magnitude relationship between the two angles. For example, if speaker 1 and speaker 2 are both located in the left area of the TV, the angle of speaker 1 relative to the TV is ⁇ 1, the angle of speaker 2 relative to the TV is ⁇ 2, and ⁇ 1 is greater than ⁇ 2, then the TV can determine according to ⁇ 1 and ⁇ 2. Speaker 1 is located to the right of Speaker 2. After that, the TV sends the audio information of the right channel to the speaker 1 and the audio information of the left channel to the speaker 2.
  • both speaker 1 and speaker 2 are located in the left area of the TV, the angle of speaker 1 relative to the TV is ⁇ 1, the angle of speaker 2 relative to the TV is ⁇ 2, and ⁇ 1 is less than ⁇ 2, then the TV can determine the speaker 1 according to ⁇ 1 and ⁇ 2 On the left side of Speaker 2. After that, the TV sends the audio information of the right channel to the speaker 2 and the audio information of the left channel to the speaker 1.
  • the boundary lines between the left area, the right area, and the front and rear areas may be preset.
  • the angle corresponding to the boundary line between the left area, the right area, and the front-rear area is preset to be ⁇ 20°. That is, if the angle of the speaker relative to the TV is within the range of [-20°, 20°], the speaker is located in the front and rear areas of the TV; if the angle of the speaker relative to the TV is within the range of (20°, 90°), the speaker is located in the front and rear areas of the TV.
  • the right area of the TV if the angle of the speaker relative to the TV is within the range of [-90°, -20°), the speaker is located in the left area of the TV.
  • the boundary between the left area, the right area, and the front and rear areas may be determined according to T 7 , T 8 and the threshold t 2 .
  • T 7 , T 8 and the threshold t 2 a curve satisfying the condition that T 7 is earlier than T 8 and
  • t 2 can be used as the boundary between the right region and the front and rear regions, and T 7 can be later than T 8 and
  • FIG. 18 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 18 , the above process of determining relative position information between the second electronic device and the first electronic device includes steps 201 to 205 .
  • Step 201 the first electronic device generates a baseband sequence, and converts the baseband sequence to obtain a first ultrasonic signal and a second ultrasonic signal.
  • the first electronic device generates a baseband sequence s with a bandwidth of B.
  • the first electronic device up-converts the baseband sequence s to obtain a first ultrasonic signal x 1 (t) and a second ultrasonic signal x 2 (t).
  • the frequency band of the first ultrasonic signal x 1 is [f 1 , f 2 ]
  • the frequency band of the second ultrasonic signal x 2 is [f 3 , f 4 ]
  • the frequency band [f 1 , f 2 ] is the same as the frequency band [f 3 ] ,f 4 ] without overlap.
  • f 1 , f 2 , f 3 and f 4 f 1 ⁇ f 2 ⁇ f 3 ⁇ f 4 , or f 3 ⁇ f 4 ⁇ f 1 ⁇ f 2 .
  • the process of up-converting the baseband sequence s by the first electronic device may be as follows: modulate the baseband sequence s on a low-frequency carrier, mix it with a high-frequency signal, and then take the two frequencies after the mixing. From the upper sideband signal, the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) can be obtained.
  • Step 202 the first electronic device transmits the first ultrasonic signal and the second ultrasonic signal to the second electronic device respectively through two speakers.
  • the two speakers may be the left channel speaker and the right channel speaker of the first electronic device, respectively.
  • the first electronic device after obtaining the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t), the first electronic device sends the first ultrasonic signal x 1 ( t), and at the same time send the second ultrasonic signal x 2 (t) to the second electronic device through the right channel speaker.
  • Step 203 the second electronic device converts the first ultrasonic signal and the second ultrasonic signal to the same frequency band.
  • the microphone of the second electronic device passes through a filter with a filter bandwidth of [f 1 , f 2 ] and a filter with a filter bandwidth of [f 3 , f 4 ]
  • the filter performs filtering to obtain the first ultrasonic signal and the second ultrasonic signal.
  • the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) will be affected by channel information or time delay during channel transmission. Therefore, when the second electronic device receives the two After one ultrasonic signal, the first ultrasonic signal x 1 (t) is transformed into a first ultrasonic signal y 1 (t), and the second ultrasonic signal x 2 (t) is transformed into a second ultrasonic signal y 2 (t).
  • the frequency band of the first ultrasonic signal y 1 (t) is the same as the frequency band of the first ultrasonic signal x 1 (t), which is [f 1 , f 2 ].
  • the frequency band of the first ultrasonic signal y 1 (t) is the same as the frequency band of the second ultrasonic signal x 2 (t), and is [f 3 , f 4 ].
  • the second electronic device After the second electronic device receives the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t), the second electronic device converts the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 ( t) Transform to the same frequency band for correlation calculation in step 204.
  • the second electronic device may perform frequency conversion processing on the first ultrasonic signal y 1 (t), so that the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t) are converted to the same frequency band.
  • the second electronic device may perform frequency conversion processing on the second ultrasonic signal y 2 (t), so that the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t) are converted to the same frequency band.
  • the second electronic device may perform frequency conversion processing on both the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t), so that the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 ( t) Transform to the same frequency band.
  • the second electronic device will describe how to convert the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t) to the same frequency band.
  • the second electronic device can change the frequency band of the first ultrasonic signal y 1 (t) from [f 1 , f 2 ] is up-converted to [f 3 , f 4 ] to obtain the first ultrasonic signal y' 1 (t).
  • the second electronic device may multiply the first ultrasonic signal y 1 (t) by cos(2 ⁇ (f 3 -f 1 )t), and then filter through a filter with a bandwidth of [f 3 , f 4 ], The first ultrasonic signal y' 1 (t) is obtained.
  • the second electronic device may convert the second ultrasonic signal y 2 (t)
  • the frequency band is down-converted from [f 3 , f 4 ] to [f 1 , f 2 ] to obtain the second ultrasonic signal y' 2 (t).
  • the second electronic device can multiply the second ultrasonic signal y 2 (t) by cos(2 ⁇ (f 3 -f 1 )t), and then filter it through a filter with a bandwidth of [f 1 , f 2 ], A second ultrasonic signal y' 2 (t) is obtained.
  • the second electronic device may also convert the first ultrasonic signal y 1 (t) And the frequency band of the second ultrasonic signal y 2 (t) is frequency-converted to a first frequency band, which is a frequency band different from the frequency band [f 1 , f 2 ] and the frequency band [f 3 , f 4 ].
  • Step 204 the second electronic device performs correlation calculation on the first ultrasonic signal and the second ultrasonic signal converted to the same frequency band to determine the time difference between the first ultrasonic signal and the second ultrasonic signal reaching the microphone of the second electronic device.
  • the time difference between the first ultrasonic signal and the second ultrasonic signal reaching the microphone of the second electronic device may be expressed as the difference in the number of sampling points of the first ultrasonic signal and the second ultrasonic signal by the microphone.
  • the microphone samples the ultrasonic signal at a fixed sampling frequency f s , for example, the sampling frequency f s is 48KHz. Therefore, in time t, the number of sampling points collected by the microphone is t*f s .
  • the first ultrasonic signal arrives at the microphone first
  • the second ultrasonic signal arrives at the microphone later
  • the number of sampling points for the first ultrasonic signal by the microphone is greater than the number of sampling points for the first ultrasonic signal.
  • the difference between the two sampling points is the product of the sampling frequency and the time difference: ⁇ t ⁇ f s , where ⁇ t is the above time difference.
  • the second electronic device converts the frequency band of the second ultrasonic signal to the frequency band of the first ultrasonic signal, and the second electronic device converts the first ultrasonic signal y 1 (t) and the second ultrasonic signal y' 2 (t) Perform relevant calculations.
  • the relevant calculation formula can be: y 1 (t) represents the value of the first ultrasonic signal y 1 (t) at the sampling time t, and y' 2 (t- ⁇ ) represents the value of the second ultrasonic signal y' 2 (t) at the sampling time t- ⁇ .
  • the peak value of y 1 (t) coincides with the peak value of y′ 2 (t- ⁇ )
  • the peak value of z( ⁇ ) can be obtained, and the peak value of the first ultrasonic signal and the second ultrasonic signal reaching the second electronic device 200 can be obtained.
  • the number of sampling points ⁇ * corresponding to the time difference of the microphone.
  • the relevant calculation formula can be: y 1 (t- ⁇ ) represents the value of the first ultrasonic signal y 1 (t) at the sampling time t- ⁇ , and y' 2 (t) represents the value of the second ultrasonic signal y' 2 (t) at the sampling time t.
  • the peak value of y 1 (t- ⁇ ) coincides with the peak value of y' 2 (t)
  • the peak value of z( ⁇ ) can be obtained, and the peak value of the first ultrasonic signal and the second ultrasonic signal reaching the second electronic device 200 can be obtained.
  • the number of sampling points ⁇ * corresponding to the time difference of the microphone.
  • Step 205 the second electronic device determines the position information of the second electronic device relative to the first electronic device according to the time difference and the time difference threshold.
  • the second electronic device may determine the orientation information of the second electronic device relative to the first electronic device according to the difference between the number of sampling points and the preset sampling point value.
  • the preset sampling point value Th is related to the first distance D between the left channel speaker and the right channel speaker, and/or the sampling frequency f s of the signal received by the microphone.
  • the preset sampling point value Th may be positively correlated with the first interval D and/or the sampling frequency f s .
  • the preset sampling point value Th may be positively correlated with the first interval D and the sampling frequency f s , and the larger the first interval D and the sampling frequency f s are, the larger the preset sampling point value Th may be.
  • the relationship between the preset sampling point value Th and the first distance D and the sampling frequency f s may be:
  • the coefficient a is an arbitrary value in (-1,1).
  • the formula for calculating the number of preset sampling points It can be set at the factory of the second electronic device.
  • the sampling frequency f s , the propagation speed v and the coefficient a of the ultrasonic signal can be set when the second electronic device leaves the factory, and the first distance D can be requested from the first electronic device.
  • the second electronic device according to the formula
  • the preset sampling point value Th is obtained by calculation.
  • the first distance D is 30 cm
  • the sampling frequency f s is 48 KHz
  • the propagation speed v of the ultrasonic signal is 340 m/s
  • the coefficient a is 1/2
  • the corresponding preset sampling point value Th is about 21.
  • the first distance D between the left channel speaker and the right channel speaker is as shown in FIG. 19
  • the second electronic device 200 is located in the right area of the first electronic device 100
  • the second electronic device 200 is located in the area on the right side of the first electronic device 100 .
  • the connection between the left channel speaker and the right channel speaker is D 4
  • the distance from the right channel speaker of the first electronic device 100 to the microphone of the second electronic device 200 is D 5
  • the sampling frequency of the microphone of the second electronic device 200 is f s , so the number of sampling points corresponding to the time difference between the two ultrasonic signals received by the microphone of the second electronic device 200 is
  • the difference in the number of sampling points corresponding to the time difference between the two ultrasonic signals received by the microphone of the second electronic device 200 value can be a is any numeric value in (-1,1).
  • a can take values such as ⁇ 0.2, ⁇ 0.3, ⁇ 0.4, ⁇ 0.5, ⁇ 0.6, ⁇ 0.7, etc.
  • the right side area, the left side area, and the front and rear side areas of the first electronic device 100 are shown in FIG. 13 . By adjusting the value of a, the size range of the right area, the left area, and the front and rear areas can be adjusted.
  • ⁇ * >Th it means that the second ultrasonic signal reaches the microphone of the second electronic device first, and the second electronic device is located in the right region of the first electronic device.
  • ⁇ * ⁇ -Th it means that the first ultrasonic signal reaches the microphone of the second electronic device first, and the second electronic device is located in the left area of the first electronic device.
  • ⁇ Th it means that the first ultrasonic signal and the second ultrasonic signal reach the microphone of the second electronic device almost simultaneously, and the second electronic device is located in the front and rear regions of the first electronic device.
  • the multiple microphones may all collect the first ultrasonic signal and the second ultrasonic signal. After that, the second electronic device takes the first ultrasonic signal and the second ultrasonic signal collected by a microphone, and performs steps 203 to 205 .
  • the controller of the second electronic device can control the first microphone to collect the first ultrasonic signal and the second ultrasonic signal, and the first microphone is any one of the multiple microphones. a microphone.
  • the controller of the second electronic device controls the first microphone to work, and the other microphones do not work temporarily. After that, the second electronic device performs steps 203 to 205 on the first ultrasonic signal and the second ultrasonic signal collected by the first microphone.
  • the multiple microphones may all collect the first ultrasonic signal and the second ultrasonic signal. After that, the second electronic device takes the first ultrasonic signal and the second ultrasonic signal collected by each microphone, and performs steps 203 to 204 respectively. The second electronic device takes an average time difference according to the plurality of time differences obtained in step 204, and then performs step 205 according to the average time difference.
  • FIG. 20 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application.
  • the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 301 to 304 .
  • Step 301 the first electronic device transmits the first ultrasonic signal and the second ultrasonic signal with different characteristics to the second electronic device through two speakers respectively.
  • the first ultrasonic signal and the second ultrasonic signal may be ultrasonic signals of different frequency bands, or ultrasonic signals of different orthogonal sequences.
  • the first ultrasonic signal and the second ultrasonic signal are directly generated by the first electronic device, rather than obtained by frequency conversion of the baseband sequence.
  • the first electronic device generates a first ultrasonic signal x 1 (t) with a frequency band [f 1 , f 2 ], and a second ultrasonic signal x 2 (t) with a frequency band [f 3 , f 4 ], and the frequency band There is no overlap between [f 1 , f 2 ] and the frequency band [f 3 , f 4 ].
  • f 1 , f 2 , f 3 and f 4 f 1 ⁇ f 2 ⁇ f 3 ⁇ f 4 , or f 3 ⁇ f 4 ⁇ f 1 ⁇ f 2 .
  • the two speakers may be a left channel speaker and a right channel speaker of the first electronic device, respectively.
  • the first electronic device sends the first ultrasonic signal x 1 (t) to the second electronic device through the left channel speaker,
  • the second ultrasonic signal x 2 (t) is sent to the second electronic device through the right channel speaker.
  • steps 302 to 304 please refer to steps 203 to 205, and details are not repeated here.
  • FIG. 21 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 21 , the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 401 to 405 .
  • steps 401 to 404 please refer to steps 201 to 204, and details are not repeated here.
  • Step 405 the second electronic device determines the angle information of the second electronic device relative to the first electronic device according to the time difference, the first distance between the left channel speaker and the right channel speaker, and the sampling frequency of the microphone.
  • step 405 may be: according to the difference in the number of sampling points, the first distance between the left channel speaker and the right channel speaker, and the sampling frequency of the microphone, determine the angle information of the second electronic device relative to the first electronic device .
  • the first distance is D
  • the distance from the microphone to the speaker of the left channel is D 4
  • the distance from the microphone to the speaker of the right channel is D 5
  • the difference in the number of sampling points Among them f s is the sampling frequency of the microphone
  • v is the propagation speed of the ultrasonic signal.
  • the following describes how to determine the angle ⁇ of the second electronic device relative to the first electronic device.
  • the angle ⁇ of the second electronic device relative to the first electronic device can be determined according to the reference angle and the relationship between D 4 -D 5 and D.
  • the angle ⁇ of the second electronic device relative to the first electronic device can be determined according to the preset boundary lines of the left area, the right area, and the front and rear areas. position. Specifically, please refer to the relevant description of the boundary between the left area, the right area, and the front and rear areas in the stereo application scenario, which will not be repeated here.
  • the second electronic device may also determine the angle of the second electronic device relative to the first electronic device according to a method such as a trigonometric function.
  • FIG. 23 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application.
  • the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 501 to 504 .
  • Step 501 the first electronic device transmits the first ultrasonic signal and the second ultrasonic signal with different characteristics to the second electronic device through two speakers respectively.
  • step 301 For details, please refer to step 301, which will not be repeated here.
  • step 502 please refer to step 203 to step 204, and details are not repeated here.
  • step 504 please refer to step 405, and details are not repeated here.
  • FIG. 24 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 24 , the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 601 to 604 .
  • Step 601 the first electronic device generates a baseband sequence, and converts the baseband sequence to obtain a first ultrasonic signal and a second ultrasonic signal.
  • the powers of the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) in this embodiment are the same.
  • step 602 please refer to step 202, and details are not repeated here.
  • Step 603 the second electronic device calculates the first power information of the first ultrasonic signal and the second power information of the second ultrasonic signal.
  • the microphone of the second electronic device passes through a filter with a filter bandwidth of [f 1 , f 2 ] and a filter with a filter bandwidth of [f 3 , f 4 ]
  • the filter performs filtering to obtain the first ultrasonic signal and the second ultrasonic signal.
  • the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) will be affected by channel information or time delay during channel transmission. Therefore, when the second electronic device receives the two After one ultrasonic signal, the first ultrasonic signal x 1 (t) is transformed into a first ultrasonic signal y 1 (t), and the second ultrasonic signal x 2 (t) is transformed into a second ultrasonic signal y 2 (t).
  • the frequency band of the first ultrasonic signal y 1 (t) is the same as the frequency band of the first ultrasonic signal x 1 (t), which is [f 1 , f 2 ].
  • the frequency band of the first ultrasonic signal y 1 (t) is the same as the frequency band of the second ultrasonic signal x 2 (t), and is [f 3 , f 4 ].
  • the second electronic device After the second electronic device receives the first ultrasonic signal y 1 (t) and the second ultrasonic signal y 2 (t), the second electronic device calculates the first power information and second power information of the first ultrasonic signal y 1 (t) Second power information of the ultrasonic signal y 2 (t).
  • the first power information may be: the first average power of the first ultrasonic signal y 1 (t) within a preset time period.
  • the second power information may be: the second average power of the second ultrasonic signal y 2 (t) within a preset time period.
  • the time length of the first ultrasonic signal y 1 (t) is the first time length
  • the time length of the second ultrasonic signal y 2 (t) is the second time length
  • the preset time period may be: less than or equal to the first time period Any value of the smallest value of a time length and a second time length.
  • the time length of the first ultrasonic signal y 1 (t) may be: the start time when the first electronic device starts to send the first ultrasonic signal y 1 (t), and the time when the first ultrasonic signal y 1 (t) ends to be sent. End time, the corresponding length of time.
  • the time length of the second ultrasonic signal y 2 (t) may be: the start time when the first electronic device starts to send the first ultrasonic signal y 2 (t), and the end time when the first ultrasonic signal y 2 (t) ends. , the corresponding length of time.
  • the first average power may be an average value of the sum of the powers of the first ultrasonic signal y 1 (t) within the preset time period.
  • the second average power may be an average value of the sum of the powers of the second ultrasonic signal y 2 (t) within the preset time period.
  • the second electronic device may use E(
  • the second electronic device may use E(
  • Step 604 the second electronic device determines the position information of the second electronic device relative to the first electronic device according to the relationship between the first power and the second power.
  • the second electronic device may calculate a ratio between the first power and the second power, and determine position information of the second electronic device relative to the first electronic device according to the ratio. For example, a first threshold value and a second threshold value may be set, and the orientation information of the second electronic device relative to the first electronic device may be determined according to the relationship between the ratio and the first threshold value and the second threshold value.
  • the first threshold a is greater than the second threshold b, and the first threshold a is greater than 1 and the second threshold b is less than 1.
  • the second electronic device calculates the ratio of the first average power to the second average power. If the ratio is greater than the first threshold a, it means that the first average power is greater than the second average power, and the second electronic device is located in the left area of the first electronic device . If the ratio is smaller than the second threshold b, it means that the first average power is smaller than the second average power, and the second electronic device is located in the right area of the first electronic device. If the ratio is less than or equal to the first threshold a and greater than or equal to the second threshold b, it means that the first average power is close to the second average power, and the second electronic device is located in the front and rear areas of the first electronic device.
  • FIG. 25 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 25 , the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 701 to 703 .
  • Step 701 the first electronic device transmits the first ultrasonic signal and the second ultrasonic signal with different characteristics to the second electronic device respectively through two speakers.
  • the first ultrasonic signal and the second ultrasonic signal are ultrasonic signals of different frequency bands, or ultrasonic signals of different orthogonal sequences.
  • the first ultrasonic signal and the second ultrasonic signal are directly generated by the first electronic device, rather than obtained by frequency conversion of the baseband sequence s.
  • the first electronic device generates a first ultrasonic signal x 1 (t) with a frequency band [f 1 , f 2 ], and a second ultrasonic signal x 2 (t) with a frequency band [f 3 , f 4 ], and the frequency band There is no overlap between [f 1 , f 2 ] and the frequency band [f 3 , f 4 ], and the powers of the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) are the same.
  • steps 702 to 703 please refer to steps 603 to 604, and details are not repeated here.
  • FIG. 26 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 26 , the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 801 to 805 .
  • Step 801 the first electronic device generates two orthogonal baseband sequences, and converts the two baseband sequences to obtain a first ultrasonic signal and a second ultrasonic signal.
  • the first electronic device generates a first baseband sequence s 1 and a second baseband sequence s 2 , and the bandwidths are both B.
  • the first electronic device up-converts the first baseband sequence s 1 and the second baseband sequence s 2 to the same frequency band [f c -B, f c +B] to obtain the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t).
  • the powers of the first ultrasonic signal x 1 (t) and the second ultrasonic signal x 2 (t) are the same.
  • step 802 please refer to step 202, and details are not repeated here.
  • Step 803 the second electronic device extracts the first ultrasonic signal and the second ultrasonic signal from the received ultrasonic signal.
  • the ultrasonic signal received by the second electronic device is a mixed ultrasonic signal of the first ultrasonic signal and the second ultrasonic signal, and the frequency band of the first ultrasonic signal and the second ultrasonic signal is the same, it is necessary to combine the first ultrasonic signal and the second ultrasonic signal.
  • the second ultrasonic signal is extracted, and subsequent steps are performed.
  • the second electronic device may filter the received ultrasonic signal through a filter with a filter bandwidth of [f c -B, f c +B]. After that, the ultrasonic signal obtained by filtering is frequency-converted to the baseband frequency, and then the ultrasonic signal converted to the baseband frequency is convolved with the first baseband sequence s 1 and the second baseband sequence s 2 respectively to obtain the first ultrasonic signal and the second ultrasonic wave Signal.
  • steps 804 to 805 please refer to steps 603 and 604, and details are not repeated here.
  • FIG. 27 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application. Referring to FIG. 27 , the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 901 to 906 .
  • Step 901 the first electronic device generates a baseband sequence, and converts the baseband sequence to obtain a preset ultrasonic signal.
  • the first electronic device generates a baseband sequence s with a bandwidth of B.
  • the first electronic device up-converts the baseband sequence s to obtain a preset ultrasonic signal x(t).
  • the preset frequency band of the ultrasonic signal x(t) is [f 1 , f 2 ], and the time length is T 9 .
  • the first electronic device includes a first speaker and a second speaker.
  • the first speaker may be a left channel speaker and the second speaker may be a right channel speaker.
  • the first speaker may be a right channel speaker and the second speaker may be a left channel speaker.
  • Step 902 the first electronic device sends the first ultrasonic signal to the second electronic device through the first speaker.
  • the first ultrasonic signal x 1 (t) is the above-mentioned preset ultrasonic signal x(t), and the time series of x 1 (t) and x(t) are the same.
  • Step 903 after the completion of sending the first ultrasonic signal, the first electronic device sends the second ultrasonic signal to the second electronic device through the second speaker.
  • the second ultrasonic signal x 2 (t) is the above-mentioned preset ultrasonic signal x(t), and the time series of x 2 (t) and x(t) are the same.
  • the first electronic device may send the second ultrasonic signal to the second electronic device through the second speaker after a preset time after the completion of sending the first ultrasonic signal.
  • the preset time can be any time greater than or equal to 0.
  • the length of the preset time is T 10
  • the time when the first electronic device completes sending the first ultrasonic signal to the second electronic device through the first speaker is T 11
  • the electronic device can pass through at time (T 11 +T 10 )
  • the second speaker sends a second ultrasonic signal to the second electronic device.
  • the two speakers do not send ultrasonic signals at the same time, so that the two ultrasonic signals sent by the two speakers are two ultrasonic signals of different orthogonal sequences.
  • Step 904 the second electronic device performs correlation calculation between the received ultrasonic signal and the preset ultrasonic signal, and determines the time values corresponding to the two peaks in the correlation calculation result.
  • the first electronic device may notify the second electronic device of the sequence information of the preset ultrasonic signal by means of WIFI or Bluetooth.
  • the preset ultrasonic signal may be an ultrasonic signal known to the second electronic device, and the first electronic device does not need to inform the second electronic device of the time series information of the preset ultrasonic signal.
  • the ultrasonic signal y(t) to be received by the second electronic device may be: the first ultrasonic signal sent by the first electronic device through the first speaker, and the second ultrasonic signal sent by the first electronic device through the second speaker The ultrasonic signal is transmitted through the channel to reach the ultrasonic signal of the microphone of the second electronic device.
  • Step 905 the second electronic device determines that the first ultrasonic signal sent by the first speaker and the second ultrasonic signal sent by the second speaker reach the microphone of the second electronic device according to the two time values and the preset time length of the ultrasonic signal. Time difference.
  • the time difference between the arrival of the first ultrasonic signal sent by the first speaker and the second ultrasonic signal sent by the second speaker to the microphone of the second electronic device can be expressed as the sampling of the first ultrasonic signal and the first ultrasonic signal by the microphone.
  • the difference in the number of points can be expressed as the sampling of the first ultrasonic signal and the first ultrasonic signal by the microphone.
  • a correlation calculation is performed between y(t) and x(t) Two correlation peaks of z( ⁇ ) and corresponding times ⁇ 1 and ⁇ 2 are obtained.
  • the waveforms of the ultrasonic signal y(t) and the first ultrasonic signal x 1 ( t ) are shown in Figure 28.
  • the first ultrasonic signal x 1 (t) arrives at the microphone first, and the second ultrasonic signal x 2 (t) arrives later microphone.
  • the time corresponding to the peak value of the first ultrasonic signal x 1 (t) is ⁇ 1
  • the time corresponding to the peak value of the second ultrasonic signal x 2 (t) is ⁇ 2
  • the first ultrasonic signal x 1 (t) and the second ultrasonic signal The time lengths of x 2 (t) are both T 9
  • the first electronic device sends the second ultrasonic signal to the second electronic device after T 10 time after the first electronic device sends the first ultrasonic signal.
  • the first electronic device can first move the second ultrasonic signal x 2 (t) to the left by the time corresponding to T 9 +T 10 to eliminate the time influence caused by the first electronic device not sending two ultrasonic signals simultaneously.
  • the time corresponding to the peak value is ⁇ 1 -T 9 -T 10 .
  • Step 906 the second electronic device determines the angle information of the second electronic device relative to the first electronic device according to the time difference, the first distance between the first speaker and the second speaker, and the sampling frequency of the microphone.
  • step 405 Please refer to step 405, which is not repeated here.
  • the second electronic device may also send two time values to the first electronic device, and the first electronic device determines the time difference and determines the angle information of the second electronic device relative to the first electronic device.
  • the second electronic device may also send the two time values to other electronic devices other than the first electronic device and the second electronic device, and the other electronic devices determine the time difference and the time value of the second electronic device relative to the first electronic device. angle information.
  • FIG. 29 is a schematic flowchart of determining relative position information between a second electronic device and a first electronic device according to an embodiment of the present application.
  • the above-mentioned process of determining the relative position information between the second electronic device and the first electronic device includes steps 1001 to 1005 .
  • step 1001 refer to step 201, and details are not repeated here.
  • the time series information of the first ultrasonic signal and the second ultrasonic signal are different.
  • Step 1002 the first electronic device sends the first ultrasonic signal to the second electronic device through the first speaker at the first time, and sends the second ultrasonic signal to the second electronic device through the second speaker at the second time.
  • the two moments are different.
  • the first electronic device may send the second ultrasonic signal to the second electronic device through the second speaker after a preset time after the first electronic device sends the first ultrasonic signal through the second speaker.
  • the preset time can be any time greater than or equal to 0.
  • steps 1003 to 1005 refer to steps 203 to 205, which will not be repeated here.
  • an embodiment of the present application further provides a device interaction method, including: establishing a connection between a first electronic device and a second electronic device; the first electronic device sending a first sound wave signal to the second electronic device through a first speaker , send the second sound wave signal to the second electronic device through the second speaker; wherein, the first speaker is different from the second speaker, and the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics;
  • the second electronic device receives the first sound wave signal and the second sound wave signal through the first microphone; the second electronic device receives the time difference between the first sound wave signal and the second sound wave signal based on the first microphone or the first sound wave signal and the second sound wave signal.
  • the strength of the sound wave signal determines the relative position information between the second electronic device and the first electronic device, where the relative position information includes that the second electronic device is located on the left side of the first electronic device, or the second electronic device is located in the first electronic device.
  • the right side of ; the first electronic device and the second electronic device perform information interaction based on relative position information.
  • the embodiment of the present application also provides an audio playback method, including: the first electronic device sends a first sound wave signal to the first audio playback device and the second audio playback device respectively through the first speaker, and sends the first sound wave signal through the second audio playback device.
  • the speaker sends the second sound wave signal to the second audio playback device and the second audio playback device respectively, the first speaker is different from the second speaker, and the first sound wave signal and the second sound wave signal are two sound wave signals with different characteristics;
  • the first electronic device receives the first relative position information between the first audio playback device and the first electronic device sent by the first audio playback device, and the information between the second audio playback device and the first electronic device sent by the second audio playback device.
  • the second relative position information is determined by the reception results of the first sound wave signal and the second sound wave signal received by the first microphone of the first audio playback device, and the second relative position information is determined by the second audio playback device.
  • the second microphone receives the first sound wave signal and the receiving result of the second sound wave signal is determined; or, the first electronic device receives the first receiving result sent by the first audio playback device, and the second receiving result sent by the second audio playback device.
  • the first reception result is that the first microphone of the first audio playback device receives the first sound wave signal and the second sound wave signal
  • the second reception result is that the second microphone of the second audio playback device receives the first sound wave
  • the reception result of the signal and the second acoustic wave signal the first electronic device determines the first relative position information based on the first reception result, and determines the second relative position information based on the second reception result; the first electronic device determines the first relative position information according to the first relative position information and the first relative position information
  • the second relative position information determines the third relative position information between the first audio playback device and the second audio playback device;
  • the third relative position information includes that the first audio playback device is located on the third side of the second audio playback device, and the second audio playback device
  • the playback device is located on the fourth side of the first audio playback device, and the third side is the left or right side; the first electronic device sends the left channel audio information to the first audio playback device and the second audio playback device on the left
  • an embodiment of the present application further provides an electronic device, including: one or more processors, a memory, and two speakers.
  • a memory and two speakers are coupled to the one or more processors, the memory is used to store computer program code, the two speakers are used to transmit sound wave signals, and the computer program code includes computer instructions.
  • the computer instructions when executed by one or more processors, cause an electronic device to perform one or more steps of any of the above methods.
  • an embodiment of the present application further provides an electronic device, including: one or more processors, a memory, and a microphone.
  • a memory and a microphone are coupled to the one or more processors, the memory for storing computer program code for receiving the acoustic wave signal, and the computer program code including computer instructions.
  • the computer instructions when executed by one or more processors, cause an electronic device to perform one or more steps of any of the above methods.
  • an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer or processor is run on a computer or a processor, the computer or the processor is made to execute any one of the above. one or more steps in a method.
  • the embodiment of the present application also provides a computer program product containing instructions, when the computer program product is run on a computer or a processor, the computer or processor is made to execute one or more of the above-mentioned methods. step.
  • an embodiment of the present application further provides a chip system
  • the chip system may include a memory and a processor, and the processor executes a computer program stored in the memory to implement one or more of the above-mentioned methods. step.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • an embodiment of the present application further provides a chip system
  • the chip system may include a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any of the above methods. one or more steps.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • Computer instructions may be sent from one website site, computer, server or data center to another website site, computer, server or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.) data center for transmission.
  • a computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)

Abstract

一种设备交互方法、位置确定方法、电子设备及芯片系统,位置确定方法包括:第一电子设备通过第一扬声器和第二扬声器向第二电子设备发送第一声波信号和第二声波信号;第一电子设备接收第二电子设备发送的第二电子设备与第一电子设备之间的相对位置信息,该相对位置信息由第二电子设备的第一麦克风接收第一声波信号和第二声波信号的接收结果确定;或者,第一电子设备接收第二电子设备发送的接收结果,该接收结果为第二电子设备的第一麦克风接收第一声波信号和第二声波信号的接收结果;第一电子设备基于接收结果确定相对位置信息。该位置确定方法能够准确地确定第二电子设备与第一电子设备之间的相对位置信息。

Description

设备交互方法、位置确定方法、电子设备及芯片系统
本申请要求于2021年01月25日提交国家知识产权局、申请号为202110100462.0、申请名称为“设备交互方法、位置确定方法、电子设备及芯片系统”的中国专利申请的优先权,以及要求于2021年12月23日提交国家知识产权局、申请号为202111595950.X、申请名称为“设备交互方法、位置确定方法、电子设备及芯片系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种设备交互方法、位置确定方法、电子设备及芯片系统。
背景技术
随着电子设备种类和数量的日益增长,多个电子设备之间的交互需求日益增多。在多个电子设备之间建立交互时,通常需要确定各个电子设备之间的相对位置信息,再基于该相对位置信息实现多个电子设备之间的交互操作。例如,对于多个音箱实现立体音效的场景中,可以根据音箱之间的相对位置信息,调整部分音箱的声场,实现多种立体音效。
以第一电子设备和第二电子设备为例,说明确定电子设备之间的相对位置信息的过程。其中,第一电子设备包括一个音频发送单元(例如扬声器),第二电子设备包括多个音频接收单元(例如麦克风)。音频发送单元发送声波信号,多个音频接收单元接收该声波信号。第二电子设备根据多个音频接收单元接收到声波信号的时间差,确定第一电子设备与第二电子设备之间的相对位置信息。
然而,上述过程要求第二电子设备具有多个音频接收单元,而且多个音频接收单元之间的距离要足够大,否则会影响所确定的相对位置的准确度。
发明内容
本申请提供一种设备交互方法、位置确定方法、电子设备及芯片系统,能够准确地确定电子设备之间的相对位置信息。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请实施例提供一种设备交互方法,包括:第一电子设备与第二电子设备建立连接;第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号;其中,第一扬声器与第二扬声器不同,且第一声波信号和第二声波信号为不同特征的两个声波信号;第二电子设备通过第一麦克风接收第一声波信号和第二声波信号;第二电子设备基于第一麦克风接收到两个声波信号的时间差或两个声波信号的强度,确定第二电子设备与第一电子设备之间的相对位置信息,该相对位置信息包括第二电子设备位于第一电子设备的左侧、 或者第二电子设备位于第一电子设备的右侧;第一电子设备和第二电子设备基于上述相对位置信息,进行信息交互。
本申请实施例中,第一电子设备的两个扬声器的摆放方式相对于第一电子设备只有一种摆放方式。不管第二电子设备位于第一电子设备的任何位置,两个扬声器的摆放方式均不会影响所确定的相对位置信息。因此,本申请实施例相对于现有技术,能够更准确地确定第二电子设备与第一电子设备之间的相对位置信息。在确定该相对位置信息之后,第一电子设备和第二电子设备可以基于该相对位置信息,进行信息交互。例如,第一电子设备和第二电子设备之间可以进行的信息交互包括:第一电子设备将第一目标内容发送到第二电子设备的显示界面中显示,第一电子设备将音频信息发送给音频播放设备以实现立体声播放音频信息等。
第二方面,本申请实施例提供一种位置确定方法,包括:第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号,第一扬声器与第二扬声器不同,且第一声波信号和第二声波信号为不同特征的两个声波信号;第一电子设备接收第二电子设备发送的第二电子设备与第一电子设备之间的相对位置信息,上述相对位置信息由第二电子设备的第一麦克风接收第一声波信号和第二声波信号的接收结果确定;或者,第一电子设备接收第二电子设备发送的接收结果,接收结果为第二电子设备的第一麦克风接收第一声波信号和第二声波信号的接收结果;第一电子设备基于接收结果确定相对位置信息。
本申请实施例中,在确定第二电子设备与第一电子设备之间的相对位置信息时,第一电子设备的两个扬声器的摆放方式相对于第一电子设备只有一种摆放方式。不管第二电子设备位于第一电子设备的任何位置,两个扬声器的摆放方式均不会影响所确定的相对位置信息。因此,本申请实施例相对于现有技术,能够更准确地确定第二电子设备与第一电子设备之间的相对位置信息。另外,第一电子设备具有第一扬声器和第二扬声器、第二电子设备具有一个麦克风即可实现本申请实施例,比较容易实现。
需要说明的是,第二电子设备与第一电子设备之间的相对位置信息可以为:第二电子设备相对于第一电子设备的位置信息,也可以为第一电子设备相对于第二电子设备的位置信息,本申请实施例对此不予限定。
本申请实施例中,第一声波信号和第二声波信号可以为时间序列相同的声波信号,也可以为时间序列不同的声波信号。
其中,上述声波信号可以为频率为0~20KHz的次声波信号,也可以为频率为20KHz以上的超声波信号。例如,上述声波信号的频率可以为1KHz、2KHz、3KHz、5KHz、10KHz、15KHz、20KHz、30KHz等。
一些实施例中,上述声波信号可以为超声波信号。
一些实施例中,第一扬声器和第二扬声器之间的距离大于预设距离。示例性的,该预设距离可以为大于或等于10厘米的任意数值。例如,该预设距离为10厘米、15厘米、20厘米、30厘米、40厘米、50厘米、60厘米、70厘米、80厘米等。
其中,电子设备的两个麦克风之间的距离通常较小,例如手机或平板电脑的两个麦克风之间的距离为10厘米左右。而笔记本电脑的两个扬声器之间的距离可以为30厘米左右,电视或显示屏的两个扬声器之间的距离可以为40厘米到50厘米左右,部分电视或显示屏 的两个扬声器之间的距离甚至可以达到70厘米到80厘米,要远远大于10厘米。相对于现有技术,本申请实施例能够较为准确地确定第二电子设备与第一电子设备之间的相对位置信息。
一些实施例中,在第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号之前,上述位置确定方法还可以包括:第一电子设备与第二电子设备之间建立配对连接。
一种场景中,第一电子设备与第二电子设备之间可以通过有线方式建立配对连接。例如,第一电子设备与第二电子设备之间可以通过HDMI接口建立配对连接。
一种场景中,第一电子设备与第二电子设备之间可以通过无线方式建立配对连接。例如,第一电子设备与第二电子设备之间可以通过共同连接一个AP、WIFI直连和蓝牙等无线方式建立配对连接。
结合第二方面,在一些实施例中,在第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号之前,上述位置确定方法还包括:响应于扩展显示操作,第一电子设备生成第一声波信号和第二声波信号,该扩展显示操作用于将第一目标内容扩展到第二电子设备的显示界面中显示。
结合第二方面,在一些实施例中,在第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号之前,上述位置确定方法还包括:第一电子设备生成第一基带序列;第一电子设备将第一基带序列进行变频处理,生成第一声波信号和第二声波信号。
一种场景中,第一电子设备生成基带序列s,带宽为B。第一电子设备将该基带序列s进行上变频,得到第一声波信号x 1(t)和第二声波信号x 2(t)。其中,第一声波信号x 1(t)和第二声波信号x 2(t)为时间序列不同的声波信号。第一声波信号x 1(t)的频带为[f 1,f 2],第二声波信号x 2的频带为[f 3,f 4]。
对应的,第一电子设备可以在同一时刻通过第一扬声器向第二电子设备发送第一声波信号x 1(t),以及通过第二扬声器向第二电子设备发送第二声波信号x 2(t)。或者,第一电子设备可以在第一时刻通过第一扬声器向第二电子设备发送第一声波信号x 1(t),以及在第二时刻通过第二扬声器向第二电子设备发送第二声波信号x 2(t),第一时刻与第二时刻不同。
其中,第一电子设备对基带序列s进行上变频的过程可以为:第一电子设备将基带序列s调制在低频载波上,并将低频载波与高频信号进行混频;之后取混频之后的两个上边带信号,即可得到第一声波信号x 1(t)和第二声波信号x 2(t)。
需要说明的是,第一声波信号x 1(t)和第二声波信号x 2(t)在信道传输过程中,会受到信道信息或时延等影响,因此,在第二电子设备接收到两个声波信号后,第一声波信号x 1(t)变换为第一声波信号y 1(t),第二声波信号x 2(t)变换为第二声波信号y 2(t)。
又一种场景中,第一电子设备生成基带序列s,带宽为B。第一电子设备将该基带序列s进行上变频,得到第一声波信号和第二声波信号。其中,第一声波信号和第二声波信号为时间序列相同的声波信号。
对应的,第一电子设备可以在第一时刻通过第一扬声器向第二电子设备发送第一声波信号,在第二时刻通过第二扬声器向第二电子设备发送第二声波信号,第一时刻 与第二时刻不同。例如,第一电子设备可以在通过第一扬声器向第二电子设备发送第一声波信号完成后,再通过第二扬声器向第二电子设备发送第二声波信号。
示例性的,第一电子设备可以在通过第一扬声器发送第一声波信号完成的预设时间后,通过第二扬声器向第二电子设备发送第二声波信号。该预设时间可以为大于或等于0的任意时间。例如,预设时间的长度为T 10,第一电子设备通过第一扬声器向第二电子设备发送第一声波信号完成的时刻为T 11,则第一电子设备可以在(T 11+T 10)时刻通过第二扬声器向第二电子设备发送第二声波信号。
结合第二方面,在一些实施例中,在第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号之前,上述位置确定方法还包括:第一电子设备生成两个正交的基带序列;第一电子设备将两个正交的基带序列进行变频处理,生成第一声波信号和第二声波信号。
例如,第一电子设备生成第一基带序列和第二基带序列。第一电子设备将第一基带序列和第二基带序列上变频至同一频带,得到第一声波信号和第二声波信号。又例如,第一电子设备生成第一基带序列和第二基带序列。第一电子设备将第一基带序列和第二基带序列上变频至不同的频带,得到第一声波信号和第二声波信号。
结合第二方面,在一些实施例中,上述接收结果包括:第一麦克风接收第一声波信号和第二声波信号的时间差;和/或,第一麦克风接收第一声波信号和第二声波信号中的每个声波信号的信号强度。
一些实施例中,上述接收结果为时间差,上述第一电子设备基于接收结果确定相对位置信息,包括:计算第三时刻减去第四时刻得到的时间差,第三时刻为第一麦克风接收所述第一声波信号的时刻,第四时刻为第一麦克风接收第二声波信号的时刻,第一扬声器位于第二扬声器的第一侧,第二扬声器位于第一扬声器的第二侧,第一侧为左侧或右侧;若时间差大于或等于第一时间差阈值,则第二电子设备位于第一电子设备的第二侧;其中,第一时间差阈值为正数;若时间差小于或等于第二时间差阈值,则第二电子设备位于第一电子设备的第一侧;其中,第二时间差阈值为负数;若时间差小于第一时间差阈值且大于第二时间差阈值,则第二电子设备位于第一电子设备的前后侧。
示例性的,上述时间差可以表示为第一麦克风对第一声波信号和第二声波信号的采样点数量的差值τ *。其中,第一声波信号和第二声波信号到达第一麦克风后,第一麦克风以固定的采样频率f s对第一声波信号和第二声波信号进行采样,例如采样频率f s为48KHz。因此,在时间t内,第一麦克风采集的采样点数量为t*f s。例如,第一声波信号先到达第一麦克风,第二声波信号后到达第一麦克风,则第一麦克风对第一声波信号的采样点数量要大于对第一声波信号的采样点数量。而两个采样点数量的差值τ *则为采样频率与时间差的乘积:Δt·f s,Δt为上述时间差。
示例性的,时间差阈值可以表示为预设采样点数值。其中,预设采样点数值与第一间距和第一麦克风的采样频率正相关,第一间距为第一扬声器和第二扬声器之间的距离。例如,预设采样点数值Th可以与第一间距D和采样频率f s正相关,第一间距D和采样频率f s越大,预设采样点数值Th可以设置的越大。
示例性的,预设采样点数值Th与第一间距D和采样频率f s的关系可以为:
Figure PCTCN2022071403-appb-000001
系数a为位于(-1,1)中的任意数值。其中,a可以取±0.2,±0.3,±0.4,±0.5,±0.6,±0.7等数值。
若τ *>Th,说明第二声波信号先到达第二电子设备的第一麦克风,则第二电子设备位于第一电子设备的第二侧。若τ *<-Th,说明第一声波信号先到达第二电子设备的第一麦克风,则第二电子设备位于第一电子设备的第一侧。若|τ *|≤Th,说明第一声波信号和第二声波信号几乎同时到达第二电子设备的第一麦克风,则第二电子设备位于第一电子设备的前后侧。
一些实施例中,上述接收结果为信号强度,上述第一电子设备基于接收结果确定相对位置信息,包括:比较第一功率和第二功率,第一功率为第一声波信号的信号强度,第二功率为第二声波信号的信号强度,第一扬声器位于第二扬声器的第一侧,第二扬声器位于第一扬声器的第二侧,第一侧为左侧或右侧;若第一功率和第二功率满足第一预设关系,则第二电子设备位于第一电子设备的第一侧;其中,第一预设关系为第一功率减去第二功率的结果大于或等于第一功率阈值,第一功率阈值为正数;或者,第一预设关系为第一功率除以第二功率的结果大于或等于第一比值,第一比值大于1;若第一功率和第二功率满足第二预设关系,则第二电子设备位于第一电子设备的第二侧;其中,第二预设关系为第一功率减去第二功率的结果小于或等于第二功率阈值,第二功率阈值为负数;或者,第二预设关系为第一功率除以第二功率的结果小于或等于第二比值,第一比值小于1;若第一功率和第二功率满足第三预设关系,则第二电子设备位于第一电子设备的前后侧;其中,第三预设关系为第一功率减去第二功率的结果小于第一功率阈值且大于第二功率阈值;或者,第三预设关系为第一功率除以第二功率的结果小于第一比值且大于第二比值。
示例性的,第一功率可以为:在一预设时间段内,第一声波信号y 1(t)的第一平均功率。第二功率可以为:在一预设时间段内,第二声波信号y 2(t)的第二平均功率。其中,第一声波信号y 1(t)的时间长度为第一时间长度,第二声波信号y 2(t)的时间长度为第二时间长度,则预设时间段可以为:小于或等于第一时间长度和第二时间长度中最小值的任一数值。其中,第一声波信号y 1(t)的时间长度可以为:第一电子设备开始发送第一声波信号y 1(t)的起始时间,与结束发送第一声波信号y 1(t)的结束时间,所对应的时间长度。第二声波信号y 2(t)的时间长度可以为:第一电子设备开始发送第一声波信号y 2(t)的起始时间,与结束发送第一声波信号y 2(t)的结束时间,所对应的时间长度。
一些实施例中,第一比值和第二比值可以互为倒数。
结合第二方面,在一些实施例中,第二电子设备与所述第一电子设备之间的相对位置信息包括以下至少一种:第二电子设备位于第一电子设备的左侧、第二电子设备位于第一电子设备的右侧、第二电子设备位于第一电子设备的前后侧。
结合第二方面,在一些实施例中,上述位置确定方法还可以包括:检测针对第一子设备显示的第一目标内容的第一操作;判断第一操作是否与所述相对位置信息对应;如果所述第一操作与相对位置信息对应,第一电子设备将第一目标内容发送到第二电子设备的显示界面中显示。
上述将第一目标内容发送到第二电子设备的显示界面中进行显示,可以包括:如果上述相对位置信息为第二电子设备位于第一电子设备的左侧,响应于第一操作将第 一目标内容发送到第二电子设备的显示界面中显示;或者,如果相对位置信息为第二电子设备位于第一电子设备的右侧,响应于第一操作将第一目标内容发送到第二电子设备的显示界面中显示;或者,如果上述相对位置信息为第二电子设备位于第一电子设备的前后侧,不响应第一操作,不将第一目标内容发送到第二电子设备的显示界面中显示。
结合第二方面,在一些实施例中,第二电子设备包括位于第一电子设备左侧的第二电子设备和位于第一电子设备右侧的第二电子设备,上述位置确定方法还包括:检测针对第一子设备显示的第一目标内容的第二操作;若第二操作为向左扩展第一目标内容的操作,则第一电子设备将第一目标内容发送到位于第一电子设备左侧的第二电子设备的显示界面中显示;若第二操作为向右扩展第一目标内容的操作,则第一电子设备将第一目标内容发送到位于第一电子设备右侧的第二电子设备的显示界面中显示。
一种场景中,上述位置确定方法还可以包括:第一电子设备生成第一引导信息,该第一引导信息用于引导用户将第一目标内容向左拖动或向右拖动。第一电子设备获取作用于目标内容上的拖动操作;第一电子设备响应上述拖动操作,将第一目标内容发送到第二电子设备的显示界面中进行显示。
例如,若第二电子设备包括位于第一电子设备左侧的第二电子设备,则该第一引导信息用于引导用户将第一目标内容向左拖动。若第二电子设备包括位于第一电子设备右侧的第二电子设备,则该第一引导信息用于引导用户将第一目标内容向右拖动。若第二电子设备包括位于第一电子设备左侧的第二电子设备和位于第一电子设备右侧的第二电子设备,则该第一引导信息用于引导用户将第一目标内容向左拖动或向右拖动。
示例性的,上述第一引导信息可以以文字的形式显示在第一电子设备的显示界面中;或者,上述第一引导信息可以以动画形式显示在第一电子设备的显示界面中;或者,上述第一引导信息可以以动画和文字相结合的形式显示在第一电子设备的显示界面中。
一种场景中,第一电子设备响应用户操作将第一目标内容向与用户操作对应的方向移动。若第一目标内容移动至第一电子设备显示界面的第一预设位置且保持第一预设时间,则说明第一目标内容的第一部分内容已经移出第一电子设备的显示界面。第二电子设备显示第一目标内容的第一部分内容,第一电子设备显示第一目标内容的第二部分内容,第一目标内容的第一部分内容和第二部分内容构成第一目标内容。此时,第一电子设备和第二电子设备共同显示第一目标内容。
一种场景中,第一电子设备响应用户操作将第一目标内容向与用户操作对应的方向移动。若第一目标内容移动至第一电子设备显示界面的第二预设位置且保持第二预设时间,则说明第一目标内容已经全部移出第一电子设备的显示界面。此时,第二电子设备显示第一目标内容,第一电子设备不再显示第一目标内容。
结合第二方面,在一些实施例中,第一电子设备基于接收结果确定相对位置信息,包括:根据时间差、第一间距和采样频率,确定第二电子设备相对于第一电子设备的角度。其中,第一间距为第一扬声器和第二扬声器之间的距离,采样频率为第二电子设备的麦克风的采样频率。
示例性的,上述时间差可以表示为第二电子设备的第一麦克风对第一声波信号和第二声波信号的采样点数量的差值τ *。上述确定第二电子设备相对于第一电子设备的角度,包括:根据基准角度、第一间距和采样点数量的差值τ *,通过预设公式确定第二电子设备相对于第一电子设备的角度。
一种场景中,基准角度可以为90°、0°和-90°。第二电子设备相对于第一电子设备的角度为90°为:第二电子设备位于第一电子设备的右侧区域,且第二电子设备位于第一扬声器和第二扬声器的连线上,且D 4-D 5=D。第二电子设备相对于第一电子设备的角度为0°为:第二电子设备位于第一电子设备的前后侧区域,且第二电子设备位于第一扬声器和第二扬声器的连线的中垂线上,且D 4-D 5=0。第二电子设备相对于第一电子设备的角度为-90°为:第二电子设备位于第一电子设备的左侧区域,且第二电子设备位于第一扬声器和第二扬声器的连线上,且D 4-D 5=-D。其中,D 4为第一扬声器到第一麦克风的距离,D 5为第二扬声器到第一麦克风的距离,D为第一间距,第一扬声器位于第二扬声器的左侧。
其中,采样点数量的差值
Figure PCTCN2022071403-appb-000002
第二电子设备相对于第一电子设备的角度θ可以近似为
Figure PCTCN2022071403-appb-000003
由公式
Figure PCTCN2022071403-appb-000004
可知
Figure PCTCN2022071403-appb-000005
因此角度θ可以近似为
Figure PCTCN2022071403-appb-000006
其中,θ为第二电子设备相对于第一电子设备的角度,τ *为采样点数量的差值,v为声波信号的传播速度,f s为第一麦克风的采样频率。
一种场景中,基准角度为0°、90°和180°。第二电子设备相对于第一电子设备的角度为0°为:第二电子设备位于第一电子设备的右侧区域,且第二电子设备位于第一扬声器和所述第二扬声器的连线上,且D 4-D 5=D。第二电子设备相对于第一电子设备的角度为90°为:第二电子设备位于第一电子设备的前后侧区域,且第二电子设备位于第一扬声器和第二扬声器的连线的中垂线上,且D 4-D 5=0。第二电子设备相对于第一电子设备的角度为180°为:第二电子设备位于第一电子设备的左侧区域,且第二电子设备位于第一扬声器和第二扬声器的连线上,且D 4-D 5=-D。其中,D 4为第一扬声器到第一麦克风的距离,D 5为第二扬声器到第一麦克风的距离,D为第一间距,第一扬声器位于第二扬声器的左侧。
其中,采样点数量的差值
Figure PCTCN2022071403-appb-000007
第二电子设备相对于第一电子设备的角度θ可以近似为
Figure PCTCN2022071403-appb-000008
由公式
Figure PCTCN2022071403-appb-000009
可知
Figure PCTCN2022071403-appb-000010
因此角度θ可以近似为
Figure PCTCN2022071403-appb-000011
其中,θ为第二电子设备相对于第一电子设备的角度,τ *为采样点数量的差值,v为声波信号的传播速度,f s为第一麦克风的采样频率。
在得到第二电子设备相对于第一电子设备的角度之后,可以根据区域分界线,确定该角度对应的方位。其中,区域分界线可以通过预设的方式设定;或者,区域分界线通过第一麦克风采集到第一声波信号和第二声波信号的时间计算得到。
一些实施例中,第一电子设备的左侧域、右侧区域以及前后侧区域的分界线,可以预先设定。例如,预先设定左侧区域、右侧区域以及前后侧区域的分界线所对应的角度为±20°。即,音箱相对于电视的角度在[-20°,20°]范围内,则音箱位于电视的前后侧区域;若音箱相 对于电视的角度在(20°,90°]范围内,则音箱位于电视的右侧区域;若音箱相对于电视的角度在[-90°,-20°)范围内,则音箱位于电视的左侧区域。
一些实施例中,可以根据第二电子设备的第一麦克风采集到第一声波信号的时间T 7和采集到第二声波信号的时间T 8以及阈值t 2,确定左侧区域、右侧区域以及前后侧区域的分界线。例如,可以将满足T 7早于T 8且|T 7-T 8|=t 2条件的曲线作为右侧区域与前后侧区域的分界线,可以将满足T 7晚于T 8且|T 7-T 8|=t 2条件的曲线作为左侧区域与前后侧区域的分界线。
结合第二方面,在一些实施例中,若第二电子设备与第一电子设备之间的相对位置信息发生变化,且变化后的相对位置信息为第二电子设备位于第一电子设备的前后侧,则第一电子设备和第二电子设备之间不改变扩展方向;其中,扩展方向包括向右扩展和向左扩展。
其中,向右扩展可以为:用户在第一电子设备的显示界面中向右拖动第一目标内容,将第一目标内容扩展到位于第一电子设备右侧区域的第二电子设备中显示。向左扩展可以为:用户在第一电子设备的显示界面中向左拖动第一目标内容,将第一目标内容扩展到位于第一电子设备左侧区域的第二电子设备中显示。
例如,第二电子设备位于第一电子设备的右侧区域,此时第一电子设备将第一目标内容发送到第二电子设备的显示界面中显示。之后,若第一电子设备和/或第二电子设备移动使得第二电子设备位于第一电子设备的前后侧区域,则扩展方向保持为向右扩展不变。此时,用户仍可以通过向右拖动目标内容,将目标内容发送到第二电子设备的显示界面中显示。其中,第一电子设备和/或第二电子设备移动包括:第二电子设备移动,或第一电子设备移动,或第一电子设备和第二电子设备移动。
结合第二方面,在一些实施例中,在第一电子设备和第二电子设备之间开始进行扩展显示时,若第二电子设备位于第一电子设备的前后侧,则第一电子设备不向第二电子设备发送第一目标内容。另外,第一电子设备可以生成第一提示信息,第一提示信息用于提示用户:第二电子设备位于第一电子设备的前后侧区域,第一电子设备不能发送第一目标内容到第二电子设备的显示界面中进行显示。
一种场景中,若第一电子设备检测到第三操作,且此时的相对位置信息表示第二电子设备位于第一电子设备的前后侧区域,则第一电子设备按照默认的扩展方向或用户习惯的扩展方向,将第一目标内容发送到第二电子设备的显示界面中显示。其中,默认的扩展方向可以为向左扩展或向右扩展。
结合第二方面,在一些实施例中,上述方法可以包括:在第一电子设备和/或第二电子设备的位置发生变化后,重新确定第二电子设备与第一电子设备之间的相对位置信息。
示例性的,第一电子设备和第二电子设备均可以通过内置的加速计传感器、陀螺仪传感器或磁力计传感器检测各自位置是否发生变化。如果第一电子设备和/或第二电子设备的位置发生变化,则第二电子设备与第一电子设备之间的相对位置信息可能发生变化。例如,第二电子设备位于第一电子设备的左侧区域,在第一电子设备和/或第二电子设备的位置发生变化后,第二电子设备可能位于第一电子设备的前后侧区域。因此,在第一电子设备和/或第二电子设备的位置发生变化后,需要重新确定第二电子设 备与第一电子设备之间的相对位置信息。
一种场景中,第一电子设备通过内置的加速计传感器、陀螺仪传感器或磁力计传感器检测到第一电子设备的位置发生变化,执行通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号的步骤以及后续步骤,以重新确定第二电子设备与第一电子设备之间的相对位置信息。
又一种场景中,第二电子设备通过内置的加速计传感器、陀螺仪传感器或磁力计传感器检测到第二电子设备的位置发生变化,则第二电子设备向第一电子设备发送相对位置信息确定请求。第一电子设备响应该相对位置信息确定请求,执行通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号的步骤以及后续步骤,以重新确定第二电子设备与第一电子设备之间的相对位置信息。
一些实施例中,在检测到以下任一项的情况下,第一电子设备执行通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号的步骤:第一电子设备与第二电子设备建立配对连接,且第一电子设备中的扩展显示应用启动;或者,第一电子设备与第二电子设备建立配对连接,且第一电子设备检测到第二预设操作;或者,第一电子设备检测到第二预设操作;或者,第一电子设备中的扩展显示应用启动。其中,若满足上述任一项,则第一电子设备执行通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号的步骤。
结合第二方面,在一些实施例中,上述位置确定方法还可以包括:检测针对第一子设备显示的第一目标内容的第三操作,所述第三操作为投屏第二目标内容的操作;判断所述相对位置信息是否满足预设位置要求;如果所述相对位置信息满足预设位置要求,第一电子设备将第二目标内容发送到第二电子设备的显示界面中显示。
其中,预设位置要求可以为第二电子设备位于第一电子设备的前后侧。或者,预设投屏条件可以为第二电子设备位于第一电子设备的左侧。或者,预设投屏条件可以为第二电子设备位于第一电子设备的右侧。
结合第二方面,在一些实施例中,上述位置确定方法可以包括:第一电子设备生成第二提示信息,第二提示信息用于提示用户:将第二电子设备放置于第一电子设备的目标区域,第二目标为前后侧区域、左侧区域和右侧区域中的一个或多个区域。用户根据第二提示信息能够帮助用户将第二电子设备放置于正确区域,以快速实现投屏。
上述第二目标内容可能具有隐私要求,也可能不具有隐私要求。对于具有隐私要求的第二目标内容,应该防止被泄露隐私的情况发生,或降低被泄露隐私的风险。
一种场景中,对于具有隐私要求的第二目标内容,若上述相对位置信息满足预设位置要求,且第一电子设备与第二电子设备之间的距离小于阈值,则第一电子设备将第二目标内容发送到第二电子设备的显示界面中显示。在相对位置信息满足预设位置要求,且第一电子设备与第二电子设备之间的距离小于阈值的情况下,将具有隐私要求的第二目标内容发送给第二电子设备进行投屏显示,能够防止该第二目标内容被泄露隐私的情况发生,或降低该第二目标内容被泄露隐私的风险。
而在第一电子设备和第二电子设备之间已经建立投屏显示的情况下,若第二电子 设备与第一电子设备之间的相对位置信息发生变化,且变化后的相对位置信息不满足预设位置要求,和/或第一电子设备和第二电子设备之间的距离大于阈值,则第一电子设备向第二电子设备发送用于请求第二电子设备停止显示第二目标内容的请求信息。
又一种场景中,对于不具有隐私要求的第二目标内容,若相对位置信息满足预设位置要求,则第一电子设备将第二目标内容发送到第二电子设备的显示界面中显示。
另外,对于不具有隐私要求的第二目标内容,在第一电子设备和第二电子设备之间已经建立投屏显示的情况下,若第二电子设备与第一电子设备之间的相对位置信息发生变化,且变化后的相对位置信息不满足预设位置要求,和/或第一电子设备和第二电子设备之间的距离大于阈值,则第二电子设备继续显示第二目标内容。
第三方面,本申请实施例提供一种位置确定方法,包括:第二电子设备通过第一麦克风接收第一电子设备发送的第一声波信号和第二声波信号,第一声波信号和第二声波信号为特征不同的两个声波信号;第二电子设备获得第一麦克风接收第一声波信号和第二声波信号的接收结果;第二电子设备根据第一麦克风的接收结果,确定出第一电子设备与第二电子设备之间的相对位置信息;或者,第二电子设备将接收结果发送给第一电子设备,以供第一电子设备基于接收结果确定出相对位置信息。
本申请实施例中,在确定第二电子设备与第一电子设备之间的相对位置信息时,第一电子设备的两个扬声器的摆放方式相对于第一电子设备只有一种摆放方式。不管第二电子设备位于第一电子设备的任何位置,两个扬声器的摆放方式均不会影响所确定的相对位置信息。因此,本申请实施例相对于现有技术,能够更准确地确定第二电子设备与第一电子设备之间的相对位置信息。另外,第一电子设备具有第一扬声器和第二扬声器、第二电子设备具有一个麦克风即可实现本申请实施例,比较容易实现。
需要说明的是,第二电子设备与第一电子设备之间的相对位置信息可以为:第二电子设备相对于第一电子设备的位置信息,也可以为第一电子设备相对于第二电子设备的位置信息,本申请实施例对此不予限定。
本申请实施例中,第一声波信号和第二声波信号可以为时间序列相同的声波信号,也可以为时间序列不同的声波信号。
其中,上述声波信号可以为频率为0~20KHz的次声波信号,也可以为频率为20KHz以上的超声波信号。例如,上述声波信号的频率可以为1KHz、2KHz、3KHz、5KHz、10KHz、15KHz、20KHz、30KHz等。
一些实施例中,上述声波信号可以为超声波信号。
一些实施例中,在第二电子设备通过第一麦克风接收第一电子设备发送的第一声波信号和第二声波信号之前,上述位置确定方法还可以包括:第一电子设备与第二电子设备之间建立配对连接。
结合第三方面,在一些实施例中,上述接收结果包括:第一麦克风接收第一声波信号和第二声波信号的时间差;和/或,第一麦克风接收第一声波信号和第二声波信号中的每个声波信号的信号强度。
结合第三方面,在一些实施例中,上述接收结果为时间差,第二电子设备获得第一麦克风接收第一声波信号和第二声波信号的接收结果,包括:将第一声波信号和第二声波信号变换到同一频带;将变换到同一频带的第一声波信号和第二声波信号进行 相关计算,确定第一麦克风接收到第一声波信号和第二声波信号的时间差。
示例性的,第二电子设备的第一麦克风接收到第一电子设备发送的第一声波信号和第二声波信号后,可以通过滤波器对声波信号进行滤波,得到第一声波信号和第二声波信号。需要说明的是,第一声波信号x 1(t)和第二声波信号x 2(t)在信道传输过程中,会受到信道信息或时延等影响,因此,在第二电子设备接收到两个声波信号后,第一声波信号x 1(t)变换为第一声波信号y 1(t),第二声波信号x 2(t)变换为第二声波信号y 2(t)。
示例性的,第二电子设备可以对第一声波信号y 1(t)进行变频处理,使得第一声波信号y 1(t)和第二声波信号y 2(t)变换到同一频带。或者,第二电子设备可以对第二声波信号y 2(t)进行变频处理,使得第一声波信号y 1(t)和第二声波信号y 2(t)变换到同一频带。或者,第二电子设备可以对第一声波信号y 1(t)和第二声波信号y 2(t)均进行变频处理,使得第一声波信号y 1(t)和第二声波信号y 2(t)变换到同一频带。
示例性的,上述时间差可以表示为第一麦克风对第一声波信号和第二声波信号的采样点数量的差值τ *,时间差阈值可以表示为预设采样点数值。其中,预设采样点数值与第一间距和第一麦克风的采样频率正相关,第一间距为第一扬声器和第二扬声器之间的距离。
对于第一声波信号和第二声波信号的时间序列不同的场景,若第一声波信号先到达第一麦克风、第二声波信号后达到第一麦克风的情况,相关计算的公式可以为:
Figure PCTCN2022071403-appb-000012
y 1(t)表示第一声波信号y 1(t)在采样时刻t的值,y' 2(t-τ)表示第二声波信号y' 2(t)在采样时刻t-τ的值。在y 1(t)的峰值和y' 2(t-τ)的峰值重合的情况下,可以得到z(τ)的峰值,以及第一声波信号和第二声波信号到达第一麦克风的时间差对应的采样点数量τ *
对于第一声波信号和第二声波信号的时间序列不同的场景,若第二声波信号先到达第一麦克风、第一声波信号后达到第一麦克风的情况,相关计算的公式可以为:
Figure PCTCN2022071403-appb-000013
y 1(t-τ)表示第一声波信号y 1(t)在采样时刻t-τ的值,y' 2(t)表示第二声波信号y' 2(t)在采样时刻t的值。在y 1(t-τ)的峰值和y' 2(t)的峰值重合的情况下,可以得到z(τ)的峰值,以及第一声波信号和第二声波信号到达第一麦克风的时间差对应的采样点数量τ *
对于第一声波信号和第二声波信号的时间序列相同的场景,第一电子设备在第一时刻通过第一扬声器发送第一声波信号,在第二时刻通过第二扬声器发送第二声波信号,第一时刻与第二时刻不同。第二电子设备将接收到的声波信号与第一声波信号或第二声波信号进行相关计算,确定第一麦克风接收到第一声波信号和第二声波信号的时间差。
示例性的,将接收到的声波信号与第一声波信号或第二声波信号进行相关计算,确定相关计算结果中两个峰值对应的时间值。之后,根据两个峰值对应的时间值和第一声波信号的时间长度或第二声波信号的时间长度,确定第一麦克风接收第一声波信号和第二声波信号的时间差。
作为举例,可以通过τ *=τ 1-(τ 2-T 9-T 10)确定时间差。其中,τ 1为相关计算中第二电子设备接收到的声波信号的峰值对应的时间值;τ 2为相关计算中第一声波信号的峰 值对应的时间;T 9为第一声波信号或第二声波信号的时间长度;T 10为第一扬声器发送第一声波信号的结束时刻,到第二扬声器发送第二声波信号的开始时刻之间的时长。
其中,第一电子设备可以通过WIFI或蓝牙等方式将第一声波信号或第二声波信号的时间序列信息告知第二电子设备。或者,第二电子设备可以预存有第一声波信号或第二声波信号的时间序列信息,第一电子设备不需要向第二电子设备告知第一声波信号或第二声波信号的时间序列信息。
结合第三方面,在一些实施例中,上述相对位置信息包括以下至少一种:第二电子设备位于第一电子设备的左侧、第二电子设备位于第一电子设备的右侧、第二电子设备位于第一电子设备的前后侧。
结合第三方面,在一些实施例中,上述接收结果为时间差,第二电子设备根据第一麦克风的接收结果,确定出第一电子设备与第二电子设备之间的相对位置信息,包括:计算第三时刻减去第四时刻得到的时间差,第三时刻为第一麦克风接收第一声波信号的时刻,第四时刻为第一麦克风接收第二声波信号的时刻,第一扬声器位于第二扬声器的第一侧,第二扬声器位于第一扬声器的第二侧,第一侧为左侧或右侧;若时间差大于或等于第一时间差阈值,则第二电子设备位于第一电子设备的第二侧;其中,第一时间差阈值为正数;若时间差小于或等于第二时间差阈值,则第二电子设备位于第一电子设备的第一侧;其中,第二时间差阈值为负数;若时间差小于第一时间差阈值且大于第二时间差阈值,则第二电子设备位于第一电子设备的前后侧。
结合第三方面,在一些实施例中,上述接收结果为信号强度,第二电子设备根据第一麦克风的接收结果,确定出第一电子设备与第二电子设备之间的相对位置信息,包括:比较第一功率和第二功率,第一功率为第一声波信号的信号强度,第二功率为第二声波信号的信号强度,第一扬声器位于第二扬声器的第一侧,第二扬声器位于第一扬声器的第二侧,第一侧为左侧或右侧;若第一功率和所述第二功率满足第一预设关系,则第二电子设备位于第一电子设备的第一侧;其中,第一预设关系为第一功率减去第二功率的结果大于或等于第一功率阈值,第一功率阈值为正数;或者,第一预设关系为第一功率除以第二功率的结果大于或等于第一比值,第一比值大于1;若第一功率和第二功率满足第二预设关系,则第二电子设备位于第一电子设备的第二侧;其中,第二预设关系为第一功率减去第二功率的结果小于或等于第二功率阈值,第二功率阈值为负数;或者,第二预设关系为第一功率除以第二功率的结果小于或等于第二比值,第一比值小于1;若第一功率和第二功率满足第三预设关系,则第二电子设备位于第一电子设备的前后侧;其中,第三预设关系为第一功率减去第二功率的结果小于第一功率阈值且大于第二功率阈值;或者,第三预设关系为第一功率除以第二功率的结果小于第一比值且大于第二比值。
一些实施例中,第一比值与第二比值互为倒数。
结合第三方面,在一些实施例中,第二电子设备根据第一麦克风的接收结果,确定出第一电子设备与第二电子设备之间的相对位置信息,包括:根据时间差、第一间距和采样频率,确定第二电子设备相对于第一电子设备的角度。其中,第一间距为第一扬声器和第二扬声器之间的距离,采样频率为第二电子设备的麦克风的采样频率。
示例性的,上述时间差可以表示为第二电子设备的第一麦克风对第一声波信号和 第二声波信号的采样点数量的差值τ *。上述确定第二电子设备相对于第一电子设备的角度,包括:根据基准角度、第一间距和采样点数量的差值τ *,通过预设公式确定第二电子设备相对于第一电子设备的角度。具体内容请参考第二方面中的相关描述,在此不再赘述。
结合第三方面,在一些实施例中,若第二电子设备的位置发生变化后,向第一电子设备发送相对位置信息重新确定请求。第一电子设备响应该相对位置信息确定请求,执行通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号的步骤以及后续步骤。第二电子设备执行通过第一麦克风接收第一声波信号和第二声波信号的步骤以及后续步骤。
需要说明的是,第一麦克风可以包括一个第一麦克风,也可以包括多个第一麦克风。对于第一麦克风为多个第一麦克风的情况,可以有多种采集声波信号的方式。
一种场景中,第二电子设备确定接收到第一声波信号和第二声波信号的时间差,包括:第二电子设备控制一个第一麦克风采集两个声波信号;第二电子设备根据第一麦克风采集的第一声波信号和第二声波信号,确定上述时间差。
一种场景中,第二电子设备确定接收到第一声波信号和第二声波信号的时间差,包括:第二电子设备控制多个第一麦克风中的每个第一麦克风均采集第一声波信号和第二声波信号;第二电子设备取任一个第一麦克风采集的第一声波信号和第二声波信号,确定上述时间差。
一种场景中,第二电子设备确定接收到第一声波信号和第二声波信号的时间差,包括:第二电子设备控制多个第一麦克风中的每个第一麦克风均采集第一声波信号和第二声波信号;第二电子设备对每个第一麦克风采集的第一声波信号和第二声波信号计算,得到多个初始时间差,每一个第一麦克风对应一个初始时间差;第二电子设备根据多个初始时间差,确定上述时间差。
第四方面,本申请实施例提供一种音频播放方法,包括:第一电子设备通过第一扬声器向第一音频播放设备和第二音频播放设备分别发送第一声波信号,通过第二扬声器向第二音频播放设备和和第二音频播放设备分别发送第二声波信号,第一扬声器与第二扬声器不同,且第一声波信号和第二声波信号为不同特征的两个声波信号;第一电子设备接收第一音频播放设备发送的第一音频播放设备与第一电子设备之间的第一相对位置信息,以及第二音频播放设备发送的第二音频播放设备与第一电子设备之间的第二相对位置信息,第一相对位置信息由第一音频播放设备的第一麦克风接收第一声波信号和第二声波信号的接收结果确定,第二相对位置信息由第二音频播放设备的第二麦克风接收第一声波信号和第二声波信号的接收结果确定;或者,第一电子设备接收第一音频播放设备发送的第一接收结果,以及第二音频播放设备发送的第二接收结果,第一接收结果为第一音频播放设备的第一麦克风接收第一声波信号和第二声波信号的接收结果,第二接收结果为第二音频播放设备的第二麦克风接收第一声波信号和第二声波信号的接收结果;第一电子设备基于第一接收结果确定第一相对位置信息,基于第二接收结果确定第二相对位置信息;第一电子设备根据第一相对位置信息和第二相对位置信息确定第一音频播放设备和第二音频播放设备之间的第三相对位置信息;第三相对位置信息包括第一音频播放设备位于第二音频播放设备的第三侧,第二音频 播放设备位于第一音频播放设备的第四侧,第三侧为左侧或右侧;第一电子设备将左声道音频信息发送给第一音频播放设备和第二音频播放设备中位于左侧的音频播放设备,将右声道音频信息发送给第一音频播放设备和第二音频播放设备位于右侧的音频播放设备。
本申请实施例中,第一电子设备能够自动确定第一音频播放设备和第二音频播放设备之间的第三相对位置信息,之后将左声道音频信息发送给位于左侧的音频播放设备,将右声道音频信息发送给位于右侧的音频播放设备,而不需要人工设定第一音频播放设备和第二音频播放设备之间的位置关系。
需要说明的是,第一相对位置信息可以为:第一音频播放设备相对于第一电子设备的位置信息,也可以为第一电子设备相对于第一音频播放设备的位置信息,本申请实施例对此不予限定。同样的,第二相对位置信息可以为:第二音频播放设备相对于第一电子设备的位置信息,也可以为第一电子设备相对于第二音频播放设备的位置信息,本申请实施例对此不予限定。
结合第四方面,在一些实施例中,上述第一接收结果包括:第一麦克风接收第一声波信号和第二声波信号的时间差;和/或,第一麦克风接收第一声波信号和第二声波信号中的每个声波信号的信号强度。
结合第四方面,在一些实施例中,上述第二接收结果包括:第二麦克风接收第一声波信号和第二声波信号的时间差;和/或,第二麦克风接收第一声波信号和第二声波信号中的每个声波信号的信号强度。
结合第四方面,在一些实施例中,确定第一音频播放设备和第二音频播放设备之间的第三相对位置信息,可以包括:若第一音频播放设备和第二音频播放设备位于第一电子设备的两个区域,则第一电子设备根据两个区域的位置关系,确定第三相对位置信息;若第一音频播放设备和第二音频播放设备位于第一电子设备的同一区域,则第一电子设备根据第一角度和第二角度,确定第一音频播放设备和第二音频播放设备之间的第三相对位置信息;其中,第一角度为第一音频播放设备相对于第一电子设备的角度,第二角度为第二音频播放设备相对于第一电子设备的角度。
一种场景中,若第一音频播放设备位于第一电子设备的左侧区域,第二音频播放设备位于第一电子设备的前后侧区域或右侧区域,说明第一音频播放设备位于第二音频播放设备的左侧,则第一电子设备将左声道音频信息发送给第一音频播放设备,将右声道音频信息发送给第二音频播放设备。
一种场景中,若第一音频播放设备位于第一电子设备的右侧区域,第二音频播放设备位于第一电子设备的前后侧区域或左侧区域,说明第一音频播放设备位于第二音频播放设备的右侧,则第一电子设备将左声道音频信息发送给第二音频播放设备,将右声道音频信息发送给第一音频播放设备。
一种场景中,若第一音频播放设备和第二音频播放设备位于第一电子设备的同一侧区域,第一电子设备可以根据第一角度和第二角度确定第三相对位置信息。
例如,若第一音频播放设备和第二音频播放设备均位于第一电子设备的左侧区域,第一音频播放设备相对于第一电子设备的角度为α1,第二音频播放设备相对于第一电子设备的角度为α2,且α1大于α2,则第一电子设备根据α1和α2确定出第一音频播放设 备位于第二音频播放设备的右侧。之后,第一电子设备将右声道音频信息发送给第一音频播放设备,将左声道音频信息发送给第二音频播放设备。
若第一音频播放设备和第二音频播放设备均位于第一电子设备的左侧区域,第一音频播放设备相对于第一电子设备的角度为α1,第二音频播放设备相对于第一电子设备的角度为α2,且α1小于α2,则第一电子设备根据α1和α2确定出第一音频播放设备位于第二音频播放设备的左侧。之后,第一电子设备将右声道音频信息发送给第二音频播放设备,将左声道音频信息发送给第一音频播放设备。
第五方面,本申请实施例提供一种电子设备,包括:一个或多个处理器、存储器和显示屏;所述存储器、所述显示屏与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述一个或多个处理器执行所述计算机指令时,使得所述电子设备执行如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法,或如第四方面中任一项所述的方法。
第六方面,本申请实施例提供一种芯片系统,所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器执行所述存储器中存储的计算机程序,以实现如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法,或如第四方面中任一项所述的方法。其中,该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
第七方面,本申请实施例提供一种芯片系统,所述芯片系统包括存储器和处理器,所述处理器执行所述存储器中存储的计算机程序,以实现如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法,或如第四方面中任一项所述的方法。其中,该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
第八方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得电子设备执行如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法,或如第四方面中任一项所述的方法。
第九方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法,或如第四方面中任一项所述的方法。
可以理解地,上述提供的第五方面所述的电子设备、第六方面和第七方面所述的芯片系统、第八方面所述的计算机程序产品、第九方面所述的计算机可读存储介质,均用于执行第一方面中所提供的方法、或第二方面中所提供的方法、或第三方面中所提供的方法、或第三方面中提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1为相关技术一提供的一种测距算法的场景示意图;
图2为相关技术二中提供的又一种测距算法的场景示意图;
图3为相关技术三中提供的确定电子设备之间相对位置的算法的场景示意图;
图4为电子设备的区域划分示意图;
图5(a)和图5(b)为电子设备的两个麦克风的摆放方向示意图;
图6(a)和图6(b)为电子设备的两个麦克风的摆放方向示意图;
图7(a)和图7(b)为第一电子设备的两个扬声器的摆放方向示意图;
图8(a)和图8(b)为第一电子设备的两个扬声器的摆放方向示意图;
图9为本申请实施例提供的位置确定方法适用的一种系统架构示意图;
图10为本申请实施例提供的第一电子设备的结构示意图;
图11为本申请实施例提供的第二电子设备的结构示意图;
图12为本申请实施例提供的位置确定方法适用的扩展屏应用场景示意图;
图13为本申请实施例提供的笔记本电脑各个区域划分示意图;
图14为本申请实施例提供的位置确定方法适用的安全投屏应用场景示意图;
图15为本申请实施例提供的位置确定方法适用的一种立体声应用场景示意图;
图16为本申请实施例提供的电视与音箱之间的角度示意图;
图17为本申请实施例提供的电视与音箱之间的角度示意图;
图18为本申请实施例提供的确定相对位置信息的流程示意图;
图19为本申请实施例提供的第一电子设备与第二电子设备之间的相对位置信息示意图;
图20为本申请实施例提供的确定相对位置信息的流程示意图;
图21为本申请实施例提供的确定相对位置信息的流程示意图;
图22为本申请实施例提供的第一电子设备与第二电子设备之间的相对位置信息示意图;
图23为本申请实施例提供的确定相对位置信息的流程示意图;
图24为本申请实施例提供的确定相对位置信息的流程示意图;
图25为本申请实施例提供的确定相对位置信息的流程示意图;
图26为本申请实施例提供的确定相对位置信息的流程示意图;
图27为本申请实施例提供的确定相对位置信息的流程示意图;
图28为本申请实施例提供的超声波信号到达第二电子设备的麦克风的时间差示意图;
图29为本申请实施例提供的确定相对位置信息的流程示意图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
此外,本申请实施例中提到的“多个”应当被解释为两个或两个以上。
本申请实施例中提供的设备交互方法和位置确定方法中所涉及到的步骤仅仅作为示例,并非所有的步骤均是必须执行的步骤,或者并非各个信息或消息中的内容均是必选的,在使用过程中可以根据需要酌情增加或减少。
本申请实施例中同一个步骤或者具有相同功能的步骤或者消息在不同实施例之间可以互相参考借鉴。
本申请实施例描述的业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
图1为相关技术一中提供的一种测距算法的场景示意图,该场景中包括电子设备10和物体20。其中,电子设备10位于目标位置,通过测量电子设备10和物体20之间的距离,来确定目标位置到物体20之间的距离。
参见图1,确定目标位置到物体20之间的距离的测距算法可以为:电子设备10向物体20发射声波信号,以及接收经物体20反射回的声波信号,电子设备10根据声波信号的传播时间和传播速度,确定目标位置到物体20之间的距离。
示例性的,电子设备10在T 1时刻通过扬声器发射声波信号,声波信号经过物体20遮挡后反射回电子设备10,电子设备10在T 2时刻通过麦克风接收到反射回的声波信号。由图1可知,声波信号由电子设备10传输到物体20的距离,与声波信号由物体20反射回电子设备10的距离相同。因此,声波信号由电子设备10传输到物体20,再由物体20反射回电子设备10,相当于电子设备10到物体20之间的距离的两倍。由此可以得出:
Figure PCTCN2022071403-appb-000014
D 1为电子设备100到物体200之间的距离,c为声波信号的传播速度,为声速。其中,电子设备10到物体20之间的距离,即为目标位置与物体20之间的距离。
本实施例中,通过一个电子设备10,即可测量目标位置到物体20之间的距离。 但是,由于需要通过物体20反射声波信号,电子设备10才能够接收到反射回的声波信号,因此该测距算法只能用于对墙体、人体等面积较大的物体的测距。而对于面积较小的物体,由于物体不能够提供为声波信号反射回电子设备10的反射面,因此采用该测距算法不能够测量目标位置到面积较小的物体之间的距离。
图2为相关技术二中提供的又一种测距算法的场景示意图,该场景中包括电子设备21和电子设备22。其中,电子设备21位于第一位置,电子设备22位于第二位置,电子设备21具有至少一个扬声器,电子设备22具有至少一个麦克风。电子设备21的一个扬声器能够发射声波信号,电子设备22的一个麦克风能够接收该声波信号。
参见图2,确定第一位置到第二位置之间的距离的测距算法可以为:电子设备21向电子设备22发射声波信号,电子设备22根据声波信号的传播时间和传播速度,确定第一位置到第二位置之间的距离;或者,位于第二位置的电子设备22向位于第一位置的电子设备21发射声波信号,电子设备21根据声波信号的传播时间和传播速度,确定第一位置到第二位置之间的距离。
示例性的,电子设备21在T 3时刻通过扬声器发射声波信号,该声波信号中携带有T3时刻的信息。电子设备22在T 4时刻通过麦克风接收到声波信号,并解析出电子设备21发射该声波信号的时间T 3,再根据接收到声波信号的时间T 4,由此可以得出:D 2=(T 4-T 3)·c,D 2为电子设备21到电子设备22之间的距离,c为声波信号的传播速度,为声速。其中,电子设备21到电子设备22之间的距离,即为第一位置与第二位置之间的距离。
本实施例中,通过两个电子设备测量第一位置与第二位置之间的距离。由D 2=(T 4-T 3)·c可知,c为常量,T 3和T 4为变量,因此(T 4-T 3)的准确度会对测距结果的准确性产生较大影响。由于电子设备21和电子设备22为不同的电子设备,如果两个电子设备的时间同步精度较差,则会导致(T 4-T 3)的准确度较差,使得第一位置与第二位置之间的距离的测距结果误差较大。
需要说明的是,在图2所示的实施例中,电子设备22可以将接收到声波信号的时间T4发送给电子设备21,电子设备21根据D 2=(T 4-T 3)·c计算电子设备21到电子设备22之间的距离。或者,电子设备22可以将接收到声波信号的时间T 4以及电子设备21发射该声波信号的时间T 3,发送给其他电子设备,该其他电子设备根据D 2=(T 4-T 3)·c计算电子设备21到电子设备22之间的距离。
图3为相关技术三中提供的确定电子设备之间相对位置的算法的场景示意图,该场景中包括:电子设备31和电子设备32。其中,电子设备31位于第一位置,电子设备32位于第二位置,电子设备31具有至少一个扬声器,电子设备32具有至少两个麦克风(图3中示出了两个麦克风,但不以此为限)。电子设备31的一个扬声器能够发射声波信号,电子设备32的各个麦克风能够接收该声波信号。
参见图3,确定电子设备之间相对位置的算法可以为:电子设备31的一个扬声器向电子设备32发射声波信号,电子设备32的两个麦克风接收该声波信号,电子设备32根据两个麦克风接收到上述声波信号的时间,确定电子设备32与电子设备31之间的相对位置。
以下以一个具体示例,对上述确定电子设备之间相对位置的算法进行具体说明。
其中,电子设备31具有一个扬声器,电子设备32具有麦克风M1和麦克风M2,且麦克风M2位于麦克风M1的右侧。例如,电子设备31通过扬声器发射声波信号,电子设备32的麦克风M1在T 5时刻接收到该声波信号,麦克风M2在T 6时刻接收到该声波信号。此时,电子设备32可以根据T 5和T 6,确定电子设备31和电子设备32之间的相对位置。
例如,若T 5早于T 6,说明该声波信号先到达麦克风M1,再到达麦克风M2,则电子设备32可以确定电子设备32位于电子设备31的右侧区域,如图4所示。若T 5晚于T 6,说明该声波信号先到达麦克风M2,再到达麦克风M1,则电子设备32可以确定电子设备32位于电子设备31的左侧区域,如图4所示。若T 5与T 6几乎相同,则说明该声波信号几乎同时到达麦克风M1和麦克风M2,则电子设备32可以确定电子设备32位于电子设备31的前后侧区域,如图4所示。
本实施例中,通过电子设备31的一个扬声器和电子设备32的两个麦克风,可以确定电子设备31与电子设备32之间的相对位置。然而,现有的电子设备产品中,具有至少两个麦克风的电子设备较少。
但是,电子设备32的两个麦克风之间的距离较小时,会对相关技术三中的算法的精度产生较大的影响。例如,电子设备32的两个麦克风之间的距离为D 3,则T 5与T 6之间的时间差|T 5-T 6|的最大值为D 3/c,其中电子设备32的两个麦克风之间的距离D 3与|T 5-T 6|的最大值D 3/c成正比关系。而现有电子设备的两个麦克风之间的距离D 3通常较小,对应的D 3/c也较小。大部分情况下,|T 5-T 6|小于D 3/c,即|T 5-T 6|是一个很小的数值,因此T 5与T 6比较接近。在D 3较小的情况下,电子设备32基于T 5和T 6,确定电子设备31与电子设备32之间的位置信息时,可能会产生较大的误差。
在说明D 3对相关技术三中的算法的精度所产生的影响之前,先介绍一下如何对图4中的各个区域进行划分。
一些实施例中,可以根据|T 5-T 6|与阈值
Figure PCTCN2022071403-appb-000015
的关系,确定电子设备31和电子设备32之间的相对位置。例如,若T 5早于T 6,且|T 5-T 6|>t 1,则电子设备32位于电子设备31的右侧区域;若T 5晚于T 6,且|T 5-T 6|>t 1,则电子设备32位于电子设备31的左侧区域;若|T 5-T 6|≤t 1,即声波信号几乎同时到达麦克风M1和麦克风M2,则电子设备32位于电子设备31的前后侧区域。
本实施例中,阈值t 1与D 3成正比,例如,
Figure PCTCN2022071403-appb-000016
若T 5早于T 6,且
Figure PCTCN2022071403-appb-000017
则电子设备32位于电子设备31的右侧区域;若T 5晚于T 6,且
Figure PCTCN2022071403-appb-000018
则电子设备32位于电子设备31的左侧区域;若
Figure PCTCN2022071403-appb-000019
则电子设备32位于电子设备31的前后侧区域。
以下以
Figure PCTCN2022071403-appb-000020
为例,说明D 3对相关技术三中的算法的精度所产生的影响。
若T 5早于T 6,且
Figure PCTCN2022071403-appb-000021
则电子设备32位于电子设备31的右侧区域;若T 5晚于T 6,且
Figure PCTCN2022071403-appb-000022
则电子设备32位于电子设备31的左侧区域;若
Figure PCTCN2022071403-appb-000023
则电子设备32位于电子设备31的前后侧区域。
其中,电子设备32是根据麦克风M1采集到声波信号的时间确定T 5,以及根据麦克风M2采集到声波信号的时间确定T 6的。而这对麦克风M1和麦克风M2之间的时间同步性要求较高,否则会对相关技术三中的算法产生一定的影响。而在实际情况中,麦克风M1和麦克风M2之间的时间同步性可能并不能够达到要求,多少会存在一些偏差。另外,声波信号的传播过程,以及电子设备32的其他方面,也可能对麦克风M1和麦克风M2之间的时间同步性产生影响,导致时间同步性出现一些偏差。
而较小的D 3对应的
Figure PCTCN2022071403-appb-000024
要小于较大的D 3对应的
Figure PCTCN2022071403-appb-000025
因此,较小的D 3对应的区间
Figure PCTCN2022071403-appb-000026
及区间
Figure PCTCN2022071403-appb-000027
的范围,分别小于较大的D 3对应的区间
Figure PCTCN2022071403-appb-000028
及区间
Figure PCTCN2022071403-appb-000029
的范围。因此,对于D 3较小的情况下,区间
Figure PCTCN2022071403-appb-000030
及区间
Figure PCTCN2022071403-appb-000031
的范围相对较小,麦克风M1和麦克风M2之间的时间同步性所导致的偏差,对电子设备32确定电子设备32相对于电子设备31的位置信息的影响较大。而对于D 3较大的情况下,区间
Figure PCTCN2022071403-appb-000032
及区间
Figure PCTCN2022071403-appb-000033
的范围相对大一些,麦克风M1和麦克风M2之间的时间同步性所导致的偏差,对电子设备32确定电子设备32相对于电子设备31的位置信息的影响相对小一些。
例如,对于电子设备32位于电子设备31的左侧区域或右侧区域,且电子设备32处于电子设备31的区域分界线附近的情况,若电子设备32的两个麦克风之间的距离D 3较小,此时电子设备32确定的位置信息可能为:电子设备32位于电子设备31的前后侧区域,该位置信息并不是电子设备32相对于电子设备31的真实位置。若电子设备32的两个麦克风之间的距离D 3较大,此时电子设备32确定的位置信息可能为:电子设备32位于电子设备31的左侧区域或右侧区域,该位置信息为电子设备32相对于电子设备31的真实位置。
由此可见,麦克风M1和麦克风M2之间的距离D 3较小时,对相关技术三中的算法的精度影响相对较大。而麦克风M1和麦克风M2之间的距离D 3较大时,对相关技术三中的算法的精度影响相对小一些。
进一步地,电子设备32可以位于电子设备31的各个方位上,而且电子设备32的两个麦克风相对于电子设备31的摆放方式可以为多种。例如,如图3所示,电子设备32的两个麦克风相对于电子设备31横向摆放。又例如,如图5(a)、图5(b)、图6(a)和图6(b)所示,电子设备32的两个麦克风相对于电子设备31竖向摆放。另外,电子设备32的两个麦克风相对于电子设备31可以以倾斜任意角度摆放。
一种场景中,如图5(a)所示,当电子设备32位于电子设备31的右侧区域时,电子设备31的声波信号先到达麦克风M1,再到达麦克风M2。如图5(b)所示,当电子设备32位于电子设备31的左侧区域时,电子设备31的声波信号先到达麦克风M1,再到达麦克风M2。由此可知,不管电子设备32位于电子设备31的左侧区域或右侧区域,电子设备31的声波信号都可以是先到达麦克风M1,再到达麦克风M2。
又一种场景中,如图6(a)所示,当电子设备32位于电子设备31的右侧区域中的下 方时,电子设备31的声波信号先到达麦克风M1,再到达麦克风M2。如图6(b)所示,当电子设备32位于电子设备31的右侧区域的上方时,电子设备31的声波信号先到达麦克风M2,再到达麦克风M1。由此可见,当电子设备32位于电子设备31的右侧区域时,声波信号可以先到达麦克风M1后达到麦克风M2,声波信号也可以先到达麦克风M2后到达麦克风M1。
根据图5(a)、图5(b)、图6(a)和图6(b)内容可知,在电子设备32的两个麦克风相对于电子设备31为竖向摆放的场景中,电子设备32位于电子设备31左侧区域或者右侧区域时,电子设备32无法准确地确定电子设备32是位于电子设备31的左侧区域,还是位于电子设备31的右侧区域。
基于上述问题,在本申请实施例中,第一电子设备具有两个扬声器,第二电子设备具有至少一个麦克风。第一电子设备通过两个扬声器分别发送不同特征的第一声波和第二声波,第二电子设备通过一个麦克风接收第一声波和第二声波。在接收到第一声波信号和第二声波信号之后,第二电子设备根据麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,确定第二电子设备与第一电子设备之间的相对位置信息。
相对于相关技术三中电子设备32需要具有至少两个麦克风,本申请实施例中,第二电子设备具有一个麦克风即可。而现有的电子设备产品中,具有至少两个麦克风的电子设备较少。因此,相对于相关技术三,本申请实施例更容易实现。
而且,相关技术三中在确定电子设备32相对于电子设备31的位置信息时,是以电子设备31为基准,是要确定电子设备32位于电子设备31的什么区域中。此时,电子设备32的两个麦克风相对于电子设备31(基准)可能有多种摆放方式。而本申请实施例中,在确定第二电子设备与第一电子设备之间的相对位置信息时,是以第一电子设备的位置为基准的,是要确定第二电子设备在第一电子设备的什么区域中的。此时,第一电子设备的两个扬声器的摆放方式相对于第一电子设备(基准)只有一种摆放方式。
参见图7(a)、图7(b)、图8(a)和图8(b)所示,第一电子设备100左侧的扬声器Y1发送第一声波信号,右侧的扬声器Y2发送第二声波信号,第二电子设备200的一个麦克风接收第一声波信号和第二声波信号。
在图7(a)中,当第二电子设备200位于第一电子设备100的右侧区域时,扬声器Y2的第二声波信号先到达麦克风,扬声器Y1的第一声波信号后到达麦克风。在图7(b)中,当第二电子设备200位于第一电子设备100的左侧区域时,扬声器Y1的第一声波信号先到达麦克风,扬声器Y2的第二声波信号后到达麦克风。由此可见,相对于图5(a)和图5(b),本申请实施例能够准确地确定第二电子设备200位于第一电子设备100的左侧区域或右侧区域。
在图8(a)中,在第二电子设备200位于第一电子设备100的右侧区域中的下方时,扬声器Y2的第二声波信号先到达麦克风,扬声器Y1的第一声波信号后到达麦克风。在图8(b)中,在第二电子设备200位于第一电子设备100的右侧区域中的上方时,扬声器Y2的第二声波信号先到达麦克风,扬声器Y1的第一声波信号后到达麦克风。由此可见,相对于图6(a)和图6(b),本申请实施例能够准确地确定第二电子设备200位于第一电子设备100的右侧区域。
综上可知,相对于相关技术三,本申请实施例中第一电子设备的两个扬声器的摆放方式并不会出现如图5(a)、图5(b)、图6(a)和图6(b)中的问题,因此能够准确地确定第二电子设备与第一电子设备之间的相对位置信息。
示例性的,第一电子设备可以是具有两个扬声器的任意电子设备,例如笔记本电脑、电视、显示屏等。第二电子设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备。本申请实施例中,对第一电子设备和第二电子设备的具体类型不做限制。
其中,相关技术三中电子设备32的两个麦克风之间的距离通常较小,例如手机或平板电脑的两个麦克风之间的距离为10厘米左右。而本申请实施例中的第一电子设备的两个扬声器之间的距离较大,例如部分笔记本电脑的两个扬声器之间的距离为30厘米左右,电视或显示屏的两个扬声器之间的距离为40厘米到50厘米左右,部分电视或显示屏的两个扬声器之间的距离甚至可以达到70厘米到80厘米,要远远大于10厘米。由此可知,本申请实施例中两个扬声器之间的距离可以大于预设距离,该预设距离可以为大于10厘米的任意数值,例如为15厘米、20厘米、30厘米、40厘米、50厘米、60厘米、70厘米、80厘米等,因此相对于相关技术三,本申请实施例能够较为准确地确定第二电子设备与第一电子设备之间的相对位置信息。
图9示出了本申请实施例提供的确定电子设备之间相对位置信息的方法适用的一种系统架构示意图。如图9所示,该系统架构包括:第一电子设备100和第二电子设备200。
其中,第一电子设备100包括至少两个音频发送单元,第二电子设备200包括至少一个音频接收单元。上述音频发送单元为能够向外发送声波信号的单元,例如扬声器。且两个音频发送单元之间的距离要大于阈值。上述音频接收单元为能够接收声波信号的单元,例如麦克风。其中,上述声波信号可以为频率为0~20KHz的次声波信号,也可以为频率为20KHz以上的超声波信号,本申请实施例对此不予限定。例如,上述声波信号的频率可以为1KHz、2KHz、3KHz、5KHz、10KHz、15KHz、20KHz、30KHz等。
具体的,第一电子设备100能够通过上述至少两个音频发送单元分别发送不同特征的声波信号。例如,不同特征的声波信号可以为不同频段的声波信号,或不同正交序列的声波信号。第二电子设备200能够通过第一音频接收单元接收上述不同特征的声波信号,第一音频接收单元为上述至少一个音频接收单元中的任一个音频接收单元。第二电子设备200计算第一音频接收单元接收到不同特征的声波信号的时间差,或不同特征的声波信号的强度,进而确定第二电子设备200与第一电子设备100之间的相对位置信息。其中,该相对位置信息可以为方位或角度等信息。
一些实施例中,第一电子设备100的音频发送单元可以为扬声器。参见图10,第一电子设备100可以包括第一扬声器110、第二扬声器120、第一存储器140、第一处理器130以及存储在第一存储器140中并可在第一处理器130上运行的计算机程序。
示例性的,计算机程序可以被分割成一个或多个模块/单元,一个或者多个模块/ 单元被存储在第一存储器140中,并由第一处理器130执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序段,该程序段用于描述计算机程序在第一电子设备100中的执行过程。
例如,第一存储器140用于存储第一指令,音频文件等。第一扬声器110、第二扬声器120和第一存储器140可以通过总线与第一处理器130连接,以便实现数据交换。第一处理器130用于调用第一存储器140中的第一指令和音频文件,并基于该第一指令和音频文件控制第一扬声器110和第二扬声器120分别发送不同特征的声波信号。
一些实施例中,第二电子设备100的音频接收单元可以为麦克风。参见图11,第二电子设备200可以包括麦克风210、第二存储器230、第二处理器220以及存储在第二存储器230中并可在第二处理器220上运行的计算机程序。
示例性的,计算机程序可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在第二存储器230中,并由第二处理器220执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序段,该程序段用于描述计算机程序在第二电子设备200中的执行过程。
例如,第二存储器230用于存储第二指令等。麦克风210和第二存储器230可以通过总线与第二处理器220连接,以便实现数据交换。第二处理器220用于调用第二存储器230中的第二指令,并基于该第二指令计算不同特征的声波信号的强度或者达到时间差,进而确定第一电子设备与第二电子设备之间的相对位置信息。其中,该相对位置信息可以为方位或角度等信息。
需要说明的是,图10中示出的扬声器的数量为两个,图11中示出的麦克风的数量为一个,仅为示例性说明,本申请实施例并不以此为限。例如,图10中扬声器的数量可以为三个及以上,图11中麦克风的数量可以为两个及以上。
示例性的,第一处理器130或第二处理器220均可以包括一个或多个处理单元。例如,第一处理器130或第二处理器220均可以包括中央处理单元(Central Processing Unit,CPU),调制解调处理单元,图形处理单元(graphics processing unit,GPU),图像信号处理单元(image signal processor,ISP),视频编解码单元,数字信号处理单元(Digital Signal Processor,DSP),基带处理单元,和/或神经网络处理单元(neural-network processing unit,NPU)等中的一个或多个处理单元。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,第一处理器130或第二处理器220可以是中央处理器,还可以是其他通用处理器、数字信号处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器,也可以是任何常规的处理器等。
示例性的,第一处理器130或第二处理器220均可以包括一个或多个接口。例如,接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,安全数字输入输出(Secure Digital Input and Output,SDIO)接口,串行外设(Serial Peripheral Interface,SPI)接口,移动行业处理器接口(Mobile  Industry Processor Interface,MIPI),用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。其中,第一处理器130或第二处理器220可以通过SDIO接口与电源管理单元耦合,通过MIPI接口和I2C接口与显示屏耦合。
示例性的,第一存储器140和/或第二存储器230可以是电子设备的内部存储单元,也可以是电子设备的外部存储设备,例如插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。第一存储器140和第二存储器230均用于存储计算机程序以及电子设备所需的其他程序和数据。第一存储器140和第二存储器230还可以用于暂时地存储已经输出或者将要输出的数据。
上述总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component,PCI)总线、扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线或通用串行总线(universal serial bus,USB)等。总线可以分为地址总线、数据总线、控制总线等。
可以理解的是,本申请实施例示意的结构并不构成对第一电子设备100及第二电子设备200的具体限定。在本申请另一些实施例中,第一电子设备100和/或第二电子设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。例如,第一电子设备100和/或第二电子设备200还可以包括通用串行总线(universal serial bus,USB)接口,电池,移动通信单元,音频单元,扬声器,受话器,麦克风,按键,摄像头,以及用户标识模块(subscriber identification module,SIM)卡接口,压力传感器,气压传感器,磁传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
以下分别介绍本申请实施例提供的设备交互方法和显示方法的三个应用场景:扩展屏应用场景、安全投屏应用场景和立体声应用场景。
一、扩展屏应用场景
图12是本申请实施例提供的扩展屏应用场景示意图。以下以第一电子设备为笔记本电脑、第二电子设备为平板电脑为例,对该扩展屏应用场景进行说明。在该扩展屏应用场景中,笔记本电脑的显示界面中显示的内容可以扩展到平板电脑的显示界面中进行显示。
首先,将笔记本电脑和平板电脑建立配对连接。
一些实施例中,在将笔记本电脑和平板电脑建立配对连接之前,还可以包括:开启扩展显示应用。例如,用户可以在笔记本电脑中施加第一预设操作,笔记本电脑响应该预设操作,运行扩展显示应用。其中,预设操作可以为触控操作,或用户通过鼠标或键盘输入的操作。
例如,用户可以在笔记本电脑的扩展显示应用中施加第二预设操作,笔记本电脑响应该第二预设操作,向平板电脑发送第一请求信息。其中,第一请求信息用于请求笔记本电脑与平板电脑建立配对连接。平板电脑显示该第一请求信息,以及获取用户输入的第三预设操作。平板电脑响应该第三预设操作,与笔记本电脑建立配对连接。
又或者,可以不开启笔记本电脑中的扩展显示应用,笔记本电脑在检测到第二预设操作之后,就可以认定为需要进行扩展显示,从而向平板电脑发送第一请求信息。
又或者,在开启笔记本电脑中的扩展显示应用之前,笔记本电脑和平板电脑已经建立配对连接,则笔记本电脑在运行扩展显示应用后,可以不需要向平板电脑发送第一请求信息。
示例性的,笔记本电脑和平板电脑之间可以通过有线方式建立配对连接。例如,第一电子设备与第二电子设备之间可以通过HDMI(High Definition Multimedia Interface,高清多媒体接口)建立配对连接。
示例性的,笔记本电脑和平板电脑之间可以通过无线方式建立配对连接。例如,笔记本电脑和平板电脑之间可以通过共用一个AP(Access Point,无线访问节点),建立配对连接。或者,笔记本电脑和平板电脑可以通过WIFI(Wireless-Fidelity,无线保真)直连或蓝牙等无线方式,建立配对连接。本申请实施例对笔记本电脑和平板电脑建立配对连接的具体连接方式不予限定。
一种场景中,笔记本电脑和平板电脑通过共用一个AP建立配对连接的过程可以包括:笔记本电脑和平板电脑与同一AP建立WIFI连接;笔记本电脑获取与该AP建立连接的各个电子设备的地址信息;笔记本电脑获取用户输入的操作信息,该操作信息可以为用户选择了某个电子设备与笔记本电脑建立配对连接;笔记本电脑响应该操作信息,基于平板电脑的地址信息向平板电脑发起配对连接建立请求,该配对连接建立请求包含笔记本电脑的地址信息;平板电脑响应该配对连接建立请求,基于笔记本电脑的地址信息,与笔记本电脑建立配对连接。
一种场景中,笔记本电脑和平板电脑通过WIFI直连建立配对连接的过程可以包括:笔记本电脑通过信道搜索与平板电脑建立WIFI链路层连接;在WIFI链路层连接建立后,笔记本电脑与平板电脑建立TCP(Transmission Control Protocol,传输控制协议)数据连接;笔记本电脑通过TCP数据连接向平板电脑发起配对连接建立请求,该配对连接建立请求包含笔记本电脑的地址信息;平板电脑响应该配对连接建立请求,基于笔记本电脑的地址信息,与笔记本电脑建立配对连接。
一种场景中,笔记本电脑和平板电脑通过蓝牙建立配对连接的过程可以包括:笔记本电脑通过蓝牙向外进行广播;平板电脑根据接收到的广播包后生成蓝牙设备列表;平板电脑计算蓝牙设备列表中的各个蓝牙设备的信号强度,并向信号强度最大的蓝牙设备发送蓝牙配对连接请求;笔记本电脑自动弹出配对连接请求对话框,并接收用户输入的操作信息,该操作信息可以为用户同意笔记本电脑与平板电脑建立配对连接;笔记本电脑响应该操作信息,与平板电脑建立蓝牙配对连接。
之后,通过本申请实施例中的位置确定方法,确定平板电脑与笔记本电脑之间的相对位置信息。
例如,在笔记本电脑需要向平板电脑进行扩展显示的情况下,笔记本电脑通过两个扬声器分别发送不同特征的第一声波信号和第二声波信号。平板电脑通过麦克风接收第一声波信号和第二声波信号。平板电脑根据麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,确定平板电脑与笔记本电脑之间的相对位置信息。平板电脑将该相对位置信息发送给笔记本电脑。如何确定平板电脑与笔记本电脑之间的相对位置信息在后面的实施例中详细介绍,在此不再赘述。
在扩展屏应用场景中,平板电脑与笔记本电脑之间的相对位置信息可以包括:平板电 脑位于笔记本电脑的左侧区域,平板电脑位于笔记本电脑的右侧区域,平板电脑位于笔记本电脑的前后侧区域,如图13所示。
需要说明的是,可以通过后面的实施例1、实施例2、实施例5、实施例6和实施例7中的方案,确定平板电脑与笔记本电脑之间的相对位置信息方位。又或者,也可以通过后面的实施例3、实施例4和实施例8中的方案,确定平板电脑相对于笔记本电脑的角度,再根据角度与区域的关系确定平板电脑与笔记本电脑之间的相对位置信息。
其中,可以参考相关技术三中对图4中的各个区域进行划分的方法,确定笔记本电脑的左侧区域、右侧区域和前后侧区域。以下对如图13所示的各个区域的划分进行说明。
例如,笔记本电脑通过左侧扬声器发射第一声波信号,通过右侧扬声器发射第二声波信号,平板电脑的麦克风在T 7时刻接收到第一声波信号,在T 8时刻接收到第二声波信号。
一些实施例中,可以根据|T 7-T 8|与阈值
Figure PCTCN2022071403-appb-000034
的关系,确定平板电脑与笔记本电脑之间的相对位置,其中D为左侧扬声器与右侧扬声器之间的距离。例如,若T 7早于T 8,且|T 7-T 8|>t 2,则平板电脑位于笔记本电脑的左侧区域;若T 7晚于T 8,且T 7-T 8|>t 2,则平板电脑位于笔记本电脑的右侧区域;若|T 7-T 8|≤t 2,即第一声波信号和第二声波信号几乎同时到达平板电脑的麦克风,则平板电脑位于笔记本电脑的前后侧区域。
本实施例中,阈值t 2与D成正比,例如,
Figure PCTCN2022071403-appb-000035
若T 7早于T 8,且
Figure PCTCN2022071403-appb-000036
则平板电脑位于笔记本电脑的左侧区域;若T 7晚于T 8,且
Figure PCTCN2022071403-appb-000037
则平板电脑位于笔记本电脑的右侧区域;若
Figure PCTCN2022071403-appb-000038
则平板电脑位于笔记本电脑的前后侧区域。
一些实施例中,可以根据后面实施例1中步骤205中的方法确定如图13所示的各个区域,具体方法请参考实施例1,在此不予赘述。
需要说明的是,在扩展屏应用场景中,将笔记本电脑周围的区域换分为如图13所示的三个区域,但并不以此为限。在其他应用场景中,可以根据实际需要将第一电子设备周围的区域划分为四个及以上区域。例如,可以设置多个阈值,根据|T 7-T 8|与各个阈值的关系,将第一电子设备周围的区域划分为四个及以上区域。
另外,平板电脑也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给笔记本电脑,由笔记本电脑确定平板电脑与笔记本电脑之间的相对位置信息。或者,平板电脑也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给其他电子设备,由其他电子设备确定平板电脑与笔记本电脑之间的相对位置信息。
其中,在笔记本电脑和平板电脑建立配对连接之后,需要确定平板电脑与笔记本电脑之间的相对位置信息。而在平板电脑和/或笔记本电脑的位置发生变化后,也需要确定平板电脑与笔记本电脑之间的相对位置信息。例如,平板电脑的加速计传感器、陀螺仪传感器或磁力计传感器检测到平板电脑的位置发生变化,平板电脑向笔记本电脑发送相对位置信息重新确定请求。该相对位置信息重新确定请求用于请求笔记本电脑通过两个扬声器重新发送不同特征的第一声波信号和第二声波信号。平板电脑确定出平板电脑与笔记本电脑之 间新的相对位置信息后,将新的相对位置信息发送给笔记本电脑。
最后,笔记本电脑根据该相对位置信息,将笔记本电脑的显示界面中显示的内容发送到平板电脑的显示界面中进行显示。
其中,用户只需对笔记本电脑进行操作,即可将笔记本电脑的显示界面中显示的内容发送到平板电脑的显示界面中进行显示。
以下以平板电脑位于笔记本电脑右侧区域为例,对笔记本电脑将一个窗口扩展到平板电脑中显示进行说明。
用户在笔记本电脑显示界面中拖动窗口向右侧移动,笔记本电脑响应用户操作将第一目标内容向右移动。随着用户对该窗口的拖动,该窗口在笔记本电脑显示界面中随之向右移动。若窗口移动至笔记本电脑显示界面的第一预设位置且保持第一预设时间,则说明窗口的第一部分内容已经移出笔记本电脑的显示界面。平板电脑显示窗口的第一部分内容,笔记本电脑显示第一目标内容的第二部分内容,窗口的第一部分内容和第二部分内容构成整个窗口。此时,笔记本电脑和平板电脑共同显示该窗口。若该窗口移动至笔记本电脑显示界面的第二预设位置且保持第二预设时间,则说明该窗口已经全部移出笔记本电脑的显示界面。此时,平板电脑显示该窗口的所有内容,笔记本电脑不再显示该窗口。
一种场景中,笔记本电脑还可以生成第一引导信息,该第一引导信息用于引导用户将文档、网页、窗口等内容向左拖动或向右拖动。笔记本电脑获取作用于文档、网页、窗口等内容上的拖动操作;笔记本电脑响应上述拖动操作,将文档、网页、窗口等内容发送到平板电脑的显示界面中进行显示。
例如,该相对位置信息表示平板电脑位于笔记本电脑左侧区域,则笔记本电脑生成第一引导信息。该第一引导信息用于引导用户:可以将笔记本电脑的显示界面中显示的文档、网页、窗口等内容向左拖动。示例性的,该第一引导信息可以以文字的形式显示在笔记本电脑的显示界面中。例如,该第一引导信息可以为显示在显示界面中的“请向左拖动XX”。示例性的,该第一引导信息可以以动画形式显示在笔记本电脑的显示界面中。例如,笔记本电脑可以在某个窗口上模拟显示人手向左拖动该窗口的动画。示例性的,该第一引导信息可以以动画和文字相结合的形式显示在笔记本电脑的显示界面中。例如,笔记本电脑可以在某个窗口上模拟显示人手向左拖动该窗口的动画及相关文字说明。
在笔记本电脑的显示界面显示该第一引导信息后,用户可以采用鼠标或者触屏的方式,将笔记本电脑的显示界面中显示的文档、网页、窗口等内容向右拖动。笔记本电脑响应该向左拖动这一操作,将文档、网页、窗口等内容发送给平板电脑。平板电脑接收上述文档、网页、窗口等内容,并在显示界面中显示上述文档、网页、窗口等内容。由此实现将笔记本电脑中的文档、网页、窗口等内容扩展到位于笔记本电脑左侧区域的平板电脑的显示界面中显示。
又一种场景中,若笔记本电脑和/或平板电脑移动,使得平板电脑与笔记本电脑之间的相对位置信息发生变化,且变化后的相对位置信息表示平板电脑位于笔记本电脑的前后侧区域,则笔记本电脑和平板电脑之间可以不改变扩展方向。
其中,扩展方向可以包括向右扩展,向左扩展。向右扩展可以为:用户在笔记本 电脑的显示界面中向右拖动文档、网页、窗口等内容,将文档、网页、窗口等内容扩展到位于笔记本电脑右侧区域的平板电脑中显示。向左扩展可以为:用户在笔记本电脑的显示界面中向左拖动文档、网页、窗口等内容,将文档、网页、窗口等内容扩展到位于笔记本电脑左侧区域的平板电脑中显示。
例如,平板电脑位于笔记本电脑的右侧区域,此时笔记本电脑将文档、网页、窗口等内容向右扩展到平板电脑中显示。若平板电脑和/或笔记本电脑移动使得平板电脑位于笔记本电脑的前后侧区域,则扩展方向保持为向右扩展不变。此时,用户可以在笔记本电脑的显示界面中将文档、网页、窗口等内容向右拖动,将文档、网页、窗口等内容扩展到平板电脑中显示。
其中,平板电脑和/或笔记本电脑移动包括:平板电脑移动,或笔记本电脑移动,或平板电脑和笔记本电脑共同移动。
又一种场景中,若笔记本电脑和/或平板电脑移动,使得平板电脑与笔记本电脑之间的相对位置信息发生变化,且变化后的相对位置信息表示平板电脑位于笔记本电脑的左侧区域,则笔记本电脑和平板电脑之间可以不改变扩展方向。
又一种场景中,若笔记本电脑和/或平板电脑移动,使得平板电脑与笔记本电脑之间的相对位置信息发生变化,且变化后的相对位置信息表示平板电脑位于笔记本电脑的右侧区域,则笔记本电脑和平板电脑之间可以不改变扩展方向。
一种场景中,若笔记本电脑检测到第四预设操作,且此时的相对位置信息表示平板电脑位于笔记本电脑的前后侧区域,则笔记本电脑可以在该第四预设操作为投屏操作时,将显示界面中显示的内容发送给平板电脑。平板电脑显示该内容,且笔记本电脑继续显示该内容。或者,笔记本电脑可以在该第四预设操作为扩展屏操作时,按照默认的扩展方向或用户习惯的扩展方向将显示界面中显示的内容扩展到平板电脑的显示界面中。其中,上述默认的扩展方向可以为向左扩展或向右扩展,用户习惯的扩展方向为向左扩展或向右扩展。
示例性的,平板电脑位于笔记本电脑的右侧区域,此时笔记本电脑的扩展方向为向右扩展。若平板电脑和/或笔记本电脑移动使得平板电脑位于笔记本电脑的前后侧区域,则笔记本电脑可以将显示界面中显示的内容发送给平板电脑,并请求平板电脑显示该内容。平板电脑响应该请求显示笔记本电脑发送的内容,且笔记本电脑继续显示该内容,从而使得平板电脑的显示界面与笔记本电脑的显示界面相同。
又一种场景中,在笔记本电脑和平板电脑之间开始进行扩展显示时,若平板电脑位于笔记本电脑的前后侧区域,则笔记本电脑不向平板电脑发送文档、网页、窗口等内容。
具体的,若用户在笔记本电脑显示界面中向任一方向施加拖动文档、网页、窗口等内容的操作时,笔记本电脑不响应该操作,不向平板电脑发送文档、网页、窗口等内容,不将文档、网页、窗口等内容扩展到平板电脑中显示。
另外,笔记本电脑还可以生成第一提示信息。该第一提示信息用于提示用户:平板电脑位于笔记本电脑的前后侧区域,笔记本电脑的显示界面中显示的内容不能扩展到平板电脑的显示界面中进行显示。
一种场景中,平板电脑可以为多个,分布在笔记本电脑的左侧和右侧。若用户在笔记 本电脑中向左拖动文档、网页、窗口等内容,笔记本电脑响应该拖动操作,将文档、网页、窗口等内容发送到位于笔记本电脑左侧的平板电脑中显示。若用户在笔记本电脑中向右拖动文档、网页、窗口等内容,笔记本电脑响应该拖动操作,将文档、网页、窗口等内容发送到位于笔记本电脑右侧的平板电脑中显示。
二、安全投屏应用场景
图14是本申请实施例提供的安全投屏应用场景示意图。以下以第一电子设备为笔记本电脑、第二电子设备为手机为例,对该安全投屏应用场景进行说明。在该安全投屏应用场景中,手机的显示界面中显示的内容可以投屏到笔记本电脑的显示界面中进行显示,以及在笔记本电脑上对手机进行操作。
首先,将笔记本电脑和手机建立配对连接,请参考扩展屏应用场景中的相关描述,在此不再赘述。
接着,通过本申请实施例中的位置确定方法,确定手机与笔记本电脑之间的相对位置信息。
例如,在手机需要向笔记本电脑进行投屏显示的情况下,笔记本电脑通过两个扬声器分别发送不同特征的第一声波信号和第二声波信号。手机通过麦克风接收第一声波信号和第二声波信号。手机根据麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,确定手机与笔记本电脑之间的相对位置信息。
另外,手机也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给笔记本电脑,由笔记本电脑确定手机与笔记本电脑之间的相对位置信息。或者,手机也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给其他电子设备,由其他电子设备确定手机与笔记本电脑之间的相对位置信息。
在安全投屏应用场景中,手机于笔记本电脑之间的相对位置信息可以包括:手机位于笔记本电脑的左侧区域,手机位于笔记本电脑的右侧区域,手机位于笔记本电脑的前后侧区域。
需要说明的是,可以通过后面的实施例1、实施例2、实施例5、实施例6和实施例7中的方案,确定手机与笔记本电脑之间的相对位置信息。又或者,也可以通过后面的实施例3、实施例4和实施例8中的方案,确定手机相对于笔记本电脑的角度,再根据角度与区域的关系确定手机与笔记本电脑之间的相对位置信息。
最后,在该相对位置信息满足预设位置要求的情况下,手机将文件、图片或显示界面等内容,投屏到笔记本电脑的显示界面中显示,或者笔记本电脑将文件、图片或显示界面中的内容,投屏到手机的显示界面中显示。
一些实施例中,该预设位置要求可以为手机位于笔记本电脑的前后侧区域、左侧区域和右侧区域中的一个区域。例如,若手机位于笔记本电脑的前后侧区域,且手机与笔记本电脑之间的距离小于阈值,则手机将文件、图片或显示界面等内容发送给笔记本电脑。笔记本电脑显示上述文件、图片或显示界面等内容,实现将手机中的文件、图片或显示界面等内容投屏到笔记本电脑的显示界面中显示。或者,笔记本电脑将文件、图片或显示界面等内容发送给手机。手机显示上述文件、图片或显示界面等内容,实现将笔记本电脑中的文件、图片或显示界面等内容投屏到手机的显示界面中显示。
一些实施例中,对于手机向笔记本电脑投屏的情况,笔记本电脑可以生成第二提示信息。该第二提示信息用于提示用户:将手机放置于笔记本电脑的具体方位,以及手机到笔记本电脑的距离。用户根据该第二提示信息能够便捷地实现将手机中的文件、图片或显示界面等内容,投屏到笔记本电脑的显示界面中显示。
一些实施例中,对于笔记本电脑向手机投屏的情况,手机可以生成上述第二提示信息。用户根据该第二提示信息能够便捷地实现将笔记本电脑中的文件、图片或显示界面等内容,投屏到手机的显示界面中显示。
以下对将电脑中的文件、图片或显示界面等内容投屏到笔记本电脑的显示界面中显示的过程进行说明。
作为举例,将手机中的文件或图片投屏到笔记本电脑的显示界面中显示的过程可以为:若手机位于笔记本电脑的前后侧区域,且手机与笔记本电脑之间的距离小于阈值,则手机将需要投屏到笔记本电脑显示的文件A或图片B发送给笔记本电脑。笔记本电脑获取到文件A或图片B之后,打开文件A或图片B,在显示界面中显示。
又或者,将手机中的文件或图片投屏到笔记本电脑的显示界面中显示的过程可以为:若手机位于笔记本电脑的左侧区域,且手机与笔记本电脑之间的距离小于阈值,则手机将需要投屏到笔记本电脑显示的文件A或图片B发送给笔记本电脑。笔记本电脑获取到文件A或图片B之后,打开文件A或图片B,在显示界面中显示。
又或者,将手机中的文件或图片投屏到笔记本电脑的显示界面中显示的过程可以为:若手机位于笔记本电脑的右侧区域,且手机与笔记本电脑之间的距离小于阈值,则手机将需要投屏到笔记本电脑显示的文件A或图片B发送给笔记本电脑。笔记本电脑获取到文件A或图片B之后,打开文件A或图片B,在显示界面中显示。
作为举例,将手机中的显示界面投屏到笔记本电脑的显示界面中显示的过程可以为:若手机位于笔记本电脑的前后侧区域,且手机与笔记本电脑之间的距离小于阈值,则手机将手机显示界面的内容以及手机显示界面的长宽比例发送给笔记本电脑。笔记本电脑根据手机显示界面的长宽比例,将手机显示界面的内容显示在显示界面中。
其中,手机显示界面的长宽比例与笔记本电脑显示界面的长宽比例通常不同,因此为了在笔记本电脑显示界面中显示手机显示界面,需要笔记本电脑根据手机显示界面的长宽比例确定显示区域。该显示区域的长宽比例与手机显示界面的长宽比例相等,而且该显示区域应尽可能大。例如,该显示区域的长度与笔记本电脑显示界面的宽度相同。在确定显示区域之后,笔记本电脑将手机显示界面的内容显示在该显示区域中。
在手机显示界面内容发生变化后,手机将新的手机界面显示的内容发送给笔记本电脑。笔记本电脑将新的手机界面显示的内容显示在显示区域中。
一些实施例中,上述文件、图片或显示界面等内容可能具有隐私要求,也可能不具有隐私要求。对于具有隐私要求的文件、图片或显示界面等内容,应该防止或降低被泄露隐私的情况发生。
例如,对于有隐私要求的文件、图片或显示界面等内容,若该相对位置信息满足预设位置要求,且手机与笔记本电脑之间的距离小于阈值,手机可以将有隐私要求的文件、图片或显示界面等内容,投屏到笔记本电脑的显示界面中显示,或者笔记本电脑将有隐私要求的文件、图片或显示界面等内容,投屏到手机的显示界面中显示。若手机与 笔记本电脑之间的距离大于或等于阈值,则手机停止向笔记本电脑发送有隐私要求的文件、图片或显示界面等内容,或者笔记本电脑停止向手机发送有隐私要求的文件、图片或显示界面等内容。
又例如,而对于没有隐私要求的文件、图片或显示界面等内容,可以不要求手机与笔记本电脑之间的距离小于阈值。例如,若该相对位置信息满足预设位置要求,不管手机与笔记本电脑之间的距离是否小于阈值,手机均可以将无隐私要求的文件、图片或显示界面等内容,投屏到笔记本电脑的显示界面中显示,或者笔记本电脑均可以将无隐私要求的文件、图片或显示界面中的内容,投屏到手机的显示界面中显示。
一些实施例中,在手机和笔记本电脑之间已经建立投屏的情况下,若手机与笔记本电脑之间的相对位置信息发生变化,使得变化后的相对位置信息不满足预设位置要求,和/或手机和笔记本电脑之间的距离大于阈值,则笔记本电脑停止显示手机发送的具有隐私要求的文件、图片或显示界面等内容,结束手机和笔记本电脑之间已经建立的投屏。
作为举例,笔记本电脑可以生成投屏结束控件,用户对该控件施加触控操作。笔记本电脑响应该触控操作,停止显示手机发送的具有隐私要求的文件、图片或显示界面等内容,结束手机和笔记本电脑之间已经建立的投屏。
作为举例,手机可以生成投屏结束控件,用户对该控件施加触控操作。手机响应该触控操作,向笔记本电脑发送投屏结束请求。笔记本电脑响应该投屏结束请求,停止显示手机发送的具有隐私要求的文件、图片或显示界面等内容,结束手机和笔记本电脑之间已经建立的投屏。
一种场景中,在结束手机和笔记本电脑之间已经建立的投屏之后,手机可以生成投屏继续控件。用户对该控件施加触控操作后,手机响应该触控操作,向笔记本电脑发送继续投屏指令。笔记本电脑响应该继续投屏指令,继续显示手机发送的具有隐私要求的文件、图片或显示界面等内容。
一些实施例中,在手机和笔记本电脑之间已经建立投屏的情况下,若手机与笔记本电脑之间的相对位置信息发生变化,使得变化后的相对位置信息不满足预设位置要求,和/或手机和笔记本电脑之间的距离大于阈值,则笔记本电脑继续显示手机发送的不具有隐私要求的文件、图片或显示界面等内容,可以不结束手机和笔记本电脑之间已经建立的投屏。
其中,手机与笔记本电脑之间的距离是否小于阈值,可以通过相关技术一或相关技术二中的算法确定,在此不再赘述。
三、立体声应用场景
图15是本申请实施例提供的立体声应用场景示意图。以下以第一电子设备为电视、第二电子设备为两个音箱(音箱1和音箱2)为例,对该立体声应用场景进行说明。在该立体声应用场景中,电视根据音箱1和音箱2的相对位置信息,确定音箱1和音箱2与左声道音频信息和右声道音频信息的对应关系,之后将音频信息传到音箱1和音箱2以实现立体声播放,而不需要人工操作来选择两个音箱的声道。
首先,将电视与音箱1和音箱2建立配对连接。
之后,通过本申请实施例中的位置确定方法,确定电视与音箱1和音箱2之间的相对位置信息。
其中,电视具有两个扬声器,音箱1和音箱2均具有至少一个麦克风。例如,在电视需要确定两个音箱播放左声道音频信息和右声道音频信息的情况下,电视通过两个扬声器分别发送不同特征的第一声波信号和第二声波信号。音箱1通过麦克风接收到第一声波信号和第二声波信号。音箱1根据麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,确定音箱1与电视之间的第一相对位置信息。音箱1将该第一相对位置信息发送给电视。音箱2通过麦克风接收到第一声波信号和第二声波信号。音箱2根据麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,确定音箱2与电视之间的第二相对位置信息。音箱2将该第二相对位置信息发送给电视。
其中,在电视和两个音箱建立配对连接之后,需要确定两个音箱分别与电视之间的相对位置信息。而在音箱的位置发生变化后,也需要再次确定两个音箱分别与电视之间的相对位置信息。
例如,第一音箱(例如音箱1和音箱2中的任一音箱)的加速计传感器、陀螺仪传感器或磁力计传感器检测到第一音箱的位置发生变化,第一音箱向电视发送第三请求信息。第三请求信息用于请求电视通过两个扬声器重新发送不同特征的第一声波信号和第二声波信号。第一音箱确定出第一音箱与电视之间新的相对位置信息后,将新的相对位置信息发送给电视。需要说明的是,若第一音箱为音箱1或音箱2,可以只需重新确定位置发生变化的音箱1或音箱2与电视之间新的相对位置信息,或者重新确定两个音箱与电视之间新的相对位置信息。
另外,第一音箱也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给电视,由电视确定音箱1和音箱2分别与电视之间的相对位置信息。或者,第一音箱也可以将麦克风接收到第一声波和第二声波的时间差,或第一声波和第二声波之间的信号强度,发送给其他电子设备,由其他电子设备确定两个音箱分别与电视之间的相对位置信息。
最后,电视根据该相对位置信息,将音频信息发送给音箱1和音箱2,以通过音箱1和音箱2实现立体声播放。
其中,电视可以根据音箱1与电视之间的第一相对位置信息,以及音箱2与电视之间的第二相对位置信息,确定音箱1和音箱2之间的第三相对位置信息。之后,电视根据第三相对位置信息,将左声道音频信息发送给位于左侧的音箱,将右声道音频信息发送给位于右侧的音箱。
若音箱1和音箱2位于电视的两个区域,则电视根据两个区域的位置关系,确定第三相对位置信息;若音箱1和音箱2位于电视的同一区域,则电视根据第一角度和第二角度,确定音箱1和音箱2之间的第三相对位置信息;其中,第一角度为音箱1相对于第一电子设备的角度,第二角度为音箱2相对于第一电子设备的角度。
一种场景中,若音箱1位于电视的左侧区域,音箱2位于电视的右侧区域或前后侧区域,说明音箱1位于音箱2的左侧,则电视将左声道音频信息发送给音箱1,将右声道音频信息发送给音箱2。若音箱1位于电视的右侧区域,音箱2位于电视的前后侧区域或左侧区域,说明音箱1位于音箱2的右侧,则电视将右声道音频信息发送给音箱1,将左声道音频信息发送给音箱2。
一种场景中,若音箱1和音箱2位于电视的同一侧区域,电视可以根据第一角度和第二角度确定第三相对位置信息。之后,电视将右声道音频信息发送给位于右侧的音箱,将左声道音频信息发送给位于左侧的音箱。其中,如何确定电视与音箱之间的角度信息在后面的实施例中详细介绍,在此不再赘述。
为了说明电视如何根据两个音箱的角度信息确定两个音箱之间的方位,以下先对音箱相对于电视机的角度所对应的音箱的位置进行说明。
一些实施例中,音箱相对于电视机的角度所对应的音箱的位置如图16所示。
首先,可以设定基准角度对应的音箱的位置。
例如,该基准角度可以为90°、-90°和0°。参见图16,音箱相对于电视机的角度为90°,则音箱的位置为:音箱位于电视机的右侧区域,且音箱位于电视机的两个扬声器的连线上。音箱相对于电视机的角度为-90°,则音箱的位置为:音箱位于电视机的左侧区域,且音箱位于电视机的两个扬声器的连线上。音箱相对于电视机的角度为0°,则音箱的位置为:音箱位于电视机的前后侧区域,且音箱位于电视机的两个扬声器的连线的中垂线上。
之后,对于90°~0°以及0°~-90°之间的任一角度对应的音箱的位置,可以根据基准角度确定。例如,音箱相对于电视机的角度为45°,则音箱的位置为:音箱位于电视机的右侧区域,且音箱与电视机的连线,与电视机的两个扬声器的连线的夹角为45°,如图16所示的两个位置。例如,音箱相对于电视机的角度为-45°,则音箱的位置为:音箱位于电视机的左侧区域,且音箱与电视机的连线,与电视机的两个扬声器的连线的夹角为45°,如图16所示的两个位置。
又例如,该基准角度可以为0°、90°和180°。参见图17,音箱相对于电视机的角度为0°,则音箱的位置为:音箱位于电视机的右侧区域,且音箱位于电视机的两个扬声器的连线上。音箱相对于电视机的角度为180°,则音箱的位置为:音箱位于电视机的左侧区域,且音箱位于电视机的两个扬声器的连线上。音箱相对于电视机的角度为90°,则音箱的位置为:音箱位于电视机的前后侧区域,且音箱位于电视机的两个扬声器的连线的中垂线上。
之后,对于90°~0°以及90°~180°之间的任一角度对应的音箱的位置,可以根据基准角度确定。例如,音箱相对于电视机的角度为45°,则音箱的位置为:音箱位于电视机的右侧区域,且音箱与电视机的连线,与电视机的两个扬声器的连线的夹角为45°,如图17所示的两个位置。例如,音箱相对于电视机的角度为135°,则音箱的位置为:音箱位于电视机的左侧区域,且音箱与电视机的连线,与电视机的两个扬声器的连线的夹角为45°,如图17所示的两个位置。
在得到两个音箱分别相对于电视的角度后,可以根据两个角度之间的大小关系确定两个音箱之间的方位。例如,若音箱1和音箱2均位于电视的左侧区域,音箱1相对于电视的角度为α1,音箱2相对于电视的角度为α2,且α1大于α2,则电视根据α1和α2能够确定出音箱1位于音箱2的右侧。之后,电视将右声道音频信息发送给音箱1,将左声道音频信息发送给音箱2。若音箱1和音箱2均位于电视的左侧区域,音箱1相对于电视的角度为α1,音箱2相对于电视的角度为α2,且α1小于α2,则电视根据α1和α2能够确定出音箱1位于音箱2的左侧。之后,电视将右声道音频信息发送给音箱2,将左声道音频信息发送给音箱1。
一些实施例中,左侧区域、右侧区域以及前后侧区域的分界线,可以预先设定。例如, 预先设定左侧区域、右侧区域以及前后侧区域的分界线所对应的角度为±20°。即,音箱相对于电视的角度在[-20°,20°]范围内,则音箱位于电视的前后侧区域;若音箱相对于电视的角度在(20°,90°]范围内,则音箱位于电视的右侧区域;若音箱相对于电视的角度在[-90°,-20°)范围内,则音箱位于电视的左侧区域。
一些实施例中,可以根据T 7、T 8以及阈值t 2,确定左侧区域、右侧区域以及前后侧区域的分界线。例如,可以将满足T 7早于T 8且|T 7-T 8|=t 2条件的曲线作为右侧区域与前后侧区域的分界线,可以将满足T 7晚于T 8且|T 7-T 8|=t 2条件的曲线作为左侧区域与前后侧区域的分界线。
以下以超声波信号为例,对本申请实施例提供的确定电子设备之间相对位置信息的过程进行详细说明。
实施例1
图18是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图18,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤201~步骤205。
步骤201,第一电子设备生成一基带序列,并将该基带序列进行变频,得到第一超声波信号和第二超声波信号。
一种场景中,第一电子设备生成基带序列s,带宽为B。第一电子设备将该基带序列s进行上变频,得到第一超声波信号x 1(t)和第二超声波信号x 2(t)。其中,第一超声波信号x 1的频带为[f 1,f 2],第二超声波信号x 2的频带为[f 3,f 4],且频带[f 1,f 2]与频带[f 3,f 4]之间无重叠部分。例如,f 1、f 2、f 3和f 4之间可以满足如下关系:f 1<f 2<f 3<f 4,或者f 3<f 4<f 1<f 2
一些实施例中,第一电子设备对基带序列s进行上变频的过程可以为:将基带序列s调制在低频载波上,并将其与高频信号进行混频,之后取混频之后的两个上边带信号,即可得到第一超声波信号x 1(t)和第二超声波信号x 2(t)。
步骤202,第一电子设备通过两个扬声器分别向第二电子设备发送第一超声波信号和第二超声波信号。
其中,两个扬声器可以分别为第一电子设备的左声道扬声器和右声道扬声器。
一种场景中,在得到第一超声波信号x 1(t)和第二超声波信号x 2(t)之后,第一电子设备通过左声道扬声器向第二电子设备发送第一超声波信号x 1(t),并同时通过右声道扬声器向第二电子设备发送第二超声波信号x 2(t)。
步骤203,第二电子设备将第一超声波信号和第二超声波信号变换到同一频带。
其中,第二电子设备的麦克风接收到第一电子设备的两个扬声器发送的超声波信号后,通过滤波带宽为[f 1,f 2]的滤波器和滤波带宽为[f 3,f 4]的滤波器进行滤波,得到第一超声波信号和第二超声波信号。
需要说明的是,第一超声波信号x 1(t)和第二超声波信号x 2(t)在信道传输过程中,会受到信道信息或时延等影响,因此,在第二电子设备接收到两个超声波信号后,第一超声波信号x 1(t)变换为第一超声波信号y 1(t),第二超声波信号x 2(t)变换为第二超声波信号y 2(t)。其中,第一超声波信号y 1(t)的频带与第一超声波信号x 1(t)的频带相同,为[f 1,f 2]。第一超声波信号y 1(t)的频带与第二超声波信号x 2(t)的频带相同,为[f 3,f 4]。
在第二电子设备接收到第一超声波信号y 1(t)和第二超声波信号y 2(t)之后,第二电 子设备将第一超声波信号y 1(t)和第二超声波信号y 2(t)变换到同一频带,以进行步骤204中的相关计算。
示例性的,第二电子设备可以对第一超声波信号y 1(t)进行变频处理,使得第一超声波信号y 1(t)和第二超声波信号y 2(t)变换到同一频带。或者,第二电子设备可以对第二超声波信号y 2(t)进行变频处理,使得第一超声波信号y 1(t)和第二超声波信号y 2(t)变换到同一频带。或者,第二电子设备可以对第一超声波信号y 1(t)和第二超声波信号y 2(t)均进行变频处理,使得第一超声波信号y 1(t)和第二超声波信号y 2(t)变换到同一频带。
以下以f 1<f 2<f 3<f 4为例,对第二电子设备将第一超声波信号y 1(t)和第二超声波信号y 2(t)变换到同一频带进行说明。
一种场景中,在第二电子设备接收到第一超声波信号y 1和第二超声波信号y 2(t)之后,第二电子设备可以将第一超声波信号y 1(t)的频带由[f 1,f 2]上变频到[f 3,f 4],得到第一超声波信号y' 1(t)。例如,第二电子设备可以将第一超声波信号y 1(t)与cos(2π(f 3-f 1)t)相乘,再通过带宽为[f 3,f 4]的滤波器进行滤波,得到第一超声波信号y' 1(t)。
又一种场景中,在第二电子设备接收到第一超声波信号y 1(t)和第二超声波信号y 2(t)之后,第二电子设备可以将第二超声波信号y 2(t)的频带由[f 3,f 4]下变频到[f 1,f 2],得到第二超声波信号y' 2(t)。例如,第二电子设备可以将第二超声波信号y 2(t)与cos(2π(f 3-f 1)t)相乘,再通过带宽为[f 1,f 2]的滤波器进行滤波,得到第二超声波信号y' 2(t)。
又一种场景中,在第二电子设备接收到第一超声波信号y 1(t)和第二超声波信号y 2(t)之后,第二电子设备也可以将第一超声波信号y 1(t)和第二超声波信号y 2(t)的频带变频至第一频带,该第一频带为与频带[f 1,f 2]和频带[f 3,f 4]不同的频带。
步骤204,第二电子设备将变换到同一频带的第一超声波信号和第二超声波信号进行相关计算,确定第一超声波信号和第二超声波信号到达第二电子设备的麦克风的时间差。
示例性的,第一超声波信号和第二超声波信号到达第二电子设备的麦克风的时间差,可以表示为麦克风对第一超声波信号和第二超声波信号的采样点数量的差值。其中,超声波信号到达麦克风后,麦克风以固定的采样频率f s对超声波信号进行采样,例如采样频率f s为48KHz。因此,在时间t内,麦克风采集的采样点数量为t*f s
例如,第一超声波信号先到达麦克风,第二超声波信号后到达麦克风,麦克风对第一超声波信号的采样点数量要大于对第一超声波信号的采样点数量。而两个采样点数量的差值则为采样频率与时间差的乘积:Δt·f s,Δt为上述时间差。
一种场景中,第二电子设备将第二超声波信号的频带变换到第一超声波信号的频带,第二电子设备对第一超声波信号y 1(t)和第二超声波信号y' 2(t)进行相关计算。
其中,对于第一声波信号先到达麦克风、第二声波信号后达到麦克风的情况,相关计算的公式可以为:
Figure PCTCN2022071403-appb-000039
y 1(t)表示第一超声波信号y 1(t)在采样时刻t的值,y' 2(t-τ)表示第二超声波信号y' 2(t)在采样时刻t-τ的值。在y 1(t)的峰值和y' 2(t-τ)的峰值重合的情况下,可以得到z(τ)的峰值,以及第一超声波信号和第二超声波信号到达第二电子设备200的麦克风的时间差对应的采样点数量τ *
对于第二超声波信号先到达麦克风、第一超声波信号后达到麦克风的情况,相关 计算的公式可以为:
Figure PCTCN2022071403-appb-000040
y 1(t-τ)表示第一超声波信号y 1(t)在采样时刻t-τ的值,y' 2(t)表示第二超声波信号y' 2(t)在采样时刻t的值。在y 1(t-τ)的峰值和y' 2(t)的峰值重合的情况下,可以得到z(τ)的峰值,以及第一超声波信号和第二超声波信号到达第二电子设备200的麦克风的时间差对应的采样点数量τ *
步骤205,第二电子设备根据时间差和时间差阈值,确定第二电子设备相对于第一电子设备的方位信息。
示例性的,第二电子设备可以根据上述采样点数量的差值和预设采样点数值,确定第二电子设备相对于第一电子设备的方位信息。
其中,预设采样点数值Th与左声道扬声器与右声道扬声器之间的第一间距D,和/或麦克风接收信号的采样频率f s相关。
一些实施例中,预设采样点数值Th可以与第一间距D和/或采样频率f s正相关。例如,预设采样点数值Th可以与第一间距D和采样频率f s正相关,第一间距D和采样频率f s越大,预设采样点数值Th可以设置的越大。示例性的,预设采样点数值Th与第一间距D和采样频率f s的关系可以为:
Figure PCTCN2022071403-appb-000041
系数a为位于(-1,1)中的任意数值。
示例性的,预设采样点数量的计算公式
Figure PCTCN2022071403-appb-000042
可以为在第二电子设备出厂时设置好的。其中,采样频率f s、超声波信号的传播速度v和系数a可以在第二电子设备出厂时设置好,第一间距D可以从第一电子设备请求得到。之后,第二电子设备根据公式
Figure PCTCN2022071403-appb-000043
计算得到预设采样点数值Th。
作为举例,第一间距D为30厘米,采样频率f s为48KHz,超声波信号的传播速度v为340米/秒,系数a为1/2,对应的预设采样点数值Th约为21。
一种场景中,左声道扬声器与右声道扬声器之间的第一间距D如图19所示,第二电子设备200位于第一电子设备100的右侧区域,且第二电子设备200位于左声道扬声器与右声道扬声器的连线上。第一电子设备100的左声道扬声器到第二电子设备200麦克风的距离为D 4,第一电子设备100的右声道扬声器到第二电子设备200麦克风的距离为D 5,则第一间距D=D 4-D 5。因此,第二电子设备200的麦克风接收到两个超声波信号的时间差为Δt=D/v,v为超声波信号的传播速度。而第二电子设备200的麦克风的采样频率为f s,因此第二电子设备200的麦克风接收到两个超声波信号的时间差对应的采样点数量为
Figure PCTCN2022071403-appb-000044
对于第二电子设备200位于第一电子设备100的左侧区域的情况不再赘述,请参考上述内容。
基于图19及相关所述内容可知,对于第二电子设备200位于第一电子设备100的右侧区域的情况,第二电子设备200的麦克风接收到两个超声波信号时间差对应的采样点数量的差值可以为
Figure PCTCN2022071403-appb-000045
a为位于(-1,1)中的任意数值。例如,a可以取±0.2,±0.3,±0.4,±0.5,±0.6,±0.7等数值。其中,第一电子设备100的右侧区域、左侧区域、前后侧区域,如图13所示。通过调整a的取值,可以调整右侧区域、左侧区域、前后侧区域的大小范围。
若τ *>Th,说明第二超声波信号先到达第二电子设备的麦克风,则第二电子设备位于第一电子设备的右侧区域。若τ *<-Th,说明第一超声波信号先到达第二电子设备 的麦克风,则第二电子设备位于第一电子设备的左侧区域。若|τ *|≤Th,说明第一超声波信号和第二超声波信号几乎同时到达第二电子设备的麦克风,则第二电子设备位于第一电子设备的前后侧区域。
一些实施例中,对于第二电子设备具有多个麦克风的情况,多个麦克风可以均采集第一超声波信号和第二超声波信号。之后,第二电子设备取一个麦克风采集的第一超声波信号和第二超声波信号,进行步骤203至步骤205。
一些实施例中,对于第二电子设备具有多个麦克风的情况,第二电子设备的控制器可以控制第一麦克风采集第一超声波信号和第二超声波信号,第一麦克风为多个麦克风中的任一个麦克风。例如,第二电子设备的控制器控制第一麦克风工作,其他麦克风暂不工作。之后,第二电子设备对第一麦克风采集的第一超声波信号和第二超声波信号,进行步骤203至步骤205。
一些实施例中,对于第二电子设备具有多个麦克风的情况,多个麦克风可以均采集第一超声波信号和第二超声波信号。之后,第二电子设备取各个麦克风采集的第一超声波信号和第二超声波信号,分别进行步骤203至步骤204。第二电子设备根据步骤204得到的多个时间差取平均时间差,再根据该平均时间差进行步骤205。
实施例2
图20是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图20,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤301~步骤304。
步骤301,第一电子设备通过两个扬声器分别向第二电子设备发送不同特征的第一超声波信号和第二超声波信号。
其中,第一超声波信号与第二超声波信号可以为不同频段的超声波信号,或为不同正交序列的超声波信号。
与实施例1中不同的是,本实施例中,第一超声波信号和第二超声波信号为第一电子设备直接生成的,而不是对基带序列进行变频得到的。例如,第一电子设备生成频带为[f 1,f 2]的第一超声波信号x 1(t),以及频带为[f 3,f 4]的第二超声波信号x 2(t),且频带[f 1,f 2]与频带[f 3,f 4]之间无重叠部分。例如,f 1、f 2、f 3和f 4之间可以满足如下关系:f 1<f 2<f 3<f 4,或者f 3<f 4<f 1<f 2
一些实施例中,两个扬声器可以分别为第一电子设备的左声道扬声器和右声道扬声器。例如,在得到第一超声波信号x 1(t)和第二超声波信号x 2(t)之后,第一电子设备通过左声道扬声器向第二电子设备发送第一超声波信号x 1(t),并同时通过右声道扬声器向第二电子设备发送第二超声波信号x 2(t)。
步骤302至步骤304,请参考步骤203至步骤205,在此不再赘述。
实施例3
图21是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图21,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤401~步骤405。
步骤401至步骤404,请参考步骤201至步骤204,在此不再赘述。
步骤405,第二电子设备根据时间差、左声道扬声器与右声道扬声器之间的第一间 距和麦克风的采样频率,确定第二电子设备相对于第一电子设备的角度信息。
一些实施例中,第一超声波信号和第二超声波信号到达第二电子设备的麦克风的时间差,可以表示为麦克风对第一超声波信号和第二超声波信号采样的采样点数量的差值。因此,步骤405可以为:根据采样点数量的差值、左声道扬声器与右声道扬声器之间的第一间距和麦克风的采样频率,确定第二电子设备相对于第一电子设备的角度信息。
如图22所示,第一间距为D,麦克风到左声道扬声器的距离为D 4,麦克风到右声道扬声器的距离为D 5,则采样点数量的差值
Figure PCTCN2022071403-appb-000046
其中,f s为麦克风的采样频率,v为超声波信号的传播速度。
以下说明如何确定第二电子设备相对于第一电子设备的角度θ。
首先,设定基准角度,请参考安全投屏应用场景中的相关描述,在此不再赘述。
之后,可以根据基准角度,以及D 4-D 5与D的关系,确定第二电子设备相对于第一电子设备的角度θ。
例如,对于基准角度为90°、0°和-90°的情况,第二电子设备相对于第一电子设备的角度θ可以近似为
Figure PCTCN2022071403-appb-000047
其中,在D 4-D 5=D时,第二电子设备位于第一电子设备的右侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线上,计算得到的角度θ为90°。在D 4-D 5=-D时,第二电子设备位于第一电子设备的左侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线上,计算得到的角度θ为-90°。在D 4-D 5=0时,第二电子设备位于第一电子设备的前后侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线的中垂线上,计算得到的角度θ为0°。
由公式
Figure PCTCN2022071403-appb-000048
可知
Figure PCTCN2022071403-appb-000049
因此角度θ可以近似为
Figure PCTCN2022071403-appb-000050
又例如,对于基准角度为0°、90°和180°的情况,第二电子设备相对于第一电子设备的角度θ可以近似为
Figure PCTCN2022071403-appb-000051
其中,在D 4-D 5=D时,第二电子设备位于第一电子设备的右侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线上,计算得到的角度θ为0°。在D 4-D 5=-D时,第二电子设备位于第一电子设备的左侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线上,计算得到的角度θ为180°。在D 4-D 5=0时,第二电子设备位于第一电子设备的前后侧区域,且第二电子设备位于第一电子设备的两个扬声器的连线的中垂线上,计算得到的角度θ为90°。
由公式
Figure PCTCN2022071403-appb-000052
可知
Figure PCTCN2022071403-appb-000053
因此角度θ可以近似为
Figure PCTCN2022071403-appb-000054
在得到第二电子设备相对于第一电子设备的角度θ之后,可以根据预先设定的左侧区域、右侧区域以及前后侧区域的分界线,确定第二电子设备相对于第一电子设备的方位。具体的,请参考立体声应用场景中关于左侧区域、右侧区域以及前后侧区域的分界线的相关描述,在此不再赘述。
在其他实施例中,第二电子设备也可以根据三角函数等方法,确定第二电子设备相对于第一电子设备的角度。
实施例4
图23是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图23,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤501~步骤504。
步骤501,第一电子设备通过两个扬声器分别向第二电子设备发送不同特征的第一超声波信号和第二超声波信号。
具体内容请参考步骤301,在此不再赘述。
步骤502至步骤503,请参考步骤203至步骤204,在此不再赘述。
步骤504,请参考步骤405,在此不再赘述。
实施例5
图24是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图24,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤601~步骤604。
步骤601,第一电子设备生成一基带序列,并将该基带序列进行变频,得到第一超声波信号和第二超声波信号。
与实施例1中步骤201不同的是,本实施例中的第一超声波信号x 1(t)和第二超声波信号x 2(t)的功率相同。
步骤602,请参考步骤202,在此不再赘述。
步骤603,第二电子设备计算第一超声波信号的第一功率信息和第二超声波信号的第二功率信息。
其中,第二电子设备的麦克风接收到第一电子设备的两个扬声器发送的超声波信号后,通过滤波带宽为[f 1,f 2]的滤波器和滤波带宽为[f 3,f 4]的滤波器进行滤波,得到第一超声波信号和第二超声波信号。
需要说明的是,第一超声波信号x 1(t)和第二超声波信号x 2(t)在信道传输过程中,会受到信道信息或时延等影响,因此,在第二电子设备接收到两个超声波信号后,第一超声波信号x 1(t)变换为第一超声波信号y 1(t),第二超声波信号x 2(t)变换为第二超声波信号y 2(t)。其中,第一超声波信号y 1(t)的频带与第一超声波信号x 1(t)的频带相同,为[f 1,f 2]。第一超声波信号y 1(t)的频带与第二超声波信号x 2(t)的频带相同,为[f 3,f 4]。
在第二电子设备接收到第一超声波信号y 1(t)和第二超声波信号y 2(t)之后,第二电子设备计算第一超声波信号y 1(t)的第一功率信息和第二超声波信号y 2(t)的第二功率信息。
一些实施例中,第一功率信息可以为:在一预设时间段内,第一超声波信号y 1(t)的第一平均功率。第二功率信息可以为:在一预设时间段内,第二超声波信号y 2(t)的第二平均功率。例如,第一超声波信号y 1(t)的时间长度为第一时间长度,第二超声波信号y 2(t)的时间长度为第二时间长度,则预设时间段可以为:小于或等于第一时间长度和第二时间长度中最小值的任一数值。
其中,第一超声波信号y 1(t)的时间长度可以为:第一电子设备开始发送第一超声 波信号y 1(t)的起始时间,与结束发送第一超声波信号y 1(t)的结束时间,所对应的时间长度。第二超声波信号y 2(t)的时间长度可以为:第一电子设备开始发送第一超声波信号y 2(t)的起始时间,与结束发送第一超声波信号y 2(t)的结束时间,所对应的时间长度。
例如,第一平均功率可以为:在该预设时间段内,第一超声波信号y 1(t)的功率之和的平均值。第二平均功率可以为:在该预设时间段内,第二超声波信号y 2(t)的功率之和的平均值。
示例性的,第二电子设备可以采用E(|y 1(t)|)计算第一平均功率,采用E(|y 2(t)|)计算上述第二平均功率。或者,第二电子设备可以采用E(|y 1(t)| 2)计算第一平均功率,采用E(|y 2(t)| 2)计算上述第二平均功率。
步骤604,第二电子设备根据第一功率和第二功率的关系,确定第二电子设备相对于第一电子设备的方位信息。
一些实施例中,第二电子设备可以计算第一功率和第二功率的比值,根据比值确定第二电子设备相对于第一电子设备的方位信息。例如,可以设置第一阈值和第二阈值,根据比值与第一阈值和第二阈值的关系,确定第二电子设备相对于第一电子设备的方位信息。
例如,第一阈值a大于第二阈值b,且第一阈值a大于1,第二阈值b小于1。第二电子设备计算第一平均功率与第二平均功率的比值,若比值大于第一阈值a,说明第一平均功率大于第二平均功率,则第二电子设备位于第一电子设备的左侧区域。若比值小于第二阈值b,说明第一平均功率小于第二平均功率,则第二电子设备位于第一电子设备的右侧区域。若比值小于或等于第一阈值a且大于或等于第二阈值b,说明第一平均功率与第二平均功率接近,则第二电子设备位于第一电子设备的前后侧区域。
示例性的,第二阈值b可以为第一阈值a的倒数,即b=1/a。若比值大于a,则第二电子设备位于第一电子设备的左侧区域。若比值小于1/a,则第二电子设备位于第一电子设备的右侧区域。若比值位于小于或等于a且大于或等于1/a之间,则电子设备位于第一电子设备的前后侧区域。
实施例6
图25是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图25,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤701~步骤703。
步骤701,第一电子设备通过两个扬声器分别向第二电子设备发送不同特征的第一超声波信号和第二超声波信号。
其中,第一超声波信号与第二超声波信号为不同频段的超声波信号,或为不同正交序列的超声波信号。
与实施例5中不同的是,本实施例中,第一超声波信号和第二超声波信号为第一电子设备直接生成的,而不是对基带序列s进行变频得到的。例如,第一电子设备生成频带为[f 1,f 2]的第一超声波信号x 1(t),以及频带为[f 3,f 4]的第二超声波信号x 2(t),且频带[f 1,f 2]与频带[f 3,f 4]之间无重叠部分,第一超声波信号x 1(t)和第二超声波信号x 2(t) 的功率相同。
步骤702至步骤703,请参考步骤603至步骤604,在此不再赘述。
实施例7
图26是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图26,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤801~步骤805。
步骤801,第一电子设备生成两个正交的基带序列,并将两个基带序列进行变频,得到第一超声波信号和第二超声波信号。
一种场景中,第一电子设备生成第一基带序列s 1和第二基带序列s 2,带宽均为B。第一电子设备将第一基带序列s 1和第二基带序列s 2上变频至同一频带[f c-B,f c+B],得到第一超声波信号x 1(t)和第二超声波信号x 2(t)。其中,第一超声波信号x 1(t)和第二超声波信号x 2(t)的功率相同。
步骤802,请参见步骤202,在此不再赘述。
步骤803,第二电子设备从接收到的超声波信号中提取第一超声波信号和第二超声波信号。
其中,由于第二电子设备从接收到的超声波信号为第一超声波信号和第二超声波信号的混合超声波信号,而且第一超声波信号和第二超声波信号的频带相同,因此需要将第一超声波信号和第二超声波信号提取出来,再进行后续步骤。
示例性的,第二电子设备可以通过滤波带宽为[f c-B,f c+B]的滤波器对接收到的超声波信号进行滤波。之后,将滤波得到的超声波信号变频至基带频率,再将变频至基带频率的超声波信号分别与第一基带序列s 1和第二基带序列s 2做卷积,得到第一超声波信号和第二超声波信号。
步骤804至步骤805,请参考步骤603和步骤604,在此不再赘述。
实施例8
图27是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图27,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤901~步骤906。
步骤901,第一电子设备生成一基带序列,并将该基带序列进行变频,得到预设超声波信号。
一种场景中,第一电子设备生成基带序列s,带宽为B。第一电子设备将该基带序列s进行上变频,得到预设超声波信号x(t)。其中,预设超声波信号x(t)的频带为[f 1,f 2],时间长度为T 9
其中,第一电子设备包括第一扬声器和第二扬声器。例如,第一扬声器可以为左声道扬声器,第二扬声器可以为右声道扬声器。或者,第一扬声器可以为右声道扬声器,第二扬声器可以为左声道扬声器。
步骤902,第一电子设备通过第一扬声器向第二电子设备发送第一超声波信号。
其中,第一超声波信号x 1(t)为上述预设超声波信号x(t),x 1(t)与x(t)的时间序列相同。
步骤903,在发送第一超声波信号完成后,第一电子设备通过第二扬声器向第二电子设备发送第二超声波信号。
其中,第二超声波信号x 2(t)为上述预设超声波信号x(t),x 2(t)与x(t)的时间序列相同。可以在发送第一超声波信号完成的预设时间后,第一电子设备通过第二扬声器向第二电子设备发送第二超声波信号。该预设时间可以为大于或等于0的任意时间。
例如,预设时间的长度为T 10,第一电子设备通过第一扬声器向第二电子设备发送第一超声波信号完成的时刻为T 11,则电子设备可以在(T 11+T 10)时刻通过第二扬声器向第二电子设备发送第二超声波信号。
其中,两个扬声器不同时发送超声波信号,使得两个扬声器发送的两个超声波信号为不同正交序列的两个超声波信号。
步骤904,第二电子设备将接收到的超声波信号与预设超声波信号进行相关计算,确定相关计算结果中两个峰值对应的时间值。
其中,第一电子设备可以通过WIFI或蓝牙等方式向第二电子设备告知预设超声波信号的序列信息。或者,预设超声波信号可以为第二电子设备已知的超声波信号,不需要第一电子设备向第二电子设备告知预设超声波信号的时间序列信息。
一些实施例中,第二电子设备将接收到的超声波信号y(t)可以为:第一电子设备通过第一扬声器发送的第一超声波信号,以及第一电子设备通过第二扬声器发送的第二超声波信号,经过信道传输到达第二电子设备的麦克风的超声波信号。
步骤905,第二电子设备根据两个时间值和预设超声波信号的时间长度,确定第一扬声器发送的第一超声波信号和第二扬声器发送的第二超声波信号,到达第二电子设备的麦克风的时间差。
示例性的,第一扬声器发送的第一超声波信号和第二扬声器发送的第二超声波信号,到达第二电子设备的麦克风的时间差,可以表示为麦克风对第一超声波信号和第一超声波信号的采样点数量的差值。
一种场景中,第二电子设备的麦克风接收到信号y(t)后,将y(t)与x(t)进行相关计算
Figure PCTCN2022071403-appb-000055
得到z(τ)的两个相关峰值和对应的时间τ 1和τ 2。其中,超声波信号y(t)和第一超声波信号x 1( t)的波形如图28所示,第一超声波信号x 1(t)先到达麦克风,第二超声波信号x 2(t)后到达麦克风。第一超声波信号x 1(t)的峰值对应的时间为τ 1,第二超声波信号x 2(t)的峰值对应的时间为τ 2,第一超声波信号x 1(t)和第二超声波信号x 2(t)的时间长度均为T 9,且第一电子设备发送第一超声波信号完成的T 10时间后,第一电子设备向第二电子设备发送第二超声波信号。则,第一电子设备可以先将第二超声波信号x 2(t)向左移动T 9+T 10所对应的时间,消除第一电子设备未同时发送两个超声波信号带来的时间影响。向左移动T 9+T 10所对应的时间后的第二超声波信号x 2(t),峰值对应的时间为τ 1-T 9-T 10。然后,再计算第一扬声器发送的第一超声波信号和第二扬声器发送的第二超声波信号,到达第二电子设备的麦克风的时间差为τ *=τ 1-(τ 2-T 9-T 10)。
步骤906,第二电子设备根据时间差、第一扬声器与第二扬声器之间的第一间距以及麦克风的采样频率,确定第二电子设备相对于第一电子设备的角度信息。
请参考步骤405,在此不再赘述。
在其他实施例中,第二电子设备也可以将两个时间值发送给第一电子设备,由第一电子设备确定时间差,以及确定第二电子设备相对于第一电子设备的角度信息。或 者,第二电子设备也可以将两个时间值发送给第一电子设备和第二电子设备之外的其他电子设备,由其他电子设备确定时间差,以及第二电子设备相对于第一电子设备的角度信息。
实施例9
图29是本申请实施例提供的一种确定第二电子设备与第一电子设备之间的相对位置信息的流程示意图。参见图29,上述确定第二电子设备与第一电子设备之间的相对位置信息的过程包括步骤1001~步骤1005。
步骤1001,参见步骤201,在此不再赘述。
本实施例中,第一超声波信号和第二超声波信号的时间序列信息不同。
步骤1002,第一电子设备在第一时刻通过第一扬声器向第二电子设备发送第一超声波信号,在第二时刻通过第二扬声器向第二电子设备发送第二超声波信号,第一时刻与第二时刻不同。
其中,可以在第一电子设备通过第二扬声器发送第一超声波信号完成后的预设时间后,第一电子设备通过第二扬声器向第二电子设备发送第二超声波信号。该预设时间可以为大于或等于0的任意时间。
步骤1003至步骤1005,参见步骤203至步骤205,在此不再赘述。
可选的,本申请实施例还提供了一种设备交互方法,包括:第一电子设备与第二电子设备建立连接;第一电子设备通过第一扬声器向第二电子设备发送第一声波信号,通过第二扬声器向第二电子设备发送第二声波信号;其中,第一扬声器与所述第二扬声器不同,且第一声波信号和第二声波信号为不同特征的两个声波信号;第二电子设备通过第一麦克风接收第一声波信号和第二声波信号;第二电子设备基于第一麦克风接收到第一声波信号和第二声波信号的时间差或第一声波信号和第二声波信号的强度,确定第二电子设备与第一电子设备之间的相对位置信息,该相对位置信息包括第二电子设备位于第一电子设备的左侧、或者第二电子设备位于第一电子设备的右侧;第一电子设备和第二电子设备基于相对位置信息,进行信息交互。
可选的,本申请实施例还提供了一种音频播放方法,包括:第一电子设备通过第一扬声器向第一音频播放设备和第二音频播放设备分别发送第一声波信号,通过第二扬声器向第二音频播放设备和和第二音频播放设备分别发送第二声波信号,第一扬声器与第二扬声器不同,且第一声波信号和第二声波信号为不同特征的两个声波信号;第一电子设备接收第一音频播放设备发送的第一音频播放设备与第一电子设备之间的第一相对位置信息,以及第二音频播放设备发送的第二音频播放设备与第一电子设备之间的第二相对位置信息,第一相对位置信息由第一音频播放设备的第一麦克风接收第一声波信号和第二声波信号的接收结果确定,第二相对位置信息由第二音频播放设备的第二麦克风接收第一声波信号和第二声波信号的接收结果确定;或者,第一电子设备接收第一音频播放设备发送的第一接收结果,以及第二音频播放设备发送的第二接收结果,第一接收结果为第一音频播放设备的第一麦克风接收第一声波信号和第二声波信号的接收结果,第二接收结果为第二音频播放设备的第二麦克风接收第一声波信号和第二声波信号的接收结果;第一电子设备基于第一接收结果确定第一相对位置信息,基于第二接收结果确定第二相对位置信息;第一电子设备根据第一相对位置信息 和第二相对位置信息确定第一音频播放设备和第二音频播放设备之间的第三相对位置信息;第三相对位置信息包括第一音频播放设备位于第二音频播放设备的第三侧,第二音频播放设备位于第一音频播放设备的第四侧,第三侧为左侧或右侧;第一电子设备将左声道音频信息发送给第一音频播放设备和第二音频播放设备中位于左侧的音频播放设备,将右声道音频信息发送给第一音频播放设备和第二音频播放设备位于右侧的音频播放设备。
可选的,本申请实施例还提供了一种电子设备,包括:一个或多个处理器、存储器和两个扬声器。存储器、两个扬声器与一个或多个处理器耦合,存储器用于存储计算机程序代码,两个扬声器用于发送声波信号,计算机程序代码包括计算机指令。当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种电子设备,包括:一个或多个处理器、存储器和麦克风。存储器、麦克风与一个或多个处理器耦合,存储器用于存储计算机程序代码,麦克风用于接收声波信号,计算机程序代码包括计算机指令。当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种芯片系统,该芯片系统可包括存储器和处理器,该处理器执行该存储器中存储的计算机程序,以实现上述任一个方法中的一个或多个步骤。其中,该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
可选的,本申请实施例还提供了一种芯片系统,该芯片系统可包括处理器,该处理器与存储器耦合,该处理器执行存储器中存储的计算机程序,以实现上述任一个方法中的一个或多个步骤。其中,该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者通过计算机可读存储介质进行传输。计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (14)

  1. 一种设备交互方法,应用于第二电子设备,其特征在于,所述方法包括:
    接收第一电子设备通过第一扬声器发出的第一声波信号;
    接收所述第一电子设备通过第二扬声器发出的第二声波信号,所述第一扬声器与所述第二扬声器不同;
    基于第一时刻和第二时刻,确定所述第二电子设备与所述第一电子设备之间的相对位置信息,其中,所述第一时刻为所述第二电子设备接收到所述第一声波信号的时刻,所述第二时刻为所述第二电子设备接收到所述第二声波信号的时刻,所述相对位置信息包括以下至少一种:所述第二电子设备位于所述第一电子设备的左侧、所述第二电子设备位于所述第一电子设备的右侧、所述第二电子设备位于所述第一电子设备的前侧或后侧。
  2. 如权利要求1所述的方法,其特征在于,所述第一扬声器位于所述第二扬声器的第一侧,所述第二扬声器位于所述第一扬声器的第二侧,所述第一侧为左侧或右侧,所述第二侧为所述第一侧的对侧,所述基于所述第一时刻与所述第二时刻确定出所述相对位置信息,包括:
    确定所述第一时刻与所述第二时刻之差;
    若所述第一时刻与所述第二时刻之差大于或等于第一阈值,则所述第二电子设备位于所述第一电子设备的第二侧;其中,所述第一阈值为正数;
    若所述第一时刻与所述第二时刻之差小于或等于第二阈值,则所述第二电子设备位于所述第一电子设备的第一侧;其中,所述第二阈值为负数;或,
    若所述第一时刻与所述第二时刻之差小于所述第一阈值且大于所述第二阈值,则所述第二电子设备位于所述第一电子设备的前侧或后侧。
  3. 如权利要求1所述的方法,其特征在于,所述第一声波信号为所述第一扬声器在第三时刻发出的声波信号,所述第二声波信号为所述第二扬声器在第四时刻发出的声波信号,所述第三时刻与所述第四时刻之差为第一时间差,所述第二时刻为将所述第二声波信号向左移动所述第一时间差之后确定的所述第二声波信号的接收时刻。
  4. 如权利要求1-3任一所述的方法,其特征在于,在所述确定所述第二电子设备与所述第一电子设备之间的相对位置信息之后,所述方法还包括:
    将所述相对位置信息发送给所述第一电子设备。
  5. 一种设备交互方法,应用于第一电子设备,其特征在于,所述方法包括:
    通过第一扬声器发出第一声波信号;
    通过第二扬声器发出第二声波信号,所述第一扬声器与所述第二扬声器不同,所述第一声波信号和所述第二声波信号用于确定第二电子设备与所述第一电子设备之间的相对位置信息;
    接收第二电子设备发送的所述第二电子设备与所述第一电子设备之间的相对位置信息,所述相对位置信息包括以下至少一种:所述第二电子设备位于所述第一电子设备的左侧、所述第二电子设备位于所述第一电子设备的右侧、所述第二电子设备位于所述第一电子设备的前侧或后侧;
    基于所述相对位置信息与所述第二电子设备交互。
  6. 如权利要求5所述的方法,其特征在于,所述通过第一扬声器发出第一声波信号,包括:在第三时刻通过第一扬声器发出第一声波信号;
    所述通过第二扬声器发出第二声波信号,包括:在第四时刻通过所述第二扬声器发出所述第二声波信号,所述第三时刻与所述第四时刻不同,且所述第三时刻与所述第四时刻的时间差为第一时间差,所述第一时间差用于确定所述第二电子设备接收所述第二声波信号的接收时刻。
  7. 如权利要求5所述的方法,其特征在于,所述基于所述相对位置信息与所述第二电子设备交互,包括:
    检测针对所述第一电子设备显示的第一目标内容的第一操作;
    判断所述第一操作是否与所述相对位置信息对应;
    如果所述第一操作与所述相对位置信息对应,所述第一电子设备将所述第一目标内容发送到所述第二电子设备的显示界面中显示。
  8. 如权利要求5所述的方法,其特征在于,所述第二电子设备包括位于所述第一电子设备左侧的第二电子设备和位于所述第一电子设备右侧的第二电子设备,所述基于所述相对位置信息与所述第二电子设备交互,包括:
    检测针对所述第一电子设备显示的第一目标内容的第二操作;
    若所述第二操作为向左扩展所述第一目标内容的操作,则所述第一电子设备将所述第一目标内容发送到位于所述第一电子设备左侧的第二电子设备的显示界面中显示;
    若所述第二操作为向右扩展所述第一目标内容的操作,则所述第一电子设备将所述第一目标内容发送到位于所述第一电子设备右侧的第二电子设备的显示界面中显示。
  9. 根据权利要求5-8任一项所述的方法,其特征在于,所述方法包括:
    在所述第一电子设备和/或所述第二电子设备的位置发生变化后,重新确定所述第一电子设备与所述第二电子设备之间的相对位置信息。
  10. 如权利要求5-8任一所述的方法,其特征在于,所述第一声波信号和所述第二声波信号为不同频段的声波信号;或者,
    所述第一声波信号和所述第二声波信号为不同正交序列的声波信号。
  11. 如权利要求5-8任一所述的方法,其特征在于,所述第一扬声器和所述第二扬声器之间的距离大于预设距离,所述预设距离为20厘米。
  12. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器和显示屏;
    所述存储器、所述显示屏与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述一个或多个处理器执行所述计算机指令时,使得所述电子设备执行如权利要求1至4中任一项所述的方法,或如权利要求5至11中任一项所述的方法。
  13. 一种芯片系统,其特征在于,所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器执行所述存储器中存储的计算机程序,以实现如权利要求1至4中任一项所述的方法,或如权利要求5至11中任一项所述的方法。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-4任一所述的方法,或如权利要求5-11任一所述的方法。
PCT/CN2022/071403 2021-01-25 2022-01-11 设备交互方法、位置确定方法、电子设备及芯片系统 WO2022156566A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/262,801 US20240085555A1 (en) 2021-01-25 2022-01-11 Method for interaction between devices, position determining method, electronic device, and chip system
EP22742045.2A EP4258006A4 (en) 2021-01-25 2022-01-11 DEVICE INTERACTION METHOD, POSITION DETERMINATION METHOD, ELECTRONIC DEVICE AND CHIP SYSTEM

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110100462 2021-01-25
CN202110100462.0 2021-01-25
CN202111595950.X 2021-12-23
CN202111595950.XA CN114895244A (zh) 2021-01-25 2021-12-23 设备交互方法、位置确定方法、电子设备及芯片系统

Publications (1)

Publication Number Publication Date
WO2022156566A1 true WO2022156566A1 (zh) 2022-07-28

Family

ID=82548262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071403 WO2022156566A1 (zh) 2021-01-25 2022-01-11 设备交互方法、位置确定方法、电子设备及芯片系统

Country Status (3)

Country Link
US (1) US20240085555A1 (zh)
EP (1) EP4258006A4 (zh)
WO (1) WO2022156566A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115015838A (zh) * 2022-08-04 2022-09-06 荣耀终端有限公司 一种定位方法和声源定位系统
WO2024041341A1 (zh) * 2022-08-26 2024-02-29 华为技术有限公司 发出、接收声音信号以及检测设备间相对位置的方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090316529A1 (en) * 2005-05-12 2009-12-24 Nokia Corporation Positioning of a Portable Electronic Device
WO2015056996A1 (ko) * 2013-10-16 2015-04-23 주식회사 와이드벤티지 스마트폰 등에 구비된 센서들을 이용한 위치 추적 시스템
CN104981983A (zh) * 2013-03-15 2015-10-14 英特尔公司 用于通过超声和无线信号的装置对装置角度检测的装置和方法
CN107656244A (zh) * 2017-08-24 2018-02-02 南京安璞信息技术有限公司 基于临界听域超声波到达时间差的室内定位系统及方法
CN107873136A (zh) * 2015-06-09 2018-04-03 三星电子株式会社 电子设备、外围设备及其控制方法
CN111343332A (zh) * 2018-12-19 2020-06-26 恩智浦有限公司 移动装置定位器
CN112083867A (zh) * 2020-07-29 2020-12-15 华为技术有限公司 一种跨设备的对象拖拽方法及设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130336094A1 (en) * 2012-06-08 2013-12-19 Rutgers, The State University Of New Jersey Systems and methods for detecting driver phone use leveraging car speakers
KR20160114849A (ko) * 2015-03-25 2016-10-06 엘지전자 주식회사 영상표시장치, 모바일 장치 및 그 동작방법

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090316529A1 (en) * 2005-05-12 2009-12-24 Nokia Corporation Positioning of a Portable Electronic Device
CN104981983A (zh) * 2013-03-15 2015-10-14 英特尔公司 用于通过超声和无线信号的装置对装置角度检测的装置和方法
WO2015056996A1 (ko) * 2013-10-16 2015-04-23 주식회사 와이드벤티지 스마트폰 등에 구비된 센서들을 이용한 위치 추적 시스템
CN107873136A (zh) * 2015-06-09 2018-04-03 三星电子株式会社 电子设备、外围设备及其控制方法
CN107656244A (zh) * 2017-08-24 2018-02-02 南京安璞信息技术有限公司 基于临界听域超声波到达时间差的室内定位系统及方法
CN111343332A (zh) * 2018-12-19 2020-06-26 恩智浦有限公司 移动装置定位器
CN112083867A (zh) * 2020-07-29 2020-12-15 华为技术有限公司 一种跨设备的对象拖拽方法及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4258006A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115015838A (zh) * 2022-08-04 2022-09-06 荣耀终端有限公司 一种定位方法和声源定位系统
CN115015838B (zh) * 2022-08-04 2022-12-09 荣耀终端有限公司 一种定位方法和声源定位系统
WO2024041341A1 (zh) * 2022-08-26 2024-02-29 华为技术有限公司 发出、接收声音信号以及检测设备间相对位置的方法

Also Published As

Publication number Publication date
EP4258006A4 (en) 2024-05-29
US20240085555A1 (en) 2024-03-14
EP4258006A1 (en) 2023-10-11

Similar Documents

Publication Publication Date Title
WO2022156566A1 (zh) 设备交互方法、位置确定方法、电子设备及芯片系统
US11714533B2 (en) Method and apparatus for dynamically displaying icon based on background image
AU2017429200B2 (en) Display method and apparatus
US10708743B2 (en) Service sharing device and method
US20200336660A1 (en) Panoramic Photo Shooting Method and Apparatus
KR101971911B1 (ko) 이미지를 디스플레이하기 위한 방법 및 그 전자 장치
WO2023155074A1 (zh) 通信方法及装置、电子设备及存储介质
WO2021023061A1 (zh) 准共址qcl信息确定方法、配置方法及相关设备
US20160291141A1 (en) Apparatus and method for measuring distance and location
CN111083684A (zh) 控制电子设备的方法及电子设备
EP3278135B1 (en) Apparatus and method for measuring distance and location
WO2014185885A1 (en) Line of sight initiated handshake
KR20140093520A (ko) 휴대용 단말기의 컨텐츠 공유 시스템 및 이를 이용한 컨텐츠 공유방법
WO2021254168A1 (zh) 会议控制方法、装置、可读介质及电子设备
WO2022222877A1 (zh) 通信连接控制方法、装置、计算机设备及可读存储介质
CN111245854A (zh) 一种媒体传输方法、媒体控制方法及装置
WO2020063852A1 (zh) 终端设备能力信息处理方法、终端设备及网络侧设备
CN114895244A (zh) 设备交互方法、位置确定方法、电子设备及芯片系统
WO2021057733A1 (zh) 先听后发lbt子带划分方法、装置、设备及介质
WO2021013006A1 (zh) 参数处理方法、设备及计算机可读存储介质
WO2022160986A1 (zh) 一种角度确定方法、电子设备及芯片系统
CN109257504B (zh) 一种音频处理方法及终端设备
WO2020077968A1 (zh) 一种投影装置及其投影图像矫正方法和计算机存储介质
WO2016095449A1 (zh) 一种虚拟桌面的显示方法、终端和存储介质
KR20130090800A (ko) 가시 범위 내 통신대상 인식을 위한 단말 및 그 방법

Legal Events

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

Ref document number: 22742045

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022742045

Country of ref document: EP

Effective date: 20230706

WWE Wipo information: entry into national phase

Ref document number: 18262801

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE