Wearing position identification method, storage medium and earphone
By collecting initial attitude parameters through an accelerometer inside the earphone, the attitude mode and target axis are determined, enabling adaptive recognition of the earphone wearing position. This solves the problems of accuracy and efficiency in earphone recognition under different postures and improves the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI RUISHENG ELECTRONIC CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-24
AI Technical Summary
Existing headphones have difficulty accurately identifying the position of the left and right earphones when the user's wearing posture is not standard, resulting in poor recognition response.
By placing an accelerometer inside the earphone, the initial posture parameters of the user when picking up the earphone and inserting it into the ear are collected, the posture mode and target axis are determined, and the wearing position of the earphone is identified based on these parameters.
It improves the accuracy and efficiency of headphone position recognition under different wearing postures, enhances user experience, and reduces hardware usage and power consumption.
Smart Images

Figure CN121924408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of headphone technology, and in particular to a method for identifying wearing position, a storage medium, and headphones. Background Technology
[0002] In existing headphone assemblies, the left earpiece is usually marked with an "L" and the right earpiece with an "R," allowing users to distinguish between the left and right earpieces. With advancements in electronic technology, some clip-on headphones now adopt a design where both earpieces are identical, eliminating the need to differentiate between left and right ears. Instead, the headphones automatically identify the wearing position. However, current headphone position recognition methods are relatively demanding on the user's posture when wearing the headphones. When the user's posture is not entirely standard, the recognition accuracy and responsiveness can be relatively low.
[0003] Therefore, it is necessary to provide a method for wear position recognition, a storage medium, and an earphone to solve the above problems. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the present invention provides a method, storage medium and earphone for wearing position recognition, which can relatively accurately and quickly identify the wearing position of the earphone based on the user's current posture when wearing the earphone, thereby improving the user experience.
[0005] To achieve the above objectives, a first aspect of the present invention provides a method for identifying wearing position, the steps of which include:
[0006] Detects whether the user has taken the earphones out of the earphone case;
[0007] If so, the accelerometer inside the earphone is triggered to collect the initial posture parameters from when the user takes the earphone out to when the earphone is inserted into the ear;
[0008] The attitude mode is determined based on the initial attitude parameters within a preset specific acquisition time.
[0009] Obtain the target axis corresponding to the attitude mode;
[0010] Based on the initial attitude parameters and the target axis, determine the motion trend information of the headphones;
[0011] Based on motion trend information, the wearing position information of the headphones can be identified.
[0012] In one implementation, the step of detecting whether the user has taken the earphones from the earphone case includes:
[0013] Check if the earphone case is open;
[0014] If so, check whether the contacts between the earphones and the earphone case are conductive.
[0015] In one implementation, the step of triggering the accelerometer in the earphone to collect initial posture parameters from the time the user takes the earphone out to the time the earphone is inserted into the ear includes:
[0016] If the system detects that the user has taken the earphones out of the earphone case, it will activate the accelerometer inside the earphones.
[0017] Check if the headphones are worn in the ears;
[0018] If so, stop the accelerometer and obtain the initial attitude parameters.
[0019] In one implementation, the step of determining the attitude mode based on initial attitude parameters within a preset specific acquisition time includes:
[0020] Obtain the initial attitude parameters of the three axes of the accelerometer within a preset specific acquisition time;
[0021] Based on the initial attitude parameters corresponding to the three axes, the mode reference value is obtained;
[0022] The attitude mode is determined based on the mode reference value.
[0023] In one implementation, the step of determining the motion trend information of the headphones based on initial attitude parameters and the target axis includes:
[0024] Based on the target axis, specific attitude parameters are obtained from the initial attitude parameters;
[0025] Simplify the processing of specific attitude parameters to obtain the target attitude parameters;
[0026] Based on the target posture parameters, the motion trend information of the headphones is obtained.
[0027] In one implementation, the steps for simplifying the processing of specific attitude parameters to obtain target attitude parameters include:
[0028] Obtain the data acquisition duration from the accelerometer;
[0029] Based on the acquisition time and the preset comparison time, the first attitude parameters are obtained from the specific attitude parameters;
[0030] The first attitude parameters are filtered to obtain the target attitude parameters.
[0031] In one implementation, the step of obtaining the motion trend information of the headphones based on the target posture parameters includes:
[0032] Based on a preset division method, the target attitude parameters are divided into several attitude parameter intervals;
[0033] Based on the changes in the positive and negative values of the target attitude parameters within the attitude parameter range, the motion trend information corresponding to the attitude parameter range is determined.
[0034] In one implementation, the step of identifying the wearing position information of the headphones based on motion trend information includes:
[0035] Obtain the matching degree between exercise trend information and preset exercise modes;
[0036] Determine whether the match is within the preset matching range;
[0037] If so, then confirm that the wearing position of the headphones is the wearing position corresponding to the sports mode;
[0038] If not, the wearing position information of the headphones is determined based on the number of trend types in the motion trend information.
[0039] A second aspect of the present invention provides a computer-readable storage medium comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for identifying the wearing position described above.
[0040] A third aspect of the present invention provides an earphone including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the wearing position recognition method described above.
[0041] The beneficial effects of this invention are as follows: it obtains initial attitude parameters through an accelerometer to determine the corresponding attitude mode and target axis, thereby achieving adaptive recognition of the wearing position of the headphones, improving the accuracy and efficiency of headphone wearing position recognition under different headphone wearing postures, and improving the user experience. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating the method for identifying the wearing position disclosed in an embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of the module structure of the earphone disclosed in an embodiment of the present invention. Detailed Implementation
[0044] In this invention, the terms "set up," "equipped with," and "connected" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, elements, or components. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances.
[0045] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0046] Furthermore, in addition to indicating direction or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in certain situations to indicate a dependency or connection. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0048] The wearing position recognition method provided in this application is mainly applied to headphones, such as TWS headphones and OWS headphones. It obtains initial posture parameters through an accelerometer to determine the corresponding posture mode and target axis, thereby realizing adaptive recognition of the wearing position of the headphones. This improves the accuracy and efficiency of headphone wearing position recognition under different headphone wearing postures and enhances the user experience.
[0049] The following is the content of the first aspect of the present invention:
[0050] Please refer to Figure 1 In this embodiment, the steps of the wearing location recognition method include:
[0051] S1. Detect whether the user has taken the earphones out of the earphone case;
[0052] S2. If so, the accelerometer inside the earphone is triggered to collect the initial posture parameters from when the user takes the earphone out to when the earphone is put into the ear.
[0053] S3. Determine the attitude mode based on the initial attitude parameters within a preset specific acquisition time.
[0054] S4. Obtain the target axis corresponding to the attitude mode;
[0055] S5. Based on the initial attitude parameters and the target axis, determine the motion trend information of the headphones;
[0056] S6. Based on motion trend information, identify the wearing position information of the headphones.
[0057] The accelerometer is located inside the earphone, with its central axis parallel to the earphone's axis, to detect the earphone's acceleration parameters along three axes. Initial attitude parameters are the earphone's acceleration parameters along these three axes. Specific acquisition duration is a specific time segment within the accelerometer's acquisition duration. Attitude mode refers to the earphone's posture when the user picks up and wears it. The target axis is the axis among the accelerometer's three axes used to identify the earphone's motion trend information. Motion trend information is the earphone's motion state within a specific time period. Wearing position information includes left and right position information, indicating whether the earphone is worn in the user's left or right ear.
[0058] The posture parameters required for adaptively determining the earphone wearing position are the posture parameters corresponding to the time period from when the user takes the earphone to when the user finishes wearing the earphone. Therefore, it is necessary to first determine whether the user has taken the earphone from the earphone case, that is, it is necessary to first detect whether the user has taken the earphone from the earphone case. Specifically, it first detects whether the earphone case is in the open state. If the earphone case is in the open state, it then detects whether the electrical connection between the earphone case and the earphone is broken. When it is detected that the electrical connection between the earphone and the earphone case is broken, it can be determined that the user has taken the corresponding earphone from the earphone case, and then the preset acceleration sensor inside the earphone is activated.
[0059] After the accelerometer inside the earphone is activated, it collects posture parameters from the moment the user takes the earphone out until it is inserted into the ear, using these parameters as initial posture parameters. It's easy to understand that by limiting the collection of posture parameters by the accelerometer to the period from when the user takes the earphone out until it is inserted into the ear, the amount of posture parameters collected by the accelerometer is reduced, decreasing data processing complexity and unnecessary power consumption, while improving the response efficiency for recognizing the earphone's wearing position. Specifically, after the user takes the earphone out, the accelerometer can detect whether the earphone is inserted into the ear, and trigger the cessation of data collection based on the insertion signal.
[0060] After collecting the initial posture parameters from when the user picks up the earphones to when they are inserted into the ear, before determining the earphone wearing position information using these initial posture parameters, it is necessary to first determine the user's posture pattern when wearing the earphones. Specifically, using the initial posture parameters within a specific time period from the moment the user picks up the earphones, the current posture pattern of the earphones is determined. By processing the initial posture parameters within this specific collection period, a reference value for determining the current posture pattern of the earphones can be obtained, and the posture pattern corresponding to this reference value is taken as the current posture pattern of the earphones. After determining the current posture pattern of the earphones, the pre-set target axis corresponding to this posture pattern can be obtained.
[0061] After obtaining the target axis, the motion trend information of the headphones is determined based on the initial attitude parameters and the target axis. Specifically, the initial attitude parameters are first processed to reduce their redundancy, and then the processed initial attitude parameters corresponding to the target axis are analyzed holistically or segmentally to obtain motion trend information.
[0062] After obtaining the corresponding motion trend information, and combining it with the wearing motion trajectory characteristics of the left and right earphones, the wearing position information of the earphones can be identified. Specifically, during the wearing process, the wearing trajectory characteristics of the left and right earphones are different. By observing the positive and negative changes in the target posture parameters of the earphones and / or the number of trend types in the motion trend information, the wearing mode corresponding to the current earphone wearing can be determined. Thus, the wearing position information of the earphones can be determined solely by the accelerometer sensor configured inside the earphones.
[0063] Understandably, by acquiring initial attitude parameters through an accelerometer, the corresponding attitude mode and target axis can be determined, thereby enabling adaptive recognition of the headphone wearing position. This improves the accuracy and efficiency of headphone wearing position recognition under different wearing postures, reduces the use of additional hardware, lowers the chip's computing power consumption for the wearing position recognition function, reduces headphone power consumption, and improves the user experience.
[0064] Furthermore, in one embodiment, step S1 of detecting whether the user has taken the earphones from the earphone case includes:
[0065] S11. Check if the earphone case is in the open state;
[0066] S12. If yes, then check whether the contacts between the earphone and the earphone case are conductive.
[0067] Smart earbuds such as TWS or OWS earbuds are usually stored in an earbud case, and the earbuds are connected to the earbud case via a charging post. When users need to use the earbuds, they need to open the earbud case first and then take the earbuds out of the earbud case. Therefore, in order to realize the earbud wearing position recognition function, it is necessary to first determine whether the user has taken the earbuds out of the earbud case when it is open.
[0068] Preferably, the headphone case contains a magnet and a Hall sensor. The interaction between the Hall sensor and the magnet can detect whether the headphone is in the open state. When the user opens or closes the headphone case, the top cover of the headphone case rotates, causing the magnet to rotate. This changes the magnetic field strength at the sensing area of the Hall sensor. The Hall sensor detects the change in magnetic field strength and outputs a corresponding detection signal, thereby determining whether the headphone case is in the open state.
[0069] Once the earphone case is confirmed to be open, the system can determine whether the user has taken the earphones out by checking if the contact points between the earphones and the case are conductive. Specifically, if the contact points between the earphones and the case are conductive, it means the user has not taken the earphones out of the case; if the contact points are not conductive, it means the user has taken the earphones out of the case.
[0070] Understandably, by detecting the open state of the earphone case and the continuity of the charging contacts, the accuracy of detecting whether the user has taken out the earphones is improved, which can effectively reduce the frequent activation of the subsequent accelerometer and improve the earphone's battery life to a certain extent.
[0071] Furthermore, in one embodiment, step S2, which triggers the accelerometer within the earphone to collect initial posture parameters from the time the user removes the earphone to the time the earphone is inserted into the ear, includes:
[0072] S21. If the user is detected taking the earphones out of the earphone case, the accelerometer inside the earphones will be activated.
[0073] S22. Check if the earphones are worn in the ears;
[0074] S23. If so, stop the accelerometer and obtain the initial attitude parameters.
[0075] After a user takes the earphones out of the charging case, the user may put them directly into their ears or put them in their ears after a period of time. When a user puts the earphones in, there are corresponding wearing trajectory characteristics. Therefore, after detecting that the user has taken the earphones out of the charging case, it is necessary to collect posture data within a specific time period for subsequent identification of the user's wearing trajectory characteristics, and thus identify the wearing position of the earphones.
[0076] Upon detecting that a user has removed the earbuds from the charging case, the accelerometer and in-ear detection sensor inside the earbuds are activated. The accelerometer begins collecting the earbuds' posture data, while the in-ear detection sensor detects whether the earbuds are worn in the ear. Specifically, the in-ear detection sensor includes, but is not limited to, capacitive sensors, infrared optical sensors, and pressure sensors; preferably, the in-ear detection sensor is a capacitive sensor. Once the in-ear detection sensor detects that the user has put the earbuds in their ear, the accelerometer stops collecting data and uses the posture data collected by the accelerometer during the period from when the user removes the earbuds from the charging case to when they are put in their ear as the initial posture parameters.
[0077] Understandably, by collecting the earphone's posture data during the period from when the user takes the earphone out of the case to when they put it on, as the initial posture parameters, data redundancy is reduced to some extent, the power consumption of the earphone is reduced, the accuracy of the posture data used for subsequent user wearing trajectory feature recognition is improved, and the response efficiency for subsequent identification of earphone wearing position information is also improved.
[0078] Furthermore, in one embodiment, step S3, which determines the attitude mode based on initial attitude parameters within a preset specific acquisition duration, includes:
[0079] S31. Obtain the initial attitude parameters of the three axes of the accelerometer within a preset specific acquisition time.
[0080] S32. Obtain the mode reference value based on the initial attitude parameters corresponding to the three axes;
[0081] S33. Determine the attitude mode based on the mode reference value.
[0082] The specific data acquisition duration is a preset duration starting from the moment the user picks up the headphones. The mode reference value is a tendency value determined using the initial attitude parameters of the three axes within the specific data acquisition duration to reflect the current wearing posture of the headphones. Several posture modes are preset, including but not limited to standard mode, lying down mode, and head tilt mode, which can be set according to actual design needs.
[0083] After acquiring the initial attitude parameters, the initial attitude parameters corresponding to the three axes of the accelerometer are obtained within a preset specific acquisition time. After obtaining the initial attitude parameters for the three axes, these parameters are processed to obtain the mode reference value. Specifically, the initial attitude parameters for each axis are averaged to obtain the average value for each axis, and then the average value of the initial attitude parameters for all three axes is averaged again to obtain the mode reference value.
[0084] The posture mode includes multiple mode types, each corresponding to a preset mapping range. After obtaining the mode reference value, it is determined which mapping range the mode reference value falls into, and then the posture mode corresponding to the current wearing posture of the headphones is determined based on the mapping range in which the mode reference value falls.
[0085] Understandably, by using the initial attitude parameters of the three axes of the accelerometer within a specific acquisition period to obtain the mode reference value, the current wearing posture mode of the headphones can be determined. This enables adaptation to multiple current wearing postures of headphones, reduces the interference of the current wearing posture of headphones on the subsequent headphone wearing position recognition, and improves the accuracy of subsequent headphone wearing position recognition.
[0086] Furthermore, in one embodiment, step S5, which determines the motion trend information of the headphones based on the initial attitude parameters and the target axis, includes:
[0087] S51. Based on the target axis, obtain specific attitude parameters from the initial attitude parameters;
[0088] S52. Simplify the processing of specific attitude parameters to obtain the target attitude parameters;
[0089] S53. Based on the target posture parameters, obtain the motion trend information of the headphones.
[0090] Among them, the specific attitude parameters are the attitude parameters corresponding to the target axis. The target attitude parameters are the processed initial attitude parameters, which can be used to determine the headphone's motion trend.
[0091] After collecting the initial posture parameters from when the user picks up the earphones to when they are inserted into the ear, it is necessary to process these initial posture parameters in conjunction with the target axis to obtain the target posture parameters containing feature information. Specifically, the posture parameters corresponding to the target axis can be filtered out from the initial posture parameters corresponding to the three axes of the accelerometer, and then simplified to obtain the target posture parameters.
[0092] It is easy to understand that, under different wearing states, the headphones have corresponding specific axes that can more accurately reflect the motion characteristics when the headphones are worn. At the same time, during the wearing process, there are also various situations such as the headphones being still or the user's hand shaking. Therefore, by using the target axis and simplifying the processing, the number of posture parameters that need to be processed in the subsequent process can be effectively reduced, while improving the accuracy of the motion trend information of the headphones determined based on the target posture parameters.
[0093] After obtaining the target posture parameters, analyzing these parameters reveals the headphone's motion trend information. Specifically, the target posture parameters can be analyzed holistically or segmentally to determine the corresponding motion trend information of the headphone, a choice that can be made based on the actual hardware performance and design requirements.
[0094] In a preferred embodiment, step S51, which simplifies the processing of specific attitude parameters to obtain target attitude parameters, includes:
[0095] S511, Obtain the acquisition duration of the accelerometer;
[0096] S512. Based on the acquisition time and the preset comparison time, obtain the first attitude parameter from the specific attitude parameters;
[0097] S513. Filter the first attitude parameters to obtain the target attitude parameters.
[0098] The acquisition duration is the time period from when the user takes the earphones out of the earphone case to when the earphones are put into the ear. The comparison duration is a pre-set duration used to divide the acquisition duration cases. The first attitude parameter is the attitude data obtained after filtering specific attitude parameters based on the acquisition duration. The target attitude parameter is the attitude parameter obtained by filtering the first attitude parameter at a specific frequency.
[0099] During the process of a user taking the earphones out of the charging case and putting them in their ears, there are various scenarios involving user movement while wearing the earphones. After obtaining the initial attitude parameters collected by the accelerometer, to reduce data complexity and improve the accuracy of subsequently determining the trajectory characteristics of earphone wearing and identifying the wearing position, specific attitude parameters need to be processed. Specifically, this can be done by processing the obtained specific attitude parameters based on the high-frequency repetitive small-amplitude changes in the acquisition duration and / or acceleration.
[0100] After obtaining the specific attitude parameters, the data acquisition time of the accelerometer is first recorded. Since the user may not put the headphones on in time during the process of picking them up and putting them on, the specific attitude parameters can be initially filtered based on the acquisition time. After obtaining the acquisition time, it can be compared with a preset comparison time to classify the corresponding situations, and then the required first attitude parameters can be obtained from the specific attitude parameters.
[0101] Specifically, after obtaining the collection duration, it is determined whether the collection duration is greater than the preset comparison duration in order to determine the corresponding situation during the process of the user taking out and putting on the headphones. During the process of the user taking out and putting on the headphones, there may be situations where the user puts on the headphones within a short time interval, or there may be situations where the user puts on the headphones within a long time interval.
[0102] When the collection time is greater than the comparison time, it means that the user took the earphones for a relatively long time before putting them in their ears. During this process, the accelerometer in the earphones collected a relatively large amount of attitude data. In order to reduce the redundancy and complexity of the attitude data to be processed, the collected data can be preliminarily processed based on the time dimension. That is, the specific attitude parameters corresponding to the preset first time duration can be used as the first attitude parameters to eliminate redundant data and improve the efficiency of subsequent data processing.
[0103] When the acquisition time is determined to be no greater than the comparison time, it means that after the user took the earphone, a relatively short time interval passed before the user put the earphone into their ear. During this process, the accelerometer inside the earphone acquired an appropriate amount of attitude data. The complexity of processing the attitude data is relatively moderate, so the specific attitude parameter corresponding to the acquisition time can be directly used as the first attitude parameter.
[0104] It is easy to understand that by comparing the acquisition time with the preset comparison time, the situation of the user wearing the headphones can be determined. Then, the attitude data collected by the accelerometer can be processed based on the time dimension, which can effectively reduce the redundancy of specific attitude parameters, improve the efficiency of subsequent data processing, and reduce the occupation of chip computing power.
[0105] During the process of a user picking up and putting on the earphones, the user's hand may experience slight tremors or vibrations. The accelerometer inside the earphones records this redundant data. After obtaining the first attitude parameters based on the time dimension, further filtering can be applied to these parameters to remove high-frequency recurring attitude parameters, thus obtaining the target attitude parameters. It can be understood that by filtering specific frequencies, the redundancy of the first attitude parameters can be further reduced, improving the efficiency and accuracy of using the subsequent target attitude parameters to determine motion trend information, thereby improving the accuracy of identifying the earphone wearing position.
[0106] Furthermore, in one embodiment, step S53, which obtains the motion trend information of the headphones based on the target posture parameters, includes:
[0107] S531. Based on a preset division method, the target attitude parameters are divided into several attitude parameter intervals;
[0108] S532. Based on the changes in the positive and negative values of the target attitude parameters within the attitude parameter interval, determine the motion trend information corresponding to the attitude parameter interval.
[0109] The attitude parameter range is a set of target attitude parameters. The motion trend information is the overall motion trend corresponding to the attitude range, determined based on the target attitude parameters within that range.
[0110] Specifically, after obtaining the target attitude parameters, they can be divided based on an equal division method, that is, dividing all the obtained target attitude parameters according to the same specific time interval; or based on a weighted division method, that is, dividing all the obtained target attitude parameters according to different time intervals. In a preferred embodiment, the target attitude parameters can be divided into several attitude parameter intervals according to the weighted division method. Specifically, the closer to the time when the headphones are worn, the higher the weight, that is, the time interval closer to the time when the headphones are worn is relatively smaller. It is easy to understand that by using a specific division method, motion trend information that better represents the motion state of the headphones can be obtained, thereby improving the accuracy of subsequent identification of the headphone wearing position.
[0111] After obtaining several attitude parameter ranges, the corresponding motion trend information is determined based on the changes in the positive and negative values of the target attitude parameters within each range. Specifically, the accelerometer inside the headphones can measure the acceleration of the headphones along a specific axis. For example, when the headphones accelerate in the first direction of the X-axis, a positive target attitude parameter can be measured; when the headphones decelerate in the first direction of the X-axis or accelerate in the second direction of the X-axis, a negative target attitude parameter can be measured. After determining the positive and negative values of each target attitude parameter within the attitude parameter range, the motion trend information for that range can be determined based on the number of positive and negative target attitude parameters. When the number of positive target attitude parameters exceeds the number of negative target attitude parameters, the motion trend for that range is acceleration; conversely, the motion trend is deceleration.
[0112] Understandably, obtaining motion trend information through intervalization can better reduce the interference of individual target posture parameters on the motion trend information, improve the accuracy of the obtained motion trend information, and to a certain extent reduce the redundancy of subsequent headphone wearing position identification, thereby improving the accuracy of subsequent headphone wearing position identification.
[0113] Furthermore, in one embodiment, step S6, which identifies the wearing position information of the headphones based on motion trend information, includes:
[0114] S61. Obtain the matching degree between motion trend information and preset motion modes;
[0115] S62. Determine whether the matching degree is within the preset matching range;
[0116] S63. If yes, then determine that the wearing position of the headphones is the wearing position corresponding to the sports mode;
[0117] S64. If not, determine the wearing position information of the headphones based on the number of trend types in the motion trend information.
[0118] The motion trend information includes acceleration trend information and deceleration trend information. The motion mode is a pre-set pattern corresponding to the overall acceleration and deceleration during the wearing of the headphones. The motion modes include the motion mode corresponding to the left earphone and the motion mode corresponding to the right earphone.
[0119] During the process of a user picking up and putting on the earphones, there are significant differences in the wearing characteristics of the left and right earphones. For example, taking the rightward direction of the X-axis of the accelerometer as positive, when the earphone accelerates to the right, the motion trend is acceleration; when the earphone decelerates to the right or accelerates to the left, the motion trend is deceleration. During the process of the user picking up and putting the earphones into their ears, the wearing trajectory of the right earphone typically shows an overall acceleration trend followed by a deceleration trend; while the wearing trajectory of the left earphone typically shows an overall deceleration trend followed by an acceleration trend.
[0120] After obtaining the motion trend information from the headphones, this information is compared with preset motion modes. Specifically, the motion trend information is compared with the motion modes corresponding to the left and right headphones, respectively, to obtain the corresponding matching degree. After obtaining the matching degree, it is then determined whether the obtained matching degree falls within the matching range.
[0121] When the matching degree falls within the matching range, it indicates that the motion characteristics when wearing the headphones match the corresponding motion pattern. The wearing position information corresponding to the motion pattern is determined as the current wearing position of the headphones, and the corresponding wearing position information is defined as the wearing position of the headphones. For example, when it is determined that the motion trend information when wearing the headphones matches the motion pattern of the left headphone within the matching range, the current wearing position of that headphone is defined as the left headphone. The definition principle for the right headphone is the same as that for the left headphone.
[0122] When the matching degree does not fall within the matching interval, the wearing position information of the headphones can be determined by utilizing the number of trend types in the motion trend information. During the wearing of the left and right headphones, the number of acceleration and deceleration trend information values differs depending on the headphone's position. For example, taking the rightward direction of the X-axis of the accelerometer as positive, during the wearing of the left headphone, the number of acceleration values in the X-axis motion trend information is usually greater than the number of deceleration values. It is easy to understand that, based on the determination of the number of trend types in the motion trend information, the wearing position information of the headphones can also be determined to some extent.
[0123] After confirming that the matching degree does not fall within the matching range, the number of acceleration trend information and deceleration trend information in the motion trend information is counted separately. After determining the number of acceleration trend information and deceleration trend information, the two numbers are compared, and the wearing position information of the headphones is determined based on the comparison result.
[0124] Understandably, by comparing motion trend information with preset motion patterns and comparing the number of trend types, adaptive confirmation of headphone wearing position information can be achieved, effectively reducing the chip computing power occupied by the wearing position recognition function, reducing headphone power consumption, and improving the response efficiency of left and right headphone recognition.
[0125] In summary, this application obtains initial attitude parameters through an accelerometer to determine the corresponding attitude mode and target axis, thereby achieving adaptive recognition of the headphone wearing position. This improves the accuracy and efficiency of headphone wearing position recognition under different headphone wearing postures, and enhances the user experience.
[0126] The following is the content of the second aspect of the present invention:
[0127] The present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for identifying wearing position.
[0128] The following is the content of the third aspect of the present invention:
[0129] A third aspect of the present invention provides an earphone, such as Figure 2 As shown, the earphone includes a memory 10, a processor 20, and a method program instruction 30 for wearing position recognition stored in the memory 10 and executable on the processor 20. When the method program instruction 30 for wearing position recognition is executed by the processor 20, the aforementioned method for wearing position recognition is implemented.
[0130] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is typically used to control the overall operation of the headphones. In this embodiment, the processor is used to run program code stored in a readable storage medium or to process data.
[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0132] The above are merely specific embodiments of this application. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for identifying wearing position, characterized in that, include: Detects whether the user has taken the earphones out of the earphone case; If so, the accelerometer inside the earphone is triggered to collect the initial posture parameters from when the user takes the earphone out to when the earphone is inserted into the ear; The attitude mode is determined based on the initial attitude parameters within a preset specific acquisition time. Obtain the target axis corresponding to the attitude mode; Based on the initial posture parameters and the target axis, the motion trend information of the headphones is determined; Based on the aforementioned motion trend information, the wearing position information of the headphones is identified.
2. The method for identifying wearing position according to claim 1, characterized in that, The step of detecting whether the user has taken the earphones out of the earphone case includes: Detect whether the earphone case is in an open state; If so, then check whether the contacts between the earphone and the earphone case are conductive.
3. The method for identifying wearing position according to claim 1, characterized in that, The step of triggering the accelerometer inside the earphone to collect the initial posture parameters from when the user takes the earphone out to when the earphone is inserted into the ear includes: If the system detects that a user has taken the earphones out of the earphone case, it will activate the accelerometer inside the earphones. Detect whether the earphones are worn in the ear; If so, then stop the accelerometer and obtain the initial attitude parameters.
4. The method for identifying wearing position according to claim 1, characterized in that, The step of determining the attitude mode based on the initial attitude parameters within a preset specific acquisition time includes: Obtain the initial attitude parameters of the three axes of the accelerometer within a preset specific acquisition time; Based on the initial attitude parameters corresponding to the three axes, the mode reference value is obtained; The attitude mode is determined based on the mode reference value.
5. The method for identifying wearing position according to claim 1, characterized in that, The step of determining the motion trend information of the headphones based on the initial posture parameters and the target axis includes: Based on the target axis, specific attitude parameters are obtained from the initial attitude parameters; The specific attitude parameters are simplified to obtain the target attitude parameters; Based on the target posture parameters, the motion trend information of the headphones is obtained.
6. The method for identifying wearing position according to claim 5, characterized in that, The step of simplifying the specific attitude parameters to obtain the target attitude parameters includes: Obtain the acquisition duration of the accelerometer; Based on the acquisition duration and the preset comparison duration, the first attitude parameter is obtained from the specific attitude parameters; The first attitude parameters are filtered to obtain the target attitude parameters.
7. The method for identifying wearing position according to claim 5, characterized in that, The step of obtaining the motion trend information of the headphones based on the target posture parameters includes: Based on a preset division method, the target attitude parameters are divided into several attitude parameter intervals; Based on the positive and negative changes of the target attitude parameters within the attitude parameter range, the motion trend information corresponding to the attitude parameter range is determined.
8. The method for identifying wearing position according to claim 1, characterized in that, The step of identifying the wearing position information of the headphones based on the motion trend information includes: Obtain the matching degree between the motion trend information and the preset motion pattern; Determine whether the matching degree is within a preset matching range; If so, then determine the wearing position of the headphones as the wearing position corresponding to the sports mode; If not, the wearing position information of the headphones is determined based on the number of trend types in the motion trend information.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for identifying wearing position as described in any one of claims 1 to 8.
10. A pair of headphones, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for wearing position recognition as described in any one of claims 1 to 8.