CN112180378A - Method and device for determining distance between devices and storage medium - Google Patents

Method and device for determining distance between devices and storage medium Download PDF

Info

Publication number
CN112180378A
CN112180378A CN202011044619.4A CN202011044619A CN112180378A CN 112180378 A CN112180378 A CN 112180378A CN 202011044619 A CN202011044619 A CN 202011044619A CN 112180378 A CN112180378 A CN 112180378A
Authority
CN
China
Prior art keywords
time
signal
determining
subframe
received
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202011044619.4A
Other languages
Chinese (zh)
Other versions
CN112180378B (en
Inventor
周岭松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Pinecone Electronic Co Ltd
Original Assignee
Beijing Xiaomi Pinecone Electronic Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Pinecone Electronic Co Ltd filed Critical Beijing Xiaomi Pinecone Electronic Co Ltd
Priority to CN202011044619.4A priority Critical patent/CN112180378B/en
Publication of CN112180378A publication Critical patent/CN112180378A/en
Application granted granted Critical
Publication of CN112180378B publication Critical patent/CN112180378B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/74Systems using reradiation of acoustic waves, e.g. IFF, i.e. identification of friend or foe

Abstract

The disclosure relates to a method, a device and a storage medium for determining a distance between devices, wherein the method comprises the following steps: sending a first sound wave signal to second equipment at a first moment recorded by a first equipment side; receiving a second acoustic signal returned by the second device in response to the first acoustic signal; determining a fourth time of the first device receiving a second acoustic signal sent by the second device and analyzing the second acoustic signal to obtain a second time and a third time; determining the transmission time of the sound wave signal between the first equipment and the second equipment according to the first time, the second time, the third time and the fourth time; the distance between the first equipment and the second equipment is determined according to the transmission speed of the sound wave in the air and the transmission time of the sound wave signal, the distance between the first equipment and the second equipment can be calculated without predicting the direction information of the first equipment and the second equipment, and the calculation difficulty of determining the distance between the equipment is reduced.

Description

Method and device for determining distance between devices and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for determining a distance between devices, and a storage medium.
Background
In the related art, the main method of determining the distance between devices is based on the principle of reflection. Specifically, when the intelligent device a needs to obtain the distance between the intelligent device a and the intelligent device B, a detection signal needs to be transmitted to the intelligent device B, and the detection signal is reflected by the intelligent device B and received by the intelligent device a. Thus, smart device a needs to know the orientation information of smart device B accurately before transmitting the probe signal. The intelligent device A obtains the signal transmission duration between the intelligent device A and the intelligent device B by comparing the time from transmitting the detection signal to receiving the detection signal, and then the distance information between the intelligent device A and the intelligent device B can be calculated by synthesizing the speed of signal transmission.
Although the distance between the devices can be calculated by the method, each intelligent device needs to be additionally provided with a detection signal transmitting device, namely, extra hardware cost is needed; in addition, each intelligent device needs to predict the accurate azimuth information of the other party before sending the detection signal, and the azimuth information is difficult to obtain, so that the difficulty of distance estimation is improved.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, and a storage medium for determining a distance between devices.
According to a first aspect of the embodiments of the present disclosure, there is provided an inter-device distance determining method, applied to a first device, the method including:
at a first moment recorded by the first equipment side, sending a first sound wave signal to second equipment;
receiving a second acoustic signal returned by the second device in response to the first acoustic signal; wherein the second acoustic signal carries time information, the time information including: a second time when the first acoustic signal is received and a third time when the second acoustic signal is sent by the second device;
determining a fourth moment recorded by the first device side when the second acoustic signal is received;
analyzing the second acoustic signal to obtain the second time and the third time;
determining the transmission time of the sound wave signal between the first device and the second device according to the first time, the second time, the third time and the fourth time;
and determining the distance between the first equipment and the second equipment according to the transmission speed of the sound wave in the air and the transmission time of the sound wave signal.
Optionally, the second acoustic signal includes identification information, an acoustic frequency sequence corresponding to the second time, and an acoustic frequency sequence corresponding to the third time;
the determining a fourth time recorded by the first device side when the second acoustic signal is received includes:
and determining a fourth time recorded by the first equipment side when the second sound wave signal is received according to the time when the identification information is received.
Optionally, the second device decomposes the second acoustic signal into a plurality of subframe signals, and sequentially sends the plurality of subframe signals to the first device;
the determining a fourth time recorded by the first device side when the second acoustic signal is received further includes:
sequentially receiving the plurality of subframe signals sent by the second equipment;
and determining the moment of receiving the identification information according to the moment of receiving the subframe signal containing the identification information.
Optionally, the determining, according to the time when the second acoustic signal is received, a fourth time recorded by the first device side when the second acoustic signal is received includes:
taking the continuous multi-frame subframe signals of the preset frequency sequence obtained by analysis as first target subframe signals, and determining the moment of receiving the last frame subframe signal in the first target subframe signals;
converting other subframe signals except the subframe signal of the last frame in the first target subframe signal into first time domain signals;
determining a first ratio of the number of sampling points corresponding to other frequencies except for the subsequence in the preset frequency sequence to a preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration, wherein the subsequence is a frequency of the preset frequency sequence obtained by analysis and included in the last frame of subframe signal;
and determining the sum of the time of receiving the subframe signal of the last frame in the first target subframe signal and the first detection duration as a fourth time recorded by the first device side when the second sound wave signal is received.
Optionally, the determining, according to the time when the second acoustic signal is received, a fourth time recorded by the first device side when the second acoustic signal is received includes:
determining a subframe signal of the complete preset frequency sequence obtained by analysis as a second target subframe signal, and determining the time when the second target subframe signal is received;
converting the second target-subframe signal into a second time-domain signal;
determining a second ratio of the number of sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration;
and determining the difference between the time of receiving the target subframe signal and the second detection time length as a fourth time recorded by the first equipment side when the second sound wave signal is received.
Optionally, the identification information includes a device identifier of the second device.
Optionally, before the first device sends the first acoustic signal to the second device at the first time, the method further includes:
receiving a control request input by a user and used for indicating to control a second device closest to the first device;
after the distance between the first device and the second devices is determined, according to the distance between the first device and each second device, the target device closest to the first device is determined, and the target device is controlled.
According to a second aspect of the embodiments of the present disclosure, there is provided an inter-device distance determining apparatus including:
a transmission module configured to transmit a first acoustic wave signal to a second device at a first timing recorded on a first device side;
a return module configured to receive a second acoustic signal returned by the second device in response to the first acoustic signal; wherein the second acoustic signal carries time information, the time information including: a second time when the first acoustic signal is received and a third time when the second acoustic signal is sent by the second device;
a first determining module configured to determine a fourth time recorded by the first device side when the second acoustic signal is received;
an analysis module configured to analyze the second acoustic signal to obtain the second time and the third time;
a computing module configured to determine a sound wave signal transmission time between the first device and the second device according to the first time, the second time, the third time and the fourth time;
a second determination module configured to determine a distance between the first device and the second device according to a transmission speed of the sound wave in the air and the sound wave signal transmission time.
Optionally, the second acoustic signal includes identification information, an acoustic frequency sequence corresponding to the second time, and an acoustic frequency sequence corresponding to the third time;
the first determining module comprises a first determining submodule configured to determine, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received.
Optionally, the second device decomposes the second acoustic signal into a plurality of subframe signals, and sequentially sends the plurality of subframe signals to the first device;
the first determining module further comprises:
a subframe signal receiving submodule configured to sequentially receive the plurality of subframe signals transmitted by the second device;
a second determining submodule, where the identification information is a preset frequency sequence, and the first determining submodule is specifically configured to:
taking the continuous multi-frame subframe signals of the preset frequency sequence obtained by analysis as first target subframe signals, and determining the moment of receiving the last frame subframe signal in the first target subframe signals;
converting other subframe signals except the subframe signal of the last frame in the first target subframe signal into first time domain signals;
determining a first ratio of the number of sampling points corresponding to other frequencies except for the subsequence in the preset frequency sequence to a preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration, wherein the subsequence is a frequency of the preset frequency sequence obtained by analysis and included in the last frame of subframe signal;
and determining the sum of the time of receiving the subframe signal of the last frame in the first target subframe signal and the first detection duration as a fourth time recorded by the first device side when the second sound wave signal is received.
Optionally, the identification information is a preset frequency sequence, and the first determining submodule is specifically configured to:
determining a subframe signal of the complete preset frequency sequence obtained by analysis as a second target subframe signal, and determining the time when the second target subframe signal is received;
converting the second target-subframe signal into a second time-domain signal;
determining a second ratio of the number of sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration;
and determining the difference between the time of receiving the target subframe signal and the second detection time length as a fourth time recorded by the first equipment side when the second sound wave signal is received.
Optionally, the apparatus further comprises:
a control request receiving module configured to receive a control request input by a user for instructing control of a second device closest to the first device;
and the control module is configured to determine a target device closest to the first device according to the distance between the first device and each second device after determining the distance between the first device and the second device, and control the target device.
According to a third aspect of the embodiments of the present disclosure, there is provided an inter-device distance determining apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of the inter-device distance determination method provided by the first aspect of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the inter-device distance determination method provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: transmitting a first acoustic signal to a second device at a first time of the first device, wherein the second device transmits a second acoustic signal to the first device upon receiving the first acoustic signal, wherein the second acoustic signal is capable of indicating a second time at which the second device receives the first acoustic signal and a third time at which the second acoustic signal is transmitted; determining a fourth time of the first device at which the second acoustic signal sent by the second device is received; analyzing the second acoustic signal to obtain the second time and the third time; determining the transmission time of the sound wave signal between the first device and the second device according to the first time, the second time, the third time and the fourth time; and determining the distance between the first equipment and the second equipment according to the transmission speed of the sound wave in the air and the transmission time of the sound wave signal. The sound wave signals are transmitted between the first equipment and the second equipment, and the time of sending the sound wave signals by each equipment and the time of arrival of the sound wave signals at each equipment are obtained through analysis so as to calculate the distance between the first equipment and the second equipment, direction information of the first equipment and the second equipment does not need to be known in advance, and calculation difficulty of determining the distance between the equipment is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating an application scenario of an inter-device distance determination method according to an exemplary embodiment
Fig. 2 is a flow chart illustrating a method of inter-device distance determination according to an example embodiment.
Fig. 3 is an interaction diagram illustrating a time of day information according to an example embodiment.
Fig. 4 is a flowchart illustrating step S13 according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating step S133 according to an exemplary embodiment.
Fig. 6 is another flowchart illustrating step S133 according to an exemplary embodiment.
Fig. 7 is another flowchart illustrating an inter-device distance determination method according to an example embodiment.
Fig. 8 is a block diagram illustrating an inter-device distance determining apparatus according to an example embodiment.
Fig. 9 is a block diagram illustrating an inter-device distance determining apparatus according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic view of an application scenario of an inter-device distance determining method according to an exemplary embodiment, as shown in fig. 1, a sound box a needs to determine distances to an air conditioner 1 and an air conditioner 2, respectively, so as to control the air conditioner closest to the sound box a. Specifically, after the sound box a receives a control request input by a user and used for instructing control of the air conditioner closest to the sound box, the sound box a interacts with the air conditioner 1 and the air conditioner 2 through time information of respective clocks to determine sound wave signal transmission time between the sound box a and the air conditioner 1 and sound wave signal transmission time between the sound box a and the air conditioner 2. After the sound wave transmission time between the first device and each second device is determined, the distance between the sound box A and the air conditioner 1 and the distance between the sound box A and the air conditioner 2 are determined according to the respective sound wave transmission time and the propagation speed of the sound waves in the air, so that the sound box A determines the target device (the air conditioner 1 or the air conditioner 2) closest to the sound box A, and the target device is controlled (for example, the air conditioner is started).
It should be noted that a device that calculates the distance between devices using the inter-device distance determination method of the present disclosure needs to be provided with a speaker and a microphone.
It should be noted that the first device and the second device may also be other smart devices including a speaker and a microphone, such as a smart phone, a tablet computer, and the like. This embodiment is not limited in any way.
Fig. 2 is a flowchart illustrating an inter-device distance determining method according to an exemplary embodiment, where the inter-device distance determining method is used in a first device as illustrated in fig. 2, and includes the following steps.
In step S11, at a first timing recorded on the first device side, a first acoustic wave signal is transmitted to the second device;
in step S12, a second acoustic signal returned by the second device in response to the first acoustic signal is received.
In step S13, a fourth time of the first device that receives the second acoustic signal transmitted by the second device is determined;
in step S14, the second acoustic signal is analyzed to obtain a second time and the third time.
In step S15, a sound wave signal transmission time between the first device and the second device is determined based on the first time, the second time, the third time, and the fourth time.
In step S16, the distance between the first device and the second device is determined based on the transmission speed of the sound wave in the air and the sound wave signal transmission time.
It should be noted that, when receiving the first acoustic signal, the second device sends a second acoustic signal to the first device, where the second acoustic signal carries time information, and the time information includes: a second time when the first acoustic signal is received and a third time when the second acoustic signal is transmitted by the second device.
In this embodiment, the time when the first device and the second device receive the corresponding signals is encoded into corresponding sound wave signals, the sound wave signals are transmitted between the first device and the second device, the first device analyzes the received second sound wave signal to determine the second time and the third time, and then the distance between the first device and the second device is calculated by combining the first time, the second time, the third time and the fourth time, so that the calculation difficulty of determining the distance between the devices is reduced without predicting the azimuth information of the first device and the second device.
It should be noted that the first device may send a first sound wave signal through a speaker carried by the first device, and the first device may collect a second sound wave signal through a microphone carried by the first device; the second device may, for example, send the second acoustic signal through a speaker carried by itself, and the second device may, for example, pick up the first acoustic signal through a microphone carried by itself.
Further explanation will be made below on how to determine the distance between the first device and the second device, with device a as the first device and device B as the second device. Specifically, referring to fig. 3, fig. 3 is a schematic diagram illustrating an interaction of time information according to an exemplary embodiment. Device A at its first time instant (i.e. T)A0) Then, T isA0Encoded into a first acoustic signal to be transmitted to device B at a second time (i.e., T)B0) Upon receiving the first acoustic signal, a second acoustic signal is transmitted to device A, where the second acoustic signal is indicative of a second time at which device B received the first acoustic signal and a third time (i.e., T) at which the second acoustic signal was transmittedB1) Device A at a fourth time (i.e., T)A1) A second acoustic signal is received. The device A can obtain T after analyzing the second acoustic signalB0、TB1Device A can utilize TA0、TA1、TB0、TB1The 4 pieces of time information are calculated by the following calculation formula to obtain the acoustic signal transmission time between the device a and the device B:
TA0-TB0=Δ+τ0; (1)
TB1-TA1=-Δ+τ1; (2)
where Δ represents the time difference between the clocks of device A and device B, τ0And τ1Representing the acoustic signal transit time between device a and device B. Since the acoustic wave is mainly affected by temperature during transmission in air, and the temperature is generally unchanged for a long time, the acoustic wave is considered to be stably transmitted, i.e. tau1And τ0Are equal, and thus combining the above equations (1) and (2) yields the acoustic signal transit times for device a and device B as:
Figure BDA0002707620700000101
after the transmission time of the sound wave signals of the equipment A and the equipment B is calculated, the propagation speed of the sound wave in the air is used: c 340m/s, the distance between device a and device B is:
d=c*τ; (4)
where d is the distance between device a and device B.
In one possible embodiment, the second acoustic signal includes the identification information, the acoustic frequency sequence corresponding to the second time, and the acoustic frequency sequence corresponding to the third time. Correspondingly, according to the time when the identification information is received, the fourth time recorded by the first equipment side when the second acoustic signal is received is determined.
Wherein the identification information is used to detect the time when the second acoustic signal arrives at the first device. A sound frequency sequence is a signal encoded at a time according to a frequency shift keying technique that uses different frequencies to represent different numbers.
In a possible implementation manner, the second device decomposes the second sound signal into a plurality of sub-frame signals, and sequentially transmits the plurality of sub-frame signals to the first device, where the second sound signal includes the identification information, the sound wave frequency sequence corresponding to the second time, and the sound wave frequency sequence corresponding to the third time, please refer to fig. 4, where the step S13 may include the method steps shown in fig. 4, for example, and fig. 4 is a flowchart of step S13 shown according to an exemplary embodiment, and includes the following steps:
step S131, sequentially receiving a plurality of subframe signals transmitted by the second device.
Step S132, according to the time of receiving the sub-frame signal containing the identification information, determining the time of receiving the identification information.
Step S133 determines, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received.
In this embodiment, the fourth time when the second acoustic signal is received is determined by using the identification information, so as to avoid the situation of missing detection of the second acoustic signal, and achieve the purpose of accurately estimating the fourth time. Wherein the sub-frame signal is a sound wave spectrum signal.
In a possible implementation manner, in the case that the identification information is a preset frequency sequence, referring to fig. 5 accordingly, the step S133 may include, for example, the step shown in fig. 5, and fig. 5 is a flowchart of the step S133 according to an exemplary embodiment, and includes the following steps:
step 1330, using the continuous multi-frame subframe signals of the preset frequency sequence obtained by the analysis as first target subframe signals, and determining the time when the last frame subframe signal of the first target subframe signals is received.
Step 1332, converting the subframe signals except the subframe signal of the last frame in the first target subframe signal into a first time domain signal.
Step 1334, determining a first ratio of the number of sampling points corresponding to other frequencies except the subsequence in the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration.
Step 1336, determining the sum of the time when the subframe signal of the last frame in the first target subframe signal is received and the first detection duration as the fourth time recorded by the first device side when the second acoustic signal is received.
In this embodiment, it is considered that the first device can determine that the identification information is detected only when the complete preset frequency sequence is detected, and then determine that the second acoustic signal sent by the second device is received at this time. The preset frequency sequence continuously detected by the first device may be distributed in the continuous subframe signals, so that the first device starts to receive the frequency values belonging to the preset frequency sequence before determining that the complete preset frequency sequence is detected. In order to accurately predict the time of the second acoustic signal reaching the first device, before a subframe signal of a complete preset frequency sequence is detected, how many signals belonging to the preset frequency sequence are in the subframe signal before the subframe signal, and the detection duration corresponding to the signals is calculated, so as to determine the time when the first device starts to receive the second acoustic signal belonging to the second device.
The preset frequency sequence is a frequency sequence pre-stored in the first device and the second device. Illustratively, the predetermined frequency sequence may be f0f1f2f3f4f5f6f7f8f9The amplitude of each frequency can be set by itself, which is not limited in this embodiment.
And the sub-sequence is the frequency of the preset frequency sequence obtained by analysis in the last frame of the sub-frame signal.
For example, a GCC-PHAT (Generalized Cross Correlation PHAse Transformation) method may be used to estimate the number of samples corresponding to other frequencies except for the sub-sequence in the predetermined frequency sequence in the first time domain signal. The GCC-PHAT method can estimate the demarcation point of background noise and other frequencies except subsequences in the preset frequency sequence.
Illustratively, taking the second acoustic signal includes 6-frame subframe signals, and the preset frequency sequence is 0101010101, the 6-frame subframe signals are sequentially as follows: (000, … …, 111); (000, … …, 111); (000, … …, 111); (000, … …, 111); (000, … …, 010); (1010101, … …, 111), analyzing the subframe signals of the 6 frames to obtain a complete predetermined frequency sequence, where the predetermined frequency sequence is detected in the 5 th frame and the sixth frame, that is, the end of the 5 th frame and the start of the 6 th frame may be continuously formed, where the subsequence is 1010101 that is part of the predetermined frequency sequence in the subframe signals of the 6 th frame. The 5 th frame and the 6 th frame are used as first target sub-frame signals, and the moment when the 6 th frame (the last frame sub-frame signal in the first target sub-frame signals) is received is determined to be T0Since the first device has already started receiving the predetermined frequency sequence at the time of the 5 th frame, the time when the 5 th frame starts receiving the predetermined frequency sequence is the time when the second acoustic signal arrives at the device. Converting the sub-frame signal of the 5 th frame into a first time domain signal, and obtaining the sub-frame signal of the 5 th frame in a sampling point corresponding to the first time domain signal according to a GCC-PHAT methodThe presence of 279 samples in the frame signal belongs to another part of the detected predetermined sequence of frequencies (i.e. 010 adjacent to 1010101). Accordingly, the first detection duration is:
Figure BDA0002707620700000131
wherein, tauGCC-PHAT1F is the preset sampling frequency.
Thus, the time (i.e., the fourth time, T) of the second acoustic signal received by the first deviceA1) Should be at T0By a further 279 samples, i.e. T, on the basis of the time corresponding to the sample pointA1=T0GCC-PHAT1
In a possible implementation manner, please refer to fig. 6, the step S133 may include, for example, the step included as shown in fig. 6, and fig. 6 is another flowchart of the step S133 shown according to an exemplary embodiment, which includes the following steps:
step 1331, determining the subframe signal of the complete preset frequency sequence obtained by the analysis as a second target subframe signal, and determining the time when the second target subframe signal is received.
Step 1333, converting the second target-subframe signal into a second time-domain signal.
Step 1335, determining a second ratio of the number of the sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration.
Step 1337, determining the difference between the time when the target subframe signal is received and the second detection duration as the fourth time recorded by the first device side when the second acoustic signal is received.
In this embodiment, it is considered that the first device can determine that the identification information is detected only when the complete preset frequency sequence is detected, and then determine that the second acoustic signal sent by the second device is received at this time. Under the condition that a complete preset frequency sequence continuously detected by a first device is distributed in a subframe signal, considering that some background noise signals may exist at the starting position of the subframe signal which is received by the first device and comprises the complete preset frequency sequence, and the background noise signals do not belong to the frequency value of the detected preset frequency sequence, when the complete preset frequency sequence is determined to exist in the frame subframe signal, how many signals which do not belong to the preset frequency sequence exist before the first bit frequency of the preset frequency sequence in the subframe signal are further determined, and the detection duration corresponding to the signals is calculated, so that the time when the first device starts to receive the second sound signal which belongs to the second device is determined.
It should be noted that, the preset frequency sequence in this embodiment is the same as the preset frequency sequence shown in fig. 5, and is not described herein again.
It should be noted that, in this embodiment, the GCC-PHAT method may be adopted to determine how many signals that do not belong to the preset frequency sequence are before the first bit frequency of the preset frequency sequence in the subframe signal, which is not described herein again.
Illustratively, taking the second acoustic signal includes 6-frame subframe signals, and the preset frequency sequence is 0101010101, the 6-frame subframe signals are sequentially as follows: (000, … …, 111); (000, … …, 111); (000, … …, 111); (000, … …, 111); (000, … …, 010); (010000, 0101010101, … …, 01), analyzing the subframe signal of the 6 th frame, it can be seen that the 6 th frame includes a complete predetermined frequency sequence, and before the sequence, there is a part of sequence that does not belong to the predetermined frequency sequence, so it is necessary to determine the detection duration corresponding to the sequence before the predetermined frequency sequence included in the subframe signal of the 6 th frame. Specifically, the time when the 6 th frame (i.e., the second target-subframe signal) is received is determined to be T0And converting the 6 th frame subframe signal into a second time domain signal, wherein 423 sampling points which are not in the preset frequency sequence (010000) exist in the 6 th frame subframe signal before the first frequency of the preset frequency sequence and are obtained according to the GCC-PHAT method in sampling points corresponding to the second time domain signal. Accordingly, the second detection duration is:
Figure BDA0002707620700000141
wherein, tauGCC-PHAT2F is the preset sampling frequency, and is the second detection time length. The preset sampling frequency may be 48000, for example, which can be set according to actual situations, and this embodiment does not limit this.
Thus, the time (i.e., the fourth time, T) of the second acoustic signal received by the first deviceA1) Should be at T0On the basis of which the corresponding time of 423 sampling points, i.e. T, is shifted backwardsA1=T0GCC-PHAT2
In the embodiment, the time of the second acoustic signal reaching the first device is accurately calculated by using the preset frequency sequence in the identification information, so that the accuracy of distance calculation is improved.
It should be noted that the process of determining, by the second device, the time when the first acoustic signal is received is similar to the process of determining, by the first device, the time when the second acoustic signal is received, and this embodiment is not described herein again.
In another embodiment, for example, in the application scenario represented in fig. 1, in order to distinguish which second device the second acoustic signal received by the first device specifically corresponds to when it is necessary to determine a distance between the first device and a different second device, the identification information may further include a device identifier of the second device, so that the first device determines the second device according to the device identifier. It can be understood that, in the case of this application scenario, the first device needs to store in advance a device identification corresponding to each second device.
In another implementation, fig. 7 is another flowchart of an inter-device distance determining method according to an exemplary embodiment, for example, including the steps shown in fig. 7:
in step S20, a control request for instructing control of a second device closest to the first device is received, which is input by a user.
In step S21, the first acoustic wave signal is transmitted to the second device at the first timing recorded on the first device side.
In step S22, a second acoustic signal returned by the second device in response to the first acoustic signal is received.
In step S23, a fourth time of the first device that received the second acoustic signal transmitted by the second device is determined.
In step S24, the second acoustic signal is analyzed to obtain a second time and the third time.
In step S25, a sound wave signal transmission time between the first device and the second device is determined based on the first time, the second time, the third time, and the fourth time.
In step S26, the distance between the first device and the second device is determined based on the transmission speed of the sound wave in the air and the sound wave signal transmission time.
In step S27, a target device closest to the first device is determined according to the distance to each of the second devices, and the target device is controlled.
When the first device receives a control request sent by a user and used for instructing to control the second device closest to the first device, the method of fig. 2 is used for determining the distance between the first device and each second device, determining one second device closest to the first device as a target device, and controlling the target device.
In step S20, the control request may be based on, for example, a bluetooth connection established between the first device and the second device, or may be based on, for example, the same Wi-Fi network established between the first device and the second device. This embodiment is not limited in any way.
Step S21 is similar to the step S11 in fig. 2, and is not repeated here.
Step S22 is similar to the step S12 in fig. 2, and is not repeated here.
Step S23 is similar to the step S13 in fig. 2, and is not repeated here.
Step S24 is similar to the step S14 in fig. 2, and is not repeated here.
Step S25 is similar to the step S15 in fig. 2, and is not repeated here.
Step S26 is similar to the step S16 in fig. 2, and is not repeated here.
In step S27, the control may be, for example, a control method such as turning on the device or turning off the device. The setting can be performed according to the actual situation, which is not limited in this embodiment.
It should be noted that the second device encodes the second time and the third time to obtain a corresponding sound wave frequency sequence. Specifically, for example, the sound wave frequency sequence obtained by encoding the second time is described, the second device encodes the numbers according to the frequency shift keying technology and a preset sound wave frequency mapping table for each number included in the second time to obtain the sound wave frequency corresponding to the number; then, according to the sound wave frequency corresponding to each number included in the second time, the sound wave frequency sequence corresponding to the second time is determined.
Wherein the frequency shift keying technique uses different frequencies to represent different numbers.
In one possible embodiment, the sound wave frequency mapping table includes a correspondence between each number in 0 to 9 and a frequency identifier, and the correspondence may be, for example: [ (f)0:0);(f1:1);(f2:2);(f3:3);(f4:4);(f5:5);(f6:6);(f7:7);(f8:8);(f9:9)]。
The numbers included in the time information are natural positive integers.
Illustratively, the sound wave frequency sequence obtained according to the sound wave frequency mapping table may be f, taking the second time as 10:23:59 as an example1f0f2f3f5f9The sequence of acoustic frequencies represents the second time instant.
In addition, it is considered that factors such as the playing power and the transmission distance of the speaker affect the amplitude of the received signal, so that the first device cannot accurately analyze and obtain the time information sent by the second device after receiving the second sound signal. Therefore, to eliminate this effect, in one possible embodiment, the process of generating the acoustic frequency sequence is further explained by taking the acoustic frequency sequence at the second time as an example, in particular, the following manner is adopted for generating the corresponding acoustic frequency sequence at the time. Specifically, the method comprises the following steps:
for a second moment, in the multiple frequency identifiers, setting frequency values corresponding to the frequency identifiers corresponding to the numbers included in the second moment as a first preset numerical value, and setting frequency values corresponding to other frequency identifiers as second preset numerical values; and sequencing the frequency identifications according to the sequence of the numbers corresponding to the frequency identifications from small to large to obtain the sound wave frequency corresponding to the number, and splicing the sound wave frequency corresponding to each number in sequence to obtain the sound wave frequency sequence corresponding to the second moment.
It should be noted that, the first preset value is far greater than the second preset value, and a difference between the first preset value and the second preset value is greater than the third preset value. For example, the first preset value may be 32767, the second preset value may be 0, and the third preset value may be 32767.
It should be noted that, the corresponding relation represented by the acoustic frequency mapping table is f0Corresponds to 0, f1Corresponds to 1, f2Corresponds to 2, f3Corresponds to 3, f4Corresponds to 4, f5Corresponds to 5, f6Corresponds to 6, f7Corresponds to 7, f8Corresponds to 8, f9Corresponding to 9, therefore, the frequency identifiers are sorted according to the numerical magnitude relationship, and the obtained sorting result is as follows: f. of0,f1,f2~f9
Illustratively, taking the second time instant as 10:23:59 as an example, the sound wave frequency corresponding to each number included in the second time instant is: the sound wave frequency corresponding to the number obtained by encoding the number 1 is (0, 32767, 0, 0, 0, 0, 0, 0, 0, 0) the sound wave frequency corresponding to the number obtained by encoding the number 0 is (32767, 0, 0, 0, 0, 0, 0 obtained by encoding the number 2 is (0, 0, 0, 0, 0, 0, 0, 5 the sound wave frequency corresponding to the number obtained by encoding the number 5 is (0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 the sound wave frequency corresponding to the number obtained by encoding the number 9 is (0, 0, 0, 0, 0, 0,0, 32767). Further, the sound frequency sequence corresponding to 10:23:59 is [ (0, 32767, 0, 0, 0, 0, 0), (0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0), (0, 0, 0, 0, 0, 0, 0, 32767) ].
It should be noted that the implementation process of converting the first time into the corresponding sound wave frequency sequence, the implementation process of converting the third time into the corresponding sound wave frequency sequence are similar to the process of converting the second time into the corresponding sound wave frequency sequence, and this embodiment is not described in detail here.
Correspondingly, taking the second time as 10:24:39 as an example, the process of the first device analyzing the corresponding sound wave frequency sequence is as follows (taking the first digit 1 of the second time as an example for explanation): when the sound wave frequency of (0, 32767, 0, 0, 0, 0, 0, 0, 0) is transmitted to the clock to be synchronized, the sound wave frequency received by the second device may have become (0, 2767, 0, 0, 0, 0, 0) due to attenuation of the signal, and at this time, the first device only needs to determine which frequency identifier corresponds to a numerical value larger than numerical values corresponding to other frequency identifiers, and determine the number corresponding to the frequency identifier corresponding to the largest numerical value as the first digit of the second time, that is, because 2767 and the frequency identifier f are 27671Corresponds to, and f1Corresponding to the number 1, it can be determined that the number corresponding to the frequency of the received sound wave at this time is 1.
If the absolute amplitude is adopted for detection, taking the second time as 10:24:39 as an example, when the second device sends the sound wave frequency of (0, 32767, 0, 0, 0, 0, 0, 0) to the first device, the sound wave frequency received by the first device may already become (0, 2767, 0, 0, 0, 0, 0, 0) due to attenuation of the signal, and the manner of determining the absolute amplitude is as follows: namely, the frequency identifier corresponding to the numerical value greater than 5000 in the sound wave frequency is determined, and the number corresponding to the frequency identifier is determined as the received number. If the set absolute amplitude is 5000, since 2767 after attenuation is smaller than the preset threshold 5000, it indicates that the number 1 is not detected, and the first device has sent a signal corresponding to the number 1, which results in a problem that accurate analysis cannot be performed.
It should be noted that the process of analyzing the first time in the first acoustic signal by the second device is similar to the process of analyzing the second time in the second acoustic signal by the first device, and this embodiment is not described herein again.
In addition, in order to prevent the environment noise frequency from matching with the preset frequency sequence included in the identification information, the time of arrival of the acoustic wave signal at each device is estimated erroneously. In a possible implementation manner, the first time, the second time and the third time may be further encoded by using a Cyclic Redundancy Check (CRC) encoding manner according to a frequency shift keying technique and a preset acoustic frequency mapping table, so as to obtain a corresponding acoustic frequency sequence in each time, thereby excluding a case where the ambient noise frequency matches the identification information. The cyclic redundancy check is a channel coding technique for generating a short fixed bit check code according to data such as a network data packet or a computer file, and is mainly used for detecting or checking errors which may occur after data transmission or storage. It uses the principle of division and remainder to detect the error.
Fig. 8 is a block diagram illustrating an inter-device distance determining apparatus according to an example embodiment. Referring to fig. 8, the inter-device distance determining apparatus 800 includes a sending module 801, a returning module 802, a first determining module 803, a parsing module 804, a calculating module 805, and a second determining module 806.
A transmission module 801 configured to transmit a first acoustic wave signal to a second device at a first timing recorded on the first device side;
a return module 802 configured to receive a second acoustic signal returned by the second device in response to the first acoustic signal; wherein the second acoustic signal carries time information, the time information including: a second time when the first acoustic signal is received and a third time when the second acoustic signal is sent by the second device;
a first determining module 803 configured to determine a fourth time recorded by the first device side when the second acoustic signal is received;
an analysis module 804 configured to analyze the second acoustic signal to obtain the second time and the third time;
a calculating module 805 configured to determine a sound wave signal transmission time between the first device and the second device according to the first time, the second time, the third time and the fourth time;
a second determining module 806 configured to determine a distance between the first device and the second device according to a transmission speed of the sound wave in the air and the sound wave signal transmission time.
Optionally, the second acoustic signal includes identification information, an acoustic frequency sequence corresponding to the second time, and an acoustic frequency sequence corresponding to the third time;
optionally, the second acoustic signal includes identification information, an acoustic frequency sequence corresponding to the second time, and an acoustic frequency sequence corresponding to the third time;
the first determining module 803 includes a first determining submodule configured to determine, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received.
Optionally, the second device decomposes the second acoustic signal into a plurality of subframe signals, and sequentially sends the plurality of subframe signals to the first device;
the first determining module 803 further includes:
a subframe signal receiving submodule configured to sequentially receive the plurality of subframe signals transmitted by the second device;
a second determining submodule configured to determine a time at which the identification information is received, according to a time at which a subframe signal containing the identification information is received.
Optionally, the identification information is a preset frequency sequence, and the first determining sub-module 803 is specifically configured to:
taking the continuous multi-frame subframe signals of the preset frequency sequence obtained by analysis as first target subframe signals, and determining the moment of receiving the last frame subframe signal in the first target subframe signals;
converting other subframe signals except the subframe signal of the last frame in the first target subframe signal into first time domain signals;
determining a first ratio of the number of sampling points corresponding to other frequencies except for the subsequence in the preset frequency sequence to a preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration, wherein the subsequence is a frequency of the preset frequency sequence obtained by analysis and included in the last frame of subframe signal;
and determining the sum of the time of receiving the subframe signal of the last frame in the first target subframe signal and the first detection duration as a fourth time recorded by the first device side when the second sound wave signal is received.
Optionally, the identification information is a preset frequency sequence, and the first determining sub-module 803 is specifically configured to:
determining a subframe signal of the complete preset frequency sequence obtained by analysis as a second target subframe signal, and determining the time when the second target subframe signal is received;
converting the second target-subframe signal into a second time-domain signal;
determining a second ratio of the number of sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration;
and determining the difference between the time of receiving the target subframe signal and the second detection time length as a fourth time recorded by the first equipment side when the second sound wave signal is received.
Optionally, the apparatus 800 further includes:
a control request receiving module configured to receive a control request input by a user for instructing control of a second device closest to the first device;
and the control module is configured to determine a target device closest to the first device according to the distance between the first device and each second device after determining the distance between the first device and the second device, and control the target device.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the inter-device distance determination method provided by the present disclosure.
Fig. 9 is a block diagram illustrating an inter-device distance determining apparatus according to an example embodiment. For example, the inter-device distance determining apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, or the like.
Referring to fig. 9, the inter-device distance determining apparatus 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, and a communications component 914.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the inter-device distance determination method described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support the operation of the inter-device distance determination apparatus 900. Examples of such data include instructions for any application or method operating on inter-device distance determination apparatus 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 906 provides power to the various components of the inter-device distance determination apparatus 900. Power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for inter-device distance determination apparatus 900.
The multimedia component 908 comprises a screen between the inter-device distance determining apparatus 900 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. When the inter-device distance determining apparatus 900 is in an operation mode, such as a photographing mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio assembly 910 includes a Microphone (MIC) and speaker for outputting acoustic signals. The microphone is configured to receive an external audio signal when the inter-device distance determining apparatus 900 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 914.
Input/output (I/O) interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The communication component 914 is configured to facilitate communication between the inter-device distance determining apparatus 900 and other devices in a wired or wireless manner. The inter-device distance determining apparatus 900 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 914 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 914 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the inter-device distance determining apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for performing the above-described inter-device distance determining method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. An inter-device distance determination method, applied to a first device, the method comprising:
at a first moment recorded by the first equipment side, sending a first sound wave signal to second equipment;
receiving a second acoustic signal returned by the second device in response to the first acoustic signal; wherein the second acoustic signal carries time information, the time information including: a second time when the first acoustic signal is received and a third time when the second acoustic signal is sent by the second device;
determining a fourth moment recorded by the first device side when the second acoustic signal is received;
analyzing the second acoustic signal to obtain the second time and the third time;
determining the transmission time of the sound wave signal between the first device and the second device according to the first time, the second time, the third time and the fourth time;
and determining the distance between the first equipment and the second equipment according to the transmission speed of the sound wave in the air and the transmission time of the sound wave signal.
2. The method of claim 1, wherein the second acoustic signal comprises identification information, a sequence of acoustic frequencies corresponding to the second time instance, and a sequence of acoustic frequencies corresponding to the third time instance;
the determining a fourth time recorded by the first device side when the second acoustic signal is received includes:
and determining a fourth time recorded by the first equipment side when the second sound wave signal is received according to the time when the identification information is received.
3. The method of claim 2, wherein the second device decomposes the second acoustic signal into a plurality of subframe signals and sequentially transmits the plurality of subframe signals to the first device;
the determining a fourth time recorded by the first device side when the second acoustic signal is received further includes:
sequentially receiving the plurality of subframe signals sent by the second equipment;
and determining the moment of receiving the identification information according to the moment of receiving the subframe signal containing the identification information.
4. The method according to claim 3, wherein the identification information is a preset frequency sequence, and accordingly, the determining, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received comprises:
taking the continuous multi-frame subframe signals of the preset frequency sequence obtained by analysis as first target subframe signals, and determining the moment of receiving the last frame subframe signal in the first target subframe signals;
converting other subframe signals except the subframe signal of the last frame in the first target subframe signal into first time domain signals;
determining a first ratio of the number of sampling points corresponding to other frequencies except for the subsequence in the preset frequency sequence to a preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration, wherein the subsequence is a frequency of the preset frequency sequence obtained by analysis and included in the last frame of subframe signal;
and determining the sum of the time of receiving the subframe signal of the last frame in the first target subframe signal and the first detection duration as a fourth time recorded by the first device side when the second sound wave signal is received.
5. The method according to claim 3, wherein the identification information is a preset frequency sequence, and accordingly, the determining, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received comprises:
determining a subframe signal of the complete preset frequency sequence obtained by analysis as a second target subframe signal, and determining the time when the second target subframe signal is received;
converting the second target-subframe signal into a second time-domain signal;
determining a second ratio of the number of sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration;
and determining the difference between the time of receiving the target subframe signal and the second detection time length as a fourth time recorded by the first equipment side when the second sound wave signal is received.
6. The method of claim 2, wherein the identification information comprises a device identification of the second device.
7. The method according to any one of claims 1-6, wherein prior to transmitting the first acoustic signal to the second device at the first time instance of the first device, the method further comprises:
receiving a control request input by a user and used for indicating to control a second device closest to the first device;
after the distance between the first device and the second devices is determined, according to the distance between the first device and each second device, the target device closest to the first device is determined, and the target device is controlled.
8. An inter-device distance determination apparatus, characterized by comprising:
a transmission module configured to transmit a first acoustic wave signal to a second device at a first timing recorded on a first device side;
a return module configured to receive a second acoustic signal returned by the second device in response to the first acoustic signal; wherein the second acoustic signal carries time information, the time information including: a second time when the first acoustic signal is received and a third time when the second acoustic signal is sent by the second device;
a first determining module configured to determine a fourth time recorded by the first device side when the second acoustic signal is received;
an analysis module configured to analyze the second acoustic signal to obtain the second time and the third time;
a computing module configured to determine a sound wave signal transmission time between the first device and the second device according to the first time, the second time, the third time and the fourth time;
a second determination module configured to determine a distance between the first device and the second device according to a transmission speed of the sound wave in the air and the sound wave signal transmission time.
9. The apparatus of claim 8, wherein the second acoustic signal comprises identification information, a sequence of acoustic frequencies corresponding to the second time instant, and a sequence of acoustic frequencies corresponding to the third time instant;
the first determining module comprises a first determining submodule configured to determine, according to the time when the identification information is received, a fourth time recorded by the first device side when the second acoustic signal is received.
10. The apparatus of claim 9, wherein the second device decomposes the second acoustic signal into a plurality of subframe signals and sequentially transmits the plurality of subframe signals to the first device;
the first determining module further comprises:
a subframe signal receiving submodule configured to sequentially receive the plurality of subframe signals transmitted by the second device;
a second determining submodule configured to determine a time at which the identification information is received, according to a time at which a subframe signal containing the identification information is received.
11. The apparatus of claim 10, wherein the identification information is a preset frequency sequence, and the first determining submodule is specifically configured to:
taking the continuous multi-frame subframe signals of the preset frequency sequence obtained by analysis as first target subframe signals, and determining the moment of receiving the last frame subframe signal in the first target subframe signals;
converting other subframe signals except the subframe signal of the last frame in the first target subframe signal into first time domain signals;
determining a first ratio of the number of sampling points corresponding to other frequencies except for the subsequence in the preset frequency sequence to a preset sampling frequency among the sampling points corresponding to the first time domain signal, and determining a negative number corresponding to the first ratio as a first detection duration, wherein the subsequence is a frequency of the preset frequency sequence obtained by analysis and included in the last frame of subframe signal;
and determining the sum of the time of receiving the subframe signal of the last frame in the first target subframe signal and the first detection duration as a fourth time recorded by the first device side when the second sound wave signal is received.
12. The apparatus of claim 10, wherein the identification information is a preset frequency sequence, and the first determining submodule is specifically configured to:
determining a subframe signal of the complete preset frequency sequence obtained by analysis as a second target subframe signal, and determining the time when the second target subframe signal is received;
converting the second target-subframe signal into a second time-domain signal;
determining a second ratio of the number of sampling points corresponding to the background noise before the preset frequency sequence to the preset sampling frequency among the sampling points corresponding to the second time domain signal, and taking the second ratio as a second detection duration;
and determining the difference between the time of receiving the target subframe signal and the second detection time length as a fourth time recorded by the first equipment side when the second sound wave signal is received.
13. The apparatus of any of claims 8-12, the apparatus further comprising:
a control request receiving module configured to receive a control request input by a user for instructing control of a second device closest to the first device;
and the control module is configured to determine a target device closest to the first device according to the distance between the first device and each second device after determining the distance between the first device and the second device, and control the target device.
14. An inter-device distance determination apparatus, characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of the method according to any one of claims 1-7.
15. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 7.
CN202011044619.4A 2020-09-28 2020-09-28 Method, device and storage medium for determining distance between devices Active CN112180378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011044619.4A CN112180378B (en) 2020-09-28 2020-09-28 Method, device and storage medium for determining distance between devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011044619.4A CN112180378B (en) 2020-09-28 2020-09-28 Method, device and storage medium for determining distance between devices

Publications (2)

Publication Number Publication Date
CN112180378A true CN112180378A (en) 2021-01-05
CN112180378B CN112180378B (en) 2024-04-02

Family

ID=73946451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011044619.4A Active CN112180378B (en) 2020-09-28 2020-09-28 Method, device and storage medium for determining distance between devices

Country Status (1)

Country Link
CN (1) CN112180378B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055817A (en) * 2021-03-31 2021-06-29 苏州触达信息技术有限公司 Positioning method of wearable device, wearable device and storage medium
CN113055870A (en) * 2021-03-31 2021-06-29 苏州触达信息技术有限公司 Positioning method of wearable device, host device and computer-readable storage medium
CN113075618A (en) * 2021-03-31 2021-07-06 苏州触达信息技术有限公司 Intelligent device positioning method, device and system, intelligent device and storage medium
CN113075619A (en) * 2021-03-31 2021-07-06 苏州触达信息技术有限公司 Intelligent device positioning method and device, intelligent device and storage medium
CN113679379A (en) * 2021-07-14 2021-11-23 深圳大学 Human body posture estimation method, device, equipment, system and medium based on sound waves
CN114286254A (en) * 2021-12-02 2022-04-05 立讯电子科技(昆山)有限公司 Wireless earphone, mobile phone and sound wave distance measuring method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090149202A1 (en) * 2007-12-07 2009-06-11 Christian Steele System and method for determination of position
CN102103200A (en) * 2010-11-29 2011-06-22 清华大学 Acoustic source spatial positioning method for distributed asynchronous acoustic sensor
US20130301391A1 (en) * 2010-11-16 2013-11-14 Qualcomm Incorporated System and method for object position estimation based on ultrasonic reflected signals
US20140286133A1 (en) * 2013-03-15 2014-09-25 Device-To-Device Angel Detection With Ultrasound And Wireless Signal Device-to-device angle detection with ultrasound and wireless signal
CN104459624A (en) * 2014-11-13 2015-03-25 南昌大学 Ultrasonic indoor positioning method based on time modulation
CN108169752A (en) * 2016-12-07 2018-06-15 北京万集科技股份有限公司 A kind of ultrasonic ranging method and system based on wireless communication
CN109031315A (en) * 2018-06-26 2018-12-18 北京小米移动软件有限公司 Distance measurement method, device, equipment and storage medium
CN110045379A (en) * 2019-04-11 2019-07-23 华为技术有限公司 Distance measurement method, related equipment and system
CN111257834A (en) * 2020-02-28 2020-06-09 广东美的厨房电器制造有限公司 Sound wave receiving device, sound wave transmitting device and sound wave positioning system
WO2020146898A1 (en) * 2019-01-11 2020-07-16 Texas Instruments Incorporated Coded ultrasonic sensing with staggered bursts
CN111624609A (en) * 2020-06-05 2020-09-04 南京英锐创电子科技有限公司 Ultrasonic ranging method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090149202A1 (en) * 2007-12-07 2009-06-11 Christian Steele System and method for determination of position
US20130301391A1 (en) * 2010-11-16 2013-11-14 Qualcomm Incorporated System and method for object position estimation based on ultrasonic reflected signals
CN102103200A (en) * 2010-11-29 2011-06-22 清华大学 Acoustic source spatial positioning method for distributed asynchronous acoustic sensor
US20140286133A1 (en) * 2013-03-15 2014-09-25 Device-To-Device Angel Detection With Ultrasound And Wireless Signal Device-to-device angle detection with ultrasound and wireless signal
CN104459624A (en) * 2014-11-13 2015-03-25 南昌大学 Ultrasonic indoor positioning method based on time modulation
CN108169752A (en) * 2016-12-07 2018-06-15 北京万集科技股份有限公司 A kind of ultrasonic ranging method and system based on wireless communication
CN109031315A (en) * 2018-06-26 2018-12-18 北京小米移动软件有限公司 Distance measurement method, device, equipment and storage medium
WO2020146898A1 (en) * 2019-01-11 2020-07-16 Texas Instruments Incorporated Coded ultrasonic sensing with staggered bursts
CN110045379A (en) * 2019-04-11 2019-07-23 华为技术有限公司 Distance measurement method, related equipment and system
CN111257834A (en) * 2020-02-28 2020-06-09 广东美的厨房电器制造有限公司 Sound wave receiving device, sound wave transmitting device and sound wave positioning system
CN111624609A (en) * 2020-06-05 2020-09-04 南京英锐创电子科技有限公司 Ultrasonic ranging method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHUZHEN ZHANG ET AL.: "A distributed self-localization algorithm for wireless sensor networks", 2010 2ND INTERNATIONAL CONFERENCE ON COMPUTER ENGINEERING AND TECHNOLOGY (ICCET), 17 June 2010 (2010-06-17) *
贾瑞武;石庚辰;: "伪回声测距", 中国科学技术大学学报, no. 11, 30 November 2010 (2010-11-30) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055817A (en) * 2021-03-31 2021-06-29 苏州触达信息技术有限公司 Positioning method of wearable device, wearable device and storage medium
CN113055870A (en) * 2021-03-31 2021-06-29 苏州触达信息技术有限公司 Positioning method of wearable device, host device and computer-readable storage medium
CN113075618A (en) * 2021-03-31 2021-07-06 苏州触达信息技术有限公司 Intelligent device positioning method, device and system, intelligent device and storage medium
CN113075619A (en) * 2021-03-31 2021-07-06 苏州触达信息技术有限公司 Intelligent device positioning method and device, intelligent device and storage medium
CN113679379A (en) * 2021-07-14 2021-11-23 深圳大学 Human body posture estimation method, device, equipment, system and medium based on sound waves
CN114286254A (en) * 2021-12-02 2022-04-05 立讯电子科技(昆山)有限公司 Wireless earphone, mobile phone and sound wave distance measuring method
CN114286254B (en) * 2021-12-02 2023-11-24 立讯电子科技(昆山)有限公司 Wireless earphone, mobile phone and sound wave distance measuring method

Also Published As

Publication number Publication date
CN112180378B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN112180378B (en) Method, device and storage medium for determining distance between devices
US10205817B2 (en) Method, device and storage medium for controlling screen state
CN110827253A (en) Training method and device of target detection model and electronic equipment
US11337173B2 (en) Method and device for selecting from a plurality of beams
WO2021031308A1 (en) Audio processing method and device, and storage medium
US10877512B2 (en) Audio data transmission method and apparatus
CN104918325A (en) Positioning guide and parking guide methods and device
CN112130616B (en) Clock synchronization method, device and storage medium
KR101874354B1 (en) Method, device, program and recording medium for processing information
CN110634488B (en) Information processing method, device and system and storage medium
CN111007462A (en) Positioning method, positioning device, positioning equipment and electronic equipment
CN106253996B (en) Sensitivity attenuation test method and device
CN105100197A (en) Method and device for installing application
CN111696553A (en) Voice processing method and device and readable medium
CN112489653B (en) Speech recognition method, device and storage medium
CN111294704B (en) Audio processing method, device and storage medium
CN111125388B (en) Method, device and equipment for detecting multimedia resources and storage medium
CN112904324A (en) Distance measuring method and device, terminal and storage medium
US11297626B2 (en) Information indication method and apparatus, base station and user equipment
CN105391620A (en) Information prompt method and device
CN105515944A (en) Message sending method and device
CN113660513A (en) Method, device and storage medium for synchronizing playing time
CN112965639A (en) Gesture recognition method and device, electronic equipment and storage medium
CN105163155A (en) Method and device for synchronous playing
US20230045608A1 (en) Method and device for measuring distance, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant