CN106093950B - Mobile terminal positioning device and method - Google Patents

Mobile terminal positioning device and method Download PDF

Info

Publication number
CN106093950B
CN106093950B CN201610388272.2A CN201610388272A CN106093950B CN 106093950 B CN106093950 B CN 106093950B CN 201610388272 A CN201610388272 A CN 201610388272A CN 106093950 B CN106093950 B CN 106093950B
Authority
CN
China
Prior art keywords
mobile terminal
frequency
sound signal
positioning
loudspeaker
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.)
Active
Application number
CN201610388272.2A
Other languages
Chinese (zh)
Other versions
CN106093950A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610388272.2A priority Critical patent/CN106093950B/en
Publication of CN106093950A publication Critical patent/CN106093950A/en
Application granted granted Critical
Publication of CN106093950B publication Critical patent/CN106093950B/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/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

Abstract

The invention discloses a mobile terminal positioning device, which comprises a receiving module, a processing module and a control module, wherein the receiving module is used for receiving a sound signal sent by a preset loudspeaker; the positioning module is used for positioning the mobile terminal according to the frequency of the received sound signal; or positioning the mobile terminal according to the received characteristic parameters of the sound signals. The invention also discloses a mobile terminal positioning method. According to the invention, the mobile terminal is positioned according to the frequency or the characteristic parameters of the received sound signals, so that the positioning precision of the mobile terminal is effectively improved.

Description

Mobile terminal positioning device and method
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a mobile terminal positioning device and a mobile terminal positioning method.
Background
At present, many occasions need to fix a position intelligent terminal. For example, when controlling a television set using a conventional remote controller, a control instruction is generally input based on a button on the remote controller. With the more and more comprehensive functions of the television, the pictures displayed on the screen of the television are more and more abundant, and the traditional remote controller has lower operating efficiency and can not meet the requirements of users. In order to improve the operating efficiency of the remote controller, in the prior art, the television is controlled by using the function of the intelligent terminal instead of a mouse, a user controls the intelligent terminal to move in the air, and the cursor on the television is controlled to move by positioning the intelligent terminal, so that the television is controlled. Or when the user places the intelligent terminal at a certain position beside a bed, the intelligent terminal is positioned, so that the mute mode of the intelligent terminal is automatically controlled to be turned on, and the sleep quality of the user is ensured; when a user places the intelligent terminal at a certain position of a study, the intelligent terminal is positioned, so that the music application of the intelligent terminal is controlled to be automatically started; when a user places the intelligent terminal at a certain position in a living room, the intelligent terminal is positioned, so that an alarm clock or a memorandum of the intelligent terminal is controlled to be automatically started, and the user is reminded of paying attention to food cooked in a kitchen.
In the prior art, when an intelligent terminal is positioned, technologies such as WIFI, FM and geomagnetism are generally used, but the positioning accuracy is poor; or, an acceleration sensor is generally arranged in the intelligent terminal, and the movement displacement of the intelligent terminal is calculated by testing the acceleration, and the positioning is completed, but the positioning accuracy is also poor.
Disclosure of Invention
The invention mainly aims to provide a mobile terminal positioning device and a mobile terminal positioning method, and aims to solve the technical problem of poor positioning accuracy of a mobile terminal.
The mobile terminal positioning device provided by the invention comprises:
the receiving module is used for receiving a preset sound signal emitted by a loudspeaker;
the positioning module is used for positioning the mobile terminal according to the frequency of the received sound signal; or, the method is used for positioning the mobile terminal according to the received characteristic parameters of the sound signals.
Optionally, the receiving module is further configured to receive a sound signal emitted by at least one speaker of the fixed terminal, where when there are at least two speakers, sound emission frequencies of the speakers are different;
the positioning module includes:
the determining unit is used for determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the loudspeaker;
and the first positioning unit is used for calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal.
Optionally, the first positioning unit includes:
a calculating subunit, configured to calculate a moving speed of the mobile terminal relative to the speaker according to the frequency offset value;
the calculation subunit is further configured to calculate a movement displacement of the mobile terminal relative to the speaker within a current sampling time interval according to the movement speed;
the determining subunit is configured to determine an initial position corresponding to the current sampling time interval of the mobile terminal, determine an end position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement, and determine a spatial mobile displacement of the mobile terminal according to the initial position and the end position;
wherein the sampling time interval is a time interval for collecting the sound signal.
Optionally, the number of the speakers is at least two, and the determining subunit is further configured to determine an actual distance of the mobile terminal relative to the speakers according to the initial position and the movement displacement; the system is also used for determining the intersection point position between spherical surfaces which take the position of the loudspeaker as the spherical center and take the actual distance corresponding to the loudspeaker as the spherical radius; and the intersection point position is also used as the termination position of the mobile terminal.
Optionally, the preset speaker is a speaker of the mobile terminal, and the positioning module includes:
the extracting unit is used for extracting the characteristic parameters of the received sound signals;
and the second positioning unit is used for determining the position corresponding to the extracted characteristic parameter according to the corresponding relation between the preset characteristic parameter and the position so as to position the mobile terminal.
In addition, the mobile terminal positioning method further provided by the invention comprises the following steps:
the mobile terminal receives a sound signal sent by a preset loudspeaker;
positioning the mobile terminal according to the frequency of the received sound signal; or positioning the mobile terminal according to the received characteristic parameters of the sound signals.
Optionally, the step of receiving, by the mobile terminal, the sound signal emitted by the preset speaker includes: the method comprises the steps that the mobile terminal receives sound signals sent by at least one loudspeaker of the fixed terminal, and when the number of the loudspeakers is at least two, the sound emission frequencies of the loudspeakers are different;
the step of locating the mobile terminal according to the frequency of the received sound signal comprises: determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the loudspeaker; and calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal.
Optionally, the step of calculating the spatial movement displacement of the mobile terminal according to the frequency offset value includes:
calculating the moving speed of the mobile terminal relative to the loudspeaker according to the frequency offset value;
calculating the movement displacement of the mobile terminal relative to the loudspeaker in the current sampling time interval according to the movement speed;
determining an initial position corresponding to the current sampling time interval of the mobile terminal;
determining the ending position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement;
determining the space movement displacement of the mobile terminal according to the initial position and the end position;
wherein the sampling time interval is a time interval for collecting the sound signal.
Optionally, the number of the speakers is at least two, and the step of determining the termination position of the mobile terminal according to the initial position and the movement displacement includes:
determining the actual distance of the mobile terminal relative to the loudspeaker according to the initial position and the movement displacement;
determining the intersection point position between spherical surfaces which take the position of the loudspeaker as the spherical center and take the actual distance corresponding to the loudspeaker as the spherical radius;
and selecting the intersection point position as the termination position of the mobile terminal.
Optionally, the preset speaker is a speaker of the mobile terminal, and the step of positioning the mobile terminal according to the received characteristic parameter of the sound signal includes: and extracting the characteristic parameters of the received sound signals, and determining the positions corresponding to the extracted characteristic parameters according to the corresponding relation between the preset characteristic parameters and the positions so as to position the mobile terminal.
According to the mobile terminal positioning device and method provided by the invention, the sound signal emitted by the preset loudspeaker is received, and the mobile terminal is positioned according to the frequency or characteristic parameter of the received sound signal, so that the positioning precision of the mobile terminal is effectively improved.
Drawings
FIG. 1 is a system architecture diagram according to various embodiments of the present invention;
fig. 2 is a schematic diagram of a hardware structure of a mobile terminal according to various embodiments of the present invention;
FIG. 3 is a block diagram of a positioning apparatus of a mobile terminal according to a first embodiment of the present invention;
FIG. 4 is a block diagram of a positioning module in a second embodiment of a mobile terminal positioning apparatus according to the present invention;
FIG. 5 is a block diagram of a first positioning unit in a third embodiment of the positioning apparatus for a mobile terminal according to the present invention;
FIG. 6 is a schematic view of a scene of interaction between a mobile terminal and a fixed terminal according to the present invention;
FIG. 7 is a block diagram of a positioning module in a fourth embodiment of a positioning apparatus for a mobile terminal according to the present invention;
fig. 8 is a flowchart illustrating a mobile terminal positioning method according to a first embodiment of the present invention;
fig. 9 is a flowchart illustrating a mobile terminal positioning method according to a second embodiment of the present invention;
fig. 10 is a schematic flow chart illustrating a step of calculating spatial movement displacement according to a third embodiment of the mobile terminal positioning method of the present invention;
fig. 11 is a flowchart illustrating a mobile terminal positioning method according to a fourth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
Specifically, as shown in fig. 1, the system architecture according to the present embodiment includes a mobile terminal and a fixed terminal. The mobile terminal may be implemented in various forms. For example, the mobile terminal described in the present invention may include devices such as a remote controller, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like. The following embodiments are described by taking a mobile terminal as an example of a smart phone. The fixed terminal can be a television, a computer all-in-one machine, a display and the like. The following embodiments are described by taking a fixed terminal as a television as an example.
As an implementation scheme, the hardware structure of the mobile terminal may be as shown in fig. 2.
Referring to fig. 2, the mobile terminal may include an audio receiving unit 110, a user input unit 120, a memory 130, a processor 140, and a communication bus 150, etc. Fig. 2 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. The respective components of the mobile terminal will be described in detail below.
The audio receiving unit 110 may be, for example, a microphone, and receives a sound signal output by another fixed terminal through the microphone.
The user input unit 120 may receive an instruction input by a user, for example, may receive a fixed terminal control command input by the user to turn on, thereby causing the mobile terminal to enter a fixed terminal control mode.
The memory 130 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 130 may alternatively be a storage device separate from the processor 140. Memory 130, which is a type of computer storage medium, may have stored therein a mobile terminal location program.
Processor 140 may invoke a mobile terminal location program stored in memory 130 and perform the following operations:
receiving a sound signal emitted by a preset loudspeaker;
positioning the mobile terminal according to the frequency of the received sound signal; or positioning the mobile terminal according to the received characteristic parameters of the sound signals.
Processor 140 may also invoke a mobile terminal location program stored in memory 130 and perform the following operations:
the method comprises the steps that the mobile terminal receives sound signals sent by at least one loudspeaker of the fixed terminal, and when the number of the loudspeakers is at least two, the sound emission frequencies of the loudspeakers are different;
determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the loudspeaker; and calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal.
Processor 140 may also invoke a mobile terminal location program stored in memory 130 and perform the following operations:
calculating the moving speed of the mobile terminal relative to the loudspeaker according to the frequency offset value;
calculating the movement displacement of the mobile terminal relative to the loudspeaker in the current sampling time interval according to the movement speed;
determining an initial position corresponding to the current sampling time interval of the mobile terminal;
determining the ending position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement;
determining the space movement displacement of the mobile terminal according to the initial position and the end position;
wherein the sampling time interval is a time interval for collecting the sound signal.
Processor 140 may also invoke a mobile terminal location program stored in memory 130 and perform the following operations:
determining the actual distance of the mobile terminal relative to the loudspeaker according to the initial position and the movement displacement;
determining the intersection point position between spherical surfaces which take the position of the loudspeaker as the spherical center and take the actual distance corresponding to the loudspeaker as the spherical radius;
and selecting the intersection point position as the termination position of the mobile terminal.
Processor 140 may also invoke a mobile terminal location program stored in memory 130 and perform the following operations:
and extracting the characteristic parameters of the received sound signals, and determining the positions corresponding to the extracted characteristic parameters according to the corresponding relation between the preset characteristic parameters and the positions so as to position the mobile terminal.
Based on the system architecture and the hardware architecture, various embodiments of the mobile terminal positioning device of the invention are provided. The mobile terminal positioning device can be realized based on the mobile terminal.
Referring to fig. 3, fig. 3 is a block diagram of a positioning apparatus of a mobile terminal according to a first embodiment of the present invention. It is emphasized that the functional block diagram of fig. 3 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art can easily add new functional blocks around the functional block of the mobile terminal positioning apparatus shown in fig. 3; the names of the functional modules are self-defined names which are only used for assisting in understanding the program functional blocks of the mobile terminal and are not used for limiting the technical scheme of the invention, and the core of the technical scheme of the invention is the functions which are to be achieved by the functional modules with the respective defined names.
This embodiment proposes a mobile terminal positioning device, the mobile terminal positioning device includes:
a receiving module 210, configured to receive a sound signal emitted by a preset speaker;
a positioning module 220, configured to position the mobile terminal according to the frequency of the received sound signal; or positioning the mobile terminal according to the received characteristic parameters of the sound signals.
In this embodiment, the preset speaker may be a speaker on a fixed terminal other than the mobile terminal, the speaker emits a sound signal with a preset frequency, when the mobile terminal moves, according to a doppler effect of sound, the frequency of the sound signal received by the mobile terminal changes, that is, a certain offset exists between the frequency of the sound signal received by the mobile terminal and the frequency of the sound signal emitted by the speaker, and the mobile terminal can be located according to the frequency offset value.
Or, the preset speaker may also be a speaker of the mobile terminal itself, after the speaker emits the sound signal, the sound signal may be reflected to the mobile terminal through an indoor wall, an object, and the like, and after the mobile terminal receives the reflected sound signal, the mobile terminal may perform feature extraction on the sound signal to obtain the sound feature. And then determining the position of the mobile terminal according to the corresponding relation between the preset sound characteristics and the position. In addition, the mobile terminal needs to store the correspondence between the sound characteristics and the location in advance. The mobile terminal can be respectively arranged at a plurality of preset positions, sound signals are respectively emitted at each preset position through a loudspeaker of the mobile terminal, reflected sound signals are received through a microphone, sound characteristics are extracted, and the corresponding relation between the sound characteristics and the positions is established.
According to the mobile terminal positioning device provided by the invention, the mobile terminal receives the sound signal emitted by the preset loudspeaker, and the mobile terminal is positioned according to the frequency or the characteristic parameter of the received sound signal, so that the positioning precision of the mobile terminal is effectively improved.
Further, in order to further improve the positioning accuracy, reduce the control error and improve the operation convenience, based on the first embodiment of the mobile terminal positioning device of the present invention, the present invention further provides a second embodiment of the mobile terminal positioning device, referring to fig. 4, fig. 4 is a schematic block diagram of a positioning module in the second embodiment of the mobile terminal positioning device of the present invention, different from the first embodiment of the mobile terminal positioning device, the receiving module 210 is further configured to receive a sound signal emitted by at least one speaker of the fixed terminal, and when there are at least two speakers, sound emission frequencies of the speakers are different;
in this embodiment, the number of speakers of the fixed terminal can be set according to actual needs. Alternatively, the fixed terminals may be provided in two or three. When the number of the loudspeakers is three, the mobile terminal can perform three-dimensional positioning, a user can freely move the mobile terminal in a three-dimensional space, and the mobile terminal or the fixed terminal determines the moving track according to the positioning result and controls the fixed terminal according to the moving track.
When the number of the loudspeakers is two, the mobile terminal can perform two-dimensional plane positioning, a user can move the mobile terminal in the two-dimensional plane, the mobile terminal or the fixed terminal determines the moving track of the mobile terminal in the two-dimensional plane according to the two-dimensional plane positioning result, and then the fixed terminal is controlled according to the moving track.
In order to prevent the sound signals emitted from the speakers for localization from affecting the user, since the hearing range of people is 2Hz to 20KHz, the sound emission frequency of the sound signals emitted from the respective speakers may be about 20Hz or more than 20 KHz. When the mobile terminal receives the sound signal, in order to prevent the received sound signal from being distorted, the sampling frequency of the mobile terminal when receiving the sound signal should be more than 2 times of the frequency of the sound signal according to the nyquist theorem. While the sound sampling frequency of a general mobile terminal is 44KHz and a sound signal in the range of 17HHz to 20KHz is hardly audible, so that the sound emission frequency can be set to 17KHz to 20 KHz. The sound emission frequencies of the speakers are different, for example, the embodiment is described by taking the fixed terminal as an example where two speakers are provided, wherein the sound emission frequency of one speaker may be set to 19KHz, and the sound emission frequency of the other speaker may be set to 20 KHz. The sound emission frequencies of the speakers should have a certain interval, so that the sound signals received by the mobile terminal are not affected each other, and the source of the sound signal can be determined directly according to the frequency of the sound signal.
In this embodiment, a control or a key for starting the fixed terminal control may be set in the mobile terminal, and when the user triggers the control or the key, the user may regard that a fixed terminal starting control instruction is received, so that the mobile terminal enters a fixed terminal control mode. After the mobile terminal enters the fixed terminal control mode, the user can control the fixed terminal by controlling the mobile terminal to move. Similarly, a control or a key for closing the control of the fixed terminal can be further arranged on the mobile terminal, and when the user triggers the control or the key, the user can be regarded as receiving a control instruction for closing the fixed terminal, so that the mobile terminal exits from the fixed terminal control mode.
The positioning module 220 includes:
a determining unit 221, configured to determine a frequency offset value of the sound signal according to the frequency of the received sound signal and a sound emission frequency corresponding to the speaker;
it is understood that, when there are at least two speakers, the determining unit 221 is configured to determine a frequency offset value of each of the sound signals according to the frequency of the received sound signal and the sound emission frequency corresponding to each of the speakers.
In this embodiment, according to the doppler effect of the sound signal, when the user controls the mobile terminal to move towards or away from the sound source, the frequency of the sound signal received by the mobile terminal may change, that is, the frequency of the sound signal received by the mobile terminal is different from the sound emission frequency of the sound source. The loudspeaker of the fixed terminal is static, and when the user controls the mobile terminal to move towards the loudspeaker, the frequency of the sound signal received by the mobile terminal is increased; when the user controls the mobile terminal to move away from the speaker, the frequency of the sound signal received by the mobile terminal is reduced.
The mobile terminal can perform short-time Fourier transform on a sound signal obtained by sampling based on a 44KHz sampling frequency, then perform windowing processing on the signal, and then perform Fourier transform on the windowed signal to obtain a local spectrogram. For example, the output length may be set to 44100 and 1764 samples (the number of samples in 40 ms) may be used, and the frequency offset value corresponding to the speaker may be obtained by subtracting the sound emission frequency of the speaker from the peak frequency of the spectrogram. Since the speed at which a user holds a mobile terminal is typically no more than 1m/s, the maximum frequency offset is 50Hz, and the complexity of detecting frequency peaks depends on the width of the scanned spectrum, which is set to 80Hz herein.
It is understood that when there are a plurality of speakers, the speaker which emits the sound signal may be determined from the received sound signal because the sound emission frequencies of different speakers are different. After receiving the sound signals, the received sound signals are filtered to respectively obtain the sound signals corresponding to the speakers, and then the sound signals corresponding to the speakers are respectively processed to obtain the frequency deviation values corresponding to the speakers.
A first positioning unit 222, configured to calculate a spatial movement displacement of the mobile terminal according to the frequency offset value, so as to position the mobile terminal.
In this embodiment, after the mobile terminal is located, a control instruction may be generated according to a location result, and the television and other terminals may be controlled.
It is understood that the control module 230 is configured to generate control commands to control the fixed terminal according to each of the frequency offset values when there are at least two speakers.
In this embodiment, the control instruction corresponding to the obtained frequency offset value may be determined according to a corresponding relationship between a preset frequency offset value and the control instruction, so as to control the fixed terminal. The corresponding relationship may be a corresponding relationship between the frequency offset value interval and the control command. For example, when there is one speaker, a frequency offset value can be obtained. The frequency offset value interval corresponding to the frequency offset value can be determined first, and then the control instruction corresponding to the frequency offset value interval is determined according to the corresponding relation. When the number of the loudspeakers is multiple, each loudspeaker can be correspondingly provided with a corresponding relation, and each corresponding relation corresponds to different control instructions, so that multiple kinds of control can be performed. In order to improve the operation convenience, each corresponding relation can correspond to two control instructions, and when the frequency deviation value is larger than zero, one control instruction corresponds to; and when the frequency offset value is less than zero, corresponding to another control command. Therefore, when the user operates, the user only needs to move towards the loudspeaker or move away from the loudspeaker to input two control instructions to the fixed terminal. When the plurality of speakers are used, the user can firstly designate the speaker corresponding to the current control based on the mobile terminal, and switch between different speakers so as to prevent interference generated when the speaker is controlled based on different speakers.
In addition, when the number of the loudspeakers is at least two, the mobile terminal can be positioned according to each frequency offset value, so that the moving track of the mobile terminal is obtained, and the fixed terminal is controlled according to the moving track.
According to the mobile terminal positioning device provided by the embodiment, the frequency offset value of the sound signal received when the mobile terminal moves is calculated according to the Doppler effect of sound, and then the mobile terminal is positioned according to the frequency offset value, so that the positioning precision is high, the control error of the fixed terminal is small, and the precision is high. In addition, the user can directly realize the control of the fixed terminal by controlling the mobile terminal to move in the air, the control position is not limited, and the convenience of controlling the fixed terminal through the mobile terminal is improved.
Further, in order to further reduce the control error and improve the operation convenience, based on the second embodiment of the mobile terminal positioning apparatus of the present invention, the present invention further provides a third embodiment of the mobile terminal positioning apparatus, referring to fig. 5, fig. 5 is a schematic block diagram of a first positioning unit in the third embodiment of the mobile terminal positioning apparatus of the present invention, and different from the second embodiment of the mobile terminal, the first positioning unit 222 includes:
a calculating subunit 2221 configured to calculate a moving speed of the mobile terminal with respect to the speaker according to the frequency offset value;
it is to be understood that, when there are at least two speakers, the calculating subunit 2221 is configured to calculate the moving speed of the mobile terminal relative to each of the speakers according to each of the frequency offset values;
let F denote the sound emission frequency of the loudspeaker,Fαrepresenting the frequency offset value, v representing the moving speed of the mobile terminal relative to the speaker, c representing the propagation speed of sound, the moving speed of the speaker is:
Figure BDA0001007152320000111
the calculating subunit 2221 is further configured to calculate a movement displacement of the mobile terminal relative to the speaker in the current sampling time interval according to the movement speed; wherein the sampling time interval is a time interval for collecting the sound signal;
it is to be understood that, when there are at least two speakers, the calculating subunit 2221 is further configured to calculate the movement displacement of the mobile terminal relative to each of the speakers in the current sampling time interval according to each of the movement speeds;
in this embodiment, the sampling time interval may be a time interval at which the mobile terminal samples the sound signal when receiving the sound signal. But also several consecutive said time intervals. And calculating the movement displacement of the mobile terminal once every sampling time interval. In the embodiment, the sampling time interval is 40ms, and the movement displacement of the terminal is updated every 40 ms. Assume a sampling interval of time tsRepresenting, the displacement of the movement within the sampling time interval by dsIndicating that the frequency offset within the sampling time interval is in FsThat means, the displacement of the movement within the sampling time interval is:
Figure BDA0001007152320000112
determining a subunit 2222, configured to locate the mobile terminal according to the movement displacement;
it is to be understood that, when there are at least two speakers, the determining subunit 2222 is configured to position the mobile terminal according to each of the movement displacements.
In this embodiment, the control instruction corresponding to the obtained movement displacement may be determined according to a preset correspondence between the movement displacement and the control instruction, so as to control the fixed terminal. The corresponding relationship may be a corresponding relationship between the movement displacement interval and the control command. For example, in the case of one loudspeaker, one displacement may be obtained. The moving displacement interval corresponding to the moving displacement may be determined first, and then the control instruction corresponding to the moving displacement interval may be determined according to the corresponding relationship. When the number of the loudspeakers is multiple, each loudspeaker can be correspondingly provided with a corresponding relation, and each corresponding relation corresponds to different control instructions, so that multiple kinds of control can be performed. In order to improve the operation convenience, each corresponding relation can correspond to two control instructions, and when the movement displacement is larger than zero, one control instruction corresponds to; and when the movement displacement is less than zero, the control device corresponds to another control instruction. Therefore, when the user operates, the user only needs to move towards the loudspeaker or move away from the loudspeaker to input two control instructions to the fixed terminal. When the plurality of speakers are used, the user can firstly designate the speaker corresponding to the current control based on the mobile terminal, and switch between different speakers so as to prevent interference generated when the speaker is controlled based on different speakers.
In addition, when the number of the loudspeakers is at least two, the mobile terminal can be positioned according to each movement displacement, so that the movement track of the mobile terminal is obtained, and the fixed terminal is controlled according to the movement track.
In the embodiment, the control instruction is determined according to the movement displacement by further calculating the movement displacement of the mobile terminal, so that the operation of a user is more convenient, the control error is effectively reduced, and the operation convenience is improved.
Optionally, the determining subunit 2222 is further configured to determine an initial position corresponding to the current sampling time interval of the mobile terminal, determine an end position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement, and determine the spatial mobile displacement of the mobile terminal according to the initial position and the end position.
In this embodiment, when the mobile terminal performs the first sampling, the initial position corresponding to the first sampling time interval may be a position obtained by the mobile terminal through WIFI positioning, or a position input by a user, or a position obtained by other means. The position is the position of the mobile terminal relative to the speaker of the stationary terminal. And when the current adoption of the mobile terminal is not the first adoption, the initial position corresponding to the current adoption time interval is the final position corresponding to the last sampling time interval.
In this embodiment, taking the example of two speakers, a two-dimensional coordinate system can be established with a horizontal plane as a coordinate plane. A connection line between the two speakers may be set as an x-axis, and as shown in fig. 6, assuming that a distance between the two speakers is d, coordinates of the left speaker is (0,0), coordinates of the right speaker is (0, d), and an initial position of the mobile terminal is (x)0,y0) And determining the termination position of the mobile terminal according to the movement displacement and the initial position. The termination location may also be in the form of coordinates. Furthermore, the spatial movement displacement of the mobile terminal can be obtained according to the initial position and the termination position. The space movement displacement comprises a movement direction and a movement distance, so that the movement track of the mobile terminal can be obtained, and a control instruction is generated according to the movement track to control the fixed terminal. For example, when the user moves up or down, the cursor of the fixed terminal can be controlled to move up or down, or the program of the fixed terminal is controlled to jump up or down, or the volume of the fixed terminal is controlled to be increased or decreased; when the user moves to the left or right, the cursor of the fixed terminal may be controlled to move to the left or right, and so on.
Optionally, the number of the speakers is at least two, and the following method may be adopted to determine the termination position of the mobile terminal according to the initial position and each of the movement displacements: the determining subunit 2222 is further configured to determine an actual distance of the mobile terminal with respect to each of the speakers according to the initial position and each of the movement displacements; the system is also used for determining the intersection point position between spherical surfaces which take the position of each loudspeaker as the center of sphere and take the actual distance corresponding to each loudspeaker as the radius of the sphere; and the intersection point position is also used as the termination position of the mobile terminal. When the mobile terminal is at the initial position, falseSetting the distances from the mobile terminal to the two loudspeakers as d0,1、d0,2If the mobile terminal is located at the end position after a sampling time interval, it is assumed that the distances between the mobile terminal and the two speakers are d1,1、d1,2And then:
Figure BDA0001007152320000131
Figure BDA0001007152320000132
wherein, FkWhich is indicative of the frequency of the sound signal,
Figure BDA0001007152320000133
indicating the doppler frequency offset value of the mobile terminal at the ith sampling time interval.
Respectively using (0,0) and (d,0) as centre of circle, d1,1And d1,2For a radius of a sphere, the intersection of two spheres can be calculated as follows:
Figure BDA0001007152320000134
(x,y)=(d1,1cos(θ1),d1,1sin(θ1))
(x*,y*)=(d1,1cos(-θ1),d1,1sin(-θ1))
when d is1,1+d1,2>d, there are two intersections. At this time, the distance (x) may be selected0,y0) One of the closer intersections serves as a termination point.
Optionally, the determining subunit 2222 is further configured to set the ending position of the current sampling time interval of the mobile terminal to the initial position of the next sampling time interval. Thus, after each time interval, the position of the mobile terminal is updated once until the mobile terminal stops moving.
According to the embodiment, the spatial movement displacement of the mobile terminal is determined, so that the mobile terminal can be positioned more accurately, the mobile terminal can control the fixed terminal more flexibly, and the convenience of user operation is further improved.
Further, in order to further improve the positioning accuracy, based on the first embodiment of the mobile terminal positioning device of the present invention, the present invention further provides a fourth embodiment of the mobile terminal positioning device, referring to fig. 7, fig. 7 is a schematic block diagram of a positioning module in the fourth embodiment of the mobile terminal positioning device of the present invention, and unlike the first embodiment of the mobile terminal positioning device, the positioning module 220 includes:
an extracting unit 223 for extracting the characteristic parameters of the received sound signal;
the second positioning unit 224 is configured to determine, according to a corresponding relationship between a preset feature parameter and a position, a position corresponding to the extracted feature parameter, so as to position the mobile terminal.
In this embodiment, the sound signal may be emitted through a speaker of the mobile terminal itself, and the sound signal is reflected by a wall, an object, and the like in a room and then received by a microphone of the mobile terminal.
It is understood that the mobile terminal may be controlled by the user to record the corresponding relationship between the preset characteristic parameter and the position. For example, a user may set multiple preset locations within a room. In the recording stage, the mobile terminal is respectively controlled to send out sound signals at each preset position, the returned sound signals are received, the characteristic parameters of the sound signals are extracted, and the corresponding relation between the characteristic parameters and the positions is stored. Optionally, at the stage of recording the corresponding relationship, for each preset position, each sound signal may be repeatedly transmitted and transmitted with a delay, so as to enhance the characteristics of the received sound signal and reduce the noise interference of the surrounding environment.
In the positioning identification stage, the mobile terminal also needs to send a sound signal and receive a returned sound signal. Optionally, in order to reduce power consumption of the mobile terminal, the SSID of the WIFI and/or the motion state of the mobile phone may be detected, and when the SSID is matched with the preset SSID and/or the motion state of the mobile phone conforms to the preset state, the mobile terminal is controlled to receive the sound signal, otherwise, the sound signal is not collected.
Optionally, the Android platform widely uses a sampling frequency of 44.1kHz, the highest frequency that a general mobile phone can detect is 22kHz, the frequency that a person can hear a sound is 20Hz to 20kHz, in order to avoid interference to the person, the sound frequency may be selected to be 20kHz to 22kHz, but severe attenuation may occur in a high frequency range, and noise of the surrounding environment is included below 11kHz, so that, optionally, the frequency range of the sound signal may be set to be 11kHz to 22 kHz.
The longer the length of the transmitted sound signal, the stronger the energy per frequency of the acquired signal, however the longer the duration of the detection. The largest peak represents the sound coming directly from the loudspeaker to the microphone, the following peaks represent a series of reflections of the surrounding environment. The 200 samples after the maximum peak are taken as the sound feature. To cover the 11-22kHz range, 4100 sample slices are divided.
The reflection of sound lasts 4500 samples, so the sensing time is 4 x (200+4500)/44100 ═ 0.42 s. A synchronization signal may also be added before the sound signal to ensure synchronization between the speaker and the microphone so that the total time is close to 2-3 seconds.
The volume is too small, the signal received by the microphone is very weak, and the volume is too large, so that interference can be generated for the user. In this embodiment, a volume of 5-10% may be selected.
Resolution of the sensing model. Assuming that the distance between the two preset positions is d, the wavelength of the sound signal is λ, the angle between the surrounding object and the tag is θ, and the reflection distance difference between the surrounding object and the two tags is δ 2d × cos θ. The round-trip distance difference delta between the labels is larger than or equal to lambda/4 and can be distinguished by sound characteristics, and based on the model, the positioning can reach the resolution of centimeter level.
Optionally, classification based on a support vector machine is employed. Assuming n preset positions, n classifiers may be set, and if the kth classifier outputs a high prediction probability, the position is considered as a preset position k. The classifier trains the prediction probability to be more than 0.5 in the target position than in other positions, and it is very suitable to use the sound features to distinguish the positioning areas.
Optionally, after the position corresponding to the extracted characteristic parameter is determined, the preset application corresponding to the determined position is controlled to be started according to the corresponding relationship between the preset position and the preset application. For example, when a user places a mobile phone at a certain position beside a bed, the user expects that the silent mode of the mobile phone can be automatically turned on, so that the sleep quality is protected; when a user places the mobile phone at a certain position of a study, the music application is expected to be automatically started, so that the mood is more comfortable; when a user places the mobile phone at a certain position in a living room, the user wants the alarm clock or the memorandum to be automatically started to remind the user of paying attention to food cooked in the kitchen. Therefore, when the mobile phone is located at the bedside, the mobile phone determines that the position of the mobile phone is located at the bedside through automatic positioning, and therefore the preset application corresponding to the position of the bedside is automatically controlled, namely the silent mode is turned on. When the mobile phone is located in the study room, the mobile phone determines that the mobile phone is located in the study room through automatic positioning, and therefore the preset application corresponding to the study room in the position, namely the music application, can be automatically controlled to be opened.
The embodiment locates through the matching of the sound characteristics, so that the locating precision is in the centimeter level, and the locating precision of the mobile terminal is effectively improved.
The invention further provides a mobile terminal positioning method, which can be applied to the mobile terminal and can also be simultaneously applied to the mobile terminal and the fixed terminal, and the interaction function is realized through the cooperation of the mobile terminal and the fixed terminal. Referring to fig. 8, fig. 8 is a flowchart illustrating a mobile terminal positioning method according to a first embodiment of the present invention, where the mobile terminal positioning method includes the following steps:
step S100, the mobile terminal receives a sound signal emitted by a preset loudspeaker;
step S200, positioning the mobile terminal according to the frequency of the received sound signal; or positioning the mobile terminal according to the received characteristic parameters of the sound signals.
In this embodiment, the preset speaker may be a speaker on a fixed terminal other than the mobile terminal, the speaker emits a sound signal with a preset frequency, when the mobile terminal moves, according to a doppler effect of sound, the frequency of the sound signal received by the mobile terminal changes, that is, a certain offset exists between the frequency of the sound signal received by the mobile terminal and the frequency of the sound signal emitted by the speaker, and the mobile terminal can be located according to the frequency offset value.
Or, the preset speaker may also be a speaker of the mobile terminal itself, after the speaker emits the sound signal, the sound signal may be reflected to the mobile terminal through an indoor wall, an object, and the like, and after the mobile terminal receives the reflected sound signal, the mobile terminal may perform feature extraction on the sound signal to obtain the sound feature. And then determining the position of the mobile terminal according to the corresponding relation between the preset sound characteristics and the position. In addition, the mobile terminal needs to store the correspondence between the sound characteristics and the location in advance. The mobile terminal can be respectively arranged at a plurality of preset positions, sound signals are respectively emitted at each preset position through a loudspeaker of the mobile terminal, reflected sound signals are received through a microphone, sound characteristics are extracted, and the corresponding relation between the sound characteristics and the positions is established.
According to the mobile terminal positioning method provided by the invention, the mobile terminal receives the sound signal emitted by the preset loudspeaker, and the mobile terminal is positioned according to the frequency or the characteristic parameter of the received sound signal, so that the positioning precision of the mobile terminal is effectively improved.
Further, in order to further improve the positioning accuracy, reduce the control error and improve the operation convenience, based on the first embodiment of the mobile terminal positioning method of the present invention, the present invention further provides a second embodiment of the mobile terminal positioning method, referring to fig. 9, fig. 9 is a flowchart of the second embodiment of the mobile terminal positioning method of the present invention, which is different from the first embodiment of the mobile terminal positioning method,
step S100 comprises step S110, the mobile terminal receives sound signals emitted by at least one loudspeaker of the fixed terminal, and when the number of the loudspeakers is at least two, the sound emission frequencies of the loudspeakers are different;
in this embodiment, the number of speakers of the fixed terminal can be set according to actual needs. Alternatively, the fixed terminals may be provided in two or three. When the number of the loudspeakers is three, the mobile terminal can perform three-dimensional positioning, a user can freely move the mobile terminal in a three-dimensional space, and the mobile terminal or the fixed terminal determines the moving track according to the positioning result and controls the fixed terminal according to the moving track.
When the number of the loudspeakers is two, the mobile terminal can perform two-dimensional plane positioning, a user can move the mobile terminal in the two-dimensional plane, the mobile terminal or the fixed terminal determines the moving track of the mobile terminal in the two-dimensional plane according to the two-dimensional plane positioning result, and then the fixed terminal is controlled according to the moving track.
In order to prevent the sound signals emitted from the speakers for localization from affecting the user, since the hearing range of people is 2Hz to 20KHz, the sound emission frequency of the sound signals emitted from the respective speakers may be about 20Hz or more than 20 KHz. When the mobile terminal receives the sound signal, in order to prevent the received sound signal from being distorted, the sampling frequency of the mobile terminal when receiving the sound signal should be more than 2 times of the frequency of the sound signal according to the nyquist theorem. While the sound sampling frequency of a general mobile terminal is 44KHz and a sound signal in the range of 17HHz to 20KHz is hardly audible, so that the sound emission frequency can be set to 17KHz to 20 KHz. The sound emission frequencies of the speakers are different, for example, the embodiment is described by taking the fixed terminal as an example where two speakers are provided, wherein the sound emission frequency of one speaker may be set to 19KHz, and the sound emission frequency of the other speaker may be set to 20 KHz. The sound emission frequencies of the speakers should have a certain interval, so that the sound signals received by the mobile terminal are not affected each other, and the source of the sound signal can be determined directly according to the frequency of the sound signal.
In this embodiment, a control or a key for starting the fixed terminal control may be set in the mobile terminal, and when the user triggers the control or the key, the user may regard that a fixed terminal starting control instruction is received, so that the mobile terminal enters a fixed terminal control mode. After the mobile terminal enters the fixed terminal control mode, the user can control the fixed terminal by controlling the mobile terminal to move. Similarly, a control or a key for closing the control of the fixed terminal can be further arranged on the mobile terminal, and when the user triggers the control or the key, the user can be regarded as receiving a control instruction for closing the fixed terminal, so that the mobile terminal exits from the fixed terminal control mode.
The step of positioning the mobile terminal according to the frequency of the received sound signal includes step S210 of determining a frequency offset value of the sound signal according to the frequency of the received sound signal and a sound emission frequency corresponding to the speaker;
step S220, calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal.
It is understood that, when there are at least two speakers, step S200 includes: determining a frequency offset value of each sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to each loudspeaker;
in this embodiment, according to the doppler effect of the sound signal, when the user controls the mobile terminal to move towards or away from the sound source, the frequency of the sound signal received by the mobile terminal may change, that is, the frequency of the sound signal received by the mobile terminal is different from the sound emission frequency of the sound source. The loudspeaker of the fixed terminal is static, and when the user controls the mobile terminal to move towards the loudspeaker, the frequency of the sound signal received by the mobile terminal is increased; when the user controls the mobile terminal to move away from the speaker, the frequency of the sound signal received by the mobile terminal is reduced.
The mobile terminal can perform short-time Fourier transform on a sound signal obtained by sampling based on a 44KHz sampling frequency, then perform windowing processing on the signal, and then perform Fourier transform on the windowed signal to obtain a local spectrogram. For example, the output length may be set to 44100 and 1764 samples (the number of samples in 40 ms) may be used, and the frequency offset value corresponding to the speaker may be obtained by subtracting the sound emission frequency of the speaker from the peak frequency of the spectrogram. Since the speed at which a user holds a mobile terminal is typically no more than 1m/s, the maximum frequency offset is 50Hz, and the complexity of detecting frequency peaks depends on the width of the scanned spectrum, which is set to 80Hz herein.
It is understood that when there are a plurality of speakers, the speaker which emits the sound signal may be determined from the received sound signal because the sound emission frequencies of different speakers are different. After receiving the sound signals, the received sound signals are filtered to respectively obtain the sound signals corresponding to the speakers, and then the sound signals corresponding to the speakers are respectively processed to obtain the frequency deviation values corresponding to the speakers.
In this embodiment, after the mobile terminal is located, a control instruction may be generated according to a location result, and the television and other terminals may be controlled.
In this embodiment, the control instruction corresponding to the obtained frequency offset value may be determined according to a corresponding relationship between a preset frequency offset value and the control instruction, so as to control the fixed terminal. The corresponding relationship may be a corresponding relationship between the frequency offset value interval and the control command. For example, when there is one speaker, a frequency offset value can be obtained. The frequency offset value interval corresponding to the frequency offset value can be determined first, and then the control instruction corresponding to the frequency offset value interval is determined according to the corresponding relation. When the number of the loudspeakers is multiple, each loudspeaker can be correspondingly provided with a corresponding relation, and each corresponding relation corresponds to different control instructions, so that multiple kinds of control can be performed. In order to improve the operation convenience, each corresponding relation can correspond to two control instructions, and when the frequency deviation value is larger than zero, one control instruction corresponds to; and when the frequency offset value is less than zero, corresponding to another control command. Therefore, when the user operates, the user only needs to move towards the loudspeaker or move away from the loudspeaker to input two control instructions to the fixed terminal. When the plurality of speakers are used, the user can firstly designate the speaker corresponding to the current control based on the mobile terminal, and switch between different speakers so as to prevent interference generated when the speaker is controlled based on different speakers.
In addition, when the number of the loudspeakers is at least two, the mobile terminal can be positioned according to each frequency offset value, so that the moving track of the mobile terminal is obtained, and the fixed terminal is controlled according to the moving track.
According to the mobile terminal positioning method provided by the embodiment, the frequency offset value of the sound signal received when the mobile terminal moves is calculated according to the Doppler effect of sound, and then the mobile terminal is positioned according to the frequency offset value, so that the positioning accuracy is high, the control error of the fixed terminal is small, and the accuracy is high. In addition, the user can directly realize the control of the fixed terminal by controlling the mobile terminal to move in the air, the control position is not limited, and the convenience of controlling the fixed terminal through the mobile terminal is improved.
Further, in order to further reduce the control error and improve the operation convenience, based on the second embodiment of the mobile terminal positioning method of the present invention, the present invention further provides a third embodiment of the mobile terminal positioning method, referring to fig. 10, where fig. 10 is a schematic flow chart of the step of calculating the spatial movement displacement in the third embodiment of the mobile terminal positioning method of the present invention, and unlike the first embodiment of the mobile terminal positioning method, the step S220 includes:
step S221, calculating the moving speed of the mobile terminal relative to the loudspeaker according to the frequency deviation value;
it is understood that, when there are at least two speakers, step S221 includes: calculating the moving speed of the mobile terminal relative to each loudspeaker according to each frequency offset value;
let F denote the sound emission frequency of the loudspeaker, FαRepresenting the frequency offset value, v representing the moving speed of the mobile terminal relative to the speaker, c representing the propagation speed of sound, the moving speed of the speaker is:
Figure BDA0001007152320000191
step S222, calculating the movement displacement of the mobile terminal relative to the loudspeaker in the current sampling time interval according to the movement speed; wherein the sampling time interval is a time interval for collecting the sound signal;
it is understood that, when there are at least two speakers, step S222 includes calculating the movement displacement of the mobile terminal relative to each of the speakers in the current sampling time interval according to each of the movement speeds;
in this embodiment, the sampling time interval may be a time interval at which the mobile terminal samples the sound signal when receiving the sound signal. But also several consecutive said time intervals. And calculating the movement displacement of the mobile terminal once every sampling time interval. In the embodiment, the sampling time interval is 40ms, and the movement displacement of the terminal is updated every 40 ms. Assume a sampling interval of time tsRepresenting, the displacement of the movement within the sampling time interval by dsIndicating that the frequency offset within the sampling time interval is in FsThat means, the displacement of the movement within the sampling time interval is:
Figure BDA0001007152320000201
after step S222, the mobile terminal may be located according to the movement displacement;
it will be appreciated that when there are at least two loudspeakers, the mobile terminal may be positioned according to the respective movement displacements.
In this embodiment, the control instruction corresponding to the obtained movement displacement may be determined according to a preset correspondence between the movement displacement and the control instruction, so as to control the fixed terminal. The corresponding relationship may be a corresponding relationship between the movement displacement interval and the control command. For example, in the case of one loudspeaker, one displacement may be obtained. The moving displacement interval corresponding to the moving displacement may be determined first, and then the control instruction corresponding to the moving displacement interval may be determined according to the corresponding relationship. When the number of the loudspeakers is multiple, each loudspeaker can be correspondingly provided with a corresponding relation, and each corresponding relation corresponds to different control instructions, so that multiple kinds of control can be performed. In order to improve the operation convenience, each corresponding relation can correspond to two control instructions, and when the movement displacement is larger than zero, one control instruction corresponds to; and when the movement displacement is less than zero, the control device corresponds to another control instruction. Therefore, when the user operates, the user only needs to move towards the loudspeaker or move away from the loudspeaker to input two control instructions to the fixed terminal. When the plurality of speakers are used, the user can firstly designate the speaker corresponding to the current control based on the mobile terminal, and switch between different speakers so as to prevent interference generated when the speaker is controlled based on different speakers.
In addition, when the number of the loudspeakers is at least two, the mobile terminal can be positioned according to each movement displacement, so that the movement track of the mobile terminal is obtained, and the fixed terminal is controlled according to the movement track.
In the embodiment, the control instruction is determined according to the movement displacement by further calculating the movement displacement of the mobile terminal, so that the operation of a user is more convenient, the control error is effectively reduced, and the operation convenience is improved.
Optionally, the step of positioning the mobile terminal according to the movement displacement includes:
step S223, determining an initial position corresponding to the current sampling time interval of the mobile terminal;
step S224, determining the ending position of the current sampling time interval of the mobile terminal according to the initial position and the movement displacement; it is understood that, when there are at least two speakers, step S224 includes determining an ending position of the current sampling time interval of the mobile terminal according to the initial position and each of the movement displacements;
and step S225, determining the space movement displacement of the mobile terminal according to the initial position and the termination position.
In this embodiment, when the mobile terminal performs the first sampling, the initial position corresponding to the first sampling time interval may be a position obtained by the mobile terminal through WIFI positioning, or a position input by a user, or a position obtained by other means. The position is the position of the mobile terminal relative to the speaker of the stationary terminal. And when the current adoption of the mobile terminal is not the first adoption, the initial position corresponding to the current adoption time interval is the final position corresponding to the last sampling time interval.
In this embodiment, taking the example of two speakers, a two-dimensional coordinate system can be established with a horizontal plane as a coordinate plane. A connection line between the two speakers may be set as an x-axis, and as shown in fig. 6, assuming that a distance between the two speakers is d, coordinates of the left speaker is (0,0), coordinates of the right speaker is (0, d), and an initial position of the mobile terminal is (x)0,y0) And determining the termination position of the mobile terminal according to the movement displacement and the initial position. The termination location may also be in the form of coordinates. Furthermore, the spatial movement displacement of the mobile terminal can be obtained according to the initial position and the termination position. The space movement displacement comprises a movement direction and a movement distance, so that the movement track of the mobile terminal can be obtained, and a control instruction is generated according to the movement track to control the fixed terminal. For example, when the user moves up or down, the cursor of the fixed terminal can be controlled to move up or down, or the program of the fixed terminal is controlled to jump up or down, or the volume of the fixed terminal is controlled to be increased or decreased; when the user moves to the left or right, the cursor of the fixed terminal may be controlled to move to the left or right, and so on.
Optionally, the number of the speakers is at least two, and the following method may be adopted to determine the termination position of the mobile terminal according to the initial position and each of the movement displacements: the step of determining the termination position of the mobile terminal according to the initial position and each of the movement displacements comprises: determining the actual distance of the mobile terminal relative to each loudspeaker according to the initial position and each moving displacement; determining intersection point positions among spherical surfaces which take the positions of the loudspeakers as the spherical centers and take the actual distances corresponding to the loudspeakers as the spherical radii; selecting one intersection point position asA termination location of the mobile terminal. When the mobile terminal is located at the initial position, it is assumed that distances from the mobile terminal to the two speakers are d0,1、d0,2If the mobile terminal is located at the end position after a sampling time interval, it is assumed that the distances between the mobile terminal and the two speakers are d1,1、d1,2And then:
Figure BDA0001007152320000211
Figure BDA0001007152320000212
wherein, FkWhich is indicative of the frequency of the sound signal,
Figure BDA0001007152320000221
indicating the doppler frequency offset value of the mobile terminal at the ith sampling time interval.
Respectively using (0,0) and (d,0) as centre of circle, d1,1And d1,2For a radius of a sphere, the intersection of two spheres can be calculated as follows:
Figure BDA0001007152320000222
(x,y)=(d1,1cos(θ1),d1,1sin(θ1))
(x*,y*)=(d1,1cos(-θ1),d1,1sin(-θ1))
when d is1,1+d1,2>d, there are two intersections. At this time, the distance (x) may be selected0,y0) One of the closer intersections serves as a termination point.
Optionally, after the step of determining the ending position of the current sampling time interval of the mobile terminal according to the initial position and each of the movement displacements, the method further includes:
and setting the ending position of the current sampling time interval of the mobile terminal as the initial position of the next sampling time interval. Thus, after each time interval, the position of the mobile terminal is updated once until the mobile terminal stops moving.
According to the embodiment, the spatial movement displacement of the mobile terminal is determined, so that the mobile terminal can be positioned more accurately, the mobile terminal can control the fixed terminal more flexibly, and the convenience of user operation is further improved.
Further, in order to further improve the positioning accuracy, based on the first embodiment of the mobile terminal positioning method of the present invention, the present invention further provides a fourth embodiment of the mobile terminal positioning method, referring to fig. 11, fig. 11 is a flowchart illustrating the fourth embodiment of the mobile terminal positioning method of the present invention, different from the first embodiment of the mobile terminal positioning method, the preset speaker is a speaker of the mobile terminal,
the step of positioning the mobile terminal according to the received characteristic parameters of the sound signals comprises:
step S230, extracting the feature parameters of the received sound signal, and determining the position corresponding to the extracted feature parameters according to the corresponding relationship between the preset feature parameters and the position, so as to position the mobile terminal.
In this embodiment, the sound signal may be emitted through a speaker of the mobile terminal itself, and the sound signal is reflected by a wall, an object, and the like in a room and then received by a microphone of the mobile terminal.
It is understood that the mobile terminal may be controlled by the user to record the corresponding relationship between the preset characteristic parameter and the position. For example, a user may set multiple preset locations within a room. In the recording stage, the mobile terminal is respectively controlled to send out sound signals at each preset position, the returned sound signals are received, the characteristic parameters of the sound signals are extracted, and the corresponding relation between the characteristic parameters and the positions is stored. Optionally, at the stage of recording the corresponding relationship, for each preset position, each sound signal may be repeatedly transmitted and transmitted with a delay, so as to enhance the characteristics of the received sound signal and reduce the noise interference of the surrounding environment.
In the positioning identification stage, the mobile terminal also needs to send a sound signal and receive a returned sound signal. Optionally, in order to reduce power consumption of the mobile terminal, the SSID of the WIFI and/or the motion state of the mobile phone may be detected, and when the SSID is matched with the preset SSID and/or the motion state of the mobile phone conforms to the preset state, the mobile terminal is controlled to receive the sound signal, otherwise, the sound signal is not collected.
Optionally, the Android platform widely uses a sampling frequency of 44.1kHz, the highest frequency that a general mobile phone can detect is 22kHz, the frequency that a person can hear a sound is 20Hz to 20kHz, in order to avoid interference to the person, the sound frequency may be selected to be 20kHz to 22kHz, but severe attenuation may occur in a high frequency range, and noise of the surrounding environment is included below 11kHz, so that, optionally, the frequency range of the sound signal may be set to be 11kHz to 22 kHz.
The longer the length of the transmitted sound signal, the stronger the energy per frequency of the acquired signal, however the longer the duration of the detection. The largest peak represents the sound coming directly from the loudspeaker to the microphone, the following peaks represent a series of reflections of the surrounding environment. The 200 samples after the maximum peak are taken as the sound feature. To cover the 11-22kHz range, 4100 sample slices are divided.
The reflection of sound lasts 4500 samples, so the sensing time is 4 x (200+4500)/44100 ═ 0.42 s. A synchronization signal may also be added before the sound signal to ensure synchronization between the speaker and the microphone so that the total time is close to 2-3 seconds.
The volume is too small, the signal received by the microphone is very weak, and the volume is too large, so that interference can be generated for the user. In this embodiment, a volume of 5-10% may be selected.
Resolution of the sensing model. Assuming that the distance between the two preset positions is d, the wavelength of the sound signal is λ, the angle between the surrounding object and the tag is θ, and the reflection distance difference between the surrounding object and the two tags is δ 2d × cos θ. The round-trip distance difference delta between the labels is larger than or equal to lambda/4 and can be distinguished by sound characteristics, and based on the model, the positioning can reach the resolution of centimeter level.
Optionally, classification based on a support vector machine is employed. Assuming n preset positions, n classifiers may be set, and if the kth classifier outputs a high prediction probability, the position is considered as a preset position k. The classifier trains the prediction probability to be more than 0.5 in the target position than in other positions, and it is very suitable to use the sound features to distinguish the positioning areas.
Optionally, after the position corresponding to the extracted characteristic parameter is determined, the preset application corresponding to the determined position is controlled to be started according to the corresponding relationship between the preset position and the preset application. For example, when a user places a mobile phone at a certain position beside a bed, the user expects that the silent mode of the mobile phone can be automatically turned on, so that the sleep quality is protected; when a user places the mobile phone at a certain position of a study, the music application is expected to be automatically started, so that the mood is more comfortable; when a user places the mobile phone at a certain position in a living room, the user wants the alarm clock or the memorandum to be automatically started to remind the user of paying attention to food cooked in the kitchen. Therefore, when the mobile phone is located at the bedside, the mobile phone determines that the position of the mobile phone is located at the bedside through automatic positioning, and therefore the preset application corresponding to the position of the bedside is automatically controlled, namely the silent mode is turned on. When the mobile phone is located in the study room, the mobile phone determines that the mobile phone is located in the study room through automatic positioning, and therefore the preset application corresponding to the study room in the position, namely the music application, can be automatically controlled to be opened.
The embodiment locates through the matching of the sound characteristics, so that the locating precision is in the centimeter level, and the locating precision of the mobile terminal is effectively improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A mobile terminal positioning device, characterized in that the mobile terminal positioning device comprises:
the receiving module is used for receiving a sound signal emitted by a preset loudspeaker through a preset sampling frequency;
the positioning module is used for positioning the mobile terminal according to the received characteristic parameters of the sound signals;
the receiving module is further configured to receive a sound signal emitted by at least one speaker of the fixed terminal, where sound emission frequencies of the speakers are different when the number of the speakers is at least two;
the positioning module includes:
the determining unit is used for determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the loudspeaker;
the first positioning unit is used for calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal;
wherein the number of the speakers is at least two, the first positioning unit includes:
the determining subunit is used for determining an initial position corresponding to the current sampling time interval of the mobile terminal;
the determining subunit is further configured to determine an actual distance of the mobile terminal relative to the speaker according to the initial position and the movement displacement; the system is also used for determining the intersection point position between spherical surfaces which take the position of the loudspeaker as the spherical center and take the actual distance corresponding to the loudspeaker as the spherical radius; the intersection point position closest to the initial position is selected as the termination position of the mobile terminal;
the determining unit is further configured to perform short-time fourier transform on the sampled sound signal, perform windowing on the signal, perform fourier transform on the windowed signal to obtain a local spectrogram, and subtract the sound emission frequency of the speaker from the peak frequency of the local spectrogram to obtain a frequency deviation value corresponding to the speaker.
2. The mobile terminal positioning apparatus of claim 1, wherein the first positioning unit comprises:
a calculating subunit, configured to calculate a moving speed of the mobile terminal relative to the speaker according to the frequency offset value;
the calculation subunit is further configured to calculate a movement displacement of the mobile terminal relative to the speaker within a current sampling time interval according to the movement speed;
the determining subunit is configured to determine an initial position corresponding to the current sampling time interval of the mobile terminal, determine an end position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement, and determine a spatial mobile displacement of the mobile terminal according to the initial position and the end position;
wherein the sampling time interval is a time interval for collecting the sound signal.
3. The mobile terminal positioning apparatus according to claim 1, wherein the preset speaker is a speaker of the mobile terminal, and the positioning module comprises:
the extracting unit is used for extracting the characteristic parameters of the received sound signals;
and the second positioning unit is used for determining the position corresponding to the extracted characteristic parameter according to the corresponding relation between the preset characteristic parameter and the position so as to position the mobile terminal.
4. A mobile terminal positioning method is characterized by comprising the following steps:
the mobile terminal receives a sound signal sent by a preset loudspeaker through a preset sampling frequency;
positioning the mobile terminal according to the received characteristic parameters of the sound signals;
the step of receiving the sound signal emitted by the preset loudspeaker by the mobile terminal comprises the following steps: the method comprises the steps that the mobile terminal receives sound signals sent by at least one loudspeaker of the fixed terminal, and when the number of the loudspeakers is at least two, the sound emission frequencies of the loudspeakers are different;
the step of locating the mobile terminal according to the frequency of the received sound signal comprises: determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the loudspeaker; calculating the space movement displacement of the mobile terminal according to the frequency deviation value so as to position the mobile terminal;
the number of the loudspeakers is at least two, and the step of determining the termination position of the mobile terminal according to the initial position and the movement displacement comprises the following steps:
determining an initial position corresponding to the current sampling time interval of the mobile terminal;
determining the actual distance of the mobile terminal relative to the loudspeaker according to the initial position and the movement displacement;
determining the intersection point position between spherical surfaces which take the position of the loudspeaker as the spherical center and take the actual distance corresponding to the loudspeaker as the spherical radius;
selecting the intersection point position closest to the initial position as the termination position of the mobile terminal;
wherein the step of determining a frequency offset value of the sound signal according to the frequency of the received sound signal and the sound emission frequency corresponding to the speaker comprises:
the method comprises the steps of firstly carrying out short-time Fourier transform on a sound signal obtained by sampling, then carrying out windowing processing on the signal, and then carrying out Fourier transform on the signal subjected to windowing processing to obtain a local spectrogram, wherein the sound emission frequency of a loudspeaker is subtracted from the peak frequency of the local spectrogram to obtain a frequency deviation value corresponding to the loudspeaker.
5. The mobile terminal positioning method according to claim 4, wherein the step of calculating the spatial movement displacement of the mobile terminal according to the frequency offset value comprises:
calculating the moving speed of the mobile terminal relative to the loudspeaker according to the frequency offset value;
calculating the movement displacement of the mobile terminal relative to the loudspeaker in the current sampling time interval according to the movement speed;
determining an initial position corresponding to the current sampling time interval of the mobile terminal;
determining the ending position of the current sampling time interval of the mobile terminal according to the initial position and the mobile displacement;
determining the space movement displacement of the mobile terminal according to the initial position and the end position;
wherein the sampling time interval is a time interval for collecting the sound signal.
6. The method according to claim 4, wherein the predetermined speaker is a speaker of the mobile terminal, and the step of positioning the mobile terminal according to the received characteristic parameter of the sound signal comprises: and extracting the characteristic parameters of the received sound signals, and determining the positions corresponding to the extracted characteristic parameters according to the corresponding relation between the preset characteristic parameters and the positions so as to position the mobile terminal.
CN201610388272.2A 2016-06-01 2016-06-01 Mobile terminal positioning device and method Active CN106093950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610388272.2A CN106093950B (en) 2016-06-01 2016-06-01 Mobile terminal positioning device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610388272.2A CN106093950B (en) 2016-06-01 2016-06-01 Mobile terminal positioning device and method

Publications (2)

Publication Number Publication Date
CN106093950A CN106093950A (en) 2016-11-09
CN106093950B true CN106093950B (en) 2020-03-27

Family

ID=57447464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610388272.2A Active CN106093950B (en) 2016-06-01 2016-06-01 Mobile terminal positioning device and method

Country Status (1)

Country Link
CN (1) CN106093950B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3000122C (en) * 2018-03-29 2019-02-26 Cae Inc. Method and system for determining a position of a microphone
CN108614760B (en) * 2018-05-10 2021-06-15 联想(北京)有限公司 Information detection method, electronic equipment and computer readable storage medium
CN109188413B (en) * 2018-10-18 2021-03-05 京东方科技集团股份有限公司 Positioning method, device and system of virtual reality equipment
CN109725291A (en) * 2018-12-25 2019-05-07 秒针信息技术有限公司 Determination method, apparatus, storage medium and the electronic device of motion state
CN112526453B (en) * 2019-09-17 2024-04-30 深圳Tcl数字技术有限公司 User positioning method and intelligent terminal
CN110711955A (en) * 2019-11-14 2020-01-21 安徽同兴科技发展有限责任公司 Partitioned dust removal device of large laser cutting machine and working method thereof
CN111770233B (en) * 2020-06-23 2021-06-11 Oppo(重庆)智能科技有限公司 Frequency compensation method and terminal equipment
CN112614332B (en) * 2020-12-10 2022-01-28 维沃移动通信有限公司 Terminal control method and device and electronic equipment
CN112882036B (en) * 2021-01-19 2022-06-10 中国人民解放军军事科学院国防科技创新研究院 Sonar audio speed and distance measuring device and method
CN114666721B (en) * 2022-05-05 2024-02-06 深圳市丰禾原电子科技有限公司 Wifi sound box with terminal tracking mode and control method thereof
CN115240377A (en) * 2022-06-23 2022-10-25 广东一医数据科技有限公司 Medical care disinfection safety early warning method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257338A (en) * 2013-04-23 2013-08-21 中国科学技术大学 Indoor positioning method and system
CN103344959A (en) * 2013-07-22 2013-10-09 乾行讯科(北京)科技有限公司 Ultrasonic location system and electronic device with locating function
CN103592629A (en) * 2013-10-21 2014-02-19 国家电网公司 Transformer substation multi-target accurate positioning system
CN203502583U (en) * 2013-10-21 2014-03-26 国家电网公司 Transformer substation multi-target accurate positioning system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130294618A1 (en) * 2012-05-06 2013-11-07 Mikhail LYUBACHEV Sound reproducing intellectual system and method of control thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257338A (en) * 2013-04-23 2013-08-21 中国科学技术大学 Indoor positioning method and system
CN103344959A (en) * 2013-07-22 2013-10-09 乾行讯科(北京)科技有限公司 Ultrasonic location system and electronic device with locating function
CN103592629A (en) * 2013-10-21 2014-02-19 国家电网公司 Transformer substation multi-target accurate positioning system
CN203502583U (en) * 2013-10-21 2014-03-26 国家电网公司 Transformer substation multi-target accurate positioning system

Also Published As

Publication number Publication date
CN106093950A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106093950B (en) Mobile terminal positioning device and method
US10778778B1 (en) Response endpoint selection based on user proximity determination
KR102127640B1 (en) Portable teriminal and sound output apparatus and method for providing locations of sound sources in the portable teriminal
US10033544B2 (en) Notification apparatus and object position notification method thereof
EP3232307A1 (en) Method and mobile device for providing recommended items based on context awareness
US20210249052A1 (en) Video synthesis method terminal and computer storage medium
CN110060680B (en) Electronic equipment interaction method and device, electronic equipment and storage medium
WO2012153227A1 (en) Gesture recognition using plural sensors
US8804460B1 (en) Ultrasonic location determination
JP2015506035A (en) Gesture control voice user interface
US20140258864A1 (en) Audio driver user interface
WO2011104673A1 (en) Gesture control
CN110493690A (en) A kind of sound collection method and device
CN109870984B (en) Multi-household-appliance control method based on wearable device
CN111683325B (en) Sound effect control method and device, sound box, wearable device and readable storage medium
EP2926228B1 (en) Controlling a user interface of a device
CN109599104A (en) Multi-beam choosing method and device
CN109243488A (en) Audio-frequency detection, device and storage medium
CN108735218A (en) voice awakening method, device, terminal and storage medium
CN114788304A (en) Method for reducing errors in an ambient noise compensation system
KR101995799B1 (en) Place recognizing device and method for providing context awareness service
KR101669520B1 (en) Electronic device and control method thereof
CN107526510A (en) sound playing method and device
CN111428079B (en) Text content processing method, device, computer equipment and storage medium
CN112180377B (en) Non-contact type man-machine interaction positioning method, tracking method, terminal and readable storage medium

Legal Events

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