Music pillow loudspeaker volume adaptive adjustment method, music pillow, equipment and medium
By establishing a multi-factor loudness relationship related to music pillows, the speaker volume is automatically adjusted to maintain the consistency of loudness, which solves the problem of unstable loudness caused by changes in the human body position or environment, and improves the sleep aid effect.
Patent Information
- Application Number
- CN202411903669.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-25
AI Technical Summary
The existing music pillow is in a sleep aid scene. The speaker volume changes due to changes in the human head position or orientation, background noise or sleep aid tracks, resulting in unstable loudness and affecting the sleeping process.
By establishing the relationship between comfortable sleep aid music loudness and speaker volume, the distance between the user's left and right ears and speakers, ambient noise, the frequency of sleep aid music and the user's sleep phase, detect changes in these factors and automatically adjust the speaker volume to maintain comfortable sleep aid music loudness.
It realizes that when the user's head position, ambient noise or sleep aid track changes, the speaker volume is automatically adjusted to maintain the consistency of loudness, thereby improving the sleep aid effect of the music pillow.
Smart Images

Figure CN119893399A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of music pillows, and in particular relates to a method for adaptively adjusting the volume of a music pillow speaker, a music pillow, a device and a medium. Background Art
[0002] The music pillow is a new type of healthy pillow. It has a speaker that can help people fall asleep comfortably while listening to music.
[0003] However, when using a music pillow in a sleep-aiding scenario, the prior art has the following shortcomings: turning over during sleep is a common phenomenon. When the user changes the position and / or orientation of the head on the music pillow, the loudness perceived by both ears may be different (sudden increase or decrease) due to the fixed speaker and the movement of the human body, thereby causing attention diversion and deviation, affecting the sleep process.
[0004] Especially when the user turns from sleeping on his back to sleeping on his side, the change in gravity on the head causes the loudness perceived by the ear close to the pillow to suddenly increase, while the loudness perceived by the other ear to suddenly drop. This auditory change will cause an increase in the level of arousal and reduce the sleep-aiding effect.
[0005] In addition, when the ambient noise changes or the sleep-aiding music tracks change, it will also affect the loudness perceived by both ears.
[0006] Other notes: Loudness is the human ear's perception of the strength of sound. It describes the loudness of a sound and represents the human ear's subjective perception of the sound. Loudness is closely related to the volume of the speaker (sound pressure level), but the sound will attenuate and change many times between the time the music is emitted from the speaker and the time it is received by the human ear. In the use scenario of the music pillow, the factors affecting the loudness of music are as follows:
[0007] (1) The distance between the human ear and the speaker. The greater the distance, the greater the attenuation. The distance is usually affected by the user's position on the pillow.
[0008] (2) The medium of sound transmission. Different materials absorb sound to different degrees. For example, sponge has a higher sound absorption coefficient, while air has a lower one. This factor is usually affected by the material of the pillow.
[0009] (3) Background noise: The louder the background noise is when music is playing, the lower the loudness of the music perceived by the human ear;
[0010] (4) The frequency of sleep-aiding music. The human ear has different loudness sensitivity values for sounds of different frequencies. The human ear is less sensitive to low-frequency and high-frequency sounds, and requires a higher sound pressure level to achieve the same loudness perception as mid-frequency sounds.
[0011] (5) Sleeping stage. Summary of the invention
[0012] The present invention aims to solve the problem that the volume of the existing music pillow does not change due to changes in the position or orientation of the human head, background noise or sleep-aiding music, and provides a method for adaptively adjusting the volume of a music pillow speaker, so as to reduce the loudness changes felt by the user caused by changes in the head, background noise or sleep-aiding music, and strive to achieve a non-perceptual change in auditory perception, thereby ensuring the sleep-aiding effect of the music pillow. The present invention also provides a music pillow, a computer device and a computer-readable storage medium.
[0013] To achieve the above object, the present invention adopts the following technical solution: a method for adaptively adjusting the volume of a music pillow speaker, the method comprising:
[0014] Step S1, establishing a relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker, and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage;
[0015] Step S2, detecting the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage, adjusting the speaker volume to a subjectively comfortable level, and determining a comfortable sleep-aiding music loudness based on the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage;
[0016] Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage changes, the speaker volume is automatically adjusted to maintain a comfortable loudness of the sleep-aiding music.
[0017] The music pillow speaker volume adaptive adjustment method of the present invention establishes a numerical relationship between the comfortable sleep-aiding music loudness and the speaker volume (the speaker volume is a required influencing variable) and the distance between the user's left and right ears and the speaker, the ambient noise, the frequency of the sleep-aiding music and at least one of the user's sleep stage, and determines the comfortable sleep-aiding music loudness according to the speaker volume and at least one of the distance between the user's left and right ears and the speaker, the ambient noise and the frequency of the sleep-aiding music. When at least one of the distance between the left and right ears and the speaker, the ambient noise and the frequency of the sleep-aiding music changes, the speaker volume is automatically adjusted to maintain the comfortable sleep-aiding music loudness, so that when at least one of the distance between the left and right ears and the speaker (caused by the user's turning over, etc.), the ambient noise (when changing), and the frequency of the sleep-aiding music (when changing) changes, the comfortable sleep-aiding music loudness is still maintained. The adjusted speaker volume is the volume actually emitted by the speaker.
[0018] As an improvement, the method for adaptively adjusting the volume of a music pillow speaker comprises:
[0019] Step S1, establishing a numerical relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0020] Step S2, detecting at least one of the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music, adjusting the speaker volume to a subjectively comfortable level, and determining a comfortable sleep-aiding music loudness based on the speaker volume and at least one of the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0021] Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music changes, the volume of the speaker is automatically adjusted to maintain the loudness of the comfortable sleep-aiding music.
[0022] As an improvement, in step S1, a numerical relationship is established between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music.
[0023] As an improvement, the loudness of comfortable sleep-aiding music is expressed as:
[0024]
[0025] Among them, K is the loudness of comfortable sleep-aiding music, L1 and L2 are the actual sound pressure levels entering the left and right ears after the speaker is attenuated, N1 and N2 are the masking coefficients of ambient noise on the loudness of the user's left and right ears of the music, and M is the user's sensitivity to the loudness of the current sleep-aiding music.
[0026] As an improvement, the actual sound pressure levels L1 and L2 of the speaker entering the left and right ears after attenuation due to distance and pillow material are expressed as:
[0027]
[0028] Among them, V0 is the volume of the speaker when the user is subjectively comfortable, α is the sound absorption coefficient of the pillow material, and the value is between 0 and 1. 0 means no sound absorption at all, and 1 means complete sound absorption. d1 and d2 are the distances from the left and right ears of the user to the speaker respectively.
[0029] Use the following formula to calculate the masking coefficients N1 and N2 of the ambient noise on the loudness of the music in the left and right ears respectively;
[0030] N1=log 10 (L1 / E1)
[0031] N2=log 10 (L2 / E2)
[0032] Among them, L1 and L2 are the actual sound pressure levels of the speakers entering the left and right ears after attenuation by distance and pillow material, and E1 and E2 are the ambient noise entering the left and right ears.
[0033] As an improvement, the following formula is used to calculate the user's loudness sensitivity value M of the current sleep-aiding music;
[0034]
[0035] f0 represents the average frequency or main frequency of the currently playing sleep-aiding music;
[0036] f1 represents the reference low frequency point, ranging from 20 to 250 Hz;
[0037] f2 represents the reference intermediate frequency point, which is between 250-2000Hz;
[0038] f3 represents the reference high frequency point, which is between 2000-20000Hz.
[0039] As an improvement, in step S1, a relationship is established between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the sleep stage of the user;
[0040] In step S2, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage are detected, and the speaker volume is adjusted. The initial speaker volume is determined according to the speaker volume, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage;
[0041] In step S3, when at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage changes, the speaker volume is automatically adjusted to maintain the comfortable loudness of the sleep-aiding music.
[0042] As an improvement, the volume of comfortable sleep-aiding music is set at a certain point or interval.
[0043] A music pillow, comprising:
[0044] A controller, including a relationship correspondence module and a volume adjustment module;
[0045] A distance detection device detects the distance between the user's left and right ears and the speaker and sends it to the controller;
[0046] An environmental noise detection device detects environmental noise and sends it to a controller;
[0047] The speaker is controlled by the controller;
[0048] The player is controlled by the controller;
[0049] The relationship correspondence module is used to establish a relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and at least one of the user's sleep stage;
[0050] The controller is used to determine the loudness of the comfortable sleep-aid music based on the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage, and is used to automatically adjust the speaker volume when at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage changes, so as to maintain the loudness of the comfortable sleep-aid music.
[0051] A computer device includes a processor and a storage medium. The storage medium stores a computer program. When the computer program is executed by the processor, the aforementioned method for adaptively adjusting the volume of a music pillow speaker is implemented.
[0052] A computer-readable storage medium stores a computer program, which, when executed, implements the aforementioned method for adaptively adjusting the volume of a music pillow speaker. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of a method for adaptively adjusting the volume of a music pillow speaker according to a first embodiment of the present invention.
[0054] Figure 2 It is a schematic diagram of the state of the human body when using a music pillow.
[0055] Figure 3 It is a structural schematic diagram of a music pillow according to Embodiment 1 of the present invention.
[0056] Figure 4 It is a structural block diagram of a music pillow according to Embodiment 1 of the present invention.
[0057] Figure 5 4 is a flow chart of a method for adaptively adjusting the volume of a music pillow speaker according to a second embodiment of the present invention.
[0058] In the figure, 1. Controller;
[0059] 2. Pillowcase;
[0060] 3. Pillow core;
[0061] 4. Speaker;
[0062] 5. Microphone. DETAILED DESCRIPTION
[0063] The technical solutions of the embodiments of the present invention are explained and described below, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0064] See also Figures 1 to 5 , a method for adaptively adjusting the volume of a music pillow speaker according to an embodiment of the present invention, the method for adaptively adjusting the volume of a music pillow speaker comprising:
[0065] Step S1, establishing a numerical relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0066] Step S2, detecting at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music, adjusting the volume of the speaker, and determining a comfortable loudness of the sleep-aiding music according to the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0067] Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music changes, the volume of the speaker is automatically adjusted to maintain the loudness of the comfortable sleep-aiding music.
[0068] The method for adaptively adjusting the volume of a music pillow speaker in an embodiment of the present invention automatically adjusts the speaker volume when at least one of the distance between the left and right ears and the speaker (caused by actions such as the user turning over), the ambient noise (when changed), and the frequency of the sleep-aid music (when changed) changes, so as to maintain the loudness of the comfortable sleep-aid music.
[0069] Embodiment 1
[0070] See also Figures 1 to 4 , a method for adaptively adjusting the volume of a music pillow speaker according to a first embodiment of the present invention, the method for adaptively adjusting the volume of a music pillow speaker comprising:
[0071] Step S1, establishing a numerical relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0072] Step S2, detecting at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music, adjusting the volume of the speaker, and determining a comfortable loudness of the sleep-aiding music according to the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music;
[0073] Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music changes, the volume of the speaker is automatically adjusted to maintain the loudness of the comfortable sleep-aiding music.
[0074] See also Figure 2 ,The human body lies on a pillow, and the distance between the human ear and the speaker will affect the subjective loudness.
[0075] In this embodiment, in step S1, a numerical relationship is established between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music.
[0076] In this embodiment, in step S2, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music are detected, the speaker volume is adjusted, and the comfortable loudness of the sleep-aiding music is determined based on the speaker volume and the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music.
[0077] In other embodiments, in addition to considering the volume of the speaker, only the relationship between the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the loudness of the comfortable sleep-aiding music may be considered.
[0078] In this embodiment, the loudness of the comfortable sleep-aiding music is expressed as:
[0079]
[0080] Among them, K is the loudness of comfortable sleep-aiding music, L1 and L2 are the actual sound pressure levels entering the left and right ears after the speaker is attenuated, N1 and N2 are the masking coefficients of ambient noise on the loudness of the music in the left and right ears of the user, and M is the user's sensitivity to the loudness of the current sleep-aiding music. L1 and L2 are closely related to the speaker volume.
[0081] In this embodiment, the actual sound pressure levels L1 and L2 of the speaker entering the left and right ears after attenuation due to distance and pillow material are expressed as:
[0082]
[0083] Among them, V0 is the volume of the speaker when the user is subjectively comfortable, α is the sound absorption coefficient of the pillow material, and the value is between 0 and 1. 0 means no sound absorption at all, and 1 means complete sound absorption. d1 and d2 are the distances from the left and right ears of the user to the speaker. When there is only one speaker in the pillow (single speaker), d1 and d2 are the distances between the left and right ears and the speaker; when there are two speakers in the pillow (dual speakers), d1 and d2 are the distances between the left and right ears and the speaker closer to them.
[0084] In this embodiment, the following formulas are used to calculate the masking coefficients N1 and N2 of the ambient noise on the loudness of the music in the left and right ears respectively;
[0085] N1=log 10 (L1 / E1)
[0086] N2=log 10 (L2 / E2)
[0087] Among them, L1 and L2 are the actual sound pressure levels of the speaker entering the left and right ears after attenuation by the distance and the pillow material, and E1 and E2 are the environmental noise entering the left and right ears. When obtaining the environmental noise E1 and E2 entering the left and right ears, the environmental noise detection device can be set in the pillowcase or outside the pillowcase.
[0088] In this embodiment, the following formula is used to calculate the loudness sensitivity value M of the user to the current sleep-aiding music:
[0089]
[0090] f0 represents the average frequency or main frequency of the currently playing sleep-aiding music (automatically obtained according to the sleep-aiding music);
[0091] f1 represents the reference low frequency point, ranging from 20 to 250 Hz;
[0092] f2 represents the reference intermediate frequency point, which is between 250-2000Hz;
[0093] f3 represents the reference high frequency point, which is between 2000-20000Hz.
[0094] In this embodiment, the loudness of the comfortable sleep-aiding music is a point or an interval.
[0095] The beneficial effect of the music pillow speaker volume adaptive adjustment method of the first embodiment of the present invention is: by establishing a numerical relationship between the loudness of comfortable sleep-aiding music and the speaker volume, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music, and determining the loudness of the comfortable sleep-aiding music according to the speaker volume, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music, when at least one of the distance between the left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music changes, the speaker volume is automatically adjusted to maintain the loudness of the comfortable sleep-aiding music, so that when at least one of the distance between the left and right ears and the speaker (caused by the user's turning over, etc.), the ambient noise (when changed), and the frequency of the sleep-aiding music (when changed) changes, the loudness of the comfortable sleep-aiding music is still maintained.
[0096] See also Figure 3 and Figure 4, a music pillow according to an embodiment of the present invention, the music pillow comprising:
[0097] A controller, including a relationship correspondence module and a volume adjustment module;
[0098] A distance detection device detects the distance between the user's left and right ears and the speaker and sends it to the controller;
[0099] An environmental noise detection device detects environmental noise and sends it to a controller;
[0100] The speaker is controlled by the controller;
[0101] The player is controlled by the controller and has a volume adjustment module;
[0102] The relationship correspondence module is used to establish a relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and at least one of the user's sleep stage;
[0103] The controller is used to determine the loudness of the comfortable sleep-aid music based on the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage, and is used to automatically adjust the speaker volume when at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage changes, so as to maintain the loudness of the comfortable sleep-aid music.
[0104] In this embodiment, the environmental noise detection device is a microphone, and the controller receives the microphone signal and detects the environmental noise according to the microphone signal. After setting the microphone, the user can also control the music pillow by voice to pause, increase the volume, decrease the volume, change songs, etc. The microphone can also obtain the user's breathing information, so that the controller can perform other actions according to the user's breathing information (such as judging the user's sleeping stage).
[0105] In this embodiment, the music pillow includes a pillowcase and a pillow core, a speaker and a microphone are arranged on the pillow core, a controller is arranged outside the pillowcase, and the controller is connected to the speaker and the microphone through a lead, the controller is installed in a control box, and the player is also installed in the control box.
[0106] In other embodiments, the player may not be provided, and after the mobile phone is wirelessly connected to the controller, the sleep-aiding music played in the mobile phone is emitted through the speaker.
[0107] In this embodiment, the distance detection device includes a position sensor and a pressure sensor. The position sensor detects the position of the head on the pillow, and the pressure sensor detects the posture or orientation of the head (the pressure on the pillow is different when lying on your back, side or stomach).
[0108] In other embodiments, the distance between the left and right ears of the user and the speaker may be detected by radar or camera.
[0109] Embodiment 2
[0110] The difference between the method of the second embodiment of the present invention and the method of the first embodiment is that the loudness of the comfortable sleep music is also related to the user's sleeping stage.
[0111] See also Figure 5 , a method for adaptively adjusting the volume of a music pillow speaker according to a second embodiment of the present invention, the method for adaptively adjusting the volume of a music pillow speaker comprising:
[0112] Step S1, establishing a relationship between the loudness of comfortable sleep-aiding music and the volume of a speaker, the distance between the left and right ears of the user and the speaker, ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage;
[0113] Step S2, detecting the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage, and determining the initial speaker volume according to the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage;
[0114] Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage changes, the speaker volume is automatically adjusted to maintain a comfortable loudness of the sleep-aiding music.
[0115] In this embodiment, the initial speaker volume is determined based on all factors including the speaker volume, the distance between the user's left and right ears and the speaker, ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage. The method of this embodiment takes into account the impact of the user's sleep stage on the loudness of the comfortable sleep-aiding music. The user's sleep stage can be inferred based on indicators such as the user's various physiological characteristics. As the user's sleep stage progresses from shallow to deep, the corresponding loudness of the comfortable sleep-aiding music gradually decreases.
[0116] An embodiment of the present invention also provides a computer device, including a processor and a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the aforementioned method for adaptively adjusting the volume of a music pillow speaker is implemented.
[0117] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the aforementioned method for adaptively adjusting the volume of a music pillow speaker is implemented.
[0118] The above is only a specific implementation of the invention, but the protection scope of the invention is not limited thereto. Those skilled in the art should understand that the invention includes but is not limited to the contents described in the above specific implementation. Any modification that does not deviate from the functional and structural principles of the invention will be included in the scope of the claims.
Claims
1. A method for adaptively adjusting the volume of a music pillow speaker, characterized in that: The method for adaptively adjusting the volume of a music pillow speaker comprises: Step S1, establishing a relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker, and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage; Step S2, detecting the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage, adjusting the speaker volume to a subjectively comfortable level, and determining a comfortable sleep-aiding music loudness based on the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage; Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aiding music, and the user's sleep stage changes, the speaker volume is automatically adjusted to maintain a comfortable loudness of the sleep-aiding music.
2. According to claim 1, a method for adaptively adjusting the volume of a music pillow speaker is characterized by: The method for adaptively adjusting the volume of a music pillow speaker comprises: Step S1, establishing a numerical relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, and the frequency of the sleep-aiding music; Step S2, detecting at least one of the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music, adjusting the speaker volume to a subjectively comfortable level, and determining a comfortable sleep-aiding music loudness based on the speaker volume and at least one of the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music; Step S3: When at least one of the distance between the left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music changes, the volume of the speaker is automatically adjusted to maintain the loudness of the comfortable sleep-aiding music.
3. The method for adaptively adjusting the volume of a music pillow speaker according to claim 2, characterized in that: In step S1, a numerical relationship is established between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music; In step S2, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music are detected, and the speaker volume is adjusted to a subjectively comfortable level. The comfortable loudness of the sleep-aiding music is determined based on the speaker volume, the distance between the user's left and right ears and the speaker, the ambient noise, and the frequency of the sleep-aiding music.
4. The method for adaptively adjusting the volume of a music pillow speaker according to claim 3, characterized in that: The loudness of comfortable sleep-aiding music is expressed as: Among them, K is the loudness of comfortable sleep-aiding music, L1 and L2 are the actual sound pressure levels entering the left and right ears after the speaker is attenuated, N1 and N2 are the masking coefficients of ambient noise on the loudness of the user's left and right ears of the music, and M is the user's sensitivity to the loudness of the current sleep-aiding music.
5. The method for adaptively adjusting the volume of a music pillow speaker according to claim 4, characterized in that: The actual sound pressure levels L1 and L2 of the speaker entering the left and right ears after attenuation due to distance and pillow material are expressed as: Among them, V0 is the volume of the speaker when the user is subjectively comfortable, α is the sound absorption coefficient of the pillow material, and the value is between 0 and 1. 0 means no sound absorption at all, and 1 means complete sound absorption. d1 and d2 are the distances from the left and right ears of the user to the speaker respectively. Use the following formula to calculate the masking coefficients N1 and N2 of the ambient noise on the loudness of the music in the left and right ears respectively; Among them, L1 and L2 are the actual sound pressure levels of the speakers entering the left and right ears after attenuation by distance and pillow material, and E1 and E2 are the ambient noise entering the left and right ears.
6. The method for adaptively adjusting the volume of a music pillow speaker according to claim 4, characterized in that: Use the following formula to calculate the user's loudness sensitivity value M for the current sleep-aiding music; f0 represents the average frequency or main frequency of the currently playing sleep-aiding music; f1 represents the reference low frequency point, ranging from 20 to 250 Hz; f2 represents the reference intermediate frequency point, which is between 250-2000Hz; f3 represents the reference high frequency point, which is between 2000-20000Hz.
7. The method for adaptively adjusting the volume of a music pillow speaker according to claim 1, characterized in that: The volume of comfortable sleep-aiding music is a point or interval.
8. A music pillow, characterized in that: The music pillow comprises: A controller, including a relationship correspondence module and a volume adjustment module; A distance detection device detects the distance between the user's left and right ears and the speaker and sends it to the controller; An environmental noise detection device detects environmental noise and sends it to a controller; The speaker is controlled by the controller; The player is controlled by the controller; The relationship correspondence module is used to establish a relationship between the loudness of the comfortable sleep-aiding music and the volume of the speaker, the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aiding music, and at least one of the user's sleep stage; The controller is used to determine the loudness of the comfortable sleep-aid music based on the speaker volume and at least one of the distance between the left and right ears of the user and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage, and is used to automatically adjust the speaker volume when at least one of the distance between the left and right ears and the speaker, the ambient noise, the frequency of the sleep-aid music and the user's sleep stage changes, so as to maintain the loudness of the comfortable sleep-aid music.
9. A computer device comprising a processor and a storage medium, wherein the storage medium stores a computer program, wherein: When the computer program is executed by a processor, the method for adaptively adjusting the volume of a music pillow speaker as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a method for adaptively adjusting the volume of a music pillow speaker as described in any one of claims 1 to 7 is implemented.