Method for obtaining headphone usage duration, electronic device, and readable storage medium

By obtaining and compensating for the wearing time of wireless headphones, the problem of inaccurate disinfection time of existing TWS headphones is solved, and more accurate disinfection judgment is achieved, avoiding waste of power and improving disinfection effect.

CN116471510BActive Publication Date: 2025-07-11JIANGXI RUISHENG ELECTRONIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310305910.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2025-07-11
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

In the current TWS headphones disinfection methods, the usage time is inaccurate, resulting in excessive disinfection or inadequate disinfection, resulting in wasted power supply of the headphone box and poor disinfection effect.

Method used

By obtaining the length of wearing the wireless headphones this time, the length of wearing accumulated after the previous disinfection, the duration of disinfection not triggered, etc., the compensation for correcting the wearing time is made. Combined with the length of wearing this time, the comprehensive length is obtained, and this is used as the basis for determining the timing of disinfection.

Benefits of technology

It improves the accuracy of headphone disinfection judgment, avoids waste of power of the headphone box, extends the use of the headphone box, and ensures the disinfection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471510B_ABST
    Figure CN116471510B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for obtaining the usage duration of earphones, an electronic device, and a readable storage medium. The obtaining method includes: obtaining the duration of the current wearing of the wireless earphones; obtaining the cumulative wearing duration of the wireless earphones from the previous disinfection to the current wearing as the previous wearing duration; obtaining the duration from the first wearing after the previous disinfection to the current moment without triggering disinfection as the non-triggered disinfection duration; compensating the previous wearing duration according to the non-triggered disinfection duration to obtain a corrected wearing duration; and obtaining a comprehensive duration according to the current wearing duration and the corrected wearing duration. Since the present invention takes into account both the actual wearing duration of the wireless earphones inside the ear and the factor of bacteria growth, it can obtain a more accurate usage duration of the earphones, thereby improving the accuracy of earphone disinfection determination, avoiding waste of the battery power of the earphone case, extending the usage duration of the earphone case, and ensuring the disinfection effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of wireless earphones, and particularly to a method for obtaining the usage duration of earphones, an electronic device, and a readable storage medium. Background Art

[0002] TWS (True Wireless Stereo) earphones are developed based on Bluetooth chip technology. They connect to the main earphone through an audio terminal such as a mobile phone, and then the main earphone quickly connects to the sub-earphone wirelessly to achieve true wireless separation and use of the left and right Bluetooth channels. Since there is no need for a wired connection, TWS earphones get rid of the wired restraint of traditional earphones and achieve a stereo effect for both ears. Compared with traditional Bluetooth earphones, they have been upgraded and optimized in terms of sound quality, noise reduction, call, transmission, and battery life.

[0003] With the increasing popularity of TWS earphones, users' requirements for TWS earphones are also getting higher and higher. Among them, users' attention to the hygiene problem of earphone use is also increasing. After a user wears TWS earphones, a closed space will be formed between the TWS earphones and the user's ear canal. The air circulation in the closed space is poor, which will cause the inside of the ear to become stuffy and hot, and a large number of bacteria will breed and attach to the TWS earphones. The longer the earphones are worn, the more bacteria will attach to the earphones. Similarly, the inside of the earphone case has a closed space. After the worn earphones are placed in the earphone case, more bacteria will breed between the earphones and the earphone case, which will further affect the health of the user's ears. Therefore, the cleaning after earphone use is particularly important.

[0004] To solve the problem of bacteria breeding on earphones, some existing TWS earphone cases are equipped with an ultraviolet disinfection function, which uses an ultraviolet lamp to disinfect the bacteria attached to the TWS earphones. However, in the existing disinfection methods, it is usually set to automatically start disinfection after the earphones are placed in the earphone case, or only the duration of the earphones being taken out of the earphone case is used as the earphone usage duration to determine whether to start ultraviolet disinfection. Such earphone usage duration is not suitable as a measurement standard for the disinfection timing, and there are problems of over-disinfection or insufficient disinfection, resulting in waste of the earphone case battery or failure to achieve the disinfection effect. Summary of the Invention

[0005] In view of the deficiencies of the prior art, the present invention provides a method for obtaining the usage duration of earphones, an electronic device, and a readable storage medium, which can obtain a duration suitable for determining the earphone disinfection timing, avoid waste of the earphone case battery caused by over-disinfection, extend the usage duration of the earphone case, and also ensure the disinfection effect.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for obtaining the usage duration of an earphone, comprising:

[0008] Obtaining the duration of the current wearing of the wireless earphone;

[0009] Obtaining the cumulative wearing duration of the wireless earphone from the previous disinfection to before the current wearing as the previous wearing duration;

[0010] Obtaining the duration from the first wearing after the previous disinfection until the current moment without triggering disinfection as the non-triggered disinfection duration;

[0011] Compensating the previous wearing duration according to the non-triggered disinfection duration to obtain the corrected wearing duration;

[0012] Obtaining the comprehensive duration according to the current wearing duration and the corrected wearing duration.

[0013] As one implementation manner, the step of obtaining the duration of the current wearing of the wireless earphone includes:

[0014] Obtaining and recording the ear-in moments of all ear-in signals and the ear-out moments of all ear-out signals emitted by the wireless earphone during the process of the wireless earphone detaching from the earphone case this time;

[0015] Calculating and accumulating the duration between each ear-in moment and the corresponding ear-out moment to obtain the duration of the current wearing.

[0016] As one implementation manner, the step of obtaining the non-triggered disinfection duration includes:

[0017] Obtaining the moment after the previous disinfection of the wireless earphone, after the first wearing and without triggering disinfection as the first moment;

[0018] Obtaining the earphone case entry moment when the wireless earphone is put into the earphone case after the current wearing;

[0019] Calculating the duration between the earphone case entry moment and the first moment to obtain the non-triggered disinfection duration.

[0020] As one implementation manner, the wireless earphone includes a first earphone and a second earphone, and the method for obtaining the usage duration of the earphone further includes:

[0021] Calculating the comprehensive duration of the first earphone and the second earphone respectively.

[0022] As one implementation manner, the comprehensive duration is the sum of the current wearing duration and the corrected wearing duration.

[0023] As one implementation manner, before the step of calculating the duration between the earphone case entry moment and the first moment, it further includes:

[0024] When the earphone in-box signal is detected, start timing;

[0025] Before the timing duration reaches the preset first threshold, if the earphone out-of-box signal is detected, obtain the in-box moment of the next wireless earphone and start timing again;

[0026] When the timing duration reaches the preset first threshold and the earphone out-of-box signal is not detected, calculate the duration between the in-box moment and the first moment.

[0027] As one implementation manner, the step of obtaining the duration of the current wearing of the wireless earphone includes:

[0028] When the earphone in-box signal is detected, start timing;

[0029] Before the timing duration reaches the preset first threshold, if the earphone out-of-box signal is detected, obtain the in-box moment of the next wireless earphone and start timing again;

[0030] When the timing duration reaches the preset first threshold and the earphone out-of-box signal is not detected, the timing of the current wearing duration ends.

[0031] As one implementation manner, the step of compensating the previous wearing duration according to the non-triggered disinfection duration to obtain the corrected wearing duration includes:

[0032] Obtain a correction coefficient according to the non-triggered disinfection duration;

[0033] Obtain the corrected wearing duration according to the previous wearing duration and the correction coefficient.

[0034] As one implementation manner, the step of obtaining the correction coefficient according to the non-triggered disinfection duration includes:

[0035] Obtain the ratio of the non-triggered disinfection duration to the preset first duration;

[0036] Obtain the correction coefficient according to the ratio of the non-triggered disinfection duration to the preset first duration.

[0037] As one implementation manner, the step of obtaining the correction coefficient according to the ratio of the non-triggered disinfection duration to the preset first duration includes:

[0038] Preset multiple correction coefficients;

[0039] Preset consecutive ratio intervals in one-to-one correspondence with the number of the correction coefficients;

[0040] Determine the ratio interval into which the ratio of the untriggered disinfection duration to the preset first duration falls;

[0041] According to the ratio interval into which the ratio of the untriggered disinfection duration to the preset first duration falls, determine the correction coefficient corresponding to the ratio interval.

[0042] As one implementation, the preset correction coefficient is selected from the interval [1, 2].

[0043] As one implementation, the corrected wearing duration is the product of the previous wearing duration and the correction coefficient.

[0044] Another object of the present invention is to provide a computer-readable storage medium storing multiple instructions, which are adapted to be loaded and executed by a processor to perform the steps of the above method for obtaining the headphone usage duration.

[0045] Another object of the present invention is to provide an electronic device, including a memory, a processor, and instructions of a disinfection program for wireless headphones stored on the memory and executable on the processor. When the instructions of the disinfection program for wireless headphones are executed by the processor, the above method for obtaining the headphone usage duration is implemented.

[0046] The present invention compensates the previous wearing duration through the untriggered disinfection duration to obtain the corrected wearing duration, and then combines the corrected wearing duration with the duration of the current wearing to obtain the comprehensive duration. The comprehensive duration can be used as a basis for measuring the headphone usage duration to determine headphone disinfection; since the present invention simultaneously considers the actual wearing duration of the wireless headphones inside the ear and the influence of the headphone case on the bacterial growth of the headphones, a more accurate headphone usage duration can be obtained, thereby improving the accuracy of headphone disinfection determination, avoiding waste of the headphone case battery, extending the headphone case usage duration, and ensuring the disinfection effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Shows a schematic diagram of a method for obtaining the headphone usage duration according to an embodiment of the present invention;

[0048] Figure 2 Shows a schematic diagram of a method for obtaining the duration of the current wearing according to an embodiment of the present invention;

[0049] Figure 3 Shows a schematic diagram of a method for obtaining the untriggered disinfection duration according to an embodiment of the present invention;

[0050] Figure 4 Shows a schematic diagram of another method for obtaining the untriggered disinfection duration according to an embodiment of the present invention;

[0051] Figure 5Schematic diagram of another method for obtaining the duration of this wearing in an embodiment of the present invention;

[0052] Figure 6 Schematic diagram of a method for obtaining the corrected wearing duration in an embodiment of the present invention;

[0053] Figure 7 Schematic diagram of a method for obtaining a correction coefficient in an embodiment of the present invention;

[0054] Figure 8 Schematic diagram of the structure of an electronic device in an embodiment of the present invention.

[0055] The realization of the object, functional characteristics, and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings. Detailed implementation manners

[0056] In the present invention, the terms "arrange", "be provided with", and "connect" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be directly connected, or indirectly connected through an intermediate medium, or there may be internal communication between two devices, components, or parts. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0057] The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0058] Moreover, in addition to being able to represent an orientation or positional relationship, some of the above terms may also be used to represent other meanings. For example, the term "upper" may also be used to represent a certain attachment relationship or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in the present invention can be understood according to specific situations.

[0059] In order to make the object, technical solution, and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] An embodiment of the present invention provides a wireless earphone and a charging case used in conjunction with the wireless earphone. The charging case has both charging and bacteria disinfection functions. For example, a disinfection device such as an ultraviolet lamp can be provided in the charging case. After the wireless earphone is placed in the charging case, the disinfection device can be turned on as needed to disinfect and sterilize the earphone worn by the user.

[0061] It can be understood that the wireless earphones of the present application include, but are not limited to, TWS earphones, Bluetooth earphones, and other wireless earphones that can be conveniently stored in the charging case.

[0062] To conveniently control the disinfection of the wireless earphone, such as Figure 1 , an embodiment of the present invention provides a method for obtaining the usage duration of an earphone, including:

[0063] S01. Obtain the duration of the current wearing of the wireless earphone;

[0064] S02. Obtain the previous wearing duration, which is the cumulative wearing duration of the wireless earphone from after the previous disinfection to before the current wearing;

[0065] S03. Obtain the duration without triggering disinfection, which is the duration from when the wireless earphone was first worn without triggering disinfection to the current moment after the previous disinfection;

[0066] S04. Compensate the previous wearing duration according to the duration without triggering disinfection to obtain the corrected wearing duration;

[0067] S05. Obtain the comprehensive duration according to the duration of the current wearing and the corrected wearing duration.

[0068] It can be understood that the above steps S01 and S02 are not in a specific order, can be carried out simultaneously, or can be carried out sequentially. The present embodiment does not limit their order.

[0069] In this embodiment, the previous wearing duration is compensated according to the duration without triggering disinfection to obtain the corrected wearing duration, and then the comprehensive duration is obtained by combining the corrected wearing duration and the duration of the current wearing. The comprehensive duration can be used as a basis for measuring the usage duration of the earphone to determine earphone disinfection; since this embodiment simultaneously considers the actual wearing duration of the wireless earphone inside the ear and the influence of the earphone case on earphone bacteria growth, a more accurate earphone usage duration can be obtained, thereby improving the accuracy of earphone disinfection determination, avoiding waste of the earphone case battery, extending the usage duration of the earphone case, and ensuring the disinfection effect.

[0070] In one embodiment, the wearing duration of the wireless earphones can be obtained through a detection sensor provided on the earphones, preferably an in-ear detection sensor. The in-ear detection sensor can be a photoelectric sensor or a capacitance sensor. For example, the photoelectric sensor can judge whether the earphones are in the ears by detecting the level signal formed by the reflected signal of the human body; the capacitance sensor can judge whether the earphones are in the ears by sensing the capacitance value of the human body. When the user wears the wireless earphones, the in-ear detection sensor detects that the earphones have been inserted into the user's ear canal and sends an in-ear signal. After receiving the in-ear signal, the earphone case starts timing the wearing duration, and this moment is the in-ear moment. This timing operation can be implemented by a program or hardware on the earphone case, on the earphones, or independent of the earphone case and the earphones; when the user removes the wireless earphones from the ears, the in-ear detection sensor detects that the earphones have left the user's ear canal and sends an out-of-ear signal. After receiving the out-of-ear signal, the earphone case stops timing for calculating the wearing duration, and this moment is the out-of-ear moment.

[0071] In one embodiment, in order to conveniently detect the in-case and out-of-case actions of the earphones, an in-case detection sensor can be provided in the earphone case. When it is detected that the wireless earphones are placed in or removed from the earphone case, the level signal of the in-case detection sensor changes, thereby sending corresponding in-case and out-of-case signals. Alternatively, contacts can be provided on the wireless earphones and the earphone case respectively. When the wireless earphones are placed in the earphone case, the contacts on the wireless earphones and the earphone case form a circuit, thereby generating an in-case signal. When the wireless earphones are removed from the earphone case, the contacts on the wireless earphones and the earphone case are disconnected, thereby generating an out-of-case signal. In this way, the in-case and out-of-case of the wireless earphones can also be judged.

[0072] It can be understood that in the actual use process, there may be a situation where the user removes the wireless earphones and does not put them into the earphone case, but wears them again, so that the wearing duration of the wireless earphones from the single time they are removed from the earphone case until they are put into the earphone case may be a continuous duration or the sum of several continuous durations.

[0073] In one embodiment, as Figure 2 , the step S01 of obtaining the wearing duration of the wireless earphones this time specifically includes:

[0074] S011. Obtain and record the in-ear moments of all in-ear signals and the out-of-ear moments of all out-of-ear signals sent by the wireless earphones during the process of the wireless earphones being removed from the earphone case this time;

[0075] S012. Calculate and accumulate the duration between each in-ear moment and the out-of-ear moment corresponding to each in-ear moment to obtain the wearing duration this time.

[0076] It can be understood that by calculating and accumulating the duration between each ear-in moment and the corresponding ear-out moment, the duration of the current headphone wearing can be accurately obtained. Of course, the duration of the current wearing can also be obtained through a timing module or a timing program. Specifically, when an ear-in signal is detected, the timing module or the timing program is started, and when an ear-out signal is detected, the timing module or the timing program is stopped, thereby obtaining the duration of the current wearing.

[0077] After the user finishes wearing the wireless headphones, the wireless headphones will be put back into the headphone case. When the wireless headphones are placed in the headphone case, the determination module in the headphone case will determine whether the wireless headphones meet the conditions for triggering disinfection. Before the determination module determines whether to trigger disinfection, it is necessary to first obtain the previous wearing duration from the cumulative module preset in the headphone case. The previous wearing duration is the cumulative wearing duration that has been accumulated when the headphones did not meet the conditions for triggering disinfection from the time after the previous disinfection to the time before the current wearing. After the determination module determines not to trigger disinfection, the current wearing duration will be recorded in the cumulative module, that is, after the determination not to trigger disinfection, the current wearing duration will be accumulated on the previous wearing duration. When determining whether to trigger disinfection, the sum of the previous wearing duration and the current wearing duration is the total wearing duration.

[0078] In one embodiment, as Figure 3 , the above step S03 of obtaining the duration without triggering disinfection specifically includes:

[0079] S031: Obtain the moment when the wireless headphones are first worn and do not trigger disinfection after the previous disinfection as the first moment;

[0080] S032: Obtain the moment when the wireless headphones are put into the headphone case after the current wearing;

[0081] S033: Calculate the duration between the moment of putting into the case and the first moment to obtain the duration without triggering disinfection.

[0082] It can be understood that after the wireless headphones are disinfected for the previous time, if the detection sensor on the wireless headphones detects that the headphones are not in the ear, it means that the headphones are not contaminated. At this time, the duration without triggering disinfection is 0, that is, the duration without triggering disinfection refers to the duration from the first time after the previous disinfection when the headphones are worn and fail to trigger disinfection to the time when the headphones are put back into the headphone case after the current wearing. By calculating the duration between the moment of putting into the case and the first moment, the duration without triggering disinfection can be obtained more accurately, which can improve the accuracy of compensating the previous wearing duration according to the duration without triggering disinfection in the subsequent step S04.

[0083] The duration without triggering disinfection can also be obtained through a timing module or a timing program. Specifically, after the previous disinfection, when the wireless earphones cannot trigger disinfection after being worn for the first time, the timing module or the timing program starts timing. When the earphone-in-case signal is obtained, the timing is paused and it is determined again whether disinfection is triggered. If disinfection cannot be triggered, the timing continues; if disinfection is triggered, the accumulated duration without triggering disinfection is cleared. Among them, the earphone-in-case signal can be obtained through the earphone-in-case detection sensor in the earphone case or the conduction state of the contacts between the earphone and the earphone case.

[0084] After obtaining the duration of this wearing, the duration of the previous wearing, and the duration without triggering disinfection, the subsequent steps S04 and S05 can be carried out, the comprehensive duration is calculated, and the comprehensive duration is used as the standard for measuring the earphone usage duration to determine whether disinfection is triggered.

[0085] In some usage scenarios, after the user puts the wireless earphones into the earphone case, the user may take out the wireless earphones again within a short period of time (such as 5 s). If the wearing duration, the duration without triggering disinfection, and the comprehensive duration are statistically counted again during this short period of time, it will increase unnecessary operations and statistics, and will also increase the power consumption to a certain extent.

[0086] Based on the above considerations, as Figure 4 , in one embodiment, the situation where the wireless earphones are put into the earphone case and then taken out within a short period of time is regarded as not being put into the earphone case, and the duration of this wearing and the duration without triggering disinfection during this period are both normally timed. Therefore, before step S033 of calculating the duration between the earphone-in-case moment and the first moment, the process of obtaining the duration without triggering disinfection can further include:

[0087] S0321. When detecting the earphone-in-case signal, start timing;

[0088] S0322. Before the timing duration reaches the preset first threshold, if the earphone-out-of-case signal is detected, the earphone-in-case signal in step S0321 is ignored, the next earphone-in-case moment of the wireless earphones is obtained, and the timing starts again until the timing duration reaches the preset first threshold;

[0089] S0323. When the timing duration reaches the preset first threshold and the earphone-out-of-case signal is not detected, calculate the duration between the earphone-in-case moment and the first moment, and this timing duration is accumulated to the duration without triggering disinfection.

[0090] Similarly, in one embodiment, as Figure 5 , step S01 of obtaining the duration of this wearing of the wireless earphones can further include:

[0091] S0111. When detecting the earphone-in-case signal, start timing;

[0092] S0112. Before the timing duration reaches the preset first threshold, if a signal indicating that the earphone is out of the case is detected, the signal indicating that the earphone is put into the case in step S0111 is ignored, and the duration of this wearing is continuously accumulated. The time when the next wireless earphone is put into the case is obtained, and the timing is restarted until the timing duration reaches the preset first threshold;

[0093] S0113. When the timing duration reaches the preset first threshold and no signal indicating that the earphone is out of the case is detected, the timing of the duration of this wearing ends.

[0094] Since both the earphone case and the ear canal with the wireless earphone inserted form a closed space with poor air fluidity where bacteria can breed, bacteria will breed in the wireless earphone in the ear canal, and bacteria will also breed in the wireless earphone in the earphone case if the earphone is not disinfected after wearing. Therefore, it is inaccurate to determine whether to start disinfection based on the total wearing duration of the accumulated wireless earphone or the time when the wireless earphone is taken out of the earphone case. If the earphone is disinfected every time after wearing, it will cause waste of the earphone case's power.

[0095] During the use of the wireless earphone, there may be situations where the earphone is put into the earphone case after being worn for a short time multiple times but disinfection cannot be triggered, or the earphone is put into the earphone case for a long time after wearing and not used again, etc. When the wireless earphone is put into the earphone case after use and disinfection cannot be triggered, bacteria will multiply in large numbers in the earphone case. Moreover, before the preset trigger condition is met, the bacteria in the earphone case will increase with the increase of the duration without triggering disinfection. Therefore, before disinfection is triggered, both the duration without triggering disinfection and the previous wearing duration will affect the amount of bacteria breeding in the wireless earphone and the earphone case. The longer the previous wearing duration and the duration without triggering disinfection, the more bacteria there will be in the wireless earphone and the earphone case.

[0096] Considering this factor, in this embodiment, after obtaining the previous wearing duration and the duration without triggering disinfection through the above steps S02 and S03 respectively, in step S04, the previous wearing duration is further compensated by using the duration without triggering disinfection to obtain the corrected wearing duration.

[0097] As Figure 6 , one way to obtain the corrected wearing duration is shown. In this embodiment, the step S04 of compensating the previous wearing duration according to the duration without triggering disinfection to obtain the corrected wearing duration includes:

[0098] S041. Obtain a correction coefficient according to the duration without triggering disinfection;

[0099] S042. Obtain the corrected wearing duration according to the previous wearing duration and the correction coefficient. Among them, the corrected wearing duration can be the product of the previous wearing duration and the correction coefficient.

[0100] In one embodiment, a parameter for measuring the degree of long-term use of the wireless earphones without triggering disinfection can be preset. For example, a preset first duration. When the wireless earphones after being used in the ears are stored in the earphone case for the preset first duration, it is determined that the degree of bacterial growth in the earphone case is very serious.

[0101] In the above step S041, a ratio can be obtained by comparing the non-triggered disinfection duration with the preset first duration. The larger the ratio, the closer the non-triggered disinfection duration is to the preset first duration. Then, according to this ratio, a corresponding coefficient is obtained and used as the correction coefficient. In this way, the situation where the wireless earphones cannot be disinfected when placed in the earphone case before triggering disinfection can be compensated by correction, so that the finally obtained earphone usage duration is more in line with the actual requirements.

[0102] Such as Figure 7 , exemplarily, in step S041, the process of obtaining the correction coefficient according to the non-triggered disinfection duration may specifically include:

[0103] S0411. Obtain the ratio of the non-triggered disinfection duration to the preset first duration;

[0104] S0412. Obtain the correction coefficient according to the ratio of the non-triggered disinfection duration to the preset first duration.

[0105] For another example, the above step S0412 may further include:

[0106] Preset multiple correction coefficients;

[0107] Preset continuous ratio intervals corresponding one-to-one to the number of correction coefficients;

[0108] Determine the ratio interval into which the ratio of the non-triggered disinfection duration to the preset first duration falls;

[0109] According to the ratio interval into which the ratio of the non-triggered disinfection duration to the preset first duration falls, determine the correction coefficient corresponding to the ratio interval.

[0110] Exemplarily, the preset correction coefficient is selected from the interval [1, 2]. Compared with the previous wearing duration, the corrected wearing duration after correcting the previous wearing duration will increase or remain unchanged to a certain extent.

[0111] By presetting multiple correction coefficients, the possible range of the ratio of the non-triggered disinfection duration to the preset first duration is divided into ratio intervals corresponding to the number of preset correction coefficients. When this ratio is calculated, according to the ratio interval into which the ratio falls, the correction coefficient corresponding to each ratio can be obtained.

[0112] For example, in step S0412, if there are 4 correction factors, the possible range of the ratio result is divided into 4 ratio intervals. When the calculated ratio result falls between the lower limit value and the upper limit value of a certain ratio interval, the correction factor corresponding to the ratio interval is obtained.

[0113] S05. Obtain the comprehensive duration based on the current wearing duration and the corrected wearing duration.

[0114] In one embodiment, the comprehensive duration is the sum of the current wearing duration and the corrected wearing duration. In this way, the comprehensive duration obtained by adding the current wearing duration and the corrected wearing duration can be used to measure the headphone usage duration and serve as the basis for determining whether to trigger disinfection. Since both the current wearing duration and the corrected wearing duration take into account the actual wearing duration of the wireless headphones inside the ear and the bacteria breeding factor in the headphone case, using the comprehensive duration calculated from these two as the basis for triggering disinfection can well solve the problems of bacteria breeding and waste of headphone case power.

[0115] After obtaining the comprehensive duration, the determination module can determine whether to start disinfection based on the comprehensive duration. When the comprehensive duration reaches the preset first determination duration, the determination module determines that the pollution degree of the wireless headphones meets the condition for triggering headphone case disinfection; otherwise, it is determined that the pollution degree of the wireless headphones does not meet the condition for triggering headphone case disinfection. In one embodiment, if disinfection is triggered, the current wearing duration, the previous wearing duration, and the non-triggered disinfection duration are all cleared and re-timed respectively; if disinfection is not triggered, the current wearing duration is accumulated to the previous wearing duration, then the current wearing duration is cleared, and the non-triggered disinfection duration continues to be timed.

[0116] For example, when the preset first determination duration is 1 hour, if the calculated comprehensive duration is 50 minutes, it is determined that the wireless headphones do not meet the disinfection condition, and the non-triggered disinfection duration continues to be accumulated. After the wireless headphones are placed in the headphone case again, the determination module is triggered to determine again whether the condition for triggering disinfection is met.

[0117] In one embodiment, the wireless headphones include a first headphone and a second headphone (e.g., left and right headphones). During the process of obtaining the headphone usage duration for disinfection of the wireless headphones, the comprehensive durations of the first headphone and the second headphone can also be calculated respectively. Using the comprehensive duration of each headphone as the standard for measuring the actual usage duration, it is determined whether to trigger the disinfection of the corresponding first headphone and second headphone respectively according to whether the comprehensive durations of the first headphone and the second headphone reach the corresponding preset first determination duration. Since the comprehensive durations of the two wireless headphones are calculated separately, it is possible to determine whether the two wireless headphones meet the disinfection trigger conditions respectively. Thus, during the disinfection process, the headphone case can disinfect only one of the wireless headphones, further saving power and extending the usage duration after the headphone case is charged.

[0118] In summary, the embodiments of the present invention consider both the actual wearing duration of the wireless earphones inside the ear and the breeding factor of bacteria in the earphone case, so that a more realistic earphone usage duration can be obtained, and the timing of triggering disinfection of the earphones is more accurate, avoiding waste of the earphone case power.

[0119] Another embodiment of the present invention provides a readable storage medium, which stores multiple instructions adapted to be loaded and executed by a processor to perform the steps of the disinfection method of the above wireless earphones.

[0120] Another embodiment of the present invention provides an electronic device, such as Figure 8 , which includes a memory 10, a processor 20, and program instructions 30 for obtaining the earphone usage duration stored on the memory 10 and operable on the processor 20. When the program instructions 30 for obtaining the earphone usage duration are executed by the processor 20, the disinfection method of the above wireless earphones is implemented.

[0121] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor is generally used to control the overall operation of the electronic device. In this embodiment, the processor is used to run the program code stored in the readable storage medium or process data.

[0122] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0123] The above are only specific embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for obtaining the usage duration of an earphone, characterized in that, Including: Obtain the duration of the current wearing of the wireless earphone; Obtain the cumulative wearing duration of the wireless earphone from the previous disinfection to the current wearing as the previous wearing duration; Obtain the duration from the first wearing after the previous disinfection to the current moment without triggering disinfection of the wireless earphone as the non-triggered disinfection duration; Compensate the previous wearing duration according to the non-triggered disinfection duration to obtain the corrected wearing duration; Obtain the comprehensive duration according to the current wearing duration and the corrected wearing duration.

2. The method for obtaining the usage duration of the earphone according to claim 1, wherein The step of obtaining the current wearing duration of the wireless earphone includes: Obtain and record the ear-in moments of all ear-in signals and the ear-out moments of all ear-out signals emitted by the wireless earphone during the process of the wireless earphone leaving the earphone case this time; Calculate and accumulate the duration between each ear-in moment and the corresponding ear-out moment to obtain the current wearing duration.

3. The method for obtaining the usage duration of the earphone according to claim 1, wherein The step of obtaining the non-triggered disinfection duration includes: Obtain the moment when the wireless earphone is first worn and does not trigger disinfection after the previous disinfection as the first moment; Obtain the ear-in moment when the wireless earphone is put into the earphone case after the current wearing; Calculate the duration between the ear-in moment and the first moment to obtain the non-triggered disinfection duration.

4. The method for obtaining the usage duration of the earphone according to claim 1, wherein The wireless earphone includes a first earphone and a second earphone, and the method for obtaining the usage duration of the earphone further includes: Calculate the comprehensive durations of the first earphone and the second earphone respectively.

5. The method for obtaining the usage duration of the earphone according to claim 1, wherein The comprehensive duration is the sum of the current wearing duration and the corrected wearing duration.

6. The method for obtaining the headphone usage duration according to claim 3, wherein Before the step of calculating the duration between the ear-in moment and the first moment, it further includes: When detecting an earphone-in-the-case signal, start timing; Before the timing duration reaches a preset first threshold, if an earphone-out-of-the-case signal is detected, obtain the ear-in moment of the next wireless earphone and restart timing; When the timing duration reaches the preset first threshold and no earphone-out-of-the-case signal is detected, calculate the duration between the ear-in moment and the first moment.

7. The method for obtaining the usage duration of the earphone according to claim 1, wherein The step of obtaining the current wearing duration of the wireless earphone includes: When detecting an earphone-in-the-case signal, start timing; Before the timing duration reaches a preset first threshold, if an earphone-out-of-the-case signal is detected, obtain the ear-in moment of the next wireless earphone and restart timing; When the timing duration reaches the preset first threshold and no earphone-out-of-the-case signal is detected, the timing of the current wearing duration ends.

8. The method for obtaining the headphone usage duration according to any one of claims 1 to 7, characterized in that, The step of compensating the previous wearing duration according to the non-triggered disinfection duration to obtain the corrected wearing duration includes: Obtain a correction coefficient according to the non-triggered disinfection duration; Obtain the corrected wearing duration according to the previous wearing duration and the correction coefficient.

9. The method for obtaining the usage duration of the earphone according to claim 8, wherein, The step of obtaining the correction coefficient according to the non-triggered disinfection duration includes: Obtain the ratio of the non-triggered disinfection duration to a preset first duration; Obtain the correction coefficient according to the ratio of the non-triggered disinfection duration to the preset first duration.

10. The method for obtaining the usage duration of the earphone according to claim 9, wherein The step of obtaining the correction coefficient according to the ratio of the non-triggered disinfection duration to the preset first duration includes: Preset multiple correction coefficients; Preset continuous ratio intervals that correspond one-to-one with the number of the correction factors; Determine the ratio interval into which the ratio of the untriggered disinfection duration to the preset first duration falls; According to the ratio interval into which the ratio of the untriggered disinfection duration to the preset first duration falls, determine the correction factor corresponding to the ratio interval.

11. The method for obtaining the headphone usage duration according to claim 10, wherein, The preset correction factor is selected from the interval [1, 2].

12. The method for obtaining the usage duration of the earphone according to claim 8, wherein, The corrected wearing duration is the product of the previous wearing duration and the correction factor.

13. A computer-readable storage medium, characterized in that, Stores a plurality of instructions, and the instructions are adapted to be loaded and executed by a processor to perform the steps of the method for obtaining the usage duration of the earphone according to any one of claims 1 to 12.

14. An electronic device, characterized in that, Includes a memory, a processor, and disinfection program instructions of a wireless earphone stored on the memory and executable on the processor. When the disinfection program instructions of the wireless earphone are executed by the processor, the method for obtaining the usage duration of the earphone according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Wireless earphone disinfection method and device, wireless earphone and storage medium

    CN112995836A

  • TWS earphone disinfection method, device, equipment, medium and program product

    CN114363764A