Step counting method and system for wireless earphone detection and wireless earphone

By establishing a three-dimensional coordinate system on wireless headphones and performing integrated calculation of acceleration data, combining rotation angle data and vector conversion, the problem of inaccuracy and miscalculation of steps by smart wearable devices during step counting statistics is solved, achieving higher step counting accuracy and reliability.

CN119691315AActive Publication Date: 2025-03-25SHENZHEN XINHONGGUANG TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411570569.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-25
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

Existing smart wearable devices have problems of inaccurate and incorrectly counting steps when calculating step counts, especially when driving or riding a bicycle, the acceleration sensor may be misjudged as walking.

Method used

Using the step counting method of wireless headphone detection, a three-dimensional coordinate system is established in the center of the headphone, acceleration data is collected for integral calculation, the rotation angle data of the headphones is calculated, and vectors are constructed and converted, and finally the step count is counted by comparing the total vector with the preset threshold.

Benefits of technology

It improves the accuracy and reliability of step counting, reduces the phenomenon of step counting caused by head movement, and significantly improves the accuracy of step counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691315A_ABST
    Figure CN119691315A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of step number detection, and discloses a step counting method and system for wireless earphone detection and a wireless earphone. The method comprises the following steps: establishing a three-dimensional coordinate system by taking an emitter in the center of the earphone as a coordinate origin; acquiring acceleration data of the earphone, and performing first integration and second integration on the acceleration data to obtain speed data and initial displacement data; calculating rotation angle data according to the speed data; constructing a first x vector, a first y vector and a first z vector according to rotation angle data and the initial displacement data, and converting the vectors into a Cartesian coordinate system; and summing the second x vector, the second y vector and the second z vector to obtain a total vector, comparing the total vector with a preset threshold value, and when the total vector is greater than the preset threshold value, generating displacement data and carrying out one-time step counting. According to the method, the accuracy and reliability of step counting can be improved, so that the high-precision requirement of a user on a step counting function is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of step detection, and in particular to a step counting method and system for wireless earphone detection and a wireless earphone. Background Art

[0002] In recent years, with the popularization of smart electronic devices, smart watches and smart headphones have been widely used in people's daily lives. As personal smart devices, their diverse functions meet people's different needs, among which the step counting function is sought after by a large number of users.

[0003] In the prior art, most smart wearable devices are equipped with accelerometers to detect the user's movement patterns. These devices analyze acceleration data to identify specific patterns in the gait cycle and thus count the number of steps. Accelerometers can sense dynamic acceleration changes in the body, such as walking, running and other activities. However, despite these technologies, smart wearable devices still have some shortcomings in step counting. For example, when driving or riding a bicycle, the accelerometer may misjudge it as walking due to vibration, thereby miscounting the number of steps. In addition, different people have different walking postures and paces, and the device may find it difficult to accurately adapt to each person's unique gait, resulting in inaccurate step counting.

[0004] In summary, the existing step counting technology still has the problem of inaccurate step counting and misrecording of steps. Summary of the invention

[0005] The present invention provides a step counting method and system for wireless earphone detection and a wireless earphone, which can improve the accuracy and reliability of step counting to meet the user's high-precision demand for the step counting function.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a step counting method for wireless headset detection, comprising: A three-dimensional coordinate system is established with the transmitter at the center of the earphone as the coordinate origin; wherein the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the earphone, and the z-axis points to the top of the earphone; Collecting acceleration data of the earphone, and performing a first integration and a second integration on the acceleration data to obtain velocity data and initial displacement data; Calculating the rotation angle data of the earphone according to the speed data; Constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector; The second x vector, the second y vector and the second z vector are summed to obtain a total vector, and the total vector is compared with a preset threshold value. When the total vector is greater than the preset threshold value, displacement data is generated and a step counting is performed.

[0007] Preferably, collecting the acceleration data of the earphone and performing the first integral calculation and the second integral calculation to obtain the velocity data includes: The first integral is calculated by the following formula: In the formula, is the acceleration data in the x-axis direction, is the acceleration data in the y-axis direction, is the speed data in the x-axis direction, is the speed data in the y-axis direction; The speed data includes speed data in the x-axis direction and speed data in the y-axis direction.

[0008] Preferably, the collecting the acceleration data of the earphone and performing the first integral calculation and the second integral calculation to obtain the initial displacement data includes: The second integral is calculated by the following formula: In the formula, is the acceleration data in the z-axis direction, is the displacement data in the z-axis direction; The displacement data in the z-axis direction is used as initial displacement data.

[0009] Preferably, calculating the rotation angle data of the earphone according to the speed data comprises: The rotation angle data of the headset is calculated using the following formula: In the formula, is the speed data in the x-axis direction, is the speed data in the y-axis direction, is the distance from the acceleration sensor to the rotation axis, is the integration time interval, is the rotation angle about the x-axis, is the rotation angle in the y-axis direction; The rotation angle data includes the rotation angle in the x-axis direction and the rotation angle in the y-axis direction.

[0010] Preferably, constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data comprises: Construct a first x vector according to the rotation angle data; wherein the first x vector is expressed as: in, is the rotation angle in the x-axis direction; Construct a first y vector according to the rotation angle data; wherein the first y vector is expressed as: in, is the rotation angle in the y-axis direction; A first z vector is constructed according to the initial displacement data; wherein the first z vector is expressed as: in, is the displacement data in the z-axis direction.

[0011] Preferably, converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector comprises: The first x-vector, the first y-vector, and the first z-vector are transformed into a Cartesian coordinate system by the following formula: In the formula, is the transformation matrix.

[0012] Preferably, when the total vector is greater than the preset threshold, displacement data is generated and step counting is performed, including: Integrating the velocity data to obtain an x-axis displacement; Calculate the number of steps according to the initial displacement data and the x-axis displacement; Among them, the number of steps is calculated by the following calculation formula: In the formula, is the x-axis displacement, is the initial displacement data, i.e. the z-axis displacement, is the preset stride length, is the number of steps.

[0013] Preferably, the method of summing the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value, and when the total vector is greater than the preset threshold value, generating total displacement data and performing a step counting, further comprises: Integrating the velocity data to obtain an x-axis displacement and a y-axis displacement; Determine whether the x-axis displacement, the y-axis displacement and the initial displacement data exceed a preset displacement threshold. If so, trigger a pulse interrupt signal, use the x-axis displacement and the initial displacement data as displacement data, and perform a step count; if not, continue to collect acceleration data.

[0014] In a second aspect, the present invention provides a pedometer system for wireless headset detection, comprising: A coordinate establishment module, used to establish a three-dimensional coordinate system with the transmitter at the center of the headset as the coordinate origin; The integral calculation module is used to collect the acceleration data of the earphone and perform the first integral and the second integral on the acceleration data to obtain the velocity data and the initial displacement data. A data calculation module is used to calculate the rotation angle data of the headset according to the speed data. A coordinate conversion module is used to construct a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and convert the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector The step counting module is used to sum the second x vector, the second y vector and the second z vector to obtain a total vector, and compare the total vector with a preset threshold value. When the total vector is greater than the preset threshold value, total displacement data is generated and a step counting is performed.

[0015] In a third aspect, the present invention also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the pedometer detection method for wireless headphones described in any one of the above is implemented.

[0016] In a fourth aspect, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned step counting methods for wireless headset detection.

[0017] In a fifth aspect, the present invention further provides a wireless headset, comprising a pedometer system detected by the wireless headset as described in any one of the above.

[0018] Compared with the prior art, the present invention has the following beneficial effects: the embodiment of the present invention provides a step counting method, system and wireless headset for wireless headset detection. The method includes: establishing a three-dimensional coordinate system with the transmitter at the center of the headset as the coordinate origin; wherein the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the headset, and the z-axis points to the top of the headset; collecting the acceleration data of the headset, and performing a first integral and a second integral on the acceleration data to obtain velocity data and initial displacement data; calculating the rotation angle data of the headset according to the velocity data; constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector; summing the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value, when the total vector is greater than the preset threshold value, generating displacement data, and performing a step counting.

[0019] In the present invention, the method can calculate the speed, rotation angle data and initial displacement of the headset through multiple integrations of acceleration data and vector conversion, thereby realizing effective reasoning of the number of steps. At the same time, due to the use of three-dimensional coordinate conversion and total vector calculation, noise and malfunction can be filtered out, the phenomenon of mis-step counting caused by head movement can be reduced, and the accuracy of step counting can be significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of a step counting method for wireless headset detection provided by a first embodiment of the present invention; Figure 2 It is a structural schematic diagram of a pedometer system for wireless headset detection provided in a second embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Reference Figure 1 The first embodiment of the present invention provides a step counting method for wireless headset detection, comprising the following steps: S11, establishing a three-dimensional coordinate system with the transmitter at the center of the earphone as the coordinate origin; wherein the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the earphone, and the z-axis points to the top of the earphone.

[0023] S12, collecting acceleration data of the earphone, and performing a first integration and a second integration on the acceleration data to obtain velocity data and initial displacement data.

[0024] S13: Calculate the rotation angle data of the earphone according to the speed data.

[0025] S14, constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector.

[0026] S15, summing the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value. When the total vector is greater than the preset threshold value, generating displacement data, and performing a step counting.

[0027] It is worth noting that pedometer statistics refers to the process of measuring and recording the number of steps people walk through by technical means. This statistical method relies on sensors and algorithms to detect the user's walking or running pace and count the number of steps. Pedometer statistics are widely used and are commonly found in various smart wearable devices, such as smart watches, bracelets, and wireless headphones, which are used to track daily exercise and help users understand their exercise status, calorie consumption, and health status.

[0028] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0029] In step S11, a three-dimensional coordinate system is established with the transmitter at the center of the earphone as the coordinate origin.

[0030] Preferably, the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the earphone, and the z-axis points to the top of the earphone.

[0031] Specifically, the system selects the transmitter at the center of the headset as the origin of the three-dimensional coordinate system to construct a spatial coordinate system. This coordinate system can define the reference frame of the headset movement, so that the headset can use this coordinate system as a reference when detecting movement to capture the user's displacement and rotation in different directions. Among them, the x-axis and y-axis of the coordinate system are perpendicular to the axial direction of the headset, and are used to sense the movement and rotation of the headset in the horizontal direction. The z-axis points to the top of the headset and is used to capture the vertical movement of the headset. This axial division method ensures that the system can accurately identify the movement trajectory of the headset in three-dimensional space, which facilitates the accurate calculation of subsequent steps.

[0032] It is worth noting that by establishing this three-dimensional coordinate system, the system can quantify the movement of the headset to a specific coordinate axis, which provides a clear directional reference for acceleration data collection, velocity and displacement calculations in subsequent steps. Compared with simple linear acceleration detection, the establishment of this three-dimensional coordinate system increases the flexibility of the system in identifying motion and can comprehensively detect the multi-axis motion of the headset, thereby improving the data precision and accuracy during the pedometer process. At the same time, after the establishment of the coordinate system, the system can more easily identify acceleration changes in different directions, and integrate these acceleration data in subsequent steps (such as S12 and S13) to accurately obtain velocity and displacement data.

[0033] In step S12, acceleration data of the earphone is collected, and a first integration and a second integration are performed on the acceleration data to obtain velocity data and initial displacement data.

[0034] Optionally, collecting acceleration data of the earphone and performing a first integral calculation and a second integral calculation to obtain velocity data includes: The first integral is calculated by the following formula: In the formula, is the acceleration data in the x-axis direction, is the acceleration data in the y-axis direction, is the speed data in the x-axis direction, is the speed data in the y-axis direction; The speed data includes speed data in the x-axis direction and speed data in the y-axis direction.

[0035] Optionally, collecting acceleration data of the earphone and performing a first integral calculation and a second integral calculation to obtain initial displacement data includes: The second integral is calculated by the following formula: In the formula, is the acceleration data in the z-axis direction, is the displacement data in the z-axis direction; The displacement data in the z-axis direction is used as initial displacement data.

[0036] Specifically, in the wireless headset pedometer method of the present invention, the collection of acceleration data is achieved through an acceleration sensor built into the headset. The acceleration sensor can sense the acceleration changes of the headset in three-dimensional space (x, y, and z axis directions), thereby providing real-time data of the headset movement. Among them, the acceleration sensor is a three-axis accelerometer, which can sense the acceleration of the headset in the three directions of x, y, and z. The acceleration data in each direction represents the instantaneous acceleration of the headset along that direction. In smart wearable devices, commonly used acceleration sensors include MEMS (micro-electromechanical system) sensors, which are suitable for integration in small devices such as headsets due to their small size and low energy consumption.

[0037] It is worth noting that in order to eliminate environmental noise or slight vibrations generated by the headset in a non-movement state, the system will filter the acceleration data. The filtering method used in this embodiment includes low-pass filtering or Kalman filtering, the purpose of which is to remove high-frequency noise and retain the effective acceleration changes of activities such as walking and running.

[0038] After the system collects the acceleration data, it will integrate it for the first time to calculate the speed data of the headset. and They represent the acceleration data in the x-axis and y-axis directions respectively, and by integrating them, we can get the velocity data in the x-axis and y-axis directions. This integral calculation accumulates the acceleration in the time dimension to obtain the instantaneous velocity of the headset in different directions, indicating the velocity change of the headset when it is moving.

[0039] Specifically, the purpose of the second integral calculation is to calculate the displacement data of the earphone in the z-axis direction, which is called the initial displacement data. Here, represents the acceleration data in the z-axis direction. It is integrated twice to obtain the speed first, and then the displacement is obtained after the second integration, that is, the displacement data in the z-axis direction. This displacement data (that is, the initial displacement of the z-axis) is the displacement of the earphone in the vertical direction, which reflects the fluctuation of the earphone in the vertical direction when walking or running. The z-axis displacement data plays an important role in step detection. It can help the system determine whether the earphone has undergone sufficient vertical displacement, thereby distinguishing the actual movement of the steps from the slight shaking of the head. This is particularly important for reducing the rate of miscounting steps and ensuring the accuracy of step statistics.

[0040] In step S13, the rotation angle data of the earphone is calculated according to the speed data.

[0041] Preferably, calculating the rotation angle data of the earphone according to the speed data comprises: The rotation angle data of the headset is calculated using the following formula: In the formula, is the speed data in the x-axis direction, is the speed data in the y-axis direction, is the distance from the acceleration sensor to the rotation axis, is the integration time interval, is the rotation angle about the x-axis, is the rotation angle in the y-axis direction; The rotation angle data includes the rotation angle in the x-axis direction and the rotation angle in the y-axis direction.

[0042] Specifically, in S13, the system further calculates the rotation angle data of the earphone using the speed data obtained in the previous step S12. Specifically, the system calculates the rotation angle of the earphone in the x-axis and y-axis directions. Through this calculation, the system can obtain the rotation angle of the earphone in the x-axis and y-axis directions, thereby obtaining the rotation information of the earphone in different axes.

[0043] It is worth mentioning that the calculation of rotation data enables the system to identify the rotation or tilt state of the headset during movement. For example, when the user turns the head or shakes the headset at a small angle, the system recognizes these movements by the change in rotation angle and distinguishes them in the subsequent step calculation. The rotation data helps the system distinguish between the actual step movement of the headset and the small rotation of the head, thereby avoiding miscounting some invalid head movements as steps. For example, when the head shakes slightly but is not actually walking, the system can use the rotation data to avoid miscounting steps.

[0044] Specifically, step S13 directly uses the speed data obtained in step S12 to ensure that the speed information of the earphone movement is further calculated based on the three-dimensional coordinate system. After calculating the rotation angle in step S13, the system can construct a first set of x, y, and z vectors based on these rotation data (step S14). These vectors reflect the rotation and displacement information of the earphones, providing an accurate direction basis for the next step of coordinate transformation and displacement calculation. In S15, the system will use vectors to calculate the total vector, and the construction of these vectors depends on the rotation data provided in step S13. By calculating the rotation angle, the system can ensure that the total vector calculation is more in line with the actual movement state of the earphones and improve the accuracy of step counting.

[0045] In the present invention, the system calculates the rotation angle of the earphone in the x-axis and y-axis directions to determine whether the earphone has reached a motion state that can trigger pedometer. Specifically, the rotation angle is a key indicator used to determine whether the earphone has moved with a sufficient amplitude, thereby deciding whether to count the action into the step count. The rotation angle, as a criterion for determining the effectiveness of steps, can filter out some low-amplitude, non-walking movements, so that the system can avoid misjudging small movements such as head swings as steps when recording steps. This filtering mechanism allows the system to pay more attention to significant step movements and improves the reliability of pedometer data. When the rotation angle is greater than the threshold, it indicates that the earphone has moved more obviously, which is consistent with the user's step movement. By controlling the rotation angle, the system can better capture movements that meet the characteristics of the step, thereby effectively improving the accuracy of the pedometer.

[0046] In step S14, a first x vector, a first y vector and a first z vector are constructed according to the rotation angle data and the initial displacement data, and the first x vector, the first y vector and the first z vector are converted to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector.

[0047] Optionally, constructing a first x vector, a first y vector, and a first z vector according to the rotation angle data and the initial displacement data includes: Construct a first x vector according to the rotation angle data; wherein the first x vector is expressed as: in, is the rotation angle in the x-axis direction; Construct a first y vector according to the rotation angle data; wherein the first y vector is expressed as: in, is the rotation angle in the y-axis direction; A first z vector is constructed according to the initial displacement data; wherein the first z vector is expressed as: in, is the displacement data in the z-axis direction.

[0048] Optionally, converting the first x vector, the first y vector, and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector, and a second z vector includes: The first x-vector, the first y-vector, and the first z-vector are transformed into a Cartesian coordinate system by the following formula: In the formula, is the transformation matrix.

[0049] Specifically, the system constructs the first set of x, y, and z vectors using the rotation data and initial displacement data of the headset. The construction process of this set of vectors is as follows: vectorization of the rotation data. According to the rotation data of the headset in the x and y directions, the system constructs the first x vector and the first y vector respectively. These two vectors reflect the rotational movement of the headset in the horizontal direction; vectorization of the initial displacement data in the z direction. According to the initial displacement data of the z axis obtained in step S12, the system constructs the first z vector. The z vector is used to represent the displacement of the headset in the vertical direction, providing the up and down movement characteristics of the headset.

[0050] It is worth noting that this set of x, y, and z vectors forms the complete motion state of the headset in its local coordinate system, including the rotation and displacement characteristics of the headset in all directions. The purpose of constructing this set of vectors is to prepare for the subsequent coordinate transformation, so that the system can process the three-dimensional motion information of the headset in a unified coordinate system.

[0051] Next, the first set of x, y, z vectors are converted to a Cartesian coordinate system to obtain a second set of x, y, z vectors. The system uses a transformation matrix to convert the first set of vectors (i.e., the x, y, z vectors in the headset's own coordinate system) to a global Cartesian coordinate system. The converted second set of x, y, z vectors express the motion state of the headset in the standard space, allowing the rotation and displacement characteristics of the headset to be calculated and analyzed in a more universal coordinate system.

[0052] Specifically, the Cartesian Coordinate System is a coordinate system for describing the position of a point in space, proposed by French mathematician René Descartes. It locates the position of a point by defining mutually perpendicular coordinate axes in space. In the step counting method of the present invention, the Cartesian coordinate system is used to unify the motion data of the earphone. The system converts the displacement and rotation vector measured by the earphone in its own coordinate system into a standard Cartesian coordinate system, so that all motion data are calculated and judged under the same reference, thereby more accurately calculating the total displacement and number of steps.

[0053] In the present invention, the main purpose of coordinate transformation is to convert the motion information of the earphone in its own coordinate system into standard motion data in global coordinates. In this way, the system can uniformly judge the motion characteristics of the earphone and avoid errors caused by different positions or angles of the earphone. The calculation results of the second group of vectors are the basis for the calculation of the total vector in the subsequent step determination. Through a unified coordinate system, the system can globally accumulate and sum the motion of the earphone, thereby facilitating the judgment of whether a valid step is reached.

[0054] In step S15, the second x vector, the second y vector and the second z vector are summed to obtain a total vector, and the total vector is compared with a preset threshold value. When the total vector is greater than the preset threshold value, displacement data is generated and a step count is performed.

[0055] Optionally, when the total vector is greater than the preset threshold, displacement data is generated and step counting is performed, including: Integrating the velocity data to obtain an x-axis displacement; Calculate the number of steps according to the initial displacement data and the x-axis displacement; Among them, the number of steps is calculated by the following calculation formula: In the formula, is the x-axis displacement, is the initial displacement data, i.e. the z-axis displacement, is the preset stride length, is the number of steps.

[0056] Specifically, the two optional embodiments are the key steps of step count determination and abnormal motion filtering, which directly affect the accuracy and effectiveness of step counting, ensuring that the system only records valid steps and filters out false movements and abnormal motions.

[0057] First, the system obtains a total vector by summing up the second set of x, y, and z vectors obtained in the previous step (i.e., the headphone motion vector expressed in the Cartesian coordinate system). The total vector represents the overall motion of the headphone in three-dimensional space and is a comprehensive reflection of the movement of the headphone in all directions.

[0058] Secondly, the total vector value is compared with a preset threshold. When the total vector is greater than the threshold, the system considers that the earphone has undergone significant movement, that is, the amount of movement of the earphone has reached the standard of "effective steps". Once the threshold requirement is met, the system generates displacement data and records the number of steps.

[0059] Preferably, the method for calculating the number of steps is: the system first integrates the speed data in the x-axis direction to obtain the x-axis displacement. Through integration, the system converts the speed data into displacement data, which represents the movement of the earphone in the x-axis direction. When calculating the number of steps, the system not only uses the x-axis displacement, but also combines the initial displacement data, that is, the displacement in the z-axis direction. These data are used together to determine the displacement characteristics of the earphone during walking. The formula adds the displacement in the x-axis and z-axis directions and divides it by the stride length L to obtain the number of steps.

[0060] The stride length L in the formula is a preset constant, which represents the distance the system assumes to move in each step. Specifically, the method for determining the stride length can be: based on the estimation of the user's height. In general, the stride length can be estimated by the user's height, because there is a certain proportional relationship between height and stride; based on the real-time adjustment of dynamic motion data, the stride length can also be estimated by dynamic data during actual exercise. For example, by analyzing the user's speed and step frequency over a period of time, the actual stride can be calculated; based on the stride calculation of the acceleration peak, the acceleration will present a periodic peak in each step. According to the spacing of these peaks (that is, the time difference between the two peaks) and the intensity of exercise, the system can calculate the user's stride length. In general, by presetting the stride length, the displacement of the earphone can be directly converted into the number of steps, which improves the accuracy of the step counting.

[0061] Optionally, the summing up the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value, when the total vector is greater than the preset threshold value, generating total displacement data, and performing a step counting, further includes: Integrating the velocity data to obtain an x-axis displacement and a y-axis displacement; Determine whether the x-axis displacement, the y-axis displacement and the initial displacement data exceed a preset displacement threshold. If so, trigger a pulse interrupt signal, use the x-axis displacement and the initial displacement data as displacement data, and perform a step count; if not, continue to collect acceleration data.

[0062] It is worth noting that the pulse interrupt is a signal trigger mechanism for marking and counting steps. Specifically, the pulse interrupt signal is used to trigger the step counting record when a movement that meets the step characteristics is detected, ensuring that the system only counts under valid movement conditions. The pulse interrupt is used as a trigger signal to mark valid steps in the step determination process. Once the system detects that the displacement in the x-axis, y-axis and z-axis directions exceeds the preset threshold, the system will generate a pulse interrupt signal. The generation of the signal indicates that the system confirms that the current movement meets the step standard, so the step counting record can be performed. In the present invention, the pulse interrupt signal helps prevent the system from counting steps when a small amplitude or invalid movement is detected. The pulse interrupt is only triggered when all displacement thresholds are met, so the mechanism can filter out non-step movements, such as small head shaking or other low-amplitude movements, thereby improving the accuracy of the step counting. The pulse interrupt signal adds a layer of protection mechanism to the step counting system. Through this trigger signal, the system can effectively avoid the phenomenon of miscounting steps caused by low-amplitude vibrations, slight shaking, etc. In different sports scenarios (such as walking, running, going up and down stairs, etc.), the pulse interruption signal can help the system determine the real step movement without recording unexpected, non-step vibrations.

[0063] Specifically, the calculation and judgment of the x-axis and y-axis displacement, the detection of the initial displacement data, and the pulse signal triggering and step counting, these steps combined together constitute an effective abnormal movement filtering mechanism. It is worth noting that when counting steps, the system not only makes a judgment based on the threshold of the total vector, but also makes further judgments on the x-axis displacement, y-axis displacement and z-axis initial displacement data. Specifically, the system needs to detect whether the x-axis and y-axis displacements have reached a preset threshold. This detection ensures that the headset has sufficient displacement in the horizontal direction to avoid misjudgment caused by slight shaking of the head or other non-step movements during walking or running. At the same time, the z-axis initial displacement data will also participate in the judgment. The z-axis initial displacement data mainly reflects the displacement of the headset in the vertical direction, which helps to capture the up and down movement characteristics in the step (such as leg lifting and stepping), further ensuring the accuracy of the step counting. Only when the x-axis displacement, y-axis displacement and z-axis initial displacement simultaneously exceed their respective preset thresholds, the system will consider that the headset has undergone "effective step" movement. The purpose of this multiple threshold judgment is to filter out invalid movements that do not meet the step characteristics. For example, a slight shake of the head or a small left-right sway of the head may produce a certain amount of displacement, but it is not enough to meet the stride requirement, so it should not be counted as a step. Through multiple judgments on the displacement in each direction, the system can effectively distinguish between valid steps and abnormal movements, avoiding the mistaken inclusion of invalid movements in the step count.

[0064] Specifically, once the x-axis displacement, y-axis displacement, and z-axis initial displacement all exceed the preset threshold, the system will trigger a pulse interrupt signal, indicating that the system confirms that the movement meets the step characteristics. After the pulse signal is triggered, the system records the movement as a step and includes it in the step count. If the threshold is not met, the pulse signal is not triggered, and the system continues to collect new acceleration data until the conditions are met.

[0065] In a preferred embodiment, the x-axis displacement, y-axis displacement and z-axis initial displacement are calculated and can also be used to determine the position of the left and right earphones. After obtaining these displacements, these data can be further used to determine the movement trend of the earphones in different directions, so as to identify the relative position of the earphones, that is, the specific position relationship between the left earphone and the right earphone. By determining the position of the left and right ears, the earphones can accurately understand the user's current direction of movement. For example, the left earphone is located at different positions such as the upper left side or the rear right side of the user. The system can use this position information to assist in determining whether the user is walking, turning or performing other actions. Accurate direction recognition helps to avoid misjudgment of step counting due to changes in the position of the earphones (such as the user turning his head or changing direction), and improves the system's direction perception ability.

[0066] Exemplarily, after obtaining the displacement of the three axes, the conditional judgment steps for determining the position of the earphone are described in detail as follows: Set the x-axis displacement, y-axis displacement and z-axis initial displacement to sumX, sumY and sumZ respectively. Condition 1: When the values ​​of sumX, sumY and sumZ are all greater than 0, and sumY is greater than sumX and sumZ: Position judgment: The system determines that the left earphone is located above the left side of the user, and the right earphone is located behind the right side of the user.

[0067] Condition 2: When the values ​​of sumX, sumY, and sumZ are all greater than 0, and sumX is greater than sumY and sumZ: Position determination: The system determines that the left earphone is located in front of the user's right side, and the right earphone is located behind the user's left side.

[0068] Condition 3: When the values ​​of sumX, sumY, and sumZ are all greater than 0, and sumZ is greater than sumX and sumY: Position determination: The system determines that the left earphone is located behind the left side of the user, and the right earphone is located in front of the right side of the user.

[0069] Condition 4: When the values ​​of sumX, sumY, and sumZ are all less than 0, and sumX is greater than sumY and sumZ: Position determination: The system determines that the left earphone is located in front of the user's right side, and the right earphone is located behind the user's left side.

[0070] Condition 5: When the absolute values ​​of sumX, sumY and sumZ are all less than a preset value; Position judgment: The system determines that the left earphone is located at the left ear and the right earphone is located at the right ear (ie, the standard wearing position).

[0071] The system can use this location information to help determine whether the user is walking, turning, or performing other actions. By judging the position of the earphones, the system can adapt to more complex motion scenarios. For example, when the user changes direction (such as turning left or right) while walking, the system can determine the user's direction change through the real-time earphone position status to avoid mistaking the turning action for a step.

[0072] In general, the step counting operation in step S15 is triggered by two methods to ensure the accuracy of step counting. These two methods include: comparing the total vector with the preset threshold. When the total vector exceeds the preset motion threshold, the system preliminarily considers that the headset has undergone effective motion and meets the characteristics of the step; judging the displacement of each axis and multiple thresholds. In addition to the judgment of the total vector, the system further performs independent threshold judgments on the displacement of the headset in the x-axis, y-axis and z-axis directions. Only when the displacement in these three directions exceeds their respective preset thresholds, a pulse interruption is triggered, and the system will finally confirm that the movement is a valid step. The threshold judgment of the total vector is a preliminary screening, while the judgment of multiple displacements is a more refined judgment, ensuring that only movements that meet the conditions in all directions are considered valid steps.

[0073] The following describes the working process of the present invention by taking a relatively common scenario as an example. The working process is as follows: The user wears a pair of wireless headphones and prepares to take a walk outdoors. The headphones start the pedometer function, and as the user walks, the headphone system automatically detects the exercise status and records the number of steps.

[0074] After the headset is turned on, the system first establishes a three-dimensional coordinate system at the center transmitter of the headset, with the x-axis and y-axis perpendicular to the axis of the headset and the z-axis pointing to the top of the headset. This coordinate system provides a motion reference, enabling the headset to sense motion in different directions.

[0075] As the user walks, the accelerometer in the headset begins to collect acceleration data in real time in the x, y, and z directions. These data reflect the user's dynamic motion characteristics during walking, including step ups and downs, forward movement, and shaking.

[0076] The system performs a first integration of the real-time acceleration data to obtain velocity data, which represents the instantaneous velocity of the headset in different directions.

[0077] Then, the system integrates the velocity data for the second time to obtain the initial displacement data, especially the displacement data in the z-axis direction. These data can reflect the displacement characteristics of the earphones during walking and help the system identify the effectiveness of the steps.

[0078] The system calculates the headset's x- and y-axis rotation angles based on the velocity data.

[0079] The system uses the previously calculated rotation angle and displacement data to construct the first set of x, y, z vectors. This vector set is transformed into a Cartesian coordinate system under the action of the transformation matrix to obtain the second set of x, y, z vectors.

[0080] The system sums the second set of x, y, and z vectors to obtain a total vector as the overall movement of the headset in three-dimensional space.

[0081] The system compares the total vector with a preset threshold. When the total vector is greater than the threshold, the system determines that the headset has moved significantly, generates displacement data, and records a step.

[0082] Before determining the number of steps, the system further checks whether the displacements in the x, y, and z directions all exceed their respective preset thresholds to confirm that the movement meets the step characteristics.

[0083] Once the displacement in all directions reaches the threshold, the system triggers a pulse interrupt signal to confirm that the movement is a valid step and count the steps. If it is not met, the acceleration data will continue to be collected until the conditions are met.

[0084] After the above double judgment, the system records a valid step. If the user continues to walk, the system continues to run the above steps and continuously records the number of steps.

[0085] Through this process, the earphones can achieve high-precision step counting in common walking scenarios, adapt to changes in various motion states, and provide users with accurate step records.

[0086] In summary, the present invention provides a pedometer method for wireless headset detection, including: establishing a three-dimensional coordinate system with a transmitter at the center of the headset as the coordinate origin; wherein the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the headset, and the z-axis points to the top of the headset; collecting acceleration data of the headset, and performing a first integral and a second integral on the acceleration data to obtain velocity data and initial displacement data; calculating the rotation angle data of the headset according to the velocity data; constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector; summing the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value, when the total vector is greater than the preset threshold value, generating displacement data, and performing a pedometer step.

[0087] In the present invention, the method can calculate the speed, rotation angle data and initial displacement of the headset through multiple integrations of acceleration data and vector conversion, thereby realizing effective reasoning of the number of steps. At the same time, due to the use of three-dimensional coordinate conversion and total vector calculation, noise and malfunction can be filtered out, the phenomenon of mis-step counting caused by head movement can be reduced, and the accuracy of step counting can be significantly improved.

[0088] Reference Figure 2 The second embodiment of the present invention provides a pedometer system for wireless headset detection, comprising: A coordinate establishment module, used to establish a three-dimensional coordinate system with the transmitter at the center of the headset as the coordinate origin; The integral calculation module is used to collect the acceleration data of the earphone and perform the first integral and the second integral on the acceleration data to obtain the velocity data and the initial displacement data. A data calculation module is used to calculate the rotation angle data of the headset according to the speed data. A coordinate conversion module is used to construct a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and convert the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector The step counting module is used to sum the second x vector, the second y vector and the second z vector to obtain a total vector, and compare the total vector with a preset threshold value. When the total vector is greater than the preset threshold value, total displacement data is generated and a step counting is performed.

[0089] In an optional implementation, the integral calculation module is specifically used to: The first integral is calculated by the following formula: In the formula, is the acceleration data in the x-axis direction, is the acceleration data in the y-axis direction, is the speed data in the x-axis direction, is the speed data in the y-axis direction; The speed data includes speed data in the x-axis direction and speed data in the y-axis direction.

[0090] In an optional implementation, the integral calculation module is specifically used to: The second integral is calculated by the following formula: In the formula, is the acceleration data in the z-axis direction, is the displacement data in the z-axis direction; The displacement data in the z-axis direction is used as initial displacement data.

[0091] In an optional implementation, the data calculation module is specifically used to: The rotation angle data of the headset is calculated using the following formula: In the formula, is the speed data in the x-axis direction, is the speed data in the y-axis direction, is the distance from the acceleration sensor to the rotation axis, is the integration time interval, is the rotation angle about the x-axis, is the rotation angle in the y-axis direction; The rotation angle data includes the rotation angle in the x-axis direction and the rotation angle in the y-axis direction.

[0092] In an optional implementation, the coordinate conversion module is specifically used for: Construct a first x vector according to the rotation angle data; wherein the first x vector is expressed as: in, is the rotation angle in the x-axis direction; Construct a first y vector according to the rotation angle data; wherein the first y vector is expressed as: in, is the rotation angle in the y-axis direction; A first z vector is constructed according to the initial displacement data; wherein the first z vector is expressed as: in, is the displacement data in the z-axis direction.

[0093] In an optional implementation, the coordinate conversion module is specifically used for: The first x-vector, the first y-vector, and the first z-vector are transformed into a Cartesian coordinate system by the following formula: In the formula, is the transformation matrix.

[0094] In an optional implementation, the step counting module is specifically used for: Integrating the velocity data to obtain an x-axis displacement; Calculate the number of steps according to the initial displacement data and the x-axis displacement; Among them, the number of steps is calculated by the following calculation formula: In the formula, is the x-axis displacement, is the initial displacement data, i.e. the z-axis displacement, is the preset stride length, is the number of steps.

[0095] In an optional implementation, the step counting module is specifically used for: Integrating the velocity data to obtain an x-axis displacement and a y-axis displacement; Determine whether the x-axis displacement, the y-axis displacement and the initial displacement data exceed a preset displacement threshold. If so, trigger a pulse interrupt signal, use the x-axis displacement and the initial displacement data as displacement data, and perform a step count; if not, continue to collect acceleration data.

[0096] It should be noted that the pedometer system for wireless headset detection provided in an embodiment of the present invention is used to execute all the process steps of the pedometer method for wireless headset detection in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0097] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a pedometer method program for wireless headset detection. When the processor executes the computer program, the steps in the above-mentioned pedometer method embodiments for wireless headset detection are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the step counting module.

[0098] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0099] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0100] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0101] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0102] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0103] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0104] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A step counting method for wireless headset detection, characterized in that: include: A three-dimensional coordinate system is established with the transmitter at the center of the earphone as the coordinate origin; wherein the x-axis and y-axis of the three-dimensional coordinate system are perpendicular to the axial direction of the earphone, and the z-axis points to the top of the earphone; Collecting acceleration data of the earphone, and performing a first integration and a second integration on the acceleration data to obtain velocity data and initial displacement data; Calculating the rotation angle data of the earphone according to the speed data; Constructing a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and converting the first x vector, the first y vector and the first z vector to a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector; The second x vector, the second y vector and the second z vector are summed to obtain a total vector, and the total vector is compared with a preset threshold value. When the total vector is greater than the preset threshold value, displacement data is generated and a step counting is performed.

2. The step counting method for wireless headset detection according to claim 1, characterized in that: The collecting the acceleration data of the earphone and performing the first integral calculation and the second integral calculation to obtain the velocity data includes: The first integral calculation is performed by the following formula: In the formula, is the acceleration data in the x-axis direction, is the acceleration data in the y-axis direction, is the speed data in the x-axis direction, is the speed data in the y-axis direction; The speed data includes speed data in the x-axis direction and speed data in the y-axis direction.

3. The step counting method for wireless headset detection according to claim 1, characterized in that: The collecting the acceleration data of the earphone and performing the first integral calculation and the second integral calculation to obtain the initial displacement data includes: The second integral is calculated by the following formula: In the formula, is the acceleration data in the z-axis direction, is the displacement data in the z-axis direction; The displacement data in the z-axis direction is used as initial displacement data.

4. The step counting method for wireless headset detection according to claim 1, characterized in that: The step of calculating the rotation angle data of the earphone according to the speed data comprises: The rotation angle data of the headset is calculated using the following formula: In the formula, is the speed data in the x-axis direction, is the speed data in the y-axis direction, is the distance from the acceleration sensor to the rotation axis, is the integration time interval, is the rotation angle about the x-axis, is the rotation angle in the y-axis direction; The rotation angle data includes the rotation angle in the x-axis direction and the rotation angle in the y-axis direction.

5. The step counting method for wireless headset detection according to claim 1, characterized in that: The step of constructing a first x vector, a first y vector, and a first z vector according to the rotation angle data and the initial displacement data comprises: Construct a first x vector according to the rotation angle data; wherein the first x vector is expressed as: in, is the rotation angle in the x-axis direction; Construct a first y vector according to the rotation angle data; wherein the first y vector is expressed as: in, is the rotation angle in the y-axis direction; A first z vector is constructed according to the initial displacement data; wherein the first z vector is expressed as: in, is the displacement data in the z-axis direction.

6. The step counting method for wireless headset detection according to claim 1, characterized in that: The converting the first x vector, the first y vector and the first z vector into a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector comprises: The first x-vector, the first y-vector, and the first z-vector are transformed into a Cartesian coordinate system by the following formula: In the formula, is the transformation matrix.

7. The step counting method for wireless headset detection according to claim 1, characterized in that: When the total vector is greater than the preset threshold, displacement data is generated and step counting is performed, including: Integrating the velocity data to obtain an x-axis displacement; Calculate the number of steps according to the initial displacement data and the x-axis displacement; Among them, the number of steps is calculated by the following calculation formula: In the formula, is the x-axis displacement, is the initial displacement data, i.e. the z-axis displacement, is the preset stride length, is the number of steps.

8. The step counting method for wireless headset detection according to claim 1, characterized in that: The method of summing the second x vector, the second y vector and the second z vector to obtain a total vector, and comparing the total vector with a preset threshold value, and when the total vector is greater than the preset threshold value, generating total displacement data and performing a step counting, further includes: Integrating the velocity data to obtain an x-axis displacement and a y-axis displacement; Determine whether the x-axis displacement, the y-axis displacement and the initial displacement data exceed a preset displacement threshold. If so, trigger a pulse interrupt signal, use the x-axis displacement and the initial displacement data as displacement data, and perform a step count; if not, continue to collect acceleration data.

9. A pedometer system for wireless earphone detection, characterized in that: include: A coordinate establishment module, used to establish a three-dimensional coordinate system with the transmitter at the center of the headset as the coordinate origin; An integral calculation module, used for collecting acceleration data of the earphone, and performing a first integral and a second integral on the acceleration data to obtain velocity data and initial displacement data; A data calculation module, used to calculate the rotation angle data of the earphone according to the speed data; a coordinate conversion module, configured to construct a first x vector, a first y vector and a first z vector according to the rotation angle data and the initial displacement data, and convert the first x vector, the first y vector and the first z vector into a Cartesian coordinate system to obtain a second x vector, a second y vector and a second z vector; The step counting module is used to sum the second x vector, the second y vector and the second z vector to obtain a total vector, and compare the total vector with a preset threshold value. When the total vector is greater than the preset threshold value, total displacement data is generated and a step counting is performed.

10. A wireless headset, characterized in that: The wireless headset includes a pedometer system detected by the wireless headset as described in claim 8.

Citation Information

Patent Citations

  • Wireless headset step counting method, device and equipment, and readable storage medium

    CN110201375A

  • METHOD, PROGRAM AND DEVICE FOR PROVIDING VIRTUAL SPACE

    JP6246310B1

  • Remote distance estimation system and method

    US11069082B1

  • Method and system for calibrating a pedometer

    US20170227374A1

  • Systems and methods for real-time data quantification, acquisition, analysis, and feedback

    US20200245900A1