Step counting method, device, earphone and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]然而,实际健走或者跑步的场景中,需要一直携带智能设备(例如手机),降低了健走或者跑步的舒适性
[0054]本公开的实施例提供的技术方案可以包括以下有益效果:获取佩戴所述耳机的用户的耳道内的第一音频信号,获取佩戴所述耳机的用户所处环境内的第二音频信号,对所述第一音频信号和所述第二音频信号进行能量检测,如果检测到所述第一音频信号在预设时间阈值内出现能量极大值,则将所述能量极大值确定为本次能量极大值,将所述本次能量极大值对应的时间点为目标时间点。根据所述目标时间点获取第二音频信号中与所述目标时间点对应的音频点的能量值(即目标能量值),之后确定所述本次能量极大值和所述目标能量值的差异值,如果差异值大于预设的差异阈值,说明第一音频信号基于闭塞效应引起,并且所述本次能量极大值为对所述第一音频信号首次检测到的能量极大值,说明用户开始戴着耳机走路或者跑步,此时确定发生一次计步事件,进而用户无需携带其他智能设备,通过耳机便能实时计步,提高用户走路或者跑步的舒适性。
Smart Images

Figure CN117716208B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of step counting technology, and more particularly to step counting methods, devices, earphones, and storage media. Background Technology
[0002] With people paying more and more attention to their health, more and more people are joining the ranks of brisk walking or running. This leads to a need for step counting during brisk walking or running.
[0003] Currently, step counting is generally achieved by adding sensors such as gyroscopes and accelerometers to smart devices (such as mobile phones).
[0004] However, in actual walking or running scenarios, it is necessary to carry smart devices (such as mobile phones) at all times, which reduces the comfort of walking or running. Summary of the Invention
[0005] To overcome the problems existing in the related technologies, this disclosure provides a step counting method, device, earphone, and storage medium.
[0006] According to a first aspect of the present disclosure, a step counting method is provided, applied to an earphone, the method comprising:
[0007] Acquire a first audio signal, wherein the first audio signal is a sound signal inside the ear canal of a user wearing the headphones;
[0008] Acquire a second audio signal, wherein the second audio signal is a sound signal in the environment where the user wearing the headphones is located;
[0009] Energy detection is performed on the first audio signal and the second audio signal;
[0010] If the first audio signal is detected to have a maximum energy value within a preset time threshold, then the maximum energy value is determined as the current maximum energy value, and the time point corresponding to the current maximum energy value is taken as the target time point;
[0011] The target energy value is obtained based on the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point;
[0012] Determine the difference between the current energy maximum and the target energy value;
[0013] A step counting event is determined to have occurred if both of the following conditions are met:
[0014] Condition 1: The difference value is greater than a preset difference threshold;
[0015] Condition 2: The maximum energy value is the maximum energy value detected for the first time for the first audio signal.
[0016] Optionally, a step counting event is determined to have occurred if all three of the following conditions are met;
[0017] Condition 1: The difference value is greater than a preset difference threshold;
[0018] Condition 2: The current energy maximum value is not the first energy maximum value detected for the first audio signal;
[0019] Condition 3: The time difference between the current energy maximum and the time of the previous energy maximum is within the preset time difference range.
[0020] Optionally, before performing energy detection on the first audio signal and the second audio signal, the method further includes:
[0021] Based on a preset frequency threshold, audio signals above the preset frequency threshold in the first and second audio signals are filtered out.
[0022] Optionally, the preset time threshold is 120 milliseconds.
[0023] Optionally, the difference between the current energy maximum and the target energy value can be determined using the following formula:
[0024]
[0025] Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference value.
[0026] Optionally, the difference threshold is greater than 15 dB.
[0027] Optionally, the frequency threshold is 70 Hz.
[0028] According to a second aspect of the present disclosure, a pedometer device is provided for use in an earphone, the device comprising:
[0029] The acquisition module is used to acquire a first audio signal, which is a sound signal inside the ear canal of a user wearing the headphones, and to acquire a second audio signal, which is a sound signal in the environment where the user wearing the headphones is located.
[0030] The detection module is used to perform energy detection on the first audio signal and the second audio signal;
[0031] The first determining module is used to determine the energy maximum value as the current energy maximum value if the first audio signal is detected to have an energy maximum value within a preset time threshold, and to take the time point corresponding to the current energy maximum value as the target time point.
[0032] The second determining module is used to obtain a target energy value based on the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point;
[0033] The third determining module is used to determine the difference between the current maximum energy value and the target energy value;
[0034] The step counting module determines a step counting event if both of the following conditions are met:
[0035] Condition 1: The difference value is greater than a preset difference threshold;
[0036] Condition 2: The maximum energy value is the maximum energy value detected for the first time for the first audio signal.
[0037] Optionally, the step counting module is further configured to:
[0038] A step counting event is determined to have occurred if all three of the following conditions are met;
[0039] Condition 1: The difference value is greater than a preset difference threshold;
[0040] Condition 2: The current energy maximum value is not the first energy maximum value detected for the first audio signal;
[0041] Condition 3: The time difference between the current energy maximum and the time of the previous energy maximum is within the preset time difference range.
[0042] Optionally, the device further includes:
[0043] The filtering module is used to filter out audio signals above a preset frequency threshold from the first audio signal and the second audio signal before energy detection is performed on the first audio signal and the second audio signal.
[0044] Optionally, the preset time threshold is 80-120 milliseconds.
[0045] Optionally, the third determining module determines the difference between the current energy maximum and the target energy value using the following formula:
[0046]
[0047] Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference value.
[0048] Optionally, the difference threshold is 15 dB.
[0049] Optionally, the frequency threshold is 70 Hz.
[0050] According to a third aspect of the present disclosure, an earphone is provided, the earphone including a housing and a feedforward microphone, a feedback microphone mounted on the housing, and a controller communicatively connected to the feedforward microphone and the feedback microphone respectively;
[0051] The feedforward microphone is used to collect sound signals in the environment where the user wearing the headphones is located, and the feedback microphone is used to collect sound signals in the ear canal of the user wearing the headphones.
[0052] The controller includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to implement the steps of the step counting method provided in the first aspect of this disclosure.
[0053] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the step counting method provided in the first aspect of the present disclosure.
[0054] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: acquiring a first audio signal in the ear canal of a user wearing the headphones, acquiring a second audio signal in the environment where the user is located, performing energy detection on the first audio signal and the second audio signal, and if a maximum energy value is detected in the first audio signal within a preset time threshold, then the maximum energy value is determined as the current maximum energy value, and the time point corresponding to the current maximum energy value is taken as the target time point. Based on the target time point, the energy value (i.e., the target energy value) of the audio point in the second audio signal corresponding to the target time point is obtained, and then the difference between the current maximum energy value and the target energy value is determined. If the difference value is greater than a preset difference threshold, it indicates that the first audio signal is caused by a blockage effect, and the current maximum energy value is the first detected maximum energy value for the first audio signal, indicating that the user has started walking or running while wearing the headphones. At this time, a step counting event is determined to have occurred, thus allowing the user to count steps in real time through the headphones without carrying other smart devices, improving the user's walking or running comfort.
[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0056] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0057] Figure 1 This is a flowchart illustrating a step counting method according to an exemplary embodiment;
[0058] Figure 2 This is an example diagram illustrating the real-time energy of a first audio signal and a second audio signal applying the step counting method of this disclosure according to an exemplary embodiment;
[0059] Figure 3 This is a block diagram illustrating a step counting device according to an exemplary embodiment;
[0060] Figure 4 This is a block diagram illustrating a step counting device according to an exemplary embodiment. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0062] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0063] Figure 1 This is a flowchart illustrating a step counting method according to an exemplary embodiment, such as... Figure 1 As shown, the step counting method used in the headphones includes the following steps.
[0064] In step S101, the first audio signal and the second audio signal are acquired.
[0065] The first audio signal is the sound signal inside the ear canal of the user wearing the headphones, and the second audio signal is the sound signal in the environment where the user wearing the headphones is located.
[0066] The headphones involved in this disclosure are headphones that include a feedforward microphone and a feedback microphone, such as true wireless stereo (TWS) Bluetooth headphones. The first audio signal can be acquired, for example, through the feedback microphone in the headphones, and the second audio signal can be acquired, for example, through the feedforward microphone in the headphones.
[0067] In one embodiment, the earphones of this disclosure can automatically count steps after the user wears them, or they can count steps after the user turns on the earphones' step counting function.
[0068] In step S102, energy detection is performed on the first audio signal and the second audio signal.
[0069] In addition, in order to remove interference from sounds such as talking and music in the headphones, before performing energy detection on the first audio signal and the second audio signal, the step counting method also includes: filtering out audio signals in the first audio signal and the second audio signal that are above the preset frequency threshold according to a preset frequency threshold.
[0070] The frequency threshold can be 40Hz, 70Hz, etc., and preferably 50Hz, to remove interference from sounds such as talking and music in the headphones.
[0071] In step S103, if the first audio signal is detected to have a maximum energy value within a preset time threshold, the maximum energy value is determined as the current maximum energy value, and the time point corresponding to the current maximum energy value is taken as the target time point.
[0072] When a user wears TWS earphones while running or walking, the sound of their feet hitting the ground is transmitted through the earphone's bone conduction to the ear canal. Consequently, the sound signal in the user's ear canal (the sound of their feet hitting the ground), i.e., the first audio signal, is blocked in the ear by the earphones and amplified, creating an occlusion effect. This results in a maximum energy value within a preset time threshold.
[0073] The preset time threshold can be 80 milliseconds or 120 milliseconds. Preferably, the preset time threshold can be 100 milliseconds.
[0074] In step S104, the target energy value is obtained according to the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point.
[0075] In step S105, the difference between the current maximum energy value and the target energy value is determined. If both of the following conditions are met, a step counting event is determined to have occurred: Condition 1: The difference value is greater than the preset difference threshold; Condition 2: The current maximum energy value is the first maximum energy value detected for the first audio signal.
[0076] In one implementation, the difference between the current energy maximum and the target energy value can be determined, for example, by the following formula: Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference between the maximum energy value and the target energy value.
[0077] The difference threshold can be 15 dB.
[0078] Furthermore, since the collision signals from a user running or walking are periodic, a step counting event can be determined when the user runs or walks continuously, provided that the following three conditions are met:
[0079] Condition 1: The difference value is greater than a preset difference threshold; Condition 2: The current maximum energy value is not the first maximum energy value detected for the first audio signal; Condition 3: The time difference between the time point corresponding to the current maximum energy value and the time point corresponding to the previously stored maximum energy value meets a preset time difference range, indicating that the user is in a continuous walking or running state. This process is repeated to determine each subsequent step counting event, so that the user does not need to carry other smart devices and can count steps in real time through headphones, improving the user's walking or running comfort.
[0080] The time difference between the current energy maximum and the time of the previously stored energy maximum can be, for example, within 200 milliseconds.
[0081] Figure 2 An example diagram is shown of the real-time energy of the first and second audio signals when the user is walking or running continuously.
[0082] The upper part is the real-time energy map of the first audio signal, and the lower part is the real-time energy map of the second audio signal.
[0083] When a user wears TWS earbuds while running or walking, the sound of their feet hitting the ground is conducted through the earbuds to the ear canal via bone conduction. Consequently, the sound signal (the sound of feet hitting the ground), i.e., the first audio signal, is blocked and amplified by the earbuds, creating an occlusion effect. This results in an instantaneous energy maxima and minimum within a preset time threshold (e.g., 100 milliseconds). Thus, each impact of the foot with the ground will have an instantaneous energy maxima and minimum within the preset time threshold (e.g., 100 milliseconds), forming a real-time energy map of the first audio signal in the time domain.
[0084] Since the second audio signal is the sound signal from the environment in which the user wearing the headphones is located, and the impact sound is almost completely attenuated by the time it reaches the headphones through the air, it can be ignored. Figure 2 The real-time energy of the second audio signal in the time domain is always negative infinity.
[0085] Furthermore, when it is determined that the first audio signal is a false detection caused by occlusion effect rather than sound leakage outside the ear, the energy value of the audio point in the second audio signal corresponding to the target time point where the current energy maximum occurs can be obtained, i.e., the target energy value. Then, the difference between the current energy maximum and the target energy value can be determined. Determine the difference value.
[0086] In an exemplary embodiment of this disclosure, a first audio signal from the ear canal of a user wearing the headphones is acquired, and a second audio signal from the environment in which the user is located is acquired. Energy detection is performed on the first and second audio signals. If a maximum energy value is detected in the first audio signal within a preset time threshold, this maximum energy value is determined as the current maximum energy value, and the time point corresponding to this maximum energy value is designated as the target time point. Based on the target time point, the energy value (i.e., the target energy value) of the audio point in the second audio signal corresponding to the target time point is acquired. Then, the difference between the current maximum energy value and the target energy value is determined. If the difference is greater than a preset difference threshold, it indicates that the first audio signal is caused by a blockage effect, and this current maximum energy value is the first detected maximum energy value for the first audio signal. This indicates that the user has started walking or running while wearing the headphones, and a step counting event is determined to have occurred. Therefore, the user can count steps in real time through the headphones without carrying other smart devices, improving the comfort of walking or running.
[0087] Figure 3 This is a block diagram illustrating a pedometer device 300 according to an exemplary embodiment. (Refer to...) Figure 3 A pedometer device is used in headphones, the device comprising:
[0088] The acquisition module 301 is used to acquire a first audio signal, which is a sound signal inside the ear canal of a user wearing the headphones, and to acquire a second audio signal, which is a sound signal in the environment where the user wearing the headphones is located.
[0089] Detection module 302 is used to perform energy detection on the first audio signal and the second audio signal;
[0090] The first determining module 303 is used to determine the energy maximum value as the current energy maximum value if the first audio signal is detected to have an energy maximum value within a preset time threshold, and to take the time point corresponding to the current energy maximum value as the target time point.
[0091] The second determining module 304 is used to obtain a target energy value based on the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point;
[0092] The third determining module 305 is used to determine the difference between the current maximum energy value and the target energy value;
[0093] The step counting module 306 is used to determine that a step counting event has occurred if both of the following conditions are met:
[0094] Condition 1: The difference value is greater than a preset difference threshold;
[0095] Condition 2: The maximum energy value is the maximum energy value detected for the first time for the first audio signal.
[0096] Optionally, the step counting module 306 is further configured to:
[0097] A step counting event is determined to have occurred if all three of the following conditions are met;
[0098] Condition 1: The difference value is greater than a preset difference threshold;
[0099] Condition 2: The current energy maximum value is not the first energy maximum value detected for the first audio signal;
[0100] Condition 3: The time difference between the current energy maximum and the time of the previous energy maximum is within the preset time difference range.
[0101] Optionally, the device further includes:
[0102] The filtering module is used to filter out audio signals above a preset frequency threshold from the first audio signal and the second audio signal before energy detection is performed on the first audio signal and the second audio signal.
[0103] Optionally, the preset time threshold is 120 milliseconds.
[0104] Optionally, the third determining module determines the difference between the current energy maximum and the target energy value using the following formula:
[0105]
[0106] Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference value.
[0107] Optionally, the difference threshold is 15 dB.
[0108] Optionally, the frequency threshold is 70 Hz.
[0109] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0110] Figure 4 This is a block diagram illustrating a step counting device 800 according to an exemplary embodiment. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0111] Reference Figure 4 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output interface 812, a sensor component 814, and a communication component 816.
[0112] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the aforementioned step counting method. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0113] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0114] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.
[0115] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0116] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0117] Input / output interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0118] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0119] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0120] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the step counting method described above.
[0121] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to complete the step counting method described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0122] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the step counting method described above when executed by the programmable device.
[0123] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0124] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A step counting method, characterized in that, Applied to headphones, including: Acquire a first audio signal, wherein the first audio signal is a sound signal inside the ear canal of a user wearing the headphones; Acquire a second audio signal, wherein the second audio signal is a sound signal in the environment where the user wearing the headphones is located; Energy detection is performed on the first audio signal and the second audio signal; If the first audio signal is detected to have a maximum energy value within a preset time threshold, then the maximum energy value is determined as the current maximum energy value, and the time point corresponding to the current maximum energy value is taken as the target time point; The target energy value is obtained based on the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point; Determine the difference between the current energy maximum and the target energy value; A step counting event is determined to have occurred if both of the following conditions are met: Condition 1: The difference value is greater than a preset difference threshold. Condition 2: The maximum energy value is the maximum energy value detected for the first time for the first audio signal.
2. The method according to claim 1, characterized in that, A step counting event is determined to have occurred if all three of the following conditions are met; Condition 1: The difference value is greater than a preset difference threshold. Condition 2: The current energy maximum value is not the first energy maximum value detected for the first audio signal; Condition 3: The time difference between the current energy maximum and the time of the previous energy maximum is within the preset time difference range.
3. The method according to claim 1, characterized in that, Before performing energy detection on the first audio signal and the second audio signal, the method further includes: Based on a preset frequency threshold, audio signals above the preset frequency threshold in the first and second audio signals are filtered out.
4. The method according to claim 1, characterized in that, The preset time threshold is 120 milliseconds.
5. The method according to claim 1, characterized in that, The difference between the current energy maximum and the target energy value is determined by the following formula: Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference value.
6. The method according to claim 1 or 2, characterized in that, The difference threshold is 15 dB.
7. The method according to claim 3, characterized in that, The frequency threshold is 70Hz.
8. A step counting device, characterized in that, Applied to headphones, the device includes: The acquisition module is used to acquire a first audio signal, which is a sound signal inside the ear canal of a user wearing the headphones, and to acquire a second audio signal, which is a sound signal in the environment where the user wearing the headphones is located. The detection module is used to perform energy detection on the first audio signal and the second audio signal; The first determining module is used to determine the energy maximum value as the current energy maximum value if the first audio signal is detected to have an energy maximum value within a preset time threshold, and to take the time point corresponding to the current energy maximum value as the target time point. The second determining module is used to obtain a target energy value based on the target time point, wherein the target energy value is the energy value of the audio point in the second audio signal corresponding to the target time point; The third determining module is used to determine the difference between the current maximum energy value and the target energy value; The step counting module determines a step counting event if both of the following conditions are met: Condition 1: The difference value is greater than a preset difference threshold; Condition 2: The maximum energy value is the maximum energy value detected for the first time for the first audio signal.
9. The apparatus according to claim 8, characterized in that, The step counting module is also used for: A step counting event is determined to have occurred if all three of the following conditions are met; Condition 1: The difference value is greater than a preset difference threshold; Condition 2: The current energy maximum value is not the first energy maximum value detected for the first audio signal; Condition 3: The time difference between the current energy maximum and the time of the previous energy maximum is within the preset time difference range.
10. The apparatus according to claim 8, characterized in that, The device further includes: The filtering module is used to filter out audio signals above a preset frequency threshold from the first audio signal and the second audio signal before energy detection is performed on the first audio signal and the second audio signal.
11. The apparatus according to claim 8, characterized in that, The preset time threshold is 120 milliseconds.
12. The apparatus according to claim 8, characterized in that, The third determining module determines the difference between the current energy maximum and the target energy value using the following formula: Where C is the maximum energy value at the target time point, D is the target energy value at the target time point, and delta is the difference value.
13. The apparatus according to claim 8 or 9, characterized in that, The difference threshold is 15 dB.
14. The apparatus according to claim 10, characterized in that, The frequency threshold is 70Hz.
15. An earphone, characterized in that, The earphone includes a housing and a feedforward microphone, a feedback microphone, and a controller that are communicatively connected to the feedforward microphone and the feedback microphone, respectively, mounted on the housing; The feedforward microphone is used to collect sound signals in the environment where the user wearing the headphones is located, and the feedback microphone is used to collect sound signals in the ear canal of the user wearing the headphones. The controller includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to implement the steps of the method according to any one of claims 1 to 7.
16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Wireless earphone, step counting method based on earphone detection, and related product
CN108680181A
Earphone step counting method, earphone and storage medium
CN112822600A