Headphone volume adjustment method, electronic device and readable storage medium
By using acceleration sensors to detect the head movement posture in the headset to generate a level signal, volume adjustment is realized without the operation of terminal equipment, and the problem of low convenience in headset volume adjustment in the prior art is solved, and the convenience of headset volume adjustment is improved.
Patent Information
- Application Number
- CN202210439597.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The volume adjustment of existing Bluetooth headphones requires operation on the terminal device, resulting in low convenience, especially when the terminal device is not around the user.
Install an acceleration sensor in the headset, and generate a level signal by detecting the head movement posture of the wearer, and adjust the headset volume according to the change direction and number of times of the level signal, so as to adjust the volume without the operation of the terminal device.
The convenience of headphone volume adjustment is improved, and users can directly control the volume size and speed through head movement, solving the problem of cumbersome operation in the prior art.
Smart Images

Figure CN114827811B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of earphone technology, and in particular to an earphone volume adjustment method, an electronic device, and a readable storage medium. Background Art
[0002] With the development of mobile Internet, smart wearable devices have gradually penetrated into all aspects of life. For example, Bluetooth headsets are one of the most common smart wearable devices. At present, Bluetooth headsets establish a connection with terminal devices wirelessly to obtain and play audio. When users need to adjust the volume of Bluetooth headsets, they can increase or decrease the volume on the terminal device. However, when the terminal device is not with the user, the user usually needs to find the terminal device to adjust the volume of the Bluetooth headset, so the volume adjustment operation process is cumbersome and less convenient for users. Summary of the invention
[0003] The main purpose of the present application is to provide a headphone volume adjustment method, an electronic device and a readable storage medium, aiming to solve the technical problem of low convenience of headphone volume adjustment in the prior art.
[0004] To achieve the above object, the present application provides a headphone volume adjustment method, which is applied to a headphone, wherein the headphone is provided with an acceleration sensor, and the headphone volume adjustment method comprises:
[0005] After detecting that the headset is in volume adjustment mode, detecting a first level signal output by the acceleration sensor, wherein the acceleration sensor is used to generate a corresponding level signal by detecting a head movement posture of a user wearing the headset;
[0006] The volume of the earphone is adjusted according to the level change direction and the corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change number is used to control the volume adjustment rate of the earphone volume.
[0007] To achieve the above object, the present application further provides an earphone volume adjustment device, which is applied to an earphone, wherein the earphone is provided with an acceleration sensor, and the earphone volume adjustment device comprises:
[0008] A detection module, configured to detect a first level signal output by the acceleration sensor after detecting that the headset is in a volume adjustment mode, wherein the acceleration sensor is configured to generate a corresponding level signal by detecting a head movement posture of a user wearing the headset;
[0009] The volume adjustment module is used to adjust the volume of the earphone according to the level change direction and the corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change number is used to control the volume adjustment rate of the earphone volume.
[0010] The present application also provides an electronic device, which is a physical device, and includes: a memory, a processor, and a program of the headphone volume adjustment method stored in the memory and executable on the processor, and when the program of the headphone volume adjustment method is executed by the processor, the steps of the headphone volume adjustment method as described above can be implemented.
[0011] The present application also provides a computer-readable storage medium, on which is stored a program for implementing the headphone volume adjustment method. When the program for the headphone volume adjustment method is executed by a processor, the steps of the headphone volume adjustment method as described above are implemented.
[0012] The present application also provides a computer program product, including a computer program, which implements the steps of the headphone volume adjustment method as described above when the computer program is executed by a processor.
[0013] The present application provides a headphone volume adjustment method, an electronic device and a readable storage medium. Compared with the technical means used in the prior art to increase or decrease the volume on a terminal device when a user needs to adjust the volume of a Bluetooth headphone, the present application detects a first level signal output by an acceleration sensor after detecting that the headphone is in a volume adjustment mode, wherein the acceleration sensor is used to generate a corresponding level signal by detecting the head movement posture of a user wearing the headphone; thereby adjusting the volume of the headphone according to a level change direction and a corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the headphone volume, and the level change number is used to control the volume adjustment rate of the headphone volume. Therefore, the acceleration sensor in the present application can generate a corresponding level signal according to the head movement posture of the user, and then control the adjustment direction of the volume according to the level change direction of the level signal, that is, control the volume to increase or decrease, and can control the volume adjustment rate according to the number of level changes of the level signal, that is, control the speed of volume adjustment, thereby achieving the purpose of controlling the volume of the earphone according to the user's head movement posture. The user can adjust the volume of the earphone without operating on the terminal device. Therefore, it overcomes the prior art that when the terminal device is not with the user, the user usually needs to find the terminal device to adjust the volume of the Bluetooth headset, so the volume adjustment operation process is cumbersome and the technical defect of low convenience for the user is improved, and the convenience of earphone volume adjustment is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0016] Figure 1 This is a flow chart of a first embodiment of the headphone volume adjustment method of the present application;
[0017] Figure 2 This is a flow chart of a second embodiment of the headphone volume adjustment method of the present application;
[0018] Figure 3 This is a flowchart of a third embodiment of the headphone volume adjustment method of the present application;
[0019] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the headphone volume adjustment method in the embodiment of the present application.
[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of this application.
[0022] Embodiment 1
[0023] The present application provides a headphone volume adjustment method, which is applied to a headphone, wherein the headphone is provided with an acceleration sensor, referring to Figure 1 In the first embodiment of the headphone volume adjustment method of the present application, the headphone volume adjustment method includes:
[0024] Step S10, after detecting that the headset is in volume adjustment mode, detecting a first level signal output by the acceleration sensor, wherein the acceleration sensor is used to generate a corresponding level signal by detecting a head movement posture of a user wearing the headset;
[0025] Step S20, adjusting the volume of the earphone according to the level change direction and the corresponding level change times corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change times is used to control the volume adjustment rate of the earphone volume.
[0026] In this embodiment, it should be noted that the headset is provided with a volume adjustment mode, and the user can turn on the volume adjustment mode in a preset mode, for example, by tapping a preset area of the headset to turn on the volume adjustment mode, or by controlling the head to move in a preset posture to turn on the volume adjustment mode, for example, it can be set that when the head turns 45 degrees to the left first, and then turns 45 degrees to the right, the volume adjustment mode can be triggered. After turning on the volume adjustment mode, the user wearing the headset can control his or her head to move in different postures, so that after detecting the head movement posture of the user wearing the headset through the acceleration sensor, a corresponding level signal can be generated, and then a corresponding volume adjustment instruction can be generated according to the level change direction and the number of level changes of the level signal, so as to realize the volume control of the headset. Among them, the level change direction can be the change direction of the amplitude of the level signal relative to the standard amplitude, the level change direction can be the increase direction of the amplitude of the level signal, and can also be the decrease direction of the amplitude of the level signal. For example, assuming that the standard amplitude of the level signal output by the acceleration sensor when the acceleration is 0 is A, the level change direction of the level signal greater than A is an increase direction, and the level change direction of the level signal less than A is a decrease direction; the number of level changes is the number of changes in the amplitude of the level signal. The amplitude of the level signal can be set to change from the standard amplitude until it returns to the standard amplitude as one level change number. For example, the standard amplitude of the level signal output by the acceleration sensor when the acceleration is 0 is A, the amplitude of the level signal increases from A to B and then resets to A, and then decreases from A to C and resets to A, then the number of changes in the level signal is 2.
[0027] As an example, steps S10 to S20 include: after detecting that the headset turns on the volume adjustment mode, detecting the user's first head movement posture through the acceleration sensor, and outputting a first level signal corresponding to the first head movement posture, wherein the acceleration sensor is used to generate a corresponding level signal by detecting the head movement posture of the user wearing the headset; obtaining the level change direction and the corresponding level change times corresponding to the first level signal, and starting to adjust the volume of the headset with the volume adjustment direction corresponding to the level change direction and the volume adjustment rate corresponding to the level change times, until it is detected that the volume of the headset reaches the target adjustment volume, wherein the target adjustment volume The volume is the target volume required by the user wearing the headset. Whether the volume of the headset reaches the target adjustment volume can be determined by detecting whether the headset obtains the volume adjustment stop instruction, that is, when the headset obtains the volume adjustment stop instruction, it is determined that the volume of the headset reaches the target adjustment volume, otherwise, it is determined that the volume of the headset does not reach the target adjustment volume; the volume adjustment stop instruction can be triggered to be generated by the user wearing the headset performing a corresponding headset operation, and the headset operation can be tapping a preset area of the headset, or controlling the head to move in a preset posture. For example, in the volume adjustment mode, when the acceleration sensor detects that the head of the wearer turns 45 degrees to the right, the volume adjustment stop instruction is triggered.
[0028] The step of adjusting the volume of the earphone according to the level change direction and the number of level changes corresponding to the first level signal comprises:
[0029] Step S21, if the level change direction is an increasing direction and the level change number is a preset first change number, start to increase the volume of the earphone at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0030] Step S22, if the level change direction is an increasing direction and the level change number is a preset second change number, start to increase the volume of the earphone at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0031] Step S23, if the level change direction is a decreasing direction and the level change number is a preset first change number, start to reduce the volume of the earphone at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0032] Step S24: if the level change direction is a decreasing direction and the level change times are a preset second change times, the volume of the earphone starts to be reduced at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume.
[0033] In the present embodiment, it should be noted that the acceleration sensor may be a gravity sensor, and the head movement posture of the user wearing the headset in the vertical direction is measured by the gravity sensor, so that the level signal corresponding to the head movement posture can be set. For example, if the upward acceleration is detected by the gravity sensor, a corresponding increasing level signal is generated, and if the downward acceleration is detected by the gravity sensor, a corresponding decreasing level signal is generated. In the embodiment of the present application, different volume adjustment rates may also be set to correspond to different levels. Optionally, the higher the number of level changes, the faster the volume adjustment rate. Different volume adjustment directions may be set to correspond to different level change directions. For example, when the level change direction is set to an increasing direction, the corresponding volume adjustment direction is to increase the volume, and when the level change direction is set to a decreasing direction, the corresponding volume adjustment direction is to decrease the volume.
[0034] In addition, it should be noted that users usually have different requirements for the volume adjustment method of headphones in different scenarios. For example, when answering a call in a relatively quiet public place, if the headphone volume is too loud, the user usually wants to quickly reduce the volume. At this time, the user has a higher requirement for the volume adjustment rate, but a lower requirement for the accuracy of the volume adjustment. When the user is listening to music, in order to have a better listening experience, the user usually hopes that the volume can be accurately adjusted to a suitable volume. At this time, the user usually does not have a high requirement for the volume adjustment rate, but a high requirement for the accuracy of the volume adjustment.
[0035] As an example, steps S21 to S24 include: if the direction of the level change is an increasing direction and the number of level changes is a preset first number of changes, then the volume of the earphone is gradually increased at a preset first volume adjustment rate corresponding to the preset first number of changes until it is detected that the volume of the earphone reaches the target adjustment volume. For example, assuming that the preset first volume adjustment rate is 10%, and the initial volume before the volume adjustment starts is 10, then the volume is increased by 10% based on the initial volume every 1s, that is, the volume increases by 1 per second; if the direction of the level change is an increasing direction and the number of level changes is a preset second number of changes, then the volume of the earphone is gradually increased at a preset second volume adjustment rate corresponding to the preset second number of changes until it is detected that the volume of the earphone reaches the target adjustment volume. For example, assuming that the preset second volume adjustment rate is 30%, and the initial volume before the volume adjustment starts is 10, then the volume is increased by 30% based on the initial volume every 1s, that is, the volume increases by 30% per second. That is, the volume increased by 3 per second; if the level change direction is a decreasing direction and the number of level changes is a preset first change number, the volume of the earphone is gradually reduced at a preset first volume adjustment rate corresponding to the preset first change number, until it is detected that the volume of the earphone reaches the target adjustment volume, for example, assuming that the preset first volume adjustment rate is 10%, and the initial volume before the volume adjustment starts is 10, then every 1s, the volume is reduced by 10% based on the initial volume, that is, the smaller volume per second is 1; if the level change direction is a decreasing direction and the number of level changes is a preset second change number, the volume of the earphone is gradually reduced at a preset second volume adjustment rate corresponding to the preset second change number, until it is detected that the volume of the earphone reaches the target adjustment volume, for example, assuming that the preset second volume adjustment rate is 30%, and the initial volume before the volume adjustment starts is 10, then every 1s, the volume is reduced by 30% based on the initial volume, that is, the smaller volume per second is 3. The embodiments of the present application achieve the purpose of increasing or decreasing the headphone volume at different volume adjustment rates based on the head movement posture of the headphone wearer detected by the gravity sensor, and can meet the needs of the headphone wearer for volume adjustment modes in different scenarios, that is, the user can always adjust the volume at the desired volume adjustment rate, further improving the convenience of headphone volume adjustment.
[0036] Wherein, before the step of detecting the first level signal output by the acceleration sensor after detecting that the headset turns on the volume adjustment mode, the method further includes:
[0037] Step A10, detecting a third level signal output by the acceleration sensor;
[0038] Step A20, judging whether the head movement posture of the user wearing the headset meets the preset head movement posture according to the third level signal;
[0039] Step A30: If yes, turn on the volume adjustment mode of the headset.
[0040] As an example, steps A10 to A30 include: detecting a third level signal output by the acceleration sensor; determining that the third level signal is consistent with a preset mode start-up level signal; if they are consistent, determining that the head movement posture of the user wearing the headset meets the preset head movement posture, and thereby starting the volume adjustment mode of the headset; if they are inconsistent, determining that the head posture of the user wearing the headset does not meet the preset head movement posture, and thereby not starting the volume adjustment mode of the headset.
[0041] As an example, the step of determining whether the third level signal is consistent with the preset mode start level signal includes:
[0042] It is determined whether the number of level changes of the third level signal is consistent with the preset target level change number, and whether the level change direction of the third level signal is consistent with the preset target level change direction. If the number of level changes of the third level signal is consistent with the preset target level change number, and the level change direction of the third level signal is consistent with the preset target level change direction, it is determined that the third level signal is consistent with the preset mode start level signal; otherwise, it is determined that the third level signal is inconsistent with the preset mode start level signal.
[0043] As an example, the step of determining whether the third level signal is consistent with the preset mode start level signal includes:
[0044] It is determined whether the number of level changes of the third level signal is consistent with the preset target level change number, whether the level change direction of the third level signal is consistent with the preset target level change direction, and whether the signal amplitude of the third level signal is within the preset signal amplitude range; if the number of level changes of the third level signal is consistent with the preset target level change number, the level change direction of the third level signal is consistent with the preset target level change direction, and the signal amplitude of the third level signal is within the preset signal amplitude range, it is determined that the third level signal is consistent with the preset mode start level signal; otherwise, it is determined that the third level signal is inconsistent with the preset mode start level signal.
[0045] The embodiment of the present application provides a method for adjusting the volume of a headphone. Compared with the technical means used in the prior art in which a user increases or decreases the volume on a terminal device when the user needs to adjust the volume of a Bluetooth headphone, the embodiment of the present application detects a first level signal output by an acceleration sensor after detecting that the headphone is in a volume adjustment mode, wherein the acceleration sensor is used to generate a corresponding level signal by detecting the head movement posture of the user wearing the headphone; thereby adjusting the volume of the headphone according to the level change direction and the corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the headphone volume, and the level change number is used to control the volume adjustment rate of the headphone volume. Therefore, in the embodiment of the present application, the acceleration sensor can generate a corresponding level signal according to the head movement posture of the user, and then control the adjustment direction of the volume according to the level change direction of the level signal, that is, control the volume to increase or decrease, and can control the volume adjustment rate according to the number of level changes of the level signal, that is, control the speed of volume adjustment, thereby achieving the purpose of controlling the volume of the earphone according to the user's head movement posture. The user can adjust the volume of the earphone without operating on the terminal device. Therefore, it overcomes the prior art that when the terminal device is not with the user, the user usually needs to find the terminal device to adjust the volume of the Bluetooth headset, so the volume adjustment operation process is cumbersome and the technical defect of low convenience for the user is improved, and the convenience of earphone volume adjustment is improved.
[0046] Embodiment 2
[0047] Reference Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the step of adjusting the volume of the earphone according to the level change direction and the corresponding level change times corresponding to the first level signal includes:
[0048] Step B10, obtaining the signal amplitude of the first level signal;
[0049] Step B20: If the signal amplitude of the first level signal is within a preset first amplitude range, the volume of the earphone is adjusted according to the level change direction and the corresponding level change times corresponding to the first level signal.
[0050] In this embodiment, it should be noted that when the acceleration sensor is an angular acceleration sensor, there are four directions of acceleration, namely up, down, left and right, while there are only two directions of level change, namely increasing and decreasing. In order to better determine the acceleration direction according to the level change direction of the level signal, thereby determining the head movement posture of the wearing user, in the embodiment of the present application, the acceleration direction detected by the acceleration sensor can be jointly characterized according to the signal amplitude information and the level change direction of the level signal.
[0051] As an example, when the acceleration direction is the up-down direction, the signal amplitude of the corresponding level signal can be set to be within a preset first amplitude range. At this time, when the acceleration direction is upward, the level change direction can be set to an increasing direction, and when the acceleration direction is downward, the level change direction can be set to a decreasing direction; when the acceleration direction is the left-right direction, the signal amplitude of the corresponding level signal can be set to be within a preset second amplitude range. At this time, when the acceleration direction is to the left, the level change direction can be set to an increasing direction, and when the acceleration direction is to the right, the level change direction can be set to a decreasing direction. The preset first amplitude range has no intersection with the preset second amplitude range.
[0052] As an example, step B10 to step B20 include: obtaining the signal amplitude of the first level signal; if the signal amplitude of the first level signal is within a preset first amplitude range, starting to adjust the volume of the earphone according to the volume adjustment direction corresponding to the level change direction and the volume adjustment rate corresponding to the number of level changes, until it is detected that the volume of the earphone reaches the target adjustment volume; if the signal amplitude of the first level signal is within a preset second amplitude range, detecting whether the volume of the earphone is being adjusted, if the volume of the earphone is being adjusted, determining whether the first level signal is consistent with a preset volume adjustment stop level signal, if consistent, stopping adjusting the volume of the earphone, if inconsistent, continuing to adjust the volume of the earphone. Wherein, the preset volume adjustment stop level signal is a level signal triggered and generated according to a preset head movement posture, and when the volume of the earphone is being adjusted, if a level signal consistent with the preset volume adjustment stop level signal is detected, it is determined that the volume of the earphone has reached the target adjustment volume, and thus the volume adjustment of the earphone is stopped.
[0053] Among them, the specific implementation process of starting to adjust the volume of the earphone according to the volume adjustment direction corresponding to the level change direction and the volume adjustment rate corresponding to the number of level changes until it is detected that the volume of the earphone reaches the target adjustment volume can refer to the specific implementation process in the above steps S21 to S24, which will not be repeated here.
[0054] The steps of the headphone volume adjustment method include:
[0055] Step C10, detecting a second level signal output by the acceleration sensor;
[0056] Step C20: If the signal amplitude of the second level signal is within a preset second amplitude range, it is determined that the volume of the earphone reaches the target adjustment volume.
[0057] As an example, step C10 to step C20 include: when adjusting the volume of the earphone, if a second level signal output by the acceleration sensor is detected, determining whether the signal amplitude of the second level signal is within a preset second amplitude range, and determining that the signal amplitude of the second level signal is within the preset second amplitude range, then determining that the volume of the earphone reaches the target adjustment volume.
[0058] As an example, the steps of the headphone volume adjustment method also include: when adjusting the volume of the headphone, if a second level signal output by the acceleration sensor is detected, determining whether the signal amplitude of the second level signal is within a preset second amplitude range, then determining whether the second level signal is consistent with a preset volume adjustment stop level signal; if they are consistent, determining that the volume of the headphone reaches the target adjustment volume.
[0059] The embodiment of the present application provides a method for adjusting the volume according to the signal amplitude size, the level change direction and the number of level changes of the level signal, that is, if the signal amplitude of the level signal is within a preset first amplitude range, then according to the level change direction and the corresponding level change number of the level signal, the volume of the earphone starts to be adjusted, and the second level signal output by the acceleration sensor is detected; if the signal amplitude of the second level signal is within the preset second amplitude range, it is determined that the volume of the earphone has reached the target adjustment volume, and it is determined that the volume of the earphone has reached the target adjustment volume, thereby completing the entire process of adjusting the earphone volume. Therefore, during the entire volume adjustment process, the user only needs to change his or her head movement posture, and there is no need to adjust the earphone volume through terminal operation or other earphone operations, thereby improving the convenience of earphone volume adjustment.
[0060] Embodiment 3
[0061] Reference Figure 3 Based on the first and second embodiments of the present application, in another embodiment of the present application, the step of detecting the first level signal output by the acceleration sensor includes:
[0062] Step S11, when it is detected that the crystal in the acceleration sensor is deformed due to the movement of the head of the wearing user, determining the deformation direction and the corresponding continuous deformation times of the crystal;
[0063] Step S12: outputting a corresponding first level signal through the acceleration sensor according to the deformation direction and the number of continuous deformations.
[0064] In the present embodiment, it should be noted that the acceleration sensor may be an angular acceleration sensor or a gravity sensor. When the acceleration sensor on the headset detects the corresponding acceleration as the head of the user wearing the headset moves, the crystal in the acceleration sensor will produce deformations in different directions according to the direction of the acceleration, and the direction of the acceleration is opposite to the direction of the crystal deformation. For example, when the user nods twice quickly (fast down and slow up), the crystal in the acceleration sensor will produce two upward deformations, and when the user raises his head twice quickly (fast up and slow down), the crystal in the acceleration sensor will produce two downward deformations. When the time interval between two adjacent deformations of the crystal is less than the preset time interval, it is determined that the two deformations are both continuous deformations.
[0065] As an example, when the acceleration sensor is a gravity sensor, the volume adjustment mode is turned on and whether the volume of the earphone reaches the target adjustment volume can be determined by detecting whether the user taps a preset area of the earphone. The signal amplitude of the level signal generated by the gravity sensor is within a preset first amplitude range. The volume adjustment at different volume adjustment rates can be achieved by relying on the number of level changes and the direction of the level change of the level signal.
[0066] As an example, when the acceleration sensor is an angular acceleration sensor, the angular acceleration sensor will generate a level signal within a preset first amplitude range and a level signal within a preset second amplitude range, wherein the level signal within the preset first amplitude range can be used to realize volume adjustment at different volume adjustment rates, and the level signal within the preset second amplitude range can be used to realize the activation of the volume adjustment mode and the determination of whether the volume of the earphone reaches the target adjustment volume. For example, assuming that when the user has head movement in the up and down directions, a level signal within the preset first amplitude range is generated. Therefore, the level signal within the preset first amplitude range can be used to detect the user's head movement posture in the up and down directions, so as to start volume adjustment at different volume adjustment rates according to the detected current head movement posture; when the user has head movement in the left and right directions, a level signal within the preset second amplitude range is generated. Therefore, the level signal within the preset second amplitude range can be used to detect the user's head movement posture in the left and right directions, so as to determine whether to turn on the volume adjustment mode or to determine whether the volume of the earphone reaches the target adjustment volume according to the detected current head movement posture.
[0067] As an example, steps S11 to S12 include: when it is detected that the crystal in the acceleration sensor is deformed due to movement of the head of the wearing user, determining the deformation direction and the corresponding number of continuous deformations corresponding to the crystal; according to the correlation between the deformation direction and the level change direction, determining the level change direction corresponding to the deformation direction, and according to the correlation between the continuous deformation number and the level change number, determining the number of level changes corresponding to the continuous deformation number; based on the level change direction and the level change number, generating and outputting a corresponding first level signal through the acceleration sensor.
[0068] As an example, steps S21 to S22 include: when it is detected that the crystal in the acceleration sensor is deformed due to movement of the head of the wearing user, determining the deformation direction and the corresponding number of continuous deformations of the crystal; determining the level change direction and the corresponding target signal amplitude corresponding to the deformation direction according to the correlation between the deformation direction and the level change direction and the correlation between the deformation direction and the level signal amplitude, and determining the number of level changes corresponding to the number of continuous deformations according to the correlation between the number of continuous deformations and the number of level changes; generating and outputting a corresponding first level signal through the acceleration sensor based on the level change direction, the number of level changes and the target signal amplitude.
[0069] Wherein, the step of outputting a corresponding first level signal through the acceleration sensor according to the deformation direction and the number of continuous deformations includes:
[0070] Step S121, if the deformation direction is downward, outputting a corresponding number of increased level signals as the first level signal through the acceleration sensor according to the number of continuous deformations, wherein the signal amplitude of the first level signal is within a preset first amplitude range;
[0071] Step S122, if the deformation direction is upward, outputting a corresponding number of reduced level signals as the first level signals through the acceleration sensor according to the number of continuous deformations, wherein the signal amplitude of the first level signal is within a preset first amplitude range;
[0072] Step S123, if the deformation direction is leftward, outputting a corresponding number of increased level signals as the first level signal through the acceleration sensor according to the number of continuous deformations, wherein the signal amplitude of the first level signal is within a preset second amplitude range;
[0073] Step S124: if the deformation direction is rightward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of reduced level signals as the first level signals, wherein the signal amplitude of the first level signal is within a preset second amplitude range.
[0074] As an example, the acceleration sensor is an angular acceleration sensor, and steps S121 to S124 include: if the deformation direction is downward, the angular acceleration sensor outputs a level signal of an increase in the number of levels corresponding to the continuous deformation times as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range; if the deformation direction is upward, the angular acceleration sensor outputs a level signal of a decrease in the number of levels corresponding to the continuous deformation times as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range; if the deformation direction is leftward, the angular acceleration sensor outputs a level signal of an increase in the number of levels corresponding to the continuous deformation times as the first level signal, wherein the signal amplitude of the first level signal is within a preset second amplitude range; if the deformation direction is rightward, the angular acceleration sensor outputs a level signal of a decrease in the number of levels corresponding to the continuous deformation times as the first level signal, wherein the signal amplitude of the first level signal is within a preset second amplitude range.
[0075] Wherein, the acceleration sensor is a gravity sensor, and the acceleration sensor includes a gravity sensor. The step of outputting a corresponding first level signal through the acceleration sensor according to the deformation direction and the number of continuous deformations includes:
[0076] Step D10, if the deformation direction is downward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of increased level signals as the first level signal;
[0077] Step D20: If the deformation direction is upward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of reduced level signals as the first level signal.
[0078] As an example, step D10 to step D20 include: if the deformation direction is downward, the gravity sensor outputs a level signal of an increase in the number of levels corresponding to the number of continuous deformations as the first level signal; if the deformation direction is upward, the gravity sensor outputs a level signal of a decrease in the number of levels corresponding to the number of continuous deformations as the first level signal. Thus, the purpose of generating different level signals by measuring the head movement posture of the user wearing the headset through the gravity sensor is achieved, and the volume of the headset can be adjusted according to the level change direction and level change number of different level signals.
[0079] An embodiment of the present application provides a method for generating a level signal, that is, when it is detected that the crystal in the acceleration sensor is deformed due to the movement of the head of the wearing user, the corresponding deformation direction and the corresponding number of continuous deformations of the crystal are determined; according to the deformation direction and the number of continuous deformations, the corresponding first level signal is output by the acceleration sensor. The embodiment of the present application realizes generating different corresponding level signals according to the crystal deformation direction and the corresponding number of continuous crystal deformations corresponding to different head movement postures of the wearer, that is, it realizes generating different level signals according to different head movement postures of the wearer, so that the volume of the earphone can be adjusted accordingly according to the different level signals, that is, the volume of the earphone is adjusted according to the level change direction and the corresponding number of level changes corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change number is used to control the volume adjustment rate of the earphone volume, thereby achieving the purpose of controlling the volume of the earphone according to the user's head movement posture, and the user can adjust the volume of the earphone without operating on the terminal device, in order to overcome the technical defect in the prior art that when the terminal device is not with the user, the user usually needs to find the terminal device to adjust the volume of the Bluetooth headset, so this volume adjustment operation process is cumbersome and the convenience for the user is low.
[0080] Embodiment 4
[0081] The present application also provides an earphone volume adjustment device, which is applied to an earphone, wherein the earphone is provided with an acceleration sensor, and the earphone volume adjustment device comprises:
[0082] A detection module, configured to detect a first level signal output by the acceleration sensor after detecting that the headset is in a volume adjustment mode, wherein the acceleration sensor is configured to generate a corresponding level signal by detecting a head movement posture of a user wearing the headset;
[0083] The volume adjustment module is used to adjust the volume of the earphone according to the level change direction and the corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change number is used to control the volume adjustment rate of the earphone volume.
[0084] Optionally, the volume adjustment module is further used for:
[0085] Acquiring the signal amplitude of the first level signal;
[0086] If the signal amplitude of the first level signal is within a preset first amplitude range, the volume of the earphone is adjusted according to the level change direction and the corresponding level change times corresponding to the first level signal.
[0087] Optionally, the volume adjustment module is further used for:
[0088] If the level change direction is an increasing direction and the level change number is a preset first change number, the volume of the earphone starts to be increased at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0089] If the level change direction is an increasing direction and the level change number is a preset second change number, start to increase the volume of the earphone at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0090] If the level change direction is a decreasing direction and the level change number is a preset first change number, the volume of the earphone starts to be reduced at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume;
[0091] If the level change direction is a decreasing direction and the level change number is a preset second change number, the volume of the earphone starts to be reduced at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume.
[0092] Optionally, the headphone volume adjustment device is further used for:
[0093] Detecting a second level signal output by the acceleration sensor;
[0094] If the signal amplitude of the second level signal is within the preset second amplitude range, it is determined that the volume of the earphone reaches the target adjustment volume.
[0095] Optionally, the detection module is further used for:
[0096] When it is detected that the crystal in the acceleration sensor is deformed due to the movement of the head of the user wearing the device, determining the deformation direction and the number of continuous deformations corresponding to the crystal;
[0097] According to the deformation direction and the number of continuous deformations, a corresponding first level signal is outputted through the acceleration sensor.
[0098] Optionally, the detection module is further used for:
[0099] If the deformation direction is downward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of increased level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range;
[0100] If the deformation direction is upward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of reduced level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range;
[0101] If the deformation direction is leftward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of increased level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset second amplitude range;
[0102] If the deformation direction is rightward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of reduced level signals as the first level signals, wherein the signal amplitude of the first level signal is within a preset second amplitude range.
[0103] Optionally, the acceleration sensor includes a gravity sensor, and the detection module is further used for:
[0104] If the deformation direction is downward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of increased level signals as the first level signal;
[0105] If the deformation direction is upward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of reduced level signals as the first level signal.
[0106] Optionally, the headphone volume adjustment device is further used for:
[0107] Detecting a third level signal output by the acceleration sensor;
[0108] According to the third level signal, determining whether the head movement posture of the user wearing the headset meets the preset head movement posture;
[0109] If yes, the volume adjustment mode of the headset is turned on.
[0110] The headphone volume adjustment device provided by the present application adopts the headphone volume adjustment method in the above embodiment to solve the technical problem of low convenience of headphone volume adjustment. Compared with the prior art, the beneficial effects of the headphone volume adjustment device provided by the embodiment of the present application are the same as the beneficial effects of the headphone volume adjustment method provided by the above embodiment, and other technical features in the headphone volume adjustment device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0111] Embodiment 5
[0112] An embodiment of the present application provides an electronic device, which may be an earphone or a terminal device carrying an earphone, and the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the earphone volume adjustment method in the above-mentioned embodiment 1.
[0113] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0114] like Figure 4 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0115] Typically, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0116] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0117] The electronic device provided by the present application adopts the headphone volume adjustment method in the above embodiment to solve the technical problem of low convenience of headphone volume adjustment. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present application are the same as the beneficial effects of the headphone volume adjustment method provided by the above embodiment 1, and other technical features in the electronic device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0118] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0120] Embodiment 6
[0121] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the headphone volume adjustment method in the above-mentioned embodiment 1.
[0122] The computer-readable storage medium provided in the embodiment of the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a system or a device or used in combination with it. The program code contained on the computer-readable storage medium can be transmitted with any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0123] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0124] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: after detecting that the volume adjustment mode of the headset is turned on, detects the first level signal output by the acceleration sensor, wherein the acceleration sensor is used to generate a corresponding level signal by detecting the head movement posture of the user wearing the headset; and adjusts the volume of the headset according to the level change direction and the corresponding level change number corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the headset volume, and the level change number is used to control the volume adjustment rate of the headset volume.
[0125] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0127] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0128] The computer-readable storage medium provided by the present application stores computer-readable program instructions for executing the above-mentioned headphone volume adjustment method, which solves the technical problem of low convenience in adjusting the headphone volume. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the headphone volume adjustment method provided in the above-mentioned embodiment, and will not be described in detail here.
[0129] Embodiment 7
[0130] The present application also provides a computer program product, including a computer program, which implements the steps of the headphone volume adjustment method as described above when the computer program is executed by a processor.
[0131] The computer program product provided by the present application solves the technical problem of low convenience in adjusting the volume of headphones. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the headphone volume adjustment method provided by the above embodiment, which will not be repeated here.
[0132] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A method for adjusting the volume of an earphone, characterized in that: Applied to earphones, the earphones are provided with an acceleration sensor, and the earphone volume adjustment method comprises: After detecting that the headset is in volume adjustment mode, detecting a first level signal output by the acceleration sensor, wherein the acceleration sensor is used to generate a corresponding level signal by detecting a head movement posture of a user wearing the headset; adjusting the volume of the earphone according to the level change direction and the corresponding level change times corresponding to the first level signal, wherein the level change direction is used to control the volume adjustment direction of the earphone volume, and the level change times is used to control the volume adjustment rate of the earphone volume; Wherein, before the step of detecting the first level signal output by the acceleration sensor after detecting that the headset turns on the volume adjustment mode, the method further includes: Detecting a third level signal output by the acceleration sensor; Determining whether the third level signal is consistent with a preset mode start-up level signal, wherein the step of determining whether the third level signal is consistent with the preset mode start-up level signal comprises: determining whether the number of level changes of the third level signal is consistent with the number of preset target level changes, determining whether the level change direction of the third level signal is consistent with the preset target level change direction, and determining whether the signal amplitude of the third level signal is within a preset signal amplitude range; If they are consistent, it is determined that the head movement posture of the user wearing the headset meets the preset head movement posture, and the volume adjustment mode of the headset is turned on; If they are inconsistent, it is determined that the head posture of the user wearing the headset does not conform to the preset head movement posture, and the volume adjustment mode of the headset is not turned on.
2. The headphone volume adjustment method according to claim 1, characterized in that: The step of adjusting the volume of the earphone according to the level change direction and the corresponding level change times corresponding to the first level signal comprises: Acquiring the signal amplitude of the first level signal; If the signal amplitude of the first level signal is within a preset first amplitude range, the volume of the earphone is adjusted according to the level change direction and the corresponding level change times corresponding to the first level signal.
3. The headphone volume adjustment method according to claim 1 or 2, characterized in that: The step of adjusting the volume of the earphone according to the level change direction and the corresponding level change times corresponding to the first level signal comprises: If the level change direction is an increasing direction and the level change number is a preset first change number, the volume of the earphone starts to be increased at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume; If the level change direction is an increasing direction and the level change number is a preset second change number, start to increase the volume of the earphone at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume; If the level change direction is a decreasing direction and the level change number is a preset first change number, the volume of the earphone starts to be reduced at a preset first volume adjustment rate until the volume of the earphone reaches a target adjustment volume; If the level change direction is a decreasing direction and the level change number is a preset second change number, the volume of the earphone starts to be reduced at a preset second volume adjustment rate until the volume of the earphone reaches a target adjustment volume.
4. The headphone volume adjustment method according to claim 3, characterized in that: The headphone volume adjustment method further includes: Detecting a second level signal output by the acceleration sensor; If the signal amplitude of the second level signal is within the preset second amplitude range, it is determined that the volume of the earphone reaches the target adjustment volume.
5. The headphone volume adjustment method according to claim 1, wherein: The step of detecting the first level signal output by the acceleration sensor comprises: When it is detected that the crystal in the acceleration sensor is deformed due to the movement of the head of the user wearing the device, determining the deformation direction and the number of continuous deformations corresponding to the crystal; According to the deformation direction and the number of continuous deformations, a corresponding first level signal is outputted through the acceleration sensor.
6. The headphone volume adjustment method according to claim 5, characterized in that: The step of outputting a corresponding first level signal through the acceleration sensor according to the deformation direction and the number of continuous deformations comprises: If the deformation direction is downward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of increased level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range; If the deformation direction is upward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of reduced level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset first amplitude range; If the deformation direction is leftward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of increased level signals as the first level signal, wherein the signal amplitude of the first level signal is within a preset second amplitude range; If the deformation direction is rightward, then according to the number of continuous deformations, the acceleration sensor outputs a corresponding number of reduced level signals as the first level signals, wherein the signal amplitude of the first level signal is within a preset second amplitude range.
7. The headphone volume adjustment method according to claim 5, characterized in that: The acceleration sensor includes a gravity sensor, and the step of outputting a corresponding first level signal through the acceleration sensor according to the deformation direction and the number of continuous deformations includes: If the deformation direction is downward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of increased level signals as the first level signal; If the deformation direction is upward, then according to the number of continuous deformations, the gravity sensor outputs a corresponding number of reduced level signals as the first level signal.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the headphone volume adjustment method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for implementing the headphone volume adjustment method, and the program for implementing the headphone volume adjustment method is executed by a processor to implement the steps of the headphone volume adjustment method according to any one of claims 1 to 7.
