CN109413556B - Equipment positioning method and device, earphone device and electronic equipment - Google Patents

Equipment positioning method and device, earphone device and electronic equipment Download PDF

Info

Publication number
CN109413556B
CN109413556B CN201811161377.XA CN201811161377A CN109413556B CN 109413556 B CN109413556 B CN 109413556B CN 201811161377 A CN201811161377 A CN 201811161377A CN 109413556 B CN109413556 B CN 109413556B
Authority
CN
China
Prior art keywords
earphone
sound
intensity
target object
sound intensity
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
CN201811161377.XA
Other languages
Chinese (zh)
Other versions
CN109413556A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811161377.XA priority Critical patent/CN109413556B/en
Publication of CN109413556A publication Critical patent/CN109413556A/en
Application granted granted Critical
Publication of CN109413556B publication Critical patent/CN109413556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083

Abstract

The embodiment of the application discloses a device positioning method and device, an earphone device and electronic equipment. The method comprises the following steps: the electronic equipment acquires first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone; acquiring second sound intensity, wherein the second sound intensity is the intensity of sound emitted by the sound source acquired by the second earphone; acquiring the distance between the first earphone and a target object; and acquiring the distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity. According to the method, under the condition that the second earphone is lost, the distance between the second earphone and the target object can be determined according to the known distance between the first earphone and the known target object and by combining the sound intensity of the sound collected by the first earphone and the sound intensity of the sound collected by the second earphone for the same sound source, so that a user can quickly find the lost earphone conveniently, and the user experience is greatly improved.

Description

Equipment positioning method and device, earphone device and electronic equipment
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to a device positioning method and apparatus, an earphone apparatus, and an electronic device.
Background
With the popularization of more external audio output devices, users of electronic devices have more choices to transmit audio to be played to the external audio output devices for playing. For example, when the electronic device can transmit audio to a headset, the audio is played by using the headset. However, when the earphone is lost, an effective retrieving method is lacked, which greatly affects the user experience.
Disclosure of Invention
In view of the above problems, the present application provides a device positioning method, an apparatus, an earphone apparatus, and an electronic device, so as to improve the above problems.
In a first aspect, the present application provides a device positioning method applied to an electronic device, where the method includes: the electronic equipment acquires first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by a first earphone; acquiring second sound intensity, wherein the second sound intensity is the intensity of sound emitted by the sound source acquired by a second earphone; acquiring the distance between the first earphone and a target object; obtaining a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity.
In a second aspect, the present application provides a device positioning method applied to an earphone apparatus, where the earphone apparatus includes a first earphone and a second earphone, and the first earphone is connected to an electronic device and the second earphone, respectively, and the method includes: the first earphone acquires a first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source acquired by the first earphone; acquiring second sound intensity, wherein the second sound intensity is the intensity of sound emitted by the sound source acquired by a second earphone; acquiring the distance between the first earphone and a target object; acquiring a distance between the second earphone and a target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity; and sending the distance between the second earphone and the target object to the electronic equipment.
In a third aspect, the present application provides a device positioning apparatus, operable on an electronic device, the apparatus comprising: the signal acquisition unit is used for acquiring first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone; the signal acquisition unit is further configured to acquire a second sound intensity, where the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone; a reference information acquisition unit for acquiring a distance between the first headphone and a target object; a positioning unit, configured to obtain a distance between the second earphone and a target object based on the distance between the first earphone and the target object, the first sound intensity, and the second sound intensity.
In a fourth aspect, the present application provides a device positioning apparatus, operable in an earphone apparatus, the earphone apparatus including a first earphone and a second earphone, the first earphone being connected to an electronic device and the second earphone, respectively, the apparatus including: the signal acquisition unit is used for acquiring first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone; the signal acquisition unit is further configured to acquire a second sound intensity, where the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone; a reference information acquisition unit for acquiring a distance between the first headphone and a target object; a positioning unit, configured to obtain a distance between the second earphone and a target object based on a distance between the first earphone and the target object, the first sound intensity, and a second sound intensity; and the information sending unit is used for sending the distance between the second earphone and the target object to the electronic equipment.
In a fifth aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a sixth aspect, the present application provides an earphone device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a seventh aspect, the present application provides a computer-readable storage medium, in which a program code is stored, wherein the above method is performed when the program code runs.
The application provides a device positioning method, device, earphone device and electronic equipment, through electronic equipment acquires the first sound intensity that the sound source that first earphone was gathered sent out sound, and second earphone is gathered the second sound intensity that the sound source sent out sound, then based on again and acquire under the condition of the distance between first earphone and the target object, again based on the distance between first earphone and the target object first sound intensity and second sound intensity acquire the second earphone with the distance between the target object. Therefore, under the condition that the second earphone is lost, the distance between the second earphone and the target object can be determined according to the known distance between the first earphone and the known target object and by combining the sound intensity of the sound of the same sound source, which is acquired by the first earphone and the second earphone, so that the user can quickly find the lost earphone, and the user experience is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of an electronic device interacting with a headset according to the present application;
FIG. 2 illustrates a schematic diagram of another electronic device and headset interaction presented herein;
fig. 3 is a flowchart illustrating a device positioning method applied to an electronic device according to the present application;
fig. 4 is a schematic interface diagram of a device positioning method applied to an electronic device according to the present application;
fig. 5 is a schematic interface diagram of another method for positioning an electronic device according to the present disclosure;
FIG. 6 is a flow chart illustrating another method for locating a device applied to an electronic device as set forth herein;
fig. 7 is a schematic structural diagram of a second headset applied to another device positioning method of an electronic device according to the present application;
fig. 8 is a schematic diagram illustrating an infrared signal emission direction of a second headset in another device positioning method applied to an electronic device according to the present application;
fig. 9 is a flowchart illustrating a further device positioning method applied to an electronic device according to the present application;
fig. 10 is a flowchart illustrating a device positioning method applied to a headset apparatus according to the present application;
fig. 11 is a flowchart illustrating a device positioning method applied to an electronic device according to the present application;
FIG. 12 is a block diagram illustrating another embodiment of a device locator apparatus for use with an electronic device;
fig. 13 is a block diagram illustrating a structure of another device positioning apparatus for operating in an electronic device according to the present application;
fig. 14 is a block diagram illustrating a device positioning apparatus for operating in a headset according to the present application;
fig. 15 is a block diagram of an electronic device according to the present disclosure;
fig. 16 is a storage unit for storing or carrying program codes for implementing a device location method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the increase of the types of audio playing devices and the improvement of playing sound effects, more users can select to output audio played by electronic devices such as mobile phones and tablet computers to the audio playing devices for playing. Common audio playing devices include a vehicle-mounted music player, a sound box, an earphone, and the like. Wherein, the earphone comprises a wired earphone or a wireless earphone.
Take an earphone as an example. If the earphone is a wired earphone, after the wired earphone is connected with the electronic device, the electronic device can transmit the audio to the wired earphone through a physical line of the wired earphone, so that the wired earphone can play the audio conveniently. Furthermore, if the earphone is a wireless earphone, the wireless earphone proposes a communication link according to a wireless communication protocol supported by the wireless earphone and the electronic device in advance, and then the electronic device transmits the audio to the wireless earphone through the communication link so that the wireless earphone can play the audio. For example, as shown in fig. 1, in one case, the wireless headset includes a first headset 110 and a second headset 120, the electronic device 100 suggests a communication link with the first headset 110 and the second headset 120, respectively, based on the aforementioned wireless communication protocol. Furthermore, as shown in fig. 2, the electronic device 100 may directly suggest a communication link based on the aforementioned wireless communication protocol for the first earphone 100, and then suggest a communication link based on the aforementioned wireless communication protocol for the first earphone 110 and the second earphone 120. The wireless communication protocol may include a Wlan protocol, a bluetooth protocol, a ZigBee protocol, or the like.
The inventor finds in research that the earphone is not easy to retrieve after being lost because the earphone is small in size. Therefore, the inventor proposes a device positioning method, a device, a headset device and an electronic device which can facilitate headset retrieving in the application.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, an apparatus positioning method provided in the present application is applied to an electronic apparatus, and the method includes:
step S110: the electronic equipment acquires first sound intensity, and the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone.
The first earphone and the second earphone are respectively provided with a sound collection module used for collecting sound, and when wireless connection is established between the first earphone and the electronic equipment, the collected sound can be sent to the electronic equipment based on the connection established between the first earphone and the electronic equipment after the sound is collected by the first earphone and the second earphone.
After the electronic device receives the voice signal sent by the first earphone, the sound content carried by the voice signal can be extracted from the received voice signal, and then the first sound intensity is determined according to the sound content. It is understood that audio data is usually played in units of frames, and the aforementioned sound content may be composed of a plurality of frames of speech content. In this case, the electronic device may determine the first sound intensity by analyzing the sound intensity of each frame of the voice content included in the voice content.
Optionally, the electronic device may obtain the sound content carried by the sound signal after receiving the sound signal sent by the first earphone, and then use a maximum sound intensity of the sound intensities corresponding to the multi-frame sound content included in the sound content as the first sound intensity. For example, if the speech content acquired from the speech signal transmitted by the first headphone includes a frame a, a frame b, and a frame c, and the sound intensity corresponding to the frame a is m, the sound intensity corresponding to the frame b is n, and the sound intensity corresponding to the frame c is l, and after comparing m, n, and l, it is found that m is the largest, it may be determined that the first sound intensity is m.
Alternatively, the electronic device may average the sound intensity of each of the voice contents of the plurality of frames included therein as the first sound intensity. For example, if the speech content acquired from the speech signal transmitted by the first headphone includes frame a, frame b, and frame c, and the sound intensity corresponding to the acquired frame a is m, the sound intensity corresponding to the acquired frame b is n, and the sound intensity corresponding to the acquired frame c is l, then the first sound intensity may be determined to be (m + n + l)/3.
As a mode, if after receiving the voice signal sent by the first earphone, the electronic device detects that the length of the sound content carried by the voice signal extracted from the received voice signal is greater than the set length, the first sound intensity may be determined by extracting part of the voice content in the voice signal from the received voice signal, so as to avoid that the overall calculation time is too long due to too long sound content carried by the voice signal. For example, if the electronic device receives that the length of the voice content carried in the voice signal sent by the first earphone is 3s, and the length is set to be 1s, in this case, the electronic device may extract the first 1s of voice content from the 3s long voice content, and then determine the first sound intensity based on the foregoing manner.
It should be noted that the aforementioned 3s voice content length and 1s set length are exemplary, and the set length can be flexibly configured according to the operating environment of the electronic device. For example, if the system resources of the current electronic device are sufficient, the set length may be configured to be longer, so that the more accurate first sound intensity may be obtained. And when the CPU residual resource and/or the residual memory are detected to be larger than a set value, the system resource is determined to be sufficient.
As one mode, whether the earphone is in a wearing state may be detected by an infrared sensor provided to the earphone. It should be noted that, when the earphone is worn on the ear of a person, some areas may be blocked, and in this case, in a manner that the infrared sensor is disposed in the area that is blocked after the earphone is in the wearing state, whether the infrared signal emitted by the infrared sensor is blocked is determined by detecting the returned state value of the infrared sensor, so as to determine whether the earphone is in the wearing state or the non-wearing state. It will be appreciated that the headset is determined to be in a worn state when the returned state value indicates that the infrared signal is occluded and in an unworn state when the returned state value indicates that the infrared signal is not occluded.
Then, as one way, the headset may detect the content represented by the state value returned by the infrared sensor at a set period, and transmit the content represented by the acquired state value returned by the infrared sensor to the electronic device at the set period, so that the electronic device records whether the headset is in a wearing state in real time. Alternatively, the electronic device may be configured by building locally a text file in which a variable, e.g., headset _ status, is configured. If the electronic device recognizes that the content representation earphone returned by the earphone is in a wearing state, 1 may be assigned to the variable headset _ status, and when the electronic device recognizes that the content representation earphone returned by the earphone is in an unworn state, 0 may be assigned to the variable headset _ status. It is possible to determine whether the headset is in a wearing state by detecting the value of the variable headset _ status in the text file after the electronic device detects that the audio playback is performed through the headset.
It should be noted that, in addition to the aforesaid detection of whether the earphone is in the wearing state by the infrared sensor, other elements may be provided to determine whether the earphone is in the wearing state. For example, a component may be disposed at a portion of the earphone that contacts with the skin of the human body after the earphone is worn, and a resistance value of the component may change after the component contacts with the skin of the human body (for example, a thermistor). Accordingly, in this manner, after the earphone determines whether the earphone is in the wearing state through the current change of the path, the result of the detection can be transmitted to the electronic device.
It should be noted that, as one mode, in order to facilitate that the first sound intensity can be determined more accurately, after the voice content is extracted from the received voice signal sent by the first earphone, it may be detected whether the extracted voice content includes the specified voice content, and if so, the first sound intensity may be continuously obtained by itself. Thereby avoiding using the sound intensity of the collected other voice signals as the first sound intensity by mistake.
Step S120: and acquiring second sound intensity, wherein the second sound intensity is acquired by the second earphone and is the intensity of sound emitted by the sound source.
It is understood that the manner in which the electronic device obtains the second sound intensity is similar to the manner in which the electronic device obtains the first sound intensity, and therefore the description thereof is omitted here.
In one way, how the electronic device obtains the first sound intensity is the same as how the electronic device obtains the second sound intensity. For example, in the case where the first sound intensity is determined by taking the largest one of the sound intensities corresponding to the respective multi-frame voice contents included in the sound content (collected by the first headphone) as the first sound intensity, the second sound intensity may be determined by taking the largest one of the sound intensities corresponding to the respective multi-frame voice contents included in the sound content (collected by the second headphone) as the second sound intensity.
Further, alternatively, the second earpiece may be a missing one, and then be located relatively farther from the target object than the first earpiece. Taking the target object as an example of the sound source, the sound emitted by the sound source may experience various unknown environments on the way to the second earphone, which may cause sudden change or distortion of the sound. And the first earphone can acquire the sound emitted by the sound source more truly because the first earphone is relatively close to the sound source. Then, as one way, the electronic device may determine, in a case where the processing rate is improved and the accuracy is ensured, the first sound intensity as the largest one of the sound intensities corresponding to the respective plural frames of the voice content included in the sound content (captured by the first headphone), and determine the second sound intensity as the average of the sound intensities of the respective plural frames of the voice content included in the sound content (captured by the second headphone).
Step S130: and acquiring the distance between the first earphone and a target object.
The electronic device can acquire the distance between the first earphone and the target object in various ways. As one way, the electronic device may be displayed with a distance input interface before performing step S110, so that the user inputs the distance between the first earphone and the target object at the distance input interface. As shown in fig. 4, an input box 98 is displayed in the distance input interface 99, in which the user can input the position of the headset from the sound source after wearing, and a button 97 can be activated after the input is completed. The distance value filled by the user can be determined by the user by means of the measuring tool itself after actual measurement. The measurements may also be taken by the electronic device, for example, the electronic device may prompt the user to place the speaker of the electronic device in the user's mouth after being triggered to play audio through the speaker. In this case, the electronic device may obtain the playing time and the time when the first earphone receives the playing sound, so that the transmission time of the sound in the middle may be determined, and then the distance from the first earphone to the mouth may be obtained by combining the transmission speed of the sound wave. The sound played by the electronic equipment can be set so as to prevent the first earphone from mistakenly taking the time of receiving other sounds as the time of receiving the sound sent by the electronic equipment.
Optionally, in a case where the target object is a mouth of the user, the distance is a distance from the first earphone to the mouth of the user in a wearing state. As a way, a touch key named headset retrieving may be configured in a toolbar of the electronic device, and when the user touches the touch key, the electronic device may be triggered to detect whether the first headset is in a wearing state, and when the first headset is detected to be in the wearing state, the prestored distance between the first headset and the target object may be obtained, and a prompt message may be simultaneously sent to prompt the user to speak out the specified voice content. As shown in fig. 5, when it is detected that the user slides the screen from the top of the screen toward the bottom of the screen on the desktop, a toolbar 96 may be displayed, and a touch key 95 is displayed in the toolbar 96.
Furthermore, as another mode, in a case that the electronic device is configured with a voice assistant, the electronic device may trigger to detect whether the first earphone is in a wearing state in a voice control mode, and if the first earphone is detected to be in the wearing state, continue to acquire a distance between the first earphone and the target object, which is stored in advance, and simultaneously send out a prompt message to prompt the user to speak out the specified voice content.
Step S140: obtaining a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity.
Then, in a case where the electronic device has acquired the distance between the first earphone and the target object, the distance between the second earphone and the target object may be determined according to the distance between the first earphone and the target object and the first sound intensity being equal to the distance between the second earphone and the target object and the second sound intensity.
In the process of finding the second earphone, in order to facilitate the user to perceive the position of the second earphone, the electronic device may further send a prompt message trigger instruction to the second earphone, so that the second earphone responds to the prompt message trigger instruction to send a prompt message.
Optionally, if it is detected that the second earphone supports vibration, sending a prompt message triggering instruction for triggering the earphone to vibrate to the second earphone, so as to vibrate the second earphone; or sending a prompt message triggering instruction for triggering the earphone to play the sound with the set frequency to the second earphone so that the second earphone plays the sound with the set frequency.
Wherein the electronic device may determine whether the second earpiece supports vibration in a variety of ways. As a mode, if the electronic device and the headset communicate with each other in a bluetooth or wifi manner, then the device model of the second headset may be carried in the wireless signal sent by the second headset based on the bluetooth protocol or wifi protocol, and then the electronic device may analyze the model of the second headset from the wireless signal sent by the second headset after receiving the wireless signal, so as to query whether the second headset supports vibration based on the model. Optionally, the electronic device may store a data table locally in advance for recording the model of the earphone supporting vibration, and after the electronic device acquires the model of the second earphone, the electronic device may determine whether the second earphone supports vibration by means of table lookup.
Furthermore, as another mode, the second headset may add the device model of the second headset after the voice content when sending the collected voice content to the electronic device, so that the electronic device may extract the device model at the same time when extracting the voice content.
The application provides a pair of equipment positioning method, through electronic equipment acquires the first sound intensity that the sound source that first earphone was gathered sent sound, and the second earphone is gathered the second sound intensity that the sound source sent sound, then again based on acquireing under the condition of the distance between first earphone and the target object, again based on distance between first earphone and the target object first sound intensity and second sound intensity acquire the second earphone with distance between the target object. Therefore, under the condition that the second earphone is lost, the distance between the second earphone and the target object can be determined according to the known distance between the first earphone and the known target object and by combining the sound intensity of the sound of the same sound source, which is acquired by the first earphone and the second earphone, so that the user can quickly find the lost earphone, and the user experience is greatly improved.
Referring to fig. 6, an apparatus positioning method provided in the present application is applied to an electronic apparatus, and the method includes:
step S210: the electronic equipment acquires first sound intensity, and the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone.
Step S220: receiving initial sound intensity sent by the second earphone and intensity correction parameters collected by the second earphone;
step S230: and correcting the initial sound intensity based on the intensity correction parameter to obtain the second sound intensity.
It should be noted that if the second earphone is lost, the second earphone can be placed back in some small gap or in some closed box. Taking the seam as an example, if the sound collection module for collecting sound of the second earphone is pressed by an object, the sound intensity of the collected voice content is inevitably small, and further, the distance between the electronic device and the target object is calculated by mistake. For example, as shown in fig. 7, the second earphone 120 is provided with a sound collection module 121 and a pressure sensing module 122 adjacent to the sound collection module 121, thereby facilitating detection of whether the sound collection module 121 is pressed.
Moreover, if the second earphone is placed in the closed box, the box will also isolate the propagation of sound, which still causes the sound intensity of the collected voice content to be small, and further causes the electronic device to calculate the distance between the electronic device and the target object by mistake.
Then to ameliorate the above problem, the second headset will also simultaneously transmit the intensity correction parameter when transmitting the voice signal to the electronic device. So that the electronic device modifies the initial sound intensity to obtain the second sound intensity based on the intensity modification parameter.
By one approach, the intensity modification parameter includes a squeezed intensity value of the second earphone, and the step of modifying the initial sound intensity based on the intensity modification parameter to obtain the second sound intensity includes: determining whether the squeezed strength value is greater than a pressure threshold value; if the pressure is larger than the pressure threshold value; and according to the amplitude of the extruded strength value exceeding the pressure threshold value, improving the initial sound intensity to obtain a second sound intensity.
As one mode, the electronic device stores a corresponding relationship between the squeezed intensity value and the sound intensity increase amplitude. After the electronic equipment acquires the extruded strength value, calculating the amplitude of the extruded strength value exceeding the pressure threshold value, and then determining the sound intensity to be improved according to the corresponding relation.
Alternatively, the second headphone includes a headphone main body and a plurality of infrared sensors provided along a circumferential direction of the headphone main body, the intensity modification parameter includes a distance value acquired by each of the plurality of infrared sensors, and the step of modifying the initial sound intensity based on the intensity modification parameter to obtain the second sound intensity includes: judging whether the distance values acquired by the infrared sensors are all smaller than a set distance value or not; and if the initial sound intensity is smaller than the set distance value, the initial sound intensity is improved to obtain a second sound intensity. For example, as shown in fig. 8, the infrared sensor provided in the second headphone 120 may emit an infrared signal in a direction indicated by an arrow in the figure to detect whether there is an object obstructing sound propagation in the direction of transmitting the infrared signal.
Step S240: and acquiring the distance between the first earphone and a target object.
Step S250: obtaining a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity.
According to the equipment positioning method, under the condition that the second earphone is lost, the distance between the second earphone and the target object can be determined according to the known distance between the first earphone and the known target object and the sound intensity of the sound of the same sound source collected by the first earphone and the second earphone respectively, so that a user can conveniently and quickly find the lost earphone, and the user experience is greatly improved. And the initial sound intensity sent by the second earphone can be corrected by the intensity correction parameter collected by the second earphone to obtain a second sound intensity capable of calculating the distance of the second earphone more accurately, so that the distance between the second earphone and the target object can be further acquired more accurately.
Referring to fig. 9, an apparatus positioning method provided by the present application is applied to an electronic apparatus, and the method includes:
step S310: the electronic equipment acquires first sound intensity, and the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone.
Step S320: and acquiring second sound intensity, wherein the second sound intensity is acquired by the second earphone and is the intensity of sound emitted by the sound source.
Step S330: obtaining a distance between the first earphone and a target object, the target object including the electronic device and the sound source.
Step S340: obtaining a distance between the second earphone and the sound source based on the distance between the first earphone and the sound source, the first sound intensity and the second sound intensity.
Step S350: obtaining a distance between the second earphone and the electronic device based on the distance between the first earphone and the electronic device, the first sound intensity and the second sound intensity.
According to the equipment positioning method, under the condition that the second earphone is lost, the distance between the second earphone and the target object can be determined according to the known distance between the first earphone and the known target object and the sound intensity of the sound of the same sound source collected by the first earphone and the second earphone respectively, so that a user can conveniently and quickly find the lost earphone, and the user experience is greatly improved. And the distances from the second earphone to the sound source and the electronic equipment can be calculated, so that the user can judge the position of the second earphone conveniently.
Referring to fig. 10, a device positioning method provided by the present application is applied to an earphone apparatus, where the earphone apparatus includes a first earphone and a second earphone, and the first earphone is connected to an electronic device and the second earphone respectively, and the method includes:
step S410: the first earphone acquires first sound intensity, and the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone.
Step S420: and acquiring second sound intensity, wherein the second sound intensity is acquired by the second earphone and is the intensity of sound emitted by the sound source.
Step S430: and acquiring the distance between the first earphone and a target object.
Step S440: obtaining a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity.
Step S450: and sending the distance between the second earphone and the target object to the electronic equipment.
The device positioning method provided by the application enables the distance between the second earphone and the target object to be determined according to the known distance between the first earphone and the known target object in the earphone device and the sound intensity of the sound of the same sound source collected by the first earphone and the second earphone respectively under the condition that the second earphone in the earphone device is lost, and therefore a user can conveniently and quickly find the lost earphone, and user experience is greatly improved. And the distances from the second earphone to the sound source and the electronic equipment can be calculated, so that the user can judge the position of the second earphone conveniently.
Referring to fig. 11, a device positioning apparatus 500 provided by the present application, operating on an electronic device, includes: a signal acquisition unit 510, a reference information acquisition unit 520, a positioning unit 530, and a prompt information transmission unit 540.
A signal obtaining unit 510, configured to obtain a first sound intensity, where the first sound intensity is an intensity of a sound emitted by a sound source collected by a first earphone;
the signal obtaining unit 510 is further configured to obtain a second sound intensity, where the second sound intensity is an intensity of sound emitted by the sound source collected by the second earphone;
a reference information obtaining unit 520, configured to obtain a distance between the first headphone and a target object;
a positioning unit 530 configured to obtain a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity, and the second sound intensity.
A prompt information sending unit 540, configured to send a prompt information trigger instruction to the second earphone, so that the second earphone sends a prompt information in response to the prompt information trigger instruction.
As a mode, the prompt information sending unit 540 is specifically configured to send a prompt information trigger instruction for triggering the earphone to vibrate to the second earphone if it is detected that the second earphone supports vibration, so as to vibrate the second earphone; or sending a prompt message triggering instruction for triggering the earphone to play the sound with the set frequency to the second earphone so that the second earphone plays the sound with the set frequency.
Referring to fig. 12, the present application provides an apparatus 600 for positioning a device, which is operated on an electronic device, where the apparatus 600 includes: a signal acquisition unit 610, a parameter modification unit 620, a reference information acquisition unit 630, and a positioning unit 640.
The signal obtaining unit 610 is configured to obtain a first sound intensity, where the first sound intensity is an intensity of a sound emitted by a sound source collected by the first earphone.
The signal obtaining unit 610 is further configured to receive an initial sound intensity sent by the second earphone and an intensity correction parameter collected by the second earphone;
a parameter modifying unit 620, configured to modify the initial sound intensity to obtain the second sound intensity based on the intensity modifying parameter.
As a way, the strength modification parameter includes the second headphone squeezed strength value, in this case, the parameter modification unit 620 is specifically configured to determine whether the squeezed strength value is greater than a pressure threshold value; if the pressure is larger than the pressure threshold value; and according to the amplitude of the extruded strength value exceeding the pressure threshold value, improving the initial sound intensity to obtain a second sound intensity.
Alternatively, the second earphone includes an earphone body and a plurality of infrared sensors arranged along a circumferential direction of the earphone body, and the strength modification parameter includes distance values acquired by the plurality of infrared sensors, in which case, the parameter modification unit 620 is specifically configured to determine whether all of the distance values acquired by the plurality of infrared sensors are smaller than a set distance value; and if the initial sound intensity is smaller than the set distance value, the initial sound intensity is improved to obtain a second sound intensity.
A reference information obtaining unit 630, configured to obtain a distance between the first earphone and the target object.
A positioning unit 640, configured to obtain a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity, and the second sound intensity.
Referring to fig. 13, a device positioning apparatus 700 provided by the present application, operating on an electronic device, includes: a signal acquisition unit 710, a reference information acquisition unit 720, a first positioning calculation unit 730, and a second positioning calculation unit 740.
The signal obtaining unit 710 is configured to obtain a first sound intensity, where the first sound intensity is an intensity of a sound emitted by a sound source collected by the first earphone.
The signal obtaining unit 710 is configured to obtain a second sound intensity, where the second sound intensity is the intensity of the sound emitted by the sound source collected by the second earphone.
And a reference information acquiring unit 720 for acquiring a distance between the first earphone and the target object.
A first positioning calculation unit 730, configured to obtain a distance between the second earphone and the sound source based on the distance between the first earphone and the sound source, the first sound intensity, and the second sound intensity.
A second positioning calculation unit 740, configured to obtain a distance between the second earphone and the electronic device based on the distance between the first earphone and the electronic device, the first sound intensity, and the second sound intensity.
Referring to fig. 14, a device positioning apparatus 800 provided by the present application operates in an earphone device, where the earphone device includes a first earphone and a second earphone, and the first earphone is connected to an electronic device and the second earphone, respectively, and the apparatus 800 includes: a signal acquisition unit 810, a reference information acquisition unit 820, a positioning unit 830, and an information transmission unit 840.
The signal obtaining unit 810 is configured to obtain a first sound intensity, where the first sound intensity is an intensity of a sound emitted by a sound source collected by the first earphone.
The signal obtaining unit 810 is further configured to obtain a second sound intensity, where the second sound intensity is the intensity of the sound emitted by the sound source collected by the second earphone.
A reference information obtaining unit 820, configured to obtain a distance between the first earphone and a target object.
A positioning unit 830, configured to obtain a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity, and the second sound intensity.
An information sending unit 840, configured to send the distance between the second earphone and the target object to the electronic device.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling. In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
To sum up, the device positioning method, the device, the earphone device and the electronic device provided by the application detect whether audio playing is currently performed through the earphone when the electronic device is in an audio output state, detect whether the earphone is in a wearing state if audio playing is detected through the earphone, and output audio at a first volume if the earphone is in the wearing state. The method enables the electronic equipment to determine the volume of the output audio according to the wearing state of the earphone when the electronic equipment outputs the audio through the earphone, and further outputs the audio with the volume smaller than that when the earphone is worn when the electronic equipment is detected not to be worn, so that the electric quantity of the earphone and the electronic equipment is saved.
An electronic device provided by the present application will be described below with reference to fig. 15.
Referring to fig. 15, based on the device positioning method and apparatus, another electronic device 200 capable of performing the device positioning method is further provided in the embodiment of the present application. The electronic device 200 includes one or more processors 102 (only one shown), a memory 104, a wireless module 106, an audio module 108, and a gesture detection module 110 coupled to each other. The memory 104 stores programs that can execute the content of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
Processor 102 may include one or more processing cores, among other things. The processor 102 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, a target application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the electronic device 200 in use (such as the aforementioned text documents), and the like.
The wireless module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices, for example, an audio playing device. The wireless module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The wireless module 106 may communicate with various networks, such as the internet, an intranet, a wireless network, or with other electronic devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless network described above may use various communication standards, protocols, and technologies, including but not limited to WLAN protocols and bluetooth protocols, and may even include those that are not currently under development.
Further, the audio module 108 may be used to process audio output by applications running in the electronic device 200. The gesture detection module 110 may include an acceleration sensor, a gyroscope, and the like to detect a gesture or acceleration of the electronic device 200.
The sound collection module 112 can collect voice signals and transmit the voice signals to other electronic devices through the wireless module 106.
The electronic device 200 may be the electronic device 100 described above. The first earphone 110 or the second earphone 120 may be the same as described above.
Referring to fig. 16, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A device positioning method is applied to an electronic device, and the method comprises the following steps:
the electronic equipment acquires first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by a first earphone;
receiving initial sound intensity sent by a second earphone and intensity correction parameters collected by the second earphone, wherein the intensity correction parameters comprise the extruded intensity value of the second earphone;
determining whether the squeezed strength value is greater than a pressure threshold value;
if the pressure is larger than the pressure threshold value; according to the amplitude that the extruded strength value exceeds the pressure threshold value, the initial sound intensity is improved to obtain a second sound intensity, and the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone;
acquiring the distance between the first earphone and a target object, wherein the target object is the sound source;
obtaining a distance between the second earphone and the target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity.
2. The method of claim 1, further comprising:
and sending a prompt message trigger instruction to the second earphone so that the second earphone responds to the prompt message trigger instruction to send prompt messages.
3. The method of claim 2, wherein the step of sending a reminder trigger instruction to the second headset to cause the second headset to send a reminder in response to the reminder trigger instruction comprises:
if the fact that the second earphone supports vibration is detected, sending a prompt message triggering instruction for triggering the second earphone to vibrate to the second earphone so as to enable the second earphone to vibrate;
or sending a prompt message triggering instruction for triggering the second earphone to play the sound with the set frequency to the second earphone, so that the second earphone plays the sound with the set frequency.
4. A device positioning method is applied to an earphone device, the earphone device comprises a first earphone and a second earphone, the first earphone is respectively connected with an electronic device and the second earphone, and the method comprises the following steps:
the first earphone acquires a first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source acquired by the first earphone;
receiving initial sound intensity sent by the second earphone and intensity correction parameters collected by the second earphone, wherein the intensity correction parameters comprise the extruded intensity value of the second earphone;
determining whether the squeezed strength value is greater than a pressure threshold value;
if the pressure is larger than the pressure threshold value; according to the amplitude that the extruded strength value exceeds the pressure threshold value, the initial sound intensity is improved to obtain a second sound intensity, and the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone;
acquiring the distance between the first earphone and a target object, wherein the target object is the sound source;
acquiring a distance between the second earphone and a target object based on the distance between the first earphone and the target object, the first sound intensity and the second sound intensity;
and sending the distance between the second earphone and the target object to the electronic equipment.
5. An apparatus for locating a device, the apparatus being operable with an electronic device, the apparatus comprising: the signal acquisition unit is used for acquiring first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone;
the signal acquisition unit is further configured to receive an initial sound intensity sent by the second earphone and an intensity correction parameter collected by the second earphone, where the intensity correction parameter includes an intensity value of the second earphone being squeezed; determining whether the squeezed strength value is greater than a pressure threshold value; if the pressure is larger than the pressure threshold value; according to the amplitude that the extruded strength value exceeds the pressure threshold value, the initial sound intensity is improved to obtain a second sound intensity, and the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone;
a reference information acquiring unit configured to acquire a distance between the first headphone and a target object, the target object being the sound source;
a positioning unit, configured to obtain a distance between the second earphone and a target object based on the distance between the first earphone and the target object, the first sound intensity, and the second sound intensity.
6. An apparatus positioning device, operating in an earphone apparatus, the earphone apparatus including a first earphone and a second earphone, the first earphone being connected to an electronic device and the second earphone, respectively, the apparatus positioning device comprising:
the signal acquisition unit is used for acquiring first sound intensity, wherein the first sound intensity is the intensity of sound emitted by a sound source collected by the first earphone;
the signal acquisition unit is further configured to receive an initial sound intensity sent by the second earphone and an intensity correction parameter collected by the second earphone, where the intensity correction parameter includes an intensity value of the second earphone being squeezed; determining whether the squeezed strength value is greater than a pressure threshold value; if the pressure is larger than the pressure threshold value; according to the amplitude that the extruded strength value exceeds the pressure threshold value, the initial sound intensity is improved to obtain a second sound intensity, and the second sound intensity is the intensity of sound emitted by the sound source collected by the second earphone;
a reference information acquiring unit configured to acquire a distance between the first headphone and a target object, the target object being the sound source; a positioning unit, configured to obtain a distance between the second earphone and a target object based on a distance between the first earphone and the target object, the first sound intensity, and a second sound intensity;
and the information sending unit is used for sending the distance between the second earphone and the target object to the electronic equipment.
7. An electronic device comprising one or more processors and memory; one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-3.
8. An earphone arrangement comprising a first earphone and a second earphone, the first earphone comprising one or more processors and a memory; one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of claim 4.
9. A computer-readable storage medium, having program code stored therein, wherein the program code when executed by a processor performs the method of any of claims 1-3.
10. A computer-readable storage medium, having program code stored therein, wherein the method of claim 4 is performed when the program code is executed by a processor.
CN201811161377.XA 2018-09-30 2018-09-30 Equipment positioning method and device, earphone device and electronic equipment Active CN109413556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811161377.XA CN109413556B (en) 2018-09-30 2018-09-30 Equipment positioning method and device, earphone device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161377.XA CN109413556B (en) 2018-09-30 2018-09-30 Equipment positioning method and device, earphone device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109413556A CN109413556A (en) 2019-03-01
CN109413556B true CN109413556B (en) 2021-03-02

Family

ID=65466678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161377.XA Active CN109413556B (en) 2018-09-30 2018-09-30 Equipment positioning method and device, earphone device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109413556B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602595A (en) * 2019-10-16 2019-12-20 南京沁恒微电子股份有限公司 Split type Bluetooth headset and positioning method thereof
CN112083908B (en) * 2020-07-29 2023-05-23 联想(北京)有限公司 Method for simulating relative movement direction of object and audio output device
CN113905302B (en) * 2021-10-11 2023-05-16 Oppo广东移动通信有限公司 Method and device for triggering prompt message and earphone

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376847B (en) * 2013-08-12 2019-01-15 联想(北京)有限公司 A kind of audio signal processing method and device
KR102005071B1 (en) * 2015-06-05 2019-07-30 애플 인크. Change of companion communication device behavior based on wearable device state
US9961431B2 (en) * 2015-09-30 2018-05-01 Apple Inc. Earbud case with wireless radio shutdown feature
CN105451111B (en) * 2015-12-10 2019-03-19 小米科技有限责任公司 Earphone control method for playing back, device and terminal
US10079027B2 (en) * 2016-06-03 2018-09-18 Nxp B.V. Sound signal detector
CN205793195U (en) * 2016-06-28 2016-12-07 唐建芬 A kind of new-type bluetooth hearing aid earphone
CN106604167B (en) * 2016-11-21 2019-07-26 捷开通讯(深圳)有限公司 A kind of method and mobile terminal of adjust automatically earphone left and right acoustic channels output volume
CN207166722U (en) * 2017-09-26 2018-03-30 吉安市立讯射频科技股份有限公司 A kind of wireless Bluetooth headsets apart from alarm set
CN108600885B (en) * 2018-03-30 2020-05-22 Oppo广东移动通信有限公司 Sound signal processing method and related product
CN108538320B (en) * 2018-03-30 2020-09-11 Oppo广东移动通信有限公司 Recording control method and device, readable storage medium and terminal

Also Published As

Publication number Publication date
CN109413556A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US10649720B2 (en) Sound effect configuration method and system and related device
CN109151211B (en) Voice processing method and device and electronic equipment
US10628119B2 (en) Sound effect processing method and mobile terminal
CN109413556B (en) Equipment positioning method and device, earphone device and electronic equipment
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN110677768A (en) Wireless earphone control method and device, wireless earphone and storage medium
US10628118B2 (en) Sound effect configuration method and related device
CN109002759A (en) text recognition method, device, mobile terminal and storage medium
CN109656827B (en) Control tree generation method and terminal equipment
CN106528545B (en) Voice information processing method and device
CN104615655A (en) Information recommendation method and device
CN108932102B (en) Data processing method and device and mobile terminal
CN109994111B (en) Interaction method, interaction device and mobile terminal
CN107948729B (en) Rich media processing method and device, storage medium and electronic equipment
CN108197264A (en) Webpage accelerates display methods, device, mobile terminal and storage medium
CN108492837B (en) Method, device and storage medium for detecting audio burst white noise
CN108848267B (en) Audio playing method and mobile terminal
CN110069407B (en) Function test method and device for application program
CN109062648B (en) Information processing method and device, mobile terminal and storage medium
CN109065017B (en) Voice data generation method and related device
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
CN108803961B (en) Data processing method and device and mobile terminal
CN113905302B (en) Method and device for triggering prompt message and earphone
CN107957899B (en) Screen recording method and device, computer readable storage medium and mobile terminal
CN103606373B (en) A kind of audio frequency method of reducing, device and terminal unit

Legal Events

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