CN112040361B - Earphone control method, earphone control device and storage medium - Google Patents

Earphone control method, earphone control device and storage medium Download PDF

Info

Publication number
CN112040361B
CN112040361B CN202010916697.2A CN202010916697A CN112040361B CN 112040361 B CN112040361 B CN 112040361B CN 202010916697 A CN202010916697 A CN 202010916697A CN 112040361 B CN112040361 B CN 112040361B
Authority
CN
China
Prior art keywords
wireless
earphone
target
wireless headset
wireless earphone
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
CN202010916697.2A
Other languages
Chinese (zh)
Other versions
CN112040361A (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 CN202010916697.2A priority Critical patent/CN112040361B/en
Publication of CN112040361A publication Critical patent/CN112040361A/en
Application granted granted Critical
Publication of CN112040361B publication Critical patent/CN112040361B/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
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

The application discloses an earphone control method, an earphone control device and a storage medium, which are applied to a first wireless earphone, wherein the first wireless earphone comprises a first UWB module, and the method comprises the following steps: establishing a communication connection between the first wireless headset and a second wireless headset, the second wireless headset comprising a second UWB module; determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state; and when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone. By adopting the embodiment of the application, the distance between the earphones exceeds a certain range when the earphones are not worn, loss prevention prompt is carried out, and the earphones can be prevented from being lost.

Description

Earphone control method, earphone control device and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for controlling an earphone, and a storage medium.
Background
With the widespread use of electronic devices (such as mobile phones, tablet computers, and the like), the electronic devices have more and more applications and more powerful functions, and the electronic devices are developed towards diversification and personalization, and become indispensable electronic products in the life of users. Along with the popularization of electronic equipment, wireless earphones are also increasingly popular, but the wireless earphones are connected with a mobile phone through a Bluetooth module and are easy to lose, and finding through Bluetooth is inconvenient. It is difficult to accurately locate the lost earphone, and therefore, how to prevent the wireless earphone from being lost needs to be solved.
Disclosure of Invention
The embodiment of the application provides an earphone control method, an earphone control device and a storage medium, which can prevent a wireless earphone from being lost.
In a first aspect, an embodiment of the present application provides an earphone control method, which is applied to a first wireless earphone, where the first wireless earphone includes a first UWB module, and the method includes:
establishing a communication connection between the first wireless headset and a second wireless headset, the second wireless headset comprising a second UWB module;
determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
and when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone.
In a second aspect, an embodiment of the present application provides an earphone control device, which is applied to a first wireless earphone, where the first wireless earphone includes a first UWB module, and the device includes: a establishing unit, a determining unit and a prompting unit, wherein,
the establishing unit is used for establishing communication connection between the first wireless earphone and a second wireless earphone, and the second wireless earphone comprises a second UWB module;
the determining unit is configured to determine, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
the prompting unit is used for performing a first prompting operation when the target distance is greater than a preset distance, wherein the first prompting operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone.
In a third aspect, embodiments of the present application provide a wireless headset comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing some or all of the steps described in the method according to the first aspect of the embodiments of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is executed by a processor to implement part or all of the steps described in the method according to the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps described in the method according to the first aspect of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the earphone control method, apparatus and storage medium described in the embodiments of the present application are applied to a first wireless earphone, the first wireless earphone includes a first UWB module, a communication connection between the first wireless earphone and a second wireless earphone is established, the second wireless earphone includes a second UWB module, when at least one of the first wireless earphone and the second wireless earphone is not worn, a target distance between the first wireless earphone and the second wireless earphone is determined by the first UWB module and the second UWB module, when the target distance is greater than a preset distance, a first prompt operation is performed, the first prompt operation is used to prompt to find at least one of the first wireless earphone and the second wireless earphone, so that distance detection can be implemented by UWB when the earphones are not worn, and when the distance between the earphones exceeds a certain range, an anti-loss prompt is performed, the loss of the earphone can be prevented.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
fig. 3A is a schematic flowchart of a method for controlling an earphone according to an embodiment of the present application;
fig. 3B is a schematic structural diagram of a wireless headset according to an embodiment of the present disclosure;
fig. 3C is a schematic structural diagram of an earphone box according to an embodiment of the present application;
fig. 3D is a schematic diagram illustrating an exemplary wireless headset positioning provided by an embodiment of the present application;
fig. 3E is a schematic flowchart of another earphone control method provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of another earphone control method provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a wireless headset according to an embodiment of the present application;
fig. 6A is a block diagram illustrating functional units of an earphone control device according to an embodiment of the present disclosure;
fig. 6B is a block diagram illustrating functional units of another earphone control device according to an embodiment of the present disclosure;
fig. 6C is a block diagram illustrating functional units of another earphone control device according to an embodiment of the present disclosure;
fig. 6D is a block diagram illustrating functional units of another earphone control device according to an embodiment of the present disclosure;
fig. 6E is a block diagram illustrating functional units of another earphone control device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
In order to better understand the scheme of the embodiments of the present application, the following first introduces the related terms and concepts that may be involved in the embodiments of the present application.
The electronic device may include a computer-enabled device, such as a smart phone, a vehicle-mounted device, a wearable device, a smart watch, smart glasses, a wireless headset (e.g., a bluetooth headset), a headset box, a computing device, or other processing device connected to a wireless modem, as well as various forms of User Equipment (UE), a Mobile Station (MS), a virtual reality/augmented reality device, a terminal device (terminal device), and so on, and may also be a base Station or a server.
The electronic device may further include an intelligent home device, and the intelligent home device may be at least one of: intelligent audio amplifier, intelligent camera, intelligent electric rice cooker, intelligent wheelchair, intelligent massage armchair, intelligent furniture, intelligent dish washer, intelligent TV set, intelligent refrigerator, intelligent electric fan, intelligent room heater, intelligent clothes hanger that dries in the air, intelligent lamp, intelligent router, intelligent switch, intelligent flush mounting plate, intelligent humidifier, intelligent air conditioner, intelligent door, intelligent window, intelligent top of a kitchen range, intelligent sterilizer, intelligent closestool, the robot etc. of sweeping the floor do not restrict here.
The software and hardware operating environment of the technical scheme disclosed by the application is introduced as follows.
As shown, fig. 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a compass 190, a motor 191, a pointer 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural network processor NPU, among others. Wherein the different processing units may be separate components or may be integrated in one or more processors. In some embodiments, the electronic device 101 may also include one or more processors 110. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to complete the control of instruction fetching and instruction execution. In other embodiments, a memory may also be provided in processor 110 for storing instructions and data. Illustratively, the memory in the processor 110 may be a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from memory. This avoids repeated accesses and reduces the latency of the processor 110, thereby increasing the efficiency with which the electronic device 101 processes data or executes instructions.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a SIM card interface, a USB interface, and/or the like. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 101, and may also be used to transmit data between the electronic device 101 and peripheral devices. The USB interface 130 may also be used to connect to a headset to play audio through the headset.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G/6G, etc. applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (blue tooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (mini-light-emitting diode, mini), a Micro-o led, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or more display screens 194.
The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or more cameras 193.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, fingerprint recognition, voice recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
Internal memory 121 may be used to store one or more computer programs, including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so as to enable the electronic device 101 to execute the method for displaying page elements provided in some embodiments of the present application, and various applications and data processing. The internal memory 121 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system; the storage program area may also store one or more applications (e.g., gallery, contacts, etc.), and the like. The storage data area may store data (such as photos, contacts, etc.) created during use of the electronic device 101, and the like. Further, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage components, flash memory components, Universal Flash Storage (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 101 to execute the method for displaying page elements provided in the embodiments of the present application, and other applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110. The electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. Such as music playing, recording, etc.
The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., X, Y and the Z axis) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
Fig. 2 shows a block diagram of a software structure of the electronic device 100. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom. The application layer may include a series of application packages.
As shown in fig. 2, the application layer may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and answered, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
As shown in fig. 3A, fig. 3A is a flowchart illustrating a method for controlling an earphone according to an embodiment of the present application, and is applied to an electronic device shown in fig. 1 or fig. 2, where the electronic device may be a first wireless earphone, and the first wireless earphone includes a first UWB module, where the method includes:
301. establishing a communication connection between the first wireless headset and a second wireless headset, the second wireless headset comprising a second UWB module.
The first wireless earphone and the second wireless earphone can respectively comprise at least one communication module, the first wireless earphone and the second wireless earphone can be in communication connection with each other through the communication modules, and the communication modules can be at least one of the following: the wireless headset comprises a bluetooth module, an infrared module, an Ultra Wideband (UWB) module, a WIFI module, a mobile communication module (2G, 3G, 4G, 5G, 6G, etc.), etc., which are not limited herein, for example, the first wireless headset may comprise a first bluetooth module, the second wireless headset may comprise a second bluetooth module, and the first wireless headset and the second wireless headset are communicatively connected through the first bluetooth module and the second bluetooth module. The UWB module may include a UWB antenna that can be used to enable transmission or reception of UWB signals.
In a specific implementation, the first wireless earphone may be a master earphone or a slave earphone, and of course, the first wireless earphone and the second wireless earphone may be a pair of earphones which are paired in advance. In a specific implementation, a communication connection is established between at least one of the first wireless earphone and the second wireless earphone and the mobile terminal. As shown in fig. 3B, the first wireless headset may include a first UWB module and the second wireless headset may include a second UWB module.
302. Determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state.
In a specific implementation, the wearing state may refer to that the earphone is worn on an ear, and both the first wireless earphone and the second wireless earphone may include a proximity sensor, for example, the first wireless earphone may detect a distance between the first wireless earphone and an ear of a person through the proximity sensor, and when the distance is within a preset distance range, it may be determined that the first wireless earphone is in the wearing state. Or, the first wireless headset and the second wireless headset may each include an acceleration sensor, for example, the first wireless headset may detect a motion trajectory of the first wireless headset through the acceleration sensor, compare the motion trajectory with a preset trajectory, and when the motion trajectory is successfully compared with the preset trajectory, determine that the first wireless headset is in a wearing state, and in addition, the second wireless headset may also detect whether the second wireless headset is in the wearing state in the same manner, and the first wireless headset may send a state acquisition request to the second wireless headset, where the state acquisition request is used to acquire a state of the second wireless headset, receive state information sent by the second wireless headset, and when the state information indicates that the second wireless headset is in the wearing state, the first wireless headset detects that the second wireless headset is in the wearing state.
Further, when at least one of the first wireless headset and the second wireless headset is not worn, the first wireless headset may determine a target distance between the first wireless headset and the second wireless headset through the first UWB module and the second UWB module. In specific implementation, the positioning and ranging technology by UWB may include: two-way Ranging (TWR) technique, time Difference of Arrival (TDOA) technique, Phase Difference of Arrival (PDOA) technique, etc., which are not limited herein.
In one possible example, after the step 302, the following steps may be further included:
when the first wireless earphone and the second wireless earphone are both in a wearing state, the first UWB module is dormant, and the second UWB module is instructed to be dormant by the second wireless earphone.
In the specific implementation, the first wireless earphone and the second wireless earphone are both in a wearing state, which indicates that the user is using the earphone, that is, the earphone is on the ear of the user, so that the possibility that the earphone is lost does not exist, the first UWB module can be dormant, and thus, the power consumption of the first wireless earphone can be reduced.
303. And when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone.
Wherein, the preset distance can be set by the user or defaulted by the system, and the at least one earphone can be understood as the wireless earphone in the unworn state. In a specific implementation, if the target distance is greater than the preset distance, that is, if the distance between the first wireless earphone and the second wireless earphone exceeds a certain range, it indicates that there is a possibility that at least one of the first wireless earphone and the second wireless earphone is lost or will be lost, a first prompt operation is performed, where the first prompt operation may be used to prompt to find at least one of the first wireless earphone and the second wireless earphone, for example, at least one of the first wireless earphone and the second wireless earphone may be found through an earphone box or a mobile phone, as shown in fig. 3C, taking the earphone box as an example, the earphone box may include at least one UWB module, and earphone positioning may be implemented through at least three UWB modules, and since the position of the earphone box or the mobile phone is known, the position of the earphone may be quickly positioned, and in combination with an indoor map, the position of the first wireless earphone or the second wireless earphone may be marked in the indoor map, therefore, the risk of losing the wireless earphone can be reduced, and the user experience is improved.
The prompting mode of the first prompting operation may be at least one of the following: voice prompts, vibration prompts, display prompts, light prompts and the like, but are not limited thereto.
In a possible example, between the above steps 302 to 303, the following steps may be further included:
a1, acquiring a target geographic position;
a2, determining the preset distance corresponding to the target geographical position according to the mapping relation between the preset geographical position and the distance threshold.
The first wireless headset may acquire the target geographic location through a positioning technology, where the positioning technology may be a GPS positioning technology, a UWB positioning technology, or a WIFI positioning technology, and is not limited herein. The mapping relation between the preset geographic position and the distance threshold value can be prestored in the first wireless earphone, and then the preset distance corresponding to the target geographic position can be determined according to the mapping relation, so that different geographic positions can be set with different distances, different environments correspond to different geographic positions and are different, and once the earphone is lost, the difficulty of searching for the earphone is different.
In one possible example, after the step 302, the following steps may be further included:
and when the target distance is smaller than or equal to the preset distance, performing second prompt operation, wherein the second prompt operation is used for prompting that at least one earphone in the first wireless earphone and the second wireless earphone is placed back to the target earphone box.
In this embodiment of the application, the target earphone box may be any earphone box, or the target earphone box may be an earphone box bound with the first wireless earphone and the second wireless earphone in advance. The prompting mode of the second prompting operation may be at least one of the following: voice prompts, vibration prompts, display prompts, light prompts and the like, but are not limited thereto.
In the concrete implementation, when the target distance is smaller than or equal to the preset distance, it is indicated that the distance between the first wireless earphone and the second wireless earphone is relatively short, and then the second prompt operation can be performed, wherein the second prompt operation is used for prompting that at least one earphone in the first wireless earphone and the second wireless earphone is placed back to the target earphone box, so that a user can be prompted to place the earphone in time, and the user experience is improved.
Further, please refer to fig. 3D, fig. 3D is a schematic diagram illustrating an embodiment of the present application that a third UWB module is used to obtain position information of a second wireless headset, where the first wireless headset includes a first UWB module, and the first UWB module includes a first UWB antenna; the second wireless headset comprises a second UWB module comprising a second UWB antenna; the earphone box or the mobile phone comprises at least one UWB module comprising a UWB antenna, such as the UWB module of the earphone box or the mobile phone comprises a third UWB antenna. The first tangent angle of the first UWB antenna relative to the earphone box or the mobile phone is determined according to the UWB signal received by the first UWB antenna and the UWB signal received by the second UWB antenna, and specifically, a first distance difference between the UWB signal arriving at the first UWB antenna and the UWB signal arriving at the second UWB antenna can be determined according to the UWB signal received by the first UWB antenna and the UWB signal received by the second UWB antenna; a first tangent angle of the first UWB antenna with respect to the earphone box or the cellular phone is determined according to the first distance difference and a first separation distance between the first UWB antenna and the second UWB antenna.
Wherein, a first tangent angle of the first UWB antenna with respect to the earphone box or the mobile phone is determined according to the first distance difference and the first separation distance between the first UWB antenna and the second UWB antenna, and specifically, a distance y from the earphone box or the mobile phone to a connection line of the first UWB antenna of the first wireless earphone and the second UWB antenna of the second wireless earphone may be determined according to the following formula:
Figure BDA0002665267250000091
as shown in fig. 3D, D is a first separation distance between the first UWB antenna and the second UWB antenna, r is a first distance between the first UWB antenna and the earphone box or the mobile phone, and p is a first distance difference (r-p) between a distance from which the UWB signal reaches the first UWB antenna and a distance from which the UWB signal reaches the second UWB antenna; further, a first chamfer angle may be determined according to the first distance between the first UWB antenna and the headphone box or the mobile phone as the distances y and r, wherein, as shown in fig. 3D, a right triangle may be constructed according to the distances y and r, x is a leg of the right triangle, another leg of the right triangle is y, a hypotenuse of the right triangle is the first distance r between the first UWB antenna and the headphone box or the mobile phone, and a sine value of the first chamfer angle α is y/r.
For example, as shown in fig. 3E, when the first wireless earphone and the second wireless earphone are bluetooth earphones and the earphone box is a bluetooth earphone box, in a default state, the bluetooth earphone box and the left and right earphone UWB earphones may both be in a sleep state, when a user takes out the earphones from the bluetooth earphone box, the number of taken-out earphones is first detected, and if two bluetooth earphones are taken out, the bluetooth earphone box is defaulted to continue to be in the sleep state, the two bluetooth earphones are turned on, and a timer (timer) is set to time the mutual detection distance; if take out an earphone, then take out earphone box bluetooth box UWB and open to set up timer, regularly mutual measuring distance, but because bluetooth earphone box probably can place in the pocket or other have and shelter from position departments, consequently need the suggestion user to notice oneself and use bluetooth earphone box voluntarily and detect. Can be provided with proximity sensor on the bluetooth headset to this can accurately judge whether the earphone is in wearing the state, the particular case is as follows: A. the user takes out two earphones, and when all not wearing, then two bluetooth earphone UWB modules all open, and regularly mutual detection mutual distance to notice the bluetooth earphone box through the bluetooth and notice whether two earphones are lost simultaneously. (when two earphones are lost at the same time and the lost distance is very close, the alarm can not be triggered); B. the user takes out the two earphones, and when only one earphone is worn, the two Bluetooth earphone UWB modules are started, and whether the earphone which is not worn is lost is detected regularly; C. when the user wears the two earphones, the UWB function is turned off, and the two layers of meanings are as follows: 1, when both earphones are worn, UWB signals can be cut off and cannot be communicated even when the earphones are started, 2, the earphones cannot be lost when the wearing state is default, and the UWB is turned off to save power consumption; D. when a user only takes out one earphone and does not wear the earphone, the distance between the Bluetooth earphone box and the taken-out earphone is detected through UWB; E. when the user only takes out one earphone, and when wearing, the bluetooth earphone box and the UWB that takes out the earphone are closed. In addition, in the specific implementation, as long as the bluetooth headset box UWB is turned on, the default is reception, and the bluetooth headset is at the transmitting end. When two bluetooth headset mutual positioning, acquiesce to regard as the transmission with low-battery earphone, high-battery earphone is as receiving.
In a possible example, before the step 301, the following steps may be further included:
b1, acquiring a first signal strength value of the second wireless earphone detected by the first wireless earphone;
b2, when the first signal strength value is in a preset signal strength range, executing the step of establishing the communication connection between the first wireless earphone and the second wireless earphone.
The preset signal intensity range can be set by the user or defaulted by the system. In specific implementation, the first wireless headset may obtain a first signal strength value of the second wireless headset detected by the first wireless headset, and when the first signal strength value is within a preset signal strength range, the step of establishing the communication connection between the first wireless headset and the second wireless headset is performed, otherwise, the step 301 may not be performed, so that when the signal strength is within a certain range, the communication connection between the first wireless headset and the second wireless headset is established. Of course, the first signal strength value and the preset signal strength range may refer to a bluetooth signal or a UWB signal, or other signals, which is not limited herein.
Further, in a possible example, the step B1 of obtaining the first signal strength value of the second wireless headset detected by the first wireless headset may include the following steps:
b11, acquiring a signal intensity change curve of the second wireless earphone in a preset time period, wherein the horizontal axis of the signal intensity change curve is time, and the vertical axis of the signal intensity change curve is a signal intensity value;
b12, sampling the signal intensity change curve to obtain a plurality of signal intensity values;
b13, determining a target mean value according to the signal intensity values;
b14, performing mean square error operation according to the signal intensity values to obtain a target mean square error;
b15, determining a target adjusting coefficient corresponding to the target mean square error according to a mapping relation between a preset mean square error and an adjusting coefficient;
and B16, adjusting the target mean value according to the target adjusting coefficient to obtain a first signal strength value of the second wireless earphone.
The preset time period may be preset or default, and the preset time period may be a time period before the current time. The first wireless earphone can also store the mapping relation between the preset mean square error and the adjusting coefficient in advance.
In a specific implementation, the first wireless earphone may obtain a signal intensity variation curve of the second wireless earphone detected by the first wireless earphone in a preset time period, a horizontal axis of the signal intensity variation curve is time, a vertical axis of the signal intensity variation curve is signal intensity value, the signal intensity variation curve is uniformly sampled to obtain a plurality of signal intensity values, a target mean value is determined according to the plurality of signal intensity values, mean square error operation is performed according to the plurality of signal intensity values to obtain a target mean square error, a target adjustment coefficient corresponding to the target mean square error is determined according to a mapping relation between the preset mean square error and the adjustment coefficient, and the target mean value is adjusted according to the target adjustment coefficient to obtain the first signal intensity of the second wireless earphone.
In this embodiment of the application, the value range may also be set by the user or updated by the system, for example, the value range of the adjustment coefficient may be-0.15 to 0.15, and of course, further, the first wireless headset may adjust the target mean value according to the target adjustment coefficient to obtain the first signal strength value, and the specific calculation mode of the first signal strength value may refer to the following formula:
first signal strength value (1+ target adjustment coefficient) target mean value
Therefore, the mean value reflects the change condition of the signal within a period of time, and the mean square error reflects the stability of the signal, so that the signal intensity of the second wireless earphone can be accurately detected.
In a possible example, the step 303, performing the first prompting operation, may include the following steps:
c1, acquiring a target fingerprint image;
c2, carrying out image quality evaluation on the target fingerprint image to obtain a target image quality evaluation value;
c3, when the target image quality evaluation value is larger than a preset image quality evaluation threshold value, matching the target fingerprint image with a preset fingerprint template;
c4, when the matching between the target fingerprint image and the preset fingerprint template is successful, executing the step of carrying out the first prompt operation.
Wherein, in this application embodiment, first wireless earphone can realize fingerprint collection through this fingerprint identification module including fingerprint identification module, or, first wireless earphone can acquire the target fingerprint image of gathering by mobile terminal. The preset image quality evaluation threshold and the preset fingerprint template can be set by a user or defaulted by a system, and can be stored in the first wireless earphone. In a specific implementation, the first wireless headset may acquire the target fingerprint image through the camera, and perform image quality evaluation on the target fingerprint image by using at least one image quality evaluation index to obtain a target image quality evaluation value, where the image quality evaluation index may be at least one of: entropy, average gradient, edge preservation, sharpness, etc., and is not limited herein. Furthermore, the first wireless earphone can match the target fingerprint image with the preset fingerprint template when the target image quality evaluation value is greater than the preset image quality evaluation threshold value, and execute step 303 when the target fingerprint image is successfully matched with the preset fingerprint template, otherwise, can prompt to re-collect the fingerprint image, so that the fingerprint identification efficiency is favorably improved.
Further, the step C2 of evaluating the image quality of the target fingerprint image to obtain the target image quality evaluation value may include the following steps:
c21, performing multi-scale feature decomposition on the target fingerprint image to obtain a low-frequency feature component image and a high-frequency feature component image;
c22, dividing the low-frequency characteristic component image into a plurality of areas;
c23, determining the information entropy corresponding to each of the plurality of areas to obtain a plurality of information entropies;
c24, determining average information entropy and target mean square error according to the plurality of information entropies;
c25, determining a target fine tuning adjustment coefficient corresponding to the target mean square error;
c26, adjusting the average information entropy according to the target fine adjustment coefficient to obtain a target information entropy;
c27, determining a third evaluation value corresponding to the target information entropy according to a preset mapping relation between the information entropy and the evaluation value;
c28, acquiring a first shooting parameter of the target corresponding to the target fingerprint image;
c29, determining a target low-frequency weight corresponding to the first shooting parameter of the target according to a mapping relation between preset shooting parameters and the low-frequency weight, and determining a target high-frequency weight according to the target low-frequency weight;
c30, determining the distribution density of the target characteristic points according to the high-frequency characteristic component images;
c31, determining a fourth evaluation value corresponding to the target feature point distribution density according to a preset mapping relation between the feature point distribution density and the evaluation value;
and C32, performing weighting operation according to the third evaluation value, the fourth evaluation value, the target low-frequency weight and the target high-frequency weight to obtain a target image quality evaluation value of the target fingerprint image.
In specific implementation, the first wireless headset may perform multi-scale feature decomposition on the target fingerprint image by using a multi-scale decomposition algorithm to obtain a low-frequency feature component image and a high-frequency feature component image, where the multi-scale decomposition algorithm may be at least one of: the pyramid transform algorithm, the wavelet transform, the contourlet transform, the shear wave transform, etc., are not limited herein, and in a specific implementation, the number of the low-frequency feature component images may be 1, and the number of the high-frequency feature component images may be 1 or more. Further, the low-frequency feature component image may be divided into a plurality of regions, each of which has the same or different area size. The low-frequency feature component image reflects the main features of the image and can occupy the main energy of the image, and the high-frequency feature component image reflects the detail information of the image.
Further, the first wireless earphone can determine information entropy corresponding to each of the plurality of regions to obtain a plurality of information entropies, and determine average information entropy and target mean square error according to the plurality of information entropies, wherein the information entropy can reflect the amount of image information to a certain extent, and the mean square error can reflect the stability of the image information. The mapping relation between the preset mean square error and the fine adjustment coefficient can be prestored in the first wireless headset, and then the target fine adjustment coefficient corresponding to the target mean square error can be determined according to the mapping relation.
Further, the first wireless earphone may adjust the average entropy according to the target fine-tuning adjustment coefficient to obtain a target entropy, where the target entropy is (1+ target fine-tuning adjustment coefficient) average entropy. The first wireless headset may store a mapping relationship between a preset information entropy and an evaluation value in advance, and further, may determine a third evaluation value corresponding to the target information entropy according to the mapping relationship between the preset information entropy and the evaluation value.
In addition, the first wireless headset may acquire a first target shooting parameter corresponding to the target fingerprint image, and the first target shooting parameter refers to the above description and is not described herein again. The first wireless earphone can also pre-store a mapping relation between preset shooting parameters and low-frequency weights, and further can determine a target low-frequency weight corresponding to a first target shooting parameter according to the mapping relation between the preset shooting parameters and the low-frequency weights, and determine a target high-frequency weight according to the target low-frequency weight, wherein the target low-frequency weight and the target high-frequency weight are equal to 1.
Further, the first wireless earphone may determine a target feature point distribution density from the high-frequency feature component image, where the target feature point distribution density is the total number of feature points/area of the high-frequency feature component image. The first wireless headset may further pre-store a mapping relationship between a preset feature point distribution density and an evaluation value, further determine a fourth evaluation value corresponding to the target feature point distribution density according to the mapping relationship between the preset feature point distribution density and the evaluation value, and finally perform a weighting operation according to the third evaluation value, the fourth evaluation value, the target low-frequency weight, and the target high-frequency weight to obtain a target image quality evaluation value of the target fingerprint image, which is specifically as follows:
target image quality evaluation value third evaluation value target low-frequency weight + fourth evaluation value target high-frequency weight
Therefore, image quality evaluation can be performed on the basis of two dimensions of the low-frequency component and the high-frequency component of the target fingerprint image, and evaluation parameters suitable for a shooting environment, namely a target image quality evaluation value, can be accurately obtained.
It can be seen that the earphone control method described in the embodiments of the present application is applied to a first wireless earphone, the first wireless earphone includes a first UWB module, a communication connection is established between the first wireless earphone and a second wireless earphone, the second wireless earphone includes a second UWB module, determining a target distance between the first wireless headset and the second wireless headset through the first UWB module and the second UWB module when at least one of the first wireless headset and the second wireless headset is not in a wearing state, when the target distance is greater than the preset distance, a first prompt operation is carried out, the first prompt operation is used for prompting to search for at least one earphone in the first wireless earphone and the second wireless earphone, thus distance detection can be realized through UWB when the earphone is not in a wearing state, the distance between the earphones exceeds a certain range, and then loss prevention prompt is carried out, so that the earphones can be prevented from being lost.
Referring to fig. 4, fig. 4 is a schematic flowchart of an earphone control method according to an embodiment of the present application, and as shown in the drawing, the earphone control method is applied to the electronic device shown in fig. 1 or fig. 2, where the electronic device may be a first wireless earphone, the first wireless earphone includes a first UWB module, and the earphone control method includes:
401. establishing a communication connection between the first wireless headset and a second wireless headset, the second wireless headset comprising a second UWB module.
402. Determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state.
403. And when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone.
404. And when the target distance is smaller than or equal to the preset distance, performing second prompt operation, wherein the second prompt operation is used for prompting that at least one earphone in the first wireless earphone and the second wireless earphone is placed back to the target earphone box.
For the detailed description of steps 401 to 404, reference may be made to corresponding steps of the earphone control method described in fig. 3A, and details are not repeated here.
It can be seen that the earphone control method described in the embodiment of the application can realize distance detection through UWB when the earphones are not worn, and perform loss prevention prompt when the distance between the earphones exceeds a certain range, and prompt a user to put the earphones back to the earphone box when the distance between the earphones is smaller than the certain range, so as to prevent the earphones from being lost.
In keeping with the foregoing embodiments, please refer to fig. 5, where fig. 5 is a schematic structural diagram of a wireless headset according to an embodiment of the present application, where the wireless headset includes a processor, a memory, a communication interface, and one or more programs, the wireless headset may be a first wireless headset, the first wireless headset includes a first UWB module, and the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
establishing a communication connection between the first wireless headset and a second wireless headset, the second wireless headset comprising a second UWB module;
determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
and when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone.
It can be seen that, in the first wireless headset described in this embodiment of the present application, the first wireless headset includes a first UWB module, a communication connection between the first wireless headset and the second wireless headset is established, the second wireless headset includes a second UWB module, when at least one of the first wireless headset and the second wireless headset is not in a wearing state, a target distance between the first wireless headset and the second wireless headset is determined by the first UWB module and the second UWB module, and when the target distance is greater than a preset distance, a first prompt operation is performed, where the first prompt operation is used to prompt to find at least one of the first wireless headset and the second wireless headset.
In one possible example, the program further includes instructions for performing the steps of:
and when the target distance is smaller than or equal to the preset distance, performing second prompt operation, wherein the second prompt operation is used for prompting that at least one earphone in the first wireless earphone and the second wireless earphone is placed back to the target earphone box.
In one possible example, the program further includes instructions for performing the steps of:
acquiring the number of earphones contained in the target earphone box;
and when the number of the earphones is 0, executing the step of establishing the communication connection between the first earphone and the second earphone.
In one possible example, the program further includes instructions for performing the steps of:
when the first wireless earphone and the second wireless earphone are both in a wearing state, the first UWB module is dormant, and the second UWB module is instructed to be dormant by the second wireless earphone.
In one possible example, the program further includes instructions for performing the steps of:
acquiring a target geographic position;
and determining the preset distance corresponding to the target geographic position according to a mapping relation between the preset geographic position and the distance threshold.
In one possible example, the program further includes instructions for performing the steps of:
obtaining a first signal strength value of the second wireless headset detected by the first wireless headset;
and when the first signal strength value is within a preset signal strength range, executing the step of establishing the communication connection between the first wireless earphone and the second wireless earphone.
In one possible example, in the obtaining the first signal strength value of the second wireless headset detected by the first wireless headset, the program includes instructions for:
acquiring a signal intensity change curve of the second wireless earphone in a preset time period, wherein the horizontal axis of the signal intensity change curve is time, and the vertical axis of the signal intensity change curve is a signal intensity value;
sampling the signal intensity change curve to obtain a plurality of signal intensity values;
determining a target mean value according to the plurality of signal intensity values;
performing mean square error operation according to the plurality of signal strength values to obtain a target mean square error;
determining a target adjusting coefficient corresponding to the target mean square error according to a mapping relation between a preset mean square error and an adjusting coefficient;
and adjusting the target mean value according to the target adjusting coefficient to obtain a first signal intensity value of the second wireless earphone.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It will be appreciated that the wireless headset, in order to perform the above-described functions, includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments provided herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the wireless headset may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6A is a block diagram of functional units of the headphone control apparatus 600 according to the embodiment of the present application. The earphone control device 600 is applied to a first wireless earphone, wherein the first wireless earphone comprises a first UWB module, and the device comprises: the establishing unit 601, the determining unit 602, and the prompting unit 603 are specifically as follows:
the establishing unit 601 is configured to establish a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module;
the determining unit 602 is configured to determine, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
the prompt unit 603 is configured to perform a first prompt operation when the target distance is greater than a preset distance, where the first prompt operation is used to prompt to find at least one of the first wireless headset and the second wireless headset.
It can be seen that the earphone control device described in the embodiments of the present application is applied to a first wireless earphone, the first wireless earphone includes a first UWB module, a communication connection is established between the first wireless earphone and a second wireless earphone, the second wireless earphone includes a second UWB module, determining a target distance between the first wireless headset and the second wireless headset through the first UWB module and the second UWB module when at least one of the first wireless headset and the second wireless headset is not in a wearing state, when the target distance is greater than the preset distance, a first prompt operation is carried out, the first prompt operation is used for prompting to search for at least one earphone in the first wireless earphone and the second wireless earphone, thus distance detection can be realized through UWB when the earphone is not in a wearing state, the distance between the earphones exceeds a certain range, and then loss prevention prompt is carried out, so that the earphones can be prevented from being lost.
In one possible example, the apparatus is further configured to implement the following functions:
the prompt unit 603 is further configured to perform a second prompt operation when the target distance is less than or equal to the preset distance, where the second prompt operation is used to prompt that at least one of the first wireless headset and the second wireless headset is placed back into the target headset box.
In one possible example, as shown in fig. 6B, fig. 6B is a further modified structure of the earphone control device 600 shown in fig. 6A, which may further include a first obtaining unit 604, as follows, compared with fig. 6A:
the first obtaining unit 604 is configured to obtain the number of earphones included in the target earphone box;
the step of establishing a communication connection between the first and second headsets is performed by the establishing unit 601 when the number of headsets is 0.
In one possible example, as shown in fig. 6C, fig. 6C is a further modified structure of the earphone control device 600 shown in fig. 6A, which may further include a sleep unit 605, as compared with fig. 6A, specifically as follows:
the sleep unit 605 is configured to sleep the first UWB module and instruct the second wireless headset to sleep the second UWB module when the first wireless headset and the second wireless headset are both in a wearing state.
In one possible example, as shown in fig. 6D, fig. 6D is a further modified structure of the earphone control device 600 shown in fig. 6A, which may further include a second obtaining unit 606 compared with fig. 6A, specifically as follows:
the second obtaining unit 606 is configured to obtain a target geographic location;
the determining unit 602 is further configured to determine the preset distance corresponding to the target geographic location according to a mapping relationship between a preset geographic location and a distance threshold.
In one possible example, as shown in fig. 6E, fig. 6E is a further modified structure of the headphone control apparatus 600 shown in fig. 6A, which may further include a third obtaining unit 607, as follows in comparison with fig. 6A:
the third obtaining unit 607, configured to obtain a first signal strength value of the second wireless headset detected by the first wireless headset;
the step of establishing the communication connection between the first wireless headset and the second wireless headset is performed by the establishing unit 601 when the first signal strength value is within a preset signal strength range.
In one possible example, in the aspect of obtaining the first signal strength value of the second wireless headset detected by the first wireless headset, the third obtaining unit 607 is specifically configured to:
acquiring a signal intensity change curve of the second wireless earphone in a preset time period, wherein the horizontal axis of the signal intensity change curve is time, and the vertical axis of the signal intensity change curve is a signal intensity value;
sampling the signal intensity change curve to obtain a plurality of signal intensity values;
determining a target mean value according to the signal intensity values;
performing mean square error operation according to the plurality of signal strength values to obtain a target mean square error;
determining a target adjusting coefficient corresponding to the target mean square error according to a mapping relation between a preset mean square error and an adjusting coefficient;
and adjusting the target mean value according to the target adjusting coefficient to obtain a first signal intensity value of the second wireless earphone.
It should be noted that the electronic device described in the embodiments of the present application is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
The establishing unit 601, the determining unit 602, the prompting unit 603, the first obtaining unit 604, the sleeping unit 605, the second obtaining unit 606, and the third obtaining unit 607 may be one or more of a control circuit, a processor, or a communication circuit, and based on the above unit modules, the functions or steps of any of the above methods can be implemented.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (7)

1. A headset control method applied to a first wireless headset including a first UWB module, the method comprising:
obtaining a first signal strength value of a second wireless headset detected by the first wireless headset;
when the first signal intensity value is within a preset signal intensity range, establishing communication connection between the first wireless earphone and a second wireless earphone, wherein the second wireless earphone comprises a second UWB module;
determining, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
when the target distance is greater than a preset distance, performing a first prompt operation, wherein the first prompt operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone;
wherein the obtaining a first signal strength value of the second wireless headset detected by the first wireless headset comprises:
acquiring a signal intensity change curve of the second wireless earphone in a preset time period, wherein the horizontal axis of the signal intensity change curve is time, and the vertical axis of the signal intensity change curve is a signal intensity value;
sampling the signal intensity change curve to obtain a plurality of signal intensity values;
determining a target mean value according to the signal intensity values;
performing mean square error operation according to the plurality of signal strength values to obtain a target mean square error;
determining a target adjusting coefficient corresponding to the target mean square error according to a mapping relation between a preset mean square error and an adjusting coefficient;
adjusting the target mean value according to the target adjusting coefficient to obtain a first signal intensity value of the second wireless earphone;
wherein the method further comprises:
when the first wireless earphone and the second wireless earphone are both in a wearing state, the first UWB module is dormant, and the second UWB module is instructed to be dormant by the second wireless earphone.
2. The method of claim 1, further comprising:
and when the target distance is smaller than or equal to the preset distance, performing second prompt operation, wherein the second prompt operation is used for prompting that at least one earphone in the first wireless earphone and the second wireless earphone is placed back to the target earphone box.
3. The method of claim 2, further comprising:
acquiring the number of earphones contained in the target earphone box;
and when the number of the earphones is 0, executing the step of establishing the communication connection between the first wireless earphone and the second wireless earphone.
4. The method according to any one of claims 1-3, further comprising:
acquiring a target geographic position;
and determining the preset distance corresponding to the target geographic position according to a mapping relation between the preset geographic position and the distance threshold.
5. A headset control device for use with a first wireless headset including a first UWB module, the device comprising: a establishing unit, a determining unit and a prompting unit, wherein,
the establishing unit is used for acquiring a first signal strength value of a second wireless earphone detected by the first wireless earphone; when the first signal intensity value is within a preset signal intensity range, establishing communication connection between the first wireless earphone and a second wireless earphone, wherein the second wireless earphone comprises a second UWB module;
the determining unit is configured to determine, by the first UWB module and the second UWB module, a target distance between the first wireless headset and the second wireless headset when at least one of the first wireless headset and the second wireless headset is not in a worn state;
the prompting unit is used for performing a first prompting operation when the target distance is greater than a preset distance, wherein the first prompting operation is used for prompting to search for at least one of the first wireless earphone and the second wireless earphone;
wherein the obtaining a first signal strength value of the second wireless headset detected by the first wireless headset comprises:
acquiring a signal intensity change curve of the second wireless earphone in a preset time period, wherein the horizontal axis of the signal intensity change curve is time, and the vertical axis of the signal intensity change curve is a signal intensity value;
sampling the signal intensity change curve to obtain a plurality of signal intensity values;
determining a target mean value according to the signal intensity values;
performing mean square error operation according to the signal intensity values to obtain a target mean square error;
determining a target adjusting coefficient corresponding to the target mean square error according to a mapping relation between a preset mean square error and an adjusting coefficient;
adjusting the target mean value according to the target adjusting coefficient to obtain a first signal intensity value of the second wireless earphone;
wherein the apparatus is further specifically configured to:
when the first wireless earphone and the second wireless earphone are both in a wearing state, the first UWB module is dormant, and the second UWB module is instructed to be dormant by the second wireless earphone.
6. A wireless headset comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
7. A computer-readable storage medium, characterized in that it stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 4.
CN202010916697.2A 2020-09-03 2020-09-03 Earphone control method, earphone control device and storage medium Active CN112040361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010916697.2A CN112040361B (en) 2020-09-03 2020-09-03 Earphone control method, earphone control device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010916697.2A CN112040361B (en) 2020-09-03 2020-09-03 Earphone control method, earphone control device and storage medium

Publications (2)

Publication Number Publication Date
CN112040361A CN112040361A (en) 2020-12-04
CN112040361B true CN112040361B (en) 2022-05-13

Family

ID=73591949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010916697.2A Active CN112040361B (en) 2020-09-03 2020-09-03 Earphone control method, earphone control device and storage medium

Country Status (1)

Country Link
CN (1) CN112040361B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653960B (en) * 2020-12-19 2023-08-29 深圳市锐尔觅移动通信有限公司 Wireless earphone control method, wireless earphone control device, electronic equipment and computer storage medium
CN113207052A (en) * 2021-01-28 2021-08-03 珠海市杰理科技股份有限公司 Communication connection method and device, Bluetooth headset, communication system and storage medium
KR102564696B1 (en) * 2021-02-04 2023-08-08 주식회사 아모센스 Truly wireless stereo earphone
CN113115179B (en) * 2021-03-24 2023-03-24 维沃移动通信有限公司 Working state adjusting method and device
CN113099357B (en) * 2021-04-09 2022-11-04 恒玄科技(上海)股份有限公司 Master-slave switching method and device of wireless earphone and wireless earphone
CN113259803B (en) * 2021-05-13 2022-10-18 恒玄科技(上海)股份有限公司 Wireless earphone assembly and signal processing method thereof
CN113423059B (en) * 2021-06-21 2023-08-08 歌尔智能科技有限公司 Equipment positioning method, device, system and readable storage medium
CN116233292A (en) * 2021-12-02 2023-06-06 Oppo广东移动通信有限公司 Measurement method, terminal device, electronic device, and readable storage medium
CN114189794B (en) * 2021-12-10 2024-03-22 深圳市昂思科技有限公司 Hearing aid anti-lost method, device, electronic equipment and computer readable medium
CN115550828B (en) * 2022-11-25 2023-04-04 杭州兆华电子股份有限公司 Construction method suitable for TWS Bluetooth headset adaptation test system
CN116847239A (en) * 2023-08-09 2023-10-03 青岛柯锐思德电子科技有限公司 TWS earphone system with UWB positioning and searching functions and searching method
CN117041853B (en) * 2023-08-31 2024-02-09 上海柯锐芯微电子有限公司 Device and method for detecting and quickly retrieving loss of low-power-consumption wireless earphone
CN117295007B (en) * 2023-09-21 2024-04-05 青岛柯锐思德电子科技有限公司 Intelligent watch and TWS earphone accurate positioning system and method based on UWB

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601209A (en) * 2020-06-24 2020-08-28 Oppo(重庆)智能科技有限公司 Control method, control device, wireless headset and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8526646B2 (en) * 2004-05-10 2013-09-03 Peter V. Boesen Communication device
CN201142111Y (en) * 2007-12-24 2008-10-29 联想(北京)有限公司 Bluetooth anti-theft device and Bluetooth earphone
US9980189B2 (en) * 2015-10-20 2018-05-22 Bragi GmbH Diversity bluetooth system and method
CN206002688U (en) * 2016-08-30 2017-03-08 李言飞 A kind of distance-measuring equipment and range-measurement system
CN207926863U (en) * 2018-02-27 2018-09-28 奥维通信股份有限公司 A kind of earphone system based on UWB positioning applications
CN109379653B (en) * 2018-09-30 2020-12-04 Oppo广东移动通信有限公司 Audio transmission method and device, electronic equipment and storage medium
CN210072891U (en) * 2019-08-07 2020-02-14 超互联科技股份有限公司 Bidirectional tracking system
CN110972063B (en) * 2019-10-25 2020-12-11 珠海格力电器股份有限公司 Distance measurement method, device and system and readable medium
CN111063170B (en) * 2019-11-29 2021-12-07 歌尔股份有限公司 TWS earphone loss prevention method, TWS earphone and computer readable storage medium
CN111586519B (en) * 2020-05-18 2022-06-03 歌尔科技有限公司 Wireless earphone loss alarm method and device, wireless earphone and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601209A (en) * 2020-06-24 2020-08-28 Oppo(重庆)智能科技有限公司 Control method, control device, wireless headset and storage medium

Also Published As

Publication number Publication date
CN112040361A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN112040361B (en) Earphone control method, earphone control device and storage medium
CN109814766B (en) Application display method and electronic equipment
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
CN110543289B (en) Method for controlling volume and electronic equipment
WO2021013230A1 (en) Robot control method, robot, terminal, server, and control system
WO2021036770A1 (en) Split-screen processing method and terminal device
CN110401768B (en) Method and device for adjusting working state of electronic equipment
WO2021000943A1 (en) Method and apparatus for managing fingerprint switch
CN111553846A (en) Super-resolution processing method and device
CN113177229A (en) Data processing method and related device
CN113986369B (en) Internet of things equipment control method and system, electronic equipment and storage medium
CN113676238B (en) Arrival angle determining method and related product
CN114244655B (en) Signal processing method and related device
CN111836226B (en) Data transmission control method, device and storage medium
CN113610943B (en) Icon rounded angle processing method and device
CN114465852A (en) Signal processing method and related device
CN114237646A (en) Game trial playing method and related device
CN114336998A (en) Charging control method, charging control device and storage medium
CN114519891A (en) Backlight adjusting method and device and storage medium
CN114630152A (en) Parameter transmission method and device for image processor and storage medium
CN111865369B (en) Antenna control method, antenna control device and storage medium
CN114596819B (en) Brightness adjusting method and related device
CN113311380B (en) Calibration method, device and storage medium
CN114339607B (en) Ranging method, ranging device and storage medium

Legal Events

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