A method and device for identifying left and right earphones, and an earphone

By arranging acceleration sensors in the headphones and calculating the wearing position of the headphones by using vector product calculation, the problem of low accuracy in the prior art recognition of the wearing position of the headphones in self-identification in the headphones is solved, and the recognition accuracy is improved.

CN115086817BActive Publication Date: 2025-04-25HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110271354.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-12
Publication Date
2025-04-25
Estimated Expiration
2041-03-12

AI Technical Summary

Technical Problem

In the prior art, the accuracy of the headphones to identify their wearing position by themselves is low.

Method used

By arranging acceleration sensors in the left and right earphones, the angle formed between the axes of the two earphones after the user wears the earphones is collected, and the wearing position of the earphones is identified through vector product calculation.

Benefits of technology

The recognition accuracy of left and right earphones is improved, and adaptive recognition of earphones is achieved through vector generation combined with the inherent characteristics of human ears without additional devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115086817B_ABST
    Figure CN115086817B_ABST
Patent Text Reader

Abstract

The embodiment of the present application is applicable to the field of earphone technology, and provides a method, device and earphone for identifying left and right earphones, the method comprising: obtaining first sensor data collected by a first acceleration sensor and second sensor data collected by a second acceleration sensor; according to the first sensor data and the second sensor data, converting a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate; determining a first projection vector of a first target sensing axis in the base coordinate system and a second projection vector of a second target sensing axis in the base coordinate system; calculating the vector product between the first projection vector and the second projection vector; and identifying the wearing position of the first earphone and the second earphone according to the vector product. The embodiment of the present application can realize adaptive identification of left and right earphones by combining the vector product with the inherent characteristics of the human ear.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of earphone technology, and more particularly to a method and device for identifying left and right earphones, and an earphone. Background Art

[0002] Headphones are a pair of conversion units that can receive electrical signals from a media player or receiver and convert the electrical signals into audible sound waves using speakers close to the ears. Usually, depending on the different ways of use, headphones can include wired headphones, wireless headphones, and so on.

[0003] When using headphones, users need to correctly distinguish between the left and right headphones. This way, the voice information of the left and right channels can be correctly distributed to the corresponding headphones. Figure 1 The figure shows a schematic diagram of a headset. Figure 1 The "R" marked on the earphone shown in the figure indicates that the earphone is the right earphone and the user should wear it on the right ear; conversely, the "L" marked on the earphone indicates that the earphone is the left earphone and the user should wear it on the left ear.

[0004] In recent years, with the development of true wireless stereo (TWS), some earphones have begun to adopt a design that the left and right earphones are completely identical. Under this product design method, each earphone is no longer marked with "R" or "L" to distinguish the left and right sides, but the same earphone can be compatible with both ears. When using it, the user does not need to distinguish which earphone is the left earphone and which earphone is the right earphone. Instead, the earphone recognizes its wearing position by itself, and then distributes the voice information of the left and right channels based on the recognition result. However, the accuracy of the existing technology in identifying the wearing position of the earphone is low. Summary of the invention

[0005] The embodiments of the present application provide a method and device for identifying left and right earphones and an earphone, which are used to solve the problem of low accuracy in the prior art in which the earphones can identify their wearing positions by themselves.

[0006] To achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0007] In a first aspect, a method for identifying left and right earphones is provided, the earphones comprising a first earphone and a second earphone, the first earphone having a first acceleration sensor, a first target sensing axis of the first acceleration sensor being parallel to a central axis of the first earphone, the second earphone having a second acceleration sensor, a second target sensing axis of the second acceleration sensor being parallel to a central axis of the second earphone, the method comprising:

[0008] Acquire first sensor data collected by the first acceleration sensor and second sensor data collected by the second acceleration sensor;

[0009] According to the first sensor data and the second sensor data, a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor are converted into a base coordinate system;

[0010] Determine a first projection vector of the first target sensing axis in the base coordinate system, and a second projection vector of the second target sensing axis in the base coordinate system;

[0011] Calculating a vector product between the first projection vector and the second projection vector;

[0012] The wearing positions of the first earphone and the second earphone are identified according to the vector product.

[0013] The identification method of the left and right earphones provided in the embodiment of the present application can have the following beneficial effects: by arranging acceleration sensors in the first earphone and the second earphone on the left and right sides respectively, the angle formed between the axes of the two earphones after the user wears the earphones can be used to summarize and compare the data collected by the two acceleration sensors, so as to finally identify the correct position of the user wearing the earphones. Usually, earphones have a simple tapping function. Since the tapping function is realized by the acceleration sensor, the identification method provided in the embodiment of the present application can realize adaptive identification of the left and right earphones through vector product combined with the inherent characteristics of the human ear without adding additional devices, thereby improving the recognition accuracy of the left and right earphones.

[0014] In a possible implementation manner of the first aspect, a gyroscope may be added to the first earphone and the second earphone to further improve the recognition accuracy of the left and right earphones by detecting the posture of the user holding the first earphone and / or the second earphone.

[0015] In a possible implementation of the first aspect, the first sensor data includes multiple groups of first data respectively collected by the first acceleration sensor when the user's head is in multiple different postures, and the second sensor data includes multiple groups of second data respectively collected by the second acceleration sensor when the user's head is in multiple different postures; wherein, when the user's head is in any posture, the first data collected by the first acceleration sensor and the second data collected by the second acceleration sensor have a corresponding relationship. In this way, using multiple data to identify the left and right earphones can further improve the accuracy of identification.

[0016] In a possible implementation manner of the first aspect, the method of converting a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate system based on the first sensor data and the second sensor data includes: calculating a rotation matrix based on the first sensor data and the second sensor data; and converting the first coordinate system corresponding to the first acceleration sensor and the second coordinate system corresponding to the second acceleration sensor into a base coordinate system based on the rotation matrix.

[0017] In a possible implementation of the first aspect, determining the first projection vector of the first target sensing axis in the base coordinate system and the second projection vector of the second target sensing axis in the base coordinate system includes: determining the first vector of the first target sensing axis in the first coordinate system according to the first sensor data, and determining the second vector of the second target sensing axis in the second coordinate system according to the second sensor data; and calculating the first projection vector of the first vector in the base coordinate system and the second projection vector of the second vector in the base coordinate system based on the rotation matrix.

[0018] In a possible implementation of the first aspect, the base coordinate system is the first coordinate system, and the calculating the vector product between the first projection vector and the second projection vector includes: calculating the vector product between the unit vector on the target axis of the base coordinate system and the second projection vector. In this way, by aligning the coordinate systems corresponding to the left and right earphones to the coordinate system of one of the earphones, the amount of data for subsequent calculations can be reduced, thereby improving recognition efficiency.

[0019] In a possible implementation of the first aspect, identifying the wearing positions of the first earphone and the second earphone according to the vector product includes: calculating the scalar product between the vector product and the vector corresponding to the gravitational acceleration; if the scalar product is greater than zero, determining that the first earphone is worn on the left ear and the second earphone is worn on the right ear; if the scalar product is less than zero, determining that the first earphone is worn on the right ear and the second earphone is worn on the left ear.

[0020] In a possible implementation of the first aspect, when the user is in an inverted state, if the product of the quantities is greater than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear; if the product of the quantities is less than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear.

[0021] In a possible implementation of the first aspect, after identifying the wearing positions of the first earphone and the second earphone according to the vector product, the method further includes: detecting whether the first earphone and the second earphone are taken out of the user's ear canal; if the first earphone and / or the second earphone are not taken out of the user's ear canal, locking the information of the identified wearing positions of the first earphone and the second earphone.

[0022] In a second aspect, a device for identifying left and right earphones is provided, which can be applied to the earphones of the first aspect, and the earphones include a first earphone and a second earphone. The first earphone has a first acceleration sensor, and a first target sensing axis of the first acceleration sensor is parallel to the central axis of the first earphone; the second earphone has a second acceleration sensor, and a second target sensing axis of the second acceleration sensor is parallel to the central axis of the second earphone. The device may specifically include the following modules:

[0023] a sensor data acquisition module, configured to acquire first sensor data acquired by the first acceleration sensor and second sensor data acquired by the second acceleration sensor;

[0024] a coordinate system conversion module, used for converting a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate system according to the first sensor data and the second sensor data;

[0025] a projection vector determination module, configured to determine a first projection vector of the first target sensing axis in the base coordinate system, and a second projection vector of the second target sensing axis in the base coordinate system;

[0026] A vector product calculation module, used to calculate the vector product between the first projection vector and the second projection vector;

[0027] A wearing position identification module is used to identify the wearing positions of the first earphone and the second earphone according to the vector product.

[0028] In a possible implementation of the second aspect, the first sensor data includes multiple groups of first data respectively collected by the first acceleration sensor when the user's head is in multiple different postures, and the second sensor data includes multiple groups of second data respectively collected by the second acceleration sensor when the user's head is in multiple different postures; wherein, when the user's head is in any posture, the first data collected by the first acceleration sensor and the second data collected by the second acceleration sensor have a corresponding relationship.

[0029] In a possible implementation of the second aspect, the coordinate system conversion module is specifically used to: calculate a rotation matrix based on the first sensor data and the second sensor data; and based on the rotation matrix, convert a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate system.

[0030] In a possible implementation of the second aspect, the projection vector determination module is specifically used to: determine the first vector of the first target sensing axis in the first coordinate system based on the first sensor data, and determine the second vector of the second target sensing axis in the second coordinate system based on the second sensor data; based on the rotation matrix, calculate the first projection vector of the first vector in the base coordinate system, and the second projection vector of the second vector in the base coordinate system.

[0031] In a possible implementation manner of the second aspect, the base coordinate system may be the first coordinate system, and the vector product calculation module is specifically used to calculate the vector product between a unit vector on a target axis of the base coordinate system and the second projection vector.

[0032] In a possible implementation of the second aspect, the wearing position identification module is specifically used to: calculate the scalar product between the vector product and the vector corresponding to the gravitational acceleration; if the scalar product is greater than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear; if the scalar product is less than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear.

[0033] In a possible implementation of the second aspect, the wearing position identification module is also used to: when the user is in an inverted state, if the quantity product is greater than zero, determine that the first earphone is worn on the right ear, and the second earphone is worn on the left ear; if the quantity product is less than zero, determine that the first earphone is worn on the left ear, and the second earphone is worn on the right ear.

[0034] In a possible implementation manner of the second aspect, the device further includes a detection module and a locking module, wherein:

[0035] The detection module is used to detect whether the first earphone and the second earphone are taken out of the ear canal of the user;

[0036] The locking module is used to lock the information of the identified wearing positions of the first earphone and the second earphone if the first earphone and / or the second earphone are not taken out of the ear canal of the user.

[0037] In a third aspect, an earphone is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for identifying the left and right earphones in any one of the first aspect is implemented.

[0038] In a fourth aspect, a computer storage medium is provided, in which computer instructions are stored. When the computer instructions are executed on the earphone, the earphone executes relevant method steps to implement the method for identifying the left and right earphones in any one of the above-mentioned first aspect.

[0039] In a fifth aspect, a computer program product is provided. When the computer program product is run on an earphone, the earphone is caused to execute relevant steps to implement the method for identifying the left and right earphones in any one of the above-mentioned first aspects.

[0040] In a sixth aspect, a chip is provided, the chip comprising a processor, the processor may be a general-purpose processor or a dedicated processor, wherein the processor is used to support the earphone to execute relevant steps to implement the method for identifying the left and right earphones in any one of the first aspects.

[0041] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic diagram of a headset in the prior art;

[0043] Figure 2 is a schematic diagram of a user wearing headphones according to an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of the relationship between the coordinates of the acceleration sensors of the left and right earphones and the direction of gravity acceleration provided by an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of the device layout of an earphone provided in an embodiment of the present application;

[0046] Figure 5 is a schematic diagram of the hardware structure of a headset provided in an embodiment of the present application;

[0047] Figure 6 is a schematic diagram of a calibration process of an acceleration sensor provided in an embodiment of the present application;

[0048] Figure 7 It is a schematic diagram of the steps of a method for identifying left and right earphones provided in an embodiment of the present application;

[0049] Figure 8is a schematic diagram of the angle difference between the first coordinate system and the second coordinate system provided in an embodiment of the present application when sensing the same gravitational acceleration;

[0050] Fig. 9 is a schematic diagram of a base coordinate system provided in an embodiment of the present application;

[0051] Fig.10 is a schematic diagram of a process of identifying left and right earphones when a user is in an upright posture provided by an embodiment of the present application;

[0052] Fig.11 It is a schematic diagram of a process of identifying left and right earphones when a user is in a tilted posture provided by an embodiment of the present application;

[0053] Fig.12 It is a schematic diagram of the identification process of the left and right earphones when the user is in an inverted posture provided by an embodiment of the present application;

[0054] Fig.13 It is a structural block diagram of a device for identifying left and right earphones provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially identical functions and effects, and their quantity and execution order are not limited. For example, the first-side earphone, the second-side earphone, etc. are only used to distinguish between earphones on different sides. When one earphone is the first-side earphone, the other earphone is correspondingly the second earphone. The first earphone can be any one of the two earphones.

[0056] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0057] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0058] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0059] The steps involved in the method for identifying left and right earphones provided in the embodiment of the present application are only examples. Not all steps must be performed, or not all contents in each step are optional. They can be increased or decreased as needed during use.

[0060] The same step or steps or technical features with the same functions in the embodiments of the present application can be referenced to each other in different embodiments.

[0061] As mentioned above, more and more headphone manufacturers are starting to use a design scheme where the left and right earphones are completely identical when designing headphones. In this way, each earphone can be compatible with both ears. When using such headphones, users do not need to distinguish which earphone is the left earphone and which is the right earphone.

[0062] For this type of headphones, although users do not need to distinguish between the left and right sides when using them, they still need to identify which earphone is worn on the left ear and which earphone is worn on the right ear, so that the terminal communicating with the headphones can correctly distribute the left channel voice information to the earphone worn on the left ear, and distribute the right channel voice information to the earphone worn on the right ear, thereby ensuring that the user obtains a good stereo effect.

[0063] In one possible implementation, pressure sensors can be installed on the earphones, one on the left earphone and one on the right earphone. When the user wears the earphones, the wearing position of the earphones can be detected by the pressure sensors, and it can be determined whether each earphone matches the target earphone based on the detection results. If the judgment result is not a match, the earphones can automatically switch between left and right channels. Since the pressure sensor has a low sensitivity in some forms, this solution is prone to problems of failure to detect or low detection accuracy.

[0064] In another possible implementation, a fingerprint sensor can be installed on the earphone. The fingerprint detected when the user wears the earphone can be used to determine whether the earphone is worn on the left ear or the right ear. Although this solution can improve the accuracy of detection, it requires the installation of at least two additional fingerprint sensors on the earphone, which is costly. In addition, fingerprint sensors are usually large in size and require a detection plane when in use. Fingerprint sensors cannot be installed at all for cylindrical or spherical earphones. At the same time, for users who operate with one hand, if the user only uses one hand to wear two earphones, the fingerprint sensor cannot correctly identify which earphone is worn on the left ear and which earphone is worn on the right ear.

[0065] In response to the above problems, an embodiment of the present application provides a method for identifying left and right earphones. Acceleration sensors are respectively arranged in the left and right earphones, and the angle formed between the axis of the left earphone and the axis of the right earphone after the user wears the earphones is used to summarize and compare the data collected by the acceleration sensors in the left and right earphones, thereby ultimately identifying the correct position of the user wearing the earphones.

[0066] Specifically, Figure 2 , which is a schematic diagram of a user wearing headphones according to an embodiment of the present application. Figure 2 (a), (b), and (c) are the front view, side view, and top view of the user wearing the earphones, respectively. In each view, the earphone worn on the left ear of the user is L, and the earphone worn on the right ear is R. There is an angle between the axis of the left earphone L and the axis of the right earphone R, and the angle value of the angle is between 0-180 degrees (excluding 0 degrees and 180 degrees). Among them, the axis of the left earphone L is roughly parallel to the axis of the left ear canal, and the axis of the right earphone R is roughly parallel to the axis of the right ear canal, and the direction can be from the outside of the ear canal to the inside of the ear canal.

[0067] According to the above features, the directional information of gravity acceleration can be sensed by the acceleration sensors arranged in the left earphone L and the right earphone R. Then, by comparing the data collected by the two acceleration sensors, the right-hand spiral rule can be used to identify the correct position of the user wearing the earphone.

[0068] like Figure 3The figure shows the relationship between the coordinates of the accelerometer sensors of the left and right earphones and the direction of gravity acceleration provided in an embodiment of the present application. Assume that the first accelerometer is an accelerometer on one of the earphones, and the second accelerometer is an accelerometer on the other earphone. In addition, the coordinate system corresponding to the first accelerometer is a coordinate system (XYZ), and the Z-axis direction is the axial direction of the earphone on that side (first side); the coordinate system corresponding to the second accelerometer is a coordinate system (X'Y'Z'), and the Z'-axis direction is the axial direction of the earphone on the other side (second side). Figure 3 It can be regarded as putting two vector systems with different coordinates into the same coordinate system. That is, Figure 3 The diagram shows a schematic diagram of unifying the vectors in the coordinate system (X'Y'Z') corresponding to the second acceleration sensor under the basic coordinate system, taking the coordinate system (XYZ) corresponding to the first acceleration sensor as the basic coordinate system. Figure 3 The g in represents the acceleration due to gravity.

[0069] The projection vector of the axis of the second earphone in the base coordinate system can be calculated through the data collected by the two acceleration sensors. After cross-multiplying the unit vector in the axis direction of the first earphone with the projection vector, dot-multiply the cross-multiplication result (vector product / outer product) with the unit vector in the direction of gravity acceleration, so that the correct position of the user wearing the earphone can be identified based on the dot product result (scalar product / inner product) using the right-hand spiral rule.

[0070] For example, in the above example, if the dot product result is greater than 0, it means that the direction of the right thumb is consistent with the direction of gravity acceleration, and the bending direction of the other four fingers of the right hand is from the right side to the left side. Therefore, it can be considered that the first earphone is worn on the left ear by the user, and the second earphone is worn on the right ear by the user. If the dot product result is less than 0, it means that the direction of the right thumb is inconsistent with the direction of gravity acceleration, and the bending direction of the other four fingers of the right hand is from the left side to the right side. Therefore, it can be considered that the first earphone is worn on the right ear by the user, and the second earphone is worn on the left ear by the user.

[0071] In the embodiment of the present application, the above-mentioned earphones can be either wired earphones or wireless earphones, and the embodiment of the present application does not limit this.

[0072] like Figure 4 , which is a schematic diagram of the device layout of an earphone provided in an embodiment of the present application. It should be noted that, due to the use of a completely identical design scheme for the left and right earphones, Figure 4 The device layout shown can be the device layout of one earphone in a pair of earphones. The other earphone can be made with the same Figure 4 Same device layout.

[0073] Figure 4The earphone shown in FIG. 4 includes a processor 401, a battery 402, an earplug 403, a mainboard 404, and an acceleration sensor 405. The acceleration sensor 405 may be a three-axis acceleration sensor. Figure 4 As shown, one of the sensing axes of the acceleration sensor 405 is parallel to the axis of the earplug, thereby indicating the direction of the earphone. The axis of the earplug can also be regarded as the central axis of the earphone ( Figure 4 Axis SS' shown in FIG.

[0074] It should be noted that when the earphone is worn on the ear by the user, the earplug 403 is inserted into the ear canal from outside the ear canal, and the axis of the earplug 403 can be approximately regarded as parallel to the axis of the ear canal.

[0075] like Figure 4 As shown, the acceleration sensor 405 can be placed on the same main board or a main board with which the processor 401 is electrically connected. The main board 404 can be placed at the rear end of the battery 402 .

[0076] remove Figure 4 In addition to the components shown, the headset provided in the embodiment of the present application may also include other components. For example, Figure 5 FIG. 5 is a schematic diagram of the hardware structure of a headset provided in an embodiment of the present application. The headset may include a processor 501, a memory 502, a wireless communication module 503, an audio module 504, a sensor module 505, and a power module 506. Figure 4 The processor 401 in the embodiment may be the same processor; the audio module 504 may include a microphone 5041, a speaker 5042, an audio processor 5043, etc.; the sensor module 505 may include an acceleration sensor 5051 and other types of sensors, such as a first proximity sensor 5052, a second proximity sensor 5053, etc., and the acceleration sensor 5051 may be Figure 4 The acceleration sensor 405 shown in FIG. 4 is the same sensor; the power module 506 may include a battery 5061 ( Figure 4 The battery 402), the power management module 5062, and the charging interface 5063, etc.

[0077] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the headset. In some embodiments of the present application, the headset may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0078] In the embodiment of the present application, in order to ensure the accuracy of recognition, one sensing axis of the acceleration sensor placed in the earphone should be parallel to the central axis of the earphone. For example, if the Z axis of the acceleration sensor is parallel to the central axis of the earphone, when the Z axis is not parallel to the central axis of the earphone, the earphone needs to be calibrated. Usually, the earphone is calibrated before it leaves the factory.

[0079] In the embodiment of the present application, the reasons for the non-parallelism between the sensing axis (Z axis) of the acceleration sensor and the central axis of the earphone include earphone structure design and / or assembly tolerance. The causes of the two reasons and the corresponding calibration methods are introduced below.

[0080] (I) The architecture design causes the acceleration sensor to be placed tilted

[0081] Due to the limited space in the earphone, the accelerometer cannot be placed horizontally. When designing the earphone architecture, the accelerometer may need to be placed at an angle, which causes the corresponding sensing axis of the accelerometer to be non-parallel to the center axis of the earphone.

[0082] In response to the tilt of the accelerometer due to the architectural design, the design data contains the attitude angle of the accelerometer in space. Usually, the attitude of a space object can be described using Euler angles. The three Euler angles of the accelerometer can be expressed as φ, θ, ψ, which represent the angles of rotation of the accelerometer around the Z axis, Y axis, and X axis, respectively. The specific angles of the above three Euler angles can be given by the design data. Based on the relationship between the Euler angles and the rotation matrix, the problem of the accelerometer (Z axis) not being parallel to the center axis of the headset caused by the architectural design can be calculated and calibrated.

[0083] A rotation matrix is ​​a matrix that when multiplied by a vector has the effect of changing the direction of the vector without changing its magnitude and preserves its chirality. In general, the dot product (inner product) of two vectors remains unchanged after they are both operated on by a rotation matrix.

[0084] The relationship between Euler angles and rotation matrices is as follows:

[0085]

[0086] According to the above relationship, the rotation matrix R1 can be calculated, and then the sensor reading can be calibrated using the rotation matrix R1. That is:

[0087]

[0088] in, Represents the raw data of the acceleration sensor, Represents the accelerometer reading after calibration.

[0089] (2) Assembly tolerance causes the acceleration sensor to tilt

[0090] Assembly tolerance refers to the deviation of the accelerometer during the assembly process of the headset. Due to the existence of assembly tolerance, the accelerometer may have different degrees of tilt. The tilt caused by this situation also needs to be calibrated.

[0091] like Figure 6 FIG. 1 is a schematic diagram of a calibration process of an acceleration sensor provided in an embodiment of the present application. Specifically, Figure 6 Shown is a process for calibrating the acceleration sensor for tilt caused by assembly tolerances.

[0092] During calibration, first place the headset horizontally to ensure that the Z axis of the accelerometer is parallel to the center axis of the headset. At this time, the X and Y axis directions of the accelerometer can be as follows: Figure 6 As shown in (a) in the figure. Read the acceleration sensor reading p1 = (x1, y1, z1) T Next, rotate the earphone 90 degrees clockwise around the center axis of the earphone and read the accelerometer reading p2 = (x2, y2, z2) T At this time, the X-axis and Y-axis directions of the acceleration sensor can be as follows Figure 6 Then, place the earbud of the headset vertically downward and read the acceleration sensor reading p3 = (x3, y3, z3) T At this time, the X-axis and Y-axis directions of the acceleration sensor can be as follows Figure 6 As shown in (c) in .

[0093] Based on the three readings of the acceleration sensor, the rotation matrix R2 can be calculated using singular value decomposition (SVD). That is:

[0094]

[0095] The sensor readings can then be calibrated using the rotation matrix R2. That is:

[0096]

[0097] in, Represents the raw data of the acceleration sensor, Represents the accelerometer reading after calibration.

[0098] Using the calibrated output accelerometer readings, the left and right earphones can be identified.

[0099] The following embodiments take the earphones having the aforementioned hardware structure / software structure and calibrated according to the aforementioned calibration process as an example to illustrate the method for identifying the left and right earphones provided in the embodiments of the present application.

[0100] Reference Figure 7 , shows a schematic diagram of the steps of a method for identifying left and right earphones provided in an embodiment of the present application, and the method may specifically include the following steps:

[0101] S701. Acquire sensor data collected by acceleration sensors in two earphones, where the sensor data includes first sensor data collected by a first acceleration sensor in the first earphone and second sensor data collected by a second acceleration sensor in the second earphone.

[0102] In the embodiment of the present application, the sensor data collected by the acceleration sensors in the two earphones can be obtained after the user wears the two earphones on the ears. When the user wears the earphones, the acceleration sensors in the two earphones will generate data at the same time. As the user's head posture changes, the data collected by the acceleration sensors will also change.

[0103] Therefore, the above-mentioned first sensor data includes multiple groups of first data collected by the first acceleration sensor when the user's head is in multiple different postures; correspondingly, the second sensor data includes multiple groups of second data collected by the second acceleration sensor when the user's head is in multiple different postures; wherein, when the user's head is in any posture, the first data collected by the first acceleration sensor and the second data collected by the second acceleration sensor have a corresponding relationship.

[0104] Exemplarily, the first sensor data may be represented in the form of a set as follows:

[0105]

[0106] The second sensor data can be expressed in the form of a set as:

[0107]

[0108] The corresponding relationship between the first sensor data and the second sensor data is:

[0109]

[0110] S702: Calculate a rotation matrix according to the first sensor data and the second sensor data.

[0111] In the embodiment of the present application, it is assumed that the movement of the user's head is a rigid body movement. According to the knowledge of spatial rotation, it can be known that:

[0112] R×P1=P2

[0113] Where R is the rotation matrix.

[0114] Using singular matrix decomposition (SVD), we can calculate R = VU T , the above V and U are process matrices in the matrix decomposition process.

[0115] S703: Based on the rotation matrix, align a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor to a base coordinate system.

[0116] In this embodiment of the present application, the first coordinate system may refer to a coordinate system (X1Y1Z1) constructed based on the three sensing axes of the first acceleration sensor in the first earphone, and the second coordinate system may refer to a coordinate system (X2Y2Z2) constructed based on the three sensing axes of the second acceleration sensor in the second earphone.

[0117] like Figure 8 , which is a schematic diagram of the angle difference between the first coordinate system and the second coordinate system provided in the embodiment of the present application when sensing the same gravitational acceleration. Figure 8 In the example, the first target sensing axis of the first acceleration sensor is the Z1 axis, and the second target sensing axis of the second acceleration sensor is the Z2 axis. The angle difference between the two when sensing the same gravity acceleration can be referred to as Figure 8 The angle difference α between Z1 and Z2.

[0118] When the left and right earphones are identified according to the angle difference, the first coordinate system and the second coordinate system need to be unified.

[0119] Specifically, the rotation matrix R calculated in S702 may be used to unify the first coordinate system and the second coordinate system, that is, to unify vectors in different coordinate systems into one base coordinate system.

[0120] S704: Determine a first projection vector of a first target sensing axis of the first acceleration sensor in the base coordinate system, and a second projection vector of a second target sensing axis of the second acceleration sensor in the base coordinate system.

[0121] In the embodiment of the present application, the first vector of the first target sensing axis in the first coordinate system can be determined according to the first sensor data, and the second vector of the second target sensing axis in the second coordinate system can be determined according to the second sensor data. Then, based on the rotation matrix calculated in the above steps, the first projection vector of the first vector in the base coordinate system and the second projection vector of the second vector in the base coordinate system are calculated.

[0122] In a possible implementation of the embodiment of the present application, the first coordinate system can be used as the base coordinate system, and then the first coordinate system and the second coordinate system can be unified using a rotation matrix. In this way, the first target sensing axis of the first acceleration sensor is in the same direction as an axis in the base coordinate system, and the first projection vector of the first target sensing axis in the base coordinate system can be located on this axis of the base coordinate system.

[0123] like Fig. 9 , which is a schematic diagram of a base coordinate system provided in an embodiment of the present application. Fig. 9 The base coordinate system shown in is the first coordinate system. Therefore, the first projection vector and is located on the Z axis of the base coordinate system. is the second projection vector, representing the projection of the second target sensing axis of the second acceleration sensor in the base coordinate system. M is the first projection vector With the second projection vector The composed plane.

[0124] S705: Calculate the vector product between the first projection vector and the second projection vector.

[0125] In the embodiment of the present application, to calculate the vector product between the first projection vector and the second projection vector, it is necessary to first determine the coordinate values ​​of each of the first sensor data and the second sensor data in the base coordinate system.

[0126] Exemplarily, the first projection vector The coordinate values ​​in the base coordinate system can be expressed as Second projection vector The coordinate values ​​in the base coordinate system can be expressed as

[0127] In a possible implementation of the embodiment of the present application, the first coordinate system is taken as the base coordinate system, and the first projection vector The unit vector on the target axis of the base coordinate system can be used Instead, the coordinate value of the unit vector can be expressed as

[0128] Therefore, calculating the vector product between the first projection vector and the second projection vector can be simplified to calculating the vector product between the unit vector on the target axis of the base coordinate system and the second projection vector:

[0129]

[0130] in, is the vector product.

[0131] S706: Identify wearing positions of the first earphone and the second earphone according to the vector product.

[0132] In the embodiment of the present application, according to the above vector product The wearing positions of the first earphone and the second earphone may be identified.

[0133] In the embodiment of the present application, after calculating the above vector product Then, the vector product can be calculated The vector corresponding to the acceleration due to gravity The dot product between: Then, the wearing positions of the first earphone and the second earphone are determined according to the quantitative product.

[0134] Specifically, if the above-mentioned quantitative product is greater than zero, it can be determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear; if the above-mentioned quantitative product is less than zero, it can be determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear.

[0135] After identifying the wearing positions of the first earphone and the second earphone, the earphone can distribute the voice information in the corresponding left and right channels to the earphones at the corresponding positions. For example, the voice information of the left channel is distributed to the earphone worn on the left ear, and the voice information of the right channel is distributed to the earphone worn on the right ear. In this way, the user can obtain a better stereo effect when using the earphone.

[0136] According to the left and right earphone identification method provided in the embodiment of the present application, the user can correctly detect the left and right sides of the earphone in most scenarios such as sitting, standing, and walking. In view of the problem that some very rare scenarios in actual scenarios may not be detected, such as when the user wears the earphones while lying flat or wearing the earphones while standing upside down, there will be problems of direction failure or wrong identification. The embodiment of the present application can circumvent this problem by using the following methods:

[0137] 1. The wearing detection function can be combined so that when the user wears the earphones in an upright position and the earphones automatically identify the left and right ears, the left and right status of the earphones are locked before the earphones are removed. For example, it can detect whether the first earphone and the second earphone are taken out of the user's ear canal; if the first earphone and / or the second earphone are not taken out of the user's ear canal, the information of the wearing positions of the identified first earphone and the second earphone is locked. In this way, the user can still get the correct left and right ear channels in other scenarios such as lying flat or standing upside down.

[0138] 2. Since it is difficult for users to keep their heads still for a long time, if the user cannot distinguish between the left and right ears after wearing headphones, the user can wait until the user's head moves to a detectable area before making a judgment and then switching to the correct channel for stereo playback. For example, after the user wears headphones, if the headphones cannot correctly identify the wearing position within a certain period of time, the headphones can wait for a period of time, wait for the acceleration sensor to collect new data, and then identify again based on the new sensor data; or, if the headphones cannot correctly identify the wearing position, they can identify again at a certain time interval until the wearing positions of the two headphones are determined.

[0139] 3. When the user is in an inverted state, the direction of gravity acceleration is opposite to the actual direction of the user. The result obtained by the above identification method is opposite to the result when the user is in an upright state. Therefore, when the user is in an inverted state, if the above quantitative product is greater than zero, it can be determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear; if the quantitative product is less than zero, it can be determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear. That is, according to whether the quantitative product is greater than or less than zero, the identification result of the user in the upright state is opposite to the identification result in the inverted state.

[0140] In a possible implementation of the embodiment of the present application, the inverted state can be determined in combination with other terminal devices. For example, a mobile phone that communicates with a headset. It can be determined whether the user is in an inverted state by unlocking the screen and the upright image on the screen. When the mobile phone detects that the user is in an inverted state, the mobile phone can send the detection result to the headset. The lock screen required here is to ensure that in the horizontal screen state, the image on the screen does not adjust as the mobile phone is flipped up and down.

[0141] 4. According to the method for identifying the left and right earphones provided in the embodiment of the present application, it is impossible to distinguish the left and right ears when the earphone is worn on one ear. However, since the stereo experience cannot be obtained when the earphone is worn on one ear, this situation does not affect the actual use of the earphone by the user.

[0142] Below, in combination with several specific scenarios, the method for identifying the left and right earphones provided in the embodiment of the present application is introduced.

[0143] It should be noted that in the following scenarios, the spatial coordinate system (head coordinate system) is established with the direction of the user's head and nose (the direction of the user's line of sight) as the positive direction of the X-axis and the top of the head as the positive direction of the Z-axis.

[0144] Scenario 1: The user is in an upright position

[0145] like Fig.10 FIG. 1 is a schematic diagram showing the process of identifying the left and right earphones when the user is in an upright position. Fig.10In (a), the user wears the earphones E11 and E12 in an upright posture, and the earphones E11 and E12 are respectively provided with acceleration sensors. Fig.10 (b) in the figure shows the coordinate systems corresponding to the two acceleration sensors in E11 and E12, wherein the coordinate system C11 is the coordinate system corresponding to the acceleration sensor in the earphone E11, the coordinate system C12 is the coordinate system corresponding to the acceleration sensor in the earphone E12, and 1000 is a simulated earth.

[0146] In the upright posture, according to the method for identifying the left and right earphones provided in the embodiment of the present application, the coordinate system C11 and the coordinate system C12 are unified into the same base coordinate system. Fig.10 As shown in (c), the vector With vector Constitute the reference plane. Among them, the vector is the projection vector of the target sensing axis of the acceleration sensor in the headset E11 in the base coordinate system, vector is the projection vector of the target sensing axis of the acceleration sensor in the headset E12 in the base coordinate system.

[0147] calculate Used to distinguish the left and right earphones. The corresponding earphone E11 is worn on the right ear. The corresponding earphone E12 is worn on the left ear.

[0148] Scenario 2: The user is in a tilted position

[0149] like Fig.11 FIG. 2 is a schematic diagram showing the process of identifying the left and right earphones when the user is in a tilted posture. According to the orientation of the user's head, the tilted posture generally includes an upward tilted posture, a horizontal posture, and a downward tilted posture. Fig.11 As shown in (a), (b) and (c) in the figure, they respectively show schematic diagrams of a user wearing headphones E21 or E22 in an upward tilted posture, a horizontal posture and a downward tilted posture, and acceleration sensors are respectively arranged in the headphones E21 and E22.

[0150] Based on the user Fig.11 Take the horizontal posture shown in (b) in the figure (the positive direction of the X-axis of the head coordinate system is facing upward) as an example. Fig.11 (d) in the figure shows the coordinate systems corresponding to the two acceleration sensors in the earphones E21 and E22, wherein the coordinate system C21 is the coordinate system corresponding to the acceleration sensor in the earphone E21, the coordinate system C22 is the coordinate system corresponding to the acceleration sensor in the earphone E22, and 1100 is a simulated earth.

[0151] In the horizontal posture, according to the method for identifying the left and right earphones provided in the embodiment of the present application, the coordinate system C21 and the coordinate system C22 are unified into the same base coordinate system. Fig.11 As shown in (e), the vector With vector Constitute the reference plane. Among them, the vector is the projection vector of the target sensing axis of the acceleration sensor in the headset E21 in the base coordinate system, vector is the projection vector of the target sensing axis of the acceleration sensor in the headset E22 in the base coordinate system.

[0152] calculate Used to distinguish the left and right earphones.

[0153] According to actual results and theoretical analysis, when the head is tilted, the relationship between the reference plane and the direction of gravity is strongly related to the way the earphones are worn and the tilt angle of the head. The recognition of the left and right ears is different under different combinations. Therefore, there is a risk of recognition in a tilted posture. The user can first adjust to an upright posture, and after recognition, the earphones will lock the recognition result until the user takes out the earphones.

[0154] Scenario 3: The user is in an inverted position

[0155] like Fig.12 FIG. 1 is a schematic diagram showing the identification process of the left and right earphones when the user is in an inverted posture. Fig.12 In (a), the user wears the earphones E31 and E32 in an inverted posture, and the earphones E31 and E32 are respectively provided with acceleration sensors. Fig.12 (b) in the figure shows the coordinate systems corresponding to the two acceleration sensors in the earphones E31 and E32, wherein the coordinate system C31 is the coordinate system corresponding to the acceleration sensor in the earphone E31, the coordinate system C32 is the coordinate system corresponding to the acceleration sensor in the earphone E32, and 1200 is a simulated earth.

[0156] In the inverted posture, according to the identification method of the left and right earphones provided in the embodiment of the present application, the coordinate system C31 and the coordinate system C32 are unified into the same base coordinate system. Fig.12 As shown in (c) in the figure, the vector With vector Constitute the reference plane. Among them, the vector is the projection vector of the target sensing axis of the acceleration sensor in the headset E31 in the base coordinate system, vector It is the projection vector of the target sensing axis of the acceleration sensor in the headset E32 in the base coordinate system.

[0157] calculate Used to distinguish the left and right earphones. According to the analysis of the above scenario, when the user is upside down, the recognition results of the left and right earphones are opposite to those when the user is standing upright. That is, re>0, indicating The corresponding earphone E31 is worn on the right ear. The corresponding earphone E32 is worn on the left ear.

[0158] The embodiment of the present application can divide the functional modules of the headset according to the above method example. For example, each functional module can be divided corresponding to each function, or one or more functions can be integrated into one functional module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0159] Corresponding to the above embodiments, refer to Fig.13 , shows a structural block diagram of a left and right earphone identification device provided by an embodiment of the present application, the device can be applied to the earphones in the aforementioned embodiments, the earphones include a first earphone and a second earphone. The first earphone has a first acceleration sensor, the first target sensing axis of the first acceleration sensor is parallel to the central axis of the first earphone; the second earphone has a second acceleration sensor, the second target sensing axis of the second acceleration sensor is parallel to the central axis of the second earphone, the device may specifically include the following modules: a sensor data acquisition module 1301, a coordinate system conversion module 1302, a projection vector determination module 1303, a vector product calculation module 1304 and a wearing position identification module 1305, wherein:

[0160] The sensor data acquisition module is used to acquire first sensor data collected by the first acceleration sensor and second sensor data collected by the second acceleration sensor;

[0161] The coordinate system conversion module is used to convert a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate system according to the first sensor data and the second sensor data;

[0162] The projection vector determination module is used to determine a first projection vector of the first target sensing axis in the base coordinate system, and a second projection vector of the second target sensing axis in the base coordinate system;

[0163] The vector product calculation module is used to calculate the vector product between the first projection vector and the second projection vector;

[0164] The wearing position identification module is used to identify the wearing positions of the first earphone and the second earphone according to the vector product.

[0165] In an embodiment of the present application, the first sensor data includes multiple groups of first data respectively collected by the first acceleration sensor when the user's head is in multiple different postures, and the second sensor data includes multiple groups of second data respectively collected by the second acceleration sensor when the user's head is in multiple different postures; wherein, when the user's head is in any posture, the first data collected by the first acceleration sensor and the second data collected by the second acceleration sensor have a corresponding relationship.

[0166] In an embodiment of the present application, the coordinate system conversion module is specifically used to: calculate a rotation matrix based on the first sensor data and the second sensor data; based on the rotation matrix, convert the first coordinate system corresponding to the first acceleration sensor and the second coordinate system corresponding to the second acceleration sensor into a base coordinate system.

[0167] In an embodiment of the present application, the projection vector determination module is specifically used to: determine the first vector of the first target sensing axis in the first coordinate system based on the first sensor data, and determine the second vector of the second target sensing axis in the second coordinate system based on the second sensor data; based on the rotation matrix, calculate the first projection vector of the first vector in the base coordinate system, and the second projection vector of the second vector in the base coordinate system.

[0168] In the embodiment of the present application, the base coordinate system may be the first coordinate system, and the vector product calculation module is specifically used to calculate the vector product between the unit vector on the target axis of the base coordinate system and the second projection vector.

[0169] In an embodiment of the present application, the wearing position identification module is specifically used to: calculate the scalar product between the vector product and the vector corresponding to the gravitational acceleration; if the scalar product is greater than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear; if the scalar product is less than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear.

[0170] In an embodiment of the present application, the wearing position identification module is also used for: when the user is in an inverted state, if the quantity product is greater than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear; if the quantity product is less than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear.

[0171] In the embodiment of the present application, the device further includes a detection module and a locking module, wherein:

[0172] The detection module is used to detect whether the first earphone and the second earphone are taken out of the ear canal of the user;

[0173] The locking module is used to lock the information of the identified wearing positions of the first earphone and the second earphone if the first earphone and / or the second earphone are not taken out of the ear canal of the user.

[0174] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0175] An embodiment of the present application also provides an earphone, which may be the earphone in the aforementioned embodiments. The earphone includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for identifying the left and right earphones in the aforementioned embodiments is implemented.

[0176] An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the earphone, the earphone executes the above-mentioned related method steps to implement the left and right earphone identification methods in the above-mentioned embodiments.

[0177] The embodiment of the present application also provides a computer program product. When the computer program product is run on the earphone, the earphone executes the above-mentioned related steps to implement the method for identifying the left and right earphones in the above-mentioned embodiments.

[0178] The embodiment of the present application further provides a chip, the chip includes a processor which can be a general processor or a dedicated processor. The processor is used to support the earphone to execute the above-mentioned related steps to implement the left and right earphone identification methods in the above-mentioned embodiments.

[0179] Optionally, the chip further includes a transceiver, and the transceiver is used to accept the control of the processor and to support the earphone to execute the above-mentioned related steps to implement the method for identifying the left and right earphones in the above-mentioned embodiments.

[0180] Optionally, the chip may also include a storage medium.

[0181] It should be noted that the chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.

[0182] Finally, it should be noted that the above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A method for identifying left and right earphones, characterized in that: The earphone comprises a first earphone and a second earphone, the first earphone comprises a first acceleration sensor, a first target sensing axis of the first acceleration sensor is parallel to a central axis of the first earphone, the second earphone comprises a second acceleration sensor, a second target sensing axis of the second acceleration sensor is parallel to the central axis of the second earphone, and the method comprises: Acquire first sensor data collected by the first acceleration sensor and second sensor data collected by the second acceleration sensor; According to the first sensor data and the second sensor data, a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor are converted into a base coordinate system; Determine a first projection vector of the first target sensing axis in the base coordinate system, and a second projection vector of the second target sensing axis in the base coordinate system; Calculating a vector product between the first projection vector and the second projection vector; The wearing positions of the first earphone and the second earphone are identified according to the vector product.

2. The method according to claim 1, characterized in that The first sensor data includes multiple groups of first data collected by the first acceleration sensor when the user's head is in multiple different postures, and the second sensor data includes multiple groups of second data collected by the second acceleration sensor when the user's head is in multiple different postures; wherein, when the user's head is in any posture, the first data collected by the first acceleration sensor and the second data collected by the second acceleration sensor have a corresponding relationship.

3. The method according to claim 1 or 2, characterized in that: The step of converting a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor into a base coordinate system according to the first sensor data and the second sensor data includes: Calculating a rotation matrix based on the first sensor data and the second sensor data; Based on the rotation matrix, a first coordinate system corresponding to the first acceleration sensor and a second coordinate system corresponding to the second acceleration sensor are aligned to a base coordinate system.

4. The method according to claim 3, characterized in that The determining of a first projection vector of the first target sensing axis in the base coordinate system and a second projection vector of the second target sensing axis in the base coordinate system comprises: Determine a first vector of the first target sensing axis in a first coordinate system based on the first sensor data, and determine a second vector of the second target sensing axis in a second coordinate system based on the second sensor data; Based on the rotation matrix, a first projection vector of the first vector in the base coordinate system and a second projection vector of the second vector in the base coordinate system are calculated.

5. The method according to any one of claims 1 to 4, characterized in that: The base coordinate system is the first coordinate system, and the calculating the vector product between the first projection vector and the second projection vector includes: A vector product between a unit vector on a target axis of the base coordinate system and the second projection vector is calculated.

6. The method according to claim 5, characterized in that The identifying the wearing positions of the first earphone and the second earphone according to the vector product includes: Calculating the dot product between the vector product and the vector corresponding to the gravitational acceleration; If the quantity product is greater than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear; If the quantitative product is less than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear.

7. The method according to claim 6, characterized in that Also includes: When the user is in an inverted state, if the product of the quantities is greater than zero, it is determined that the first earphone is worn on the right ear and the second earphone is worn on the left ear; if the product of the quantities is less than zero, it is determined that the first earphone is worn on the left ear and the second earphone is worn on the right ear.

8. The method according to any one of claims 1 to 7, characterized in that: After identifying the wearing positions of the first earphone and the second earphone according to the vector product, the method further includes: Detecting whether the first earphone and the second earphone are taken out of the ear canal of the user; If the first earphone and / or the second earphone are not taken out of the ear canal of the user, the information of the identified wearing positions of the first earphone and the second earphone is locked.

9. A headset comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for identifying the left and right earphones according to any one of claims 1 to 8 is implemented.

10. A computer storage medium, characterized in that: The method comprises computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method for identifying left and right earphones as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Auto detection of headphone orientation

    CN104509129A

  • Method and system for realizing normal output of left sound and right sound based on headset

    CN105959854A