WO2023024717A1 - 助眠音乐的生成方法及装置 - Google Patents
助眠音乐的生成方法及装置 Download PDFInfo
- Publication number
- WO2023024717A1 WO2023024717A1 PCT/CN2022/104139 CN2022104139W WO2023024717A1 WO 2023024717 A1 WO2023024717 A1 WO 2023024717A1 CN 2022104139 W CN2022104139 W CN 2022104139W WO 2023024717 A1 WO2023024717 A1 WO 2023024717A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sleep
- music
- aid
- spectrums
- spectrum
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M21/00—Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
- A61M21/02—Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis for inducing sleep or relaxation, e.g. by direct nerve stimulation, hypnosis, analgesia
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/02—Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
- A61B5/021—Measuring pressure in heart or blood vessels
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/02—Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
- A61B5/024—Measuring pulse rate or heart rate
- A61B5/02438—Measuring pulse rate or heart rate with portable devices, e.g. worn by the patient
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/103—Measuring devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
- A61B5/11—Measuring movement of the entire body or parts thereof, e.g. head or hand tremor or mobility of a limb
- A61B5/1104—Measuring movement of the entire body or parts thereof, e.g. head or hand tremor or mobility of a limb induced by stimuli or drugs
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/103—Measuring devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
- A61B5/11—Measuring movement of the entire body or parts thereof, e.g. head or hand tremor or mobility of a limb
- A61B5/1116—Determining posture transitions
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/48—Other medical applications
- A61B5/4806—Sleep evaluation
- A61B5/4809—Sleep detection, i.e. determining whether a subject is asleep or not
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/48—Other medical applications
- A61B5/4806—Sleep evaluation
- A61B5/4812—Detecting sleep stages or cycles
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/48—Other medical applications
- A61B5/4836—Diagnosis combined with treatment in closed-loop systems or methods
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/68—Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
- A61B5/6801—Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient specially adapted to be attached to or worn on the body surface
- A61B5/6802—Sensor mounted on worn items
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H20/00—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
- G16H20/70—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to mental therapies, e.g. psychological therapy or autogenous training
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/20—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M21/00—Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
- A61M2021/0005—Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus
- A61M2021/0027—Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus by the hearing sense
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M2205/00—General characteristics of the apparatus
- A61M2205/33—Controlling, regulating or measuring
- A61M2205/3303—Using a biosensor
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M2205/00—General characteristics of the apparatus
- A61M2205/50—General characteristics of the apparatus with microprocessors or computers
- A61M2205/502—User interfaces, e.g. screens or keyboards
- A61M2205/505—Touch-screens; Virtual keyboard or keypads; Virtual buttons; Soft keys; Mouse touches
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M2230/00—Measuring parameters of the user
- A61M2230/04—Heartbeat characteristics, e.g. ECG, blood pressure modulation
- A61M2230/06—Heartbeat rate only
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M2230/00—Measuring parameters of the user
- A61M2230/40—Respiratory characteristics
- A61M2230/42—Rate
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61M—DEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
- A61M2230/00—Measuring parameters of the user
- A61M2230/63—Motion, e.g. physical activity
Definitions
- the present disclosure relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for generating sleep aid music.
- sleep is also closely related to improving immunity and the ability to resist diseases.
- Good immunity comes from high-quality sleep.
- music is easy to obtain and accepted by people, and has now become a mainstream means of sleep aid.
- Music-based sleep aids belong to the category of psychological intervention, and its purpose is to decompress and obtain physical and mental relaxation, so as to achieve the effect of sleep aid.
- the present disclosure provides a method, device, equipment and storage medium for generating sleep aid music.
- a method for generating sleep aid music including:
- sleep-helping music is generated.
- the acquisition of multiple sleep-aid music spectrums includes:
- the n reference music spectrums whose corresponding sleep-helping values are greater than the first threshold are determined as sleep-helping music spectrums, where m is greater than n, and n is a natural number greater than 1.
- the genetic algorithm is used to process the plurality of sleep-aiding music spectrums to obtain a sleep-aiding music spectrum chain, including:
- genetic algorithm is used to process the multiple sleep aid music spectrums to obtain the sleep aid music spectrum chains.
- the sleep-aid values corresponding to the multiple sleep-aid music spectrums are processed using a genetic algorithm to obtain the sleep-aid music spectrum chains, including:
- the sleep aid values corresponding to the multiple sleep aid music spectrums select the target sleep aid music spectrum to be processed from the multiple sleep aid music spectrums;
- the target sub-sleep-aid music spectrum is to determine the sleep-aid music spectrum chain.
- the method for generating the sleep-helping music further includes:
- the sleep state determine the sleep aid value of the sleep aid music spectrum for generating the sleep aid music
- the sleep-helping music spectrum that generates any sleep-helping music is removed from the multiple sleep-helping music spectrums to obtain updated multiple sleep-helping music Music Spectrum.
- the acquisition of the sleep state of the user includes:
- the physiological parameters include at least one of the following parameters: number of tossings, heart rate, blood pressure, respiration rate, head movement frequency;
- the sleep state of the user is determined.
- a device for generating sleep aid music including:
- the first acquisition module is used to acquire multiple frequency spectrums of sleep aid music
- the second acquisition module is used to process the plurality of sleep-aid music spectrums by using a genetic algorithm to acquire a sleep-aid music spectrum chain;
- the first generating module is configured to generate sleep-helping music according to the spectrum chain of sleep-helping music.
- the first acquisition module is specifically used for:
- the n reference music spectrums whose corresponding sleep-helping values are greater than the first threshold are determined as sleep-helping music spectrums, where m is greater than n, and n is a natural number greater than 1.
- the second acquisition module includes:
- the processing unit is configured to use a genetic algorithm to process the multiple sleep-aid music spectrums based on the sleep-aid values corresponding to the multiple sleep-aid music spectrums, so as to obtain a sleep-aid audio frequency spectrum chain.
- the processing unit is specifically configured to:
- the sleep aid values corresponding to the multiple sleep aid music spectrums select the target sleep aid music spectrum to be processed from the multiple sleep aid music spectrums;
- the target sub-sleep-aid music spectrum is to determine the sleep-aid music spectrum chain.
- the first generation module includes:
- a first acquiring unit configured to acquire the sleep state of the user during the playing of the sleep-aiding music
- a first generating unit configured to determine a sleep-helping value of a sleep-helping music spectrum for generating the sleep-helping music according to the sleep state
- the second generating unit is configured to remove the sleep-helping music spectrum for generating the sleep-helping music from the plurality of sleep-helping music spectrums when the sleep-helping value of any sleep-helping music is less than a second threshold, so as to obtain Updated spectrum of multiple sleep aids.
- the first acquisition unit is specifically configured to:
- the physiological parameters include at least one of the following parameters: number of tossings, heart rate, blood pressure, respiration rate, head movement frequency;
- the sleep state of the user is determined.
- an electronic device including:
- 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 method described in the above one aspect embodiment.
- a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, and the computer instructions are used to enable the computer to execute the above-mentioned embodiment of the first aspect.
- a computer program product including a computer program, when the computer program is executed by a processor, the method described in the above one embodiment is implemented.
- a plurality of sleep-aid music spectrums are obtained first, and then the multiple sleep-aid music spectrums are processed using a genetic algorithm to obtain a sleep-aid music spectrum chain, and then sleep-aid music is generated according to the sleep-aid music spectrum chain. Therefore, the frequency spectrum of the sleep aid music can be used as the genetic material, and the genetic algorithm can be used to generate the sleep aid music, thereby not only ensuring the effect and reliability of the sleep aid music, but also reducing the cost of the sleep aid music.
- multiple reference music spectra are obtained first, and each reference music spectrum is identified by using the recognition model generated by training to determine the sleep aid value corresponding to each reference music spectrum, and then the multiple reference music
- the reference music spectrum whose sleep-aid value is greater than the first threshold is determined as the sleep-aid music spectrum
- the multiple sleep-aid music spectrums are performed using a genetic algorithm. processing to obtain sleep aid audio spectrum chain, and finally generate sleep aid music according to the sleep aid music spectrum chain. Therefore, by using the music spectrum with a high sleep-helping value as the genetic material, the genetic algorithm is used to generate the sleep-helping music, thereby further improving the effect and reliability of the generated sleep-helping music.
- multiple sleep-aid music spectrums are obtained first, and then genetic algorithms are used to process the multiple sleep-aid music spectrums to obtain sleep-aid music spectrum chains, and then the sleep-aid music spectrum chains are used to generate sleep-aid music spectrum chains.
- Sleep music wherein, in the process of playing sleep-aid music, the sleep state parameters of the user are obtained, and according to the sleep state parameters, the sleep-aid value of the sleep-aid music spectrum for generating the sleep-aid music is determined, and then the sleep-aid value of any sleep-aid music
- the sleep-aid music spectrum that generates any sleep-aid music is removed from multiple sleep-aid music spectrums to obtain updated multiple sleep-aid music spectrums, and finally based on the updated sleep-aid music spectrum Set, repeatedly execute the above sleep-aid music generation process to generate sleep-aid music corresponding to the user.
- the reliability and effectiveness of sleep-aid music generation can be improved through the feedback of the user's sleep situation, and the user's personalized customization can be realized, and sleep-aid music with better sleep-aid effect can be generated scientifically and reliably.
- Fig. 1 is a schematic flow chart of a method for generating sleep aid music according to the present disclosure
- Fig. 2 is a schematic flowchart of another method for generating sleep-aiding music according to the present disclosure
- Fig. 3 is a schematic flowchart of another method for generating sleep-aiding music according to the present disclosure
- Fig. 4 is a structural block diagram of a device for generating sleep aid music according to the present disclosure
- Fig. 5 is a structural block diagram of an electronic device provided according to the present disclosure.
- the method for generating sleep aid music proposed in this disclosure can be executed by the device for generating sleep aid music provided by this disclosure, and can also be executed by the electronic device provided by this disclosure, where the electronic device can include but not limited to terminal devices such as desktop computers and tablet computers , it can also be a server, and the method for generating sleep-helping music provided by the present disclosure is implemented below with the device for generating sleep-helping music provided by the present disclosure, which is not limited to the present disclosure, and is hereinafter referred to as "device”.
- Fig. 1 is a schematic flowchart of a method for generating sleep aid music according to an embodiment of the present disclosure.
- the method for generating sleep aid music may include the following steps 101 to 103 .
- Step 101 acquiring a plurality of spectrums of sleep aid music.
- Sleep-aid music can help people decompress and obtain physical and mental relaxation by combining sleep-aid melody and music elements, so as to achieve the effect of sleep aid.
- the sleep aid music can be brainwave music, binaural music, music played repeatedly at a fixed frequency, white noise, etc.
- the sleep aid music spectrum refers to any type of music spectrum that has a sleep aid effect and can generate music through combination, mutation and other processing.
- Step 102 using a genetic algorithm to process multiple sleep-aid music spectrums to obtain a sleep-aid music spectrum chain.
- each sleep-aid music spectrum contained in the sleep-aid music spectrum set can be used as the spectrum of the parent generation, and then the spectrum of each parent generation can be processed by a genetic algorithm.
- the spectrum of multiple parents is cross-processed, or the spectrum of any parent is mutated, and then cross-processed with the spectrum of other parents, so as to generate the spectrum of the offspring with sleep-aiding effect chain.
- the crossing can be single-point crossing, multi-point crossing, uniform crossing, arithmetic crossing, etc.
- the variation can be uniform variation, boundary variation, Gaussian approximation variation, etc.
- Step 103 generating sleep-helping music according to the spectrum chain of sleep-helping music.
- inverse Fourier transform may be performed on the spectrum chain of the sleep aid music, so as to realize decoding of the spectrum chain of the sleep aid music, so as to obtain the sleep aid music.
- the method for generating sleep-helping music can also remove noise signals in the sleeping-helping music according to a user-preset frequency.
- a plurality of sleep-aid music spectrums may be obtained first, and then a genetic algorithm may be used to process the multiple sleep-aid music spectrums to obtain a sleep-aid music spectrum chain, and then generate a sleep-aid music spectrum chain according to the sleep-aid music spectrum chain. sleep music. Therefore, the frequency spectrum of the sleep aid music can be used as the genetic material, and the genetic algorithm can be used to generate the sleep aid music, thereby not only ensuring the effect and reliability of the sleep aid music, but also reducing the cost of the sleep aid music.
- Fig. 2 is a schematic flowchart of a method for generating sleep aid music according to yet another embodiment of the present disclosure.
- the method for generating sleep aid music may include the following steps 201 to 205 .
- Step 201 acquire m reference music spectrums.
- m is a natural number greater than 1.
- the reference music spectrum may be obtained by performing certain processing on the original audio data of the reference music.
- the original audio data may be first divided into fixed-length music segments, and then the reference music spectrum corresponding to the music segments may be obtained by Fourier transforming these segments.
- sleep aid music may also contain music fragments with average sleep aid effects
- non-sleep aid music may also contain music fragments with better sleep aid effects, so in order to better provide Users formulate sleep aid music to help users achieve high-quality sleep, and can select various types of reference music from a large amount of audio data in advance, which can be any type of music.
- the reference music spectrum can be a music spectrum including sleep-helping music and non-sleep-helping music, for example, the music spectrum of heavy metal, rock, hip-hop and other non-sleep-helping music and brain wave music, binaural music, fixed-frequency repeating music Music spectrum for sleep aids like music and white noise.
- Step 202 using the recognition model generated by the training, to identify each reference music spectrum, so as to determine the sleep aid value corresponding to each reference music spectrum.
- the recognition model can be obtained by training the marked sleep-aiding music spectrum and the non-sleep-helping music spectrum, and the recognition model generated through training can identify each reference music spectrum.
- the recognition model can adopt a convolutional neural network structure or a recurrent neural network structure.
- the sleep aiding effect of the reference music spectrum can be determined through the recognition of the recognition model.
- the output of the neurons in the last layer of the recognition model can be used as the sleep aid value, and the sleep aid effect of the sleep aid music spectrum can be represented by the sleep aid value.
- Step 203 Determine the n reference music spectra whose corresponding sleep aid value is greater than the first threshold among the m reference music spectrums as the sleep aid music spectrum, where m is greater than n, and n is a natural number greater than 1.
- the first threshold may be a preset sleep aid threshold. If the sleep aiding value corresponding to any reference music spectrum is greater than the first threshold, it indicates that the sleep aiding effect corresponding to the reference music spectrum is better, and therefore, it can be determined as the sleep aiding music spectrum.
- n there are 4 reference music spectrums, that is, n is 4, they are a, b, c, and d respectively, and the sleep aid values corresponding to a, b, c, and d are 16, 36, 84, and 77 respectively . If the preset first threshold value is 75, then c and d in the reference music spectrum can be determined as the sleep-aiding music spectrum.
- Step 204 based on the sleep aid values corresponding to the multiple sleep aid music spectrums, use the genetic algorithm to process the multiple sleep aid music spectrums to obtain the sleep aid audio frequency spectrum chain.
- the target sleep-aid music spectrum to be processed can be selected from the multiple sleep-aid music spectrums according to the sleep-aid values corresponding to the multiple sleep-aid music spectrums, and then the target sleep-aid music spectrums are cross-calculated respectively and/or mutation operations to generate multiple first-level sleep-aid music spectrums.
- the target sleep aid music spectrum may be a sleep aid music spectrum selected from various sleep aid music spectrums and having a relatively high sleep aid value.
- the genetic and exploration process can be simulated to obtain a first-level sub-sleep-aiding music spectrum that is more suitable for sleep-aiding conditions by performing crossover and/or mutation operations on the target music spectrum.
- crossover can be single-point crossover, multi-point crossover, uniform crossover, arithmetic crossover, etc.
- mutation can be uniform mutation, boundary mutation, Gaussian approximation mutation, etc.
- the target first-level sleep-aid music spectrum can be selected from multiple first-level sleep-aid audio spectrums according to the sleep-aid value corresponding to the first-level sleep-aid audio spectrum, and then based on the target first-level sleep-aid music spectrum, Go back and repeat the crossover operation and/or mutation operation until the number of operations reaches the preset value, and finally determine the sleep-aid music spectrum chain according to the target sleep-aid music spectrum and the generated target sleep-aid music spectrums at all levels.
- the offspring with high fitness and good sleep-aiding effect can be selectively retained through crossover operation and mutation operation, that is, the first-level child sleep-aiding music spectrum.
- the target first-level sub-sleep-aiding music spectrum may be a first-level sub-sleep-aiding music spectrum that more satisfies sleep-aiding requirements.
- the sleep-aid music generation method uses the genetic algorithm to process the sleep-aid music spectrum
- the sleep-aid values corresponding to the multiple sleep-aid music spectrums can be used as the fitness of the music spectrum, so as to pass the genetic algorithm
- the algorithm processes the spectrum of sleep-helping music whose sleep-helping value is higher than the preset sleep-helping threshold. Thereby, the musical attribute of the generated sleep aid music can be made more sleep aid.
- Step 205 generating sleep-helping music according to the spectrum chain of sleep-helping music.
- step 205 reference may be made to the specific implementation process of the above-mentioned embodiment, and the present disclosure does not repeat it here.
- m reference music spectrums are first obtained, and each reference music spectrum is identified by using the recognition model generated by training to determine the sleep aid value corresponding to each reference music spectrum, and then the m reference music spectrums are The n reference music spectrums whose sleep-aiding values are greater than the first threshold are determined as sleep-aiding music spectrums, and then based on the sleep-aiding values corresponding to multiple sleep-aiding music spectrums, the genetic algorithm is used to perform processing to obtain sleep aid audio spectrum chain, and finally generate sleep aid music according to the sleep aid music spectrum chain. Therefore, by using the music spectrum with a high sleep-helping value as the genetic material, the genetic algorithm is used to generate the sleep-helping music, thereby further improving the effect and reliability of the generated sleep-helping music.
- Fig. 3 is a schematic flowchart of a method for generating sleep aid music according to another embodiment of the present disclosure.
- the method for generating sleep aid music may include the following steps 301 to 307 .
- Step 301 acquiring a plurality of spectrums of sleep aid music.
- Step 302 using a genetic algorithm to process multiple sleep-aid music spectrums to obtain a sleep-aid music spectrum chain.
- Step 303 generating sleep-helping music according to the spectrum chain of sleep-helping music.
- Step 304 during the process of playing the sleep aid music, acquire the sleep state parameters of the user.
- a wearable device may be used to collect multiple physiological parameters of the user.
- the physiological parameters include at least one of the following parameters: tossing times, heart rate, blood pressure, respiration rate, and head movement frequency. Then the sleep state parameters of the user can be determined according to a plurality of physiological parameters.
- physiological parameters of the user may be collected through wearable devices, such as watches and wristbands.
- the physiological parameters may be tossing times, heart rate, blood pressure, respiration rate, head movement frequency, and the like.
- the sleep state parameter may be used to characterize the sleep state of the user, for example, deep sleep, deep sleep, light sleep, falling asleep, and the like.
- thresholds of physiological parameters such as tossing times threshold, heart rate threshold, blood pressure threshold, respiration rate threshold, and head movement frequency threshold can be preset, and then the user's physiological parameters are compared with the thresholds of each physiological parameter, so that the user's Sleep state is inferred. For example, if the number of tossing times, head movement frequency, and heart rate are all lower than the preset physiological parameter thresholds when the user is listening to a certain sleep aid music A, it indicates that the current user may be in a deep sleep state.
- the mapping relationship between physiological parameters and sleep state parameters can be set in advance, and then the sleep state parameters of the current user when playing a specific sleep aid music are determined according to the collected physiological parameters.
- the user's sleep parameters can also be determined by monitoring the spatial variation of the user's position and posture when playing sleep-helping music through the wearable device.
- sleep state parameters of the user corresponding to each sleep-helping music may be acquired.
- Step 305 determine the sleep-helping value of the sleep-helping music spectrum for generating sleep-helping music.
- the sleep state parameters it is possible to determine the degree of influence of each sleep aid music on the sleep state of the user, that is, the sleep aid effect.
- sleep state parameters may be input into a pre-trained sleep aid recognition network, thereby determining sleep aid values corresponding to sleep state parameters corresponding to each sleep aid music.
- the sleep aid recognition network can be realized by various deep neural networks (Deep Neural Networks, DNN).
- Step 306 when the sleep-helping value of any sleep-helping music is less than the second threshold, remove the sleep-helping music spectrum that generates any sleep-helping music from the multiple sleep-helping music spectrums, so as to obtain the updated multiple sleep-helping music spectrum.
- the device can judge the efficacy of the sleep-helping music. For example, if the sleep aid value of any sleep aid music is higher than the second threshold, it indicates that the current sleep aid music is a sleep aid music with high adaptability and strong sleep aid ability.
- the sleep-aid music spectrum set can be updated, so as to generate a sleep-aid music spectrum set that is more suitable for users after the update.
- Step 307 based on the updated spectrum set of sleep-helping music, repeatedly execute the above sleep-helping music generating process, so as to generate sleep-helping music corresponding to the user.
- the spectrum set of the sleep aid music can be continuously adapted to the sleep characteristics of the user, so as to realize rapid adaptation and meet the sleep aid demand of the user.
- a plurality of sleep-aid music spectrums are obtained first, and then a genetic algorithm is used to process the multiple sleep-aid music spectrums to obtain a sleep-aid music spectrum chain, and then a sleep-aid music spectrum chain is generated according to the sleep-aid music spectrum chain. music.
- the sleep aid value of the sleep aid music spectrum for generating the sleep aid music is determined, and then the sleep aid value of any sleep aid music is less than the second
- the sleep-aid music spectrum that generates any sleep-aid music is removed from multiple sleep-aid music spectrums to obtain updated multiple sleep-aid music spectrums, and finally based on the updated sleep-aid music spectrum set, repeat Executing the above sleep-aiding music generation process to generate sleep-aiding music corresponding to the user.
- FIG. 4 is a structural block diagram of an apparatus for generating sleep aid music provided by an embodiment of the present disclosure.
- the device for generating sleep aid music includes: a first obtaining module 410 , a second obtaining module 420 , and a first generating module 430 .
- the first acquisition module 410 is configured to acquire a plurality of spectrums of sleep-aiding music.
- the second obtaining module 420 is configured to use a genetic algorithm to process the plurality of sleep-aiding music spectrums to obtain a chain of sleep-aiding music spectrums.
- the first generating module 430 is configured to generate sleep-helping music according to the spectrum chain of sleep-helping music.
- the first obtaining module 410 is specifically configured to:
- the n reference music spectrums whose corresponding sleep-helping values are greater than the first threshold are determined as sleep-helping music spectrums, where m is greater than n, and n is a natural number greater than 1.
- the second obtaining module 420 includes:
- the processing unit is configured to use a genetic algorithm to process the multiple sleep-aid music spectrums based on the sleep-aid values corresponding to the multiple sleep-aid music spectrums, so as to obtain a sleep-aid audio frequency spectrum chain.
- the processing unit is specifically configured to:
- the sleep aid values corresponding to the multiple sleep aid music spectrums select the target sleep aid music spectrum to be processed from the multiple sleep aid music spectrums;
- the music spectrum is used to determine the sleep-aiding music spectrum chain.
- the first generation module 430 includes:
- a first acquiring unit configured to acquire the sleep state of the user during the playing of the sleep-aiding music
- a first generating unit configured to determine a sleep-helping value of a sleep-helping music spectrum for generating the sleep-helping music according to the sleep state
- the second generating unit is configured to remove the sleep-helping music spectrum for generating the sleep-helping music from the plurality of sleep-helping music spectrums when the sleep-helping value of any sleep-helping music is less than a second threshold, so as to obtain Updated spectrum of multiple sleep aids.
- the first acquisition unit is specifically configured to:
- the physiological parameters include at least one of the following parameters: number of tossings, heart rate, blood pressure, respiration rate, head movement frequency;
- the sleep state of the user is determined.
- the device can first acquire multiple sleep-aid music spectra, and then use genetic algorithm to process the multiple sleep-aid music spectrums to obtain sleep-aid music spectrum chains, and then generate sleep-aid music spectrum chains according to the sleep-aid music spectrum chains. sleep music. Therefore, the frequency spectrum of the sleep aid music can be used as the genetic material, and the genetic algorithm can be used to generate the sleep aid music, thereby not only ensuring the effect and reliability of the sleep aid music, but also reducing the cost of the sleep aid music.
- the present disclosure also provides a wearable device, a readable storage medium, and a computer program product.
- FIG. 5 shows a schematic block diagram of an electronic device 500 that can be used to implement embodiments of the present disclosure.
- Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
- Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
- the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
- the device 500 includes a computing unit 501 that can execute according to a computer program stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 into a random-access memory (RAM) 503. Various appropriate actions and treatments. In the RAM 503, various programs and data necessary for the operation of the device 500 can also be stored.
- the computing unit 501, ROM 502, and RAM 503 are connected to each other through a bus 504.
- An input/output (I/O) interface 505 is also connected to the bus 504 .
- the I/O interface 505 includes: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc. ; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, and the like.
- the communication unit 509 allows the device 500 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
- the computing unit 501 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 501 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
- the calculation unit 501 executes various methods and processes described above, for example, a method for generating sleep aid music.
- the method for generating sleep aid music may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508 .
- part or all of the computer program may be loaded and/or installed on the device 500 via the ROM 502 and/or the communication unit 509.
- the computer program When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method for generating sleep aid music described above can be executed.
- the computing unit 501 may be configured in any other appropriate way (for example, by means of firmware) to execute the method for generating sleep aid music.
- Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
- FPGAs field programmable gate arrays
- ASICs application specific integrated circuits
- ASSPs application specific standard products
- SOC system of systems
- CPLD load programmable logic device
- computer hardware firmware, software, and/or combinations thereof.
- programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
- Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
- the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
- a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- CD-ROM compact disk read only memory
- magnetic storage or any suitable combination of the foregoing.
- the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
- a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
- a keyboard and pointing device eg, a mouse or a trackball
- Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
- the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
- the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
- a computer system may include clients and servers.
- Clients and servers are generally remote from each other and typically interact through a communication network.
- the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
- the server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the problem of traditional physical host and VPS service ("Virtual Private Server", or "VPS”) Among them, there are defects such as difficult management and weak business scalability.
- the server can also be a server of a distributed system, or a server combined with a blockchain.
- the device can first acquire multiple sleep-aid music spectra, and then use genetic algorithm to process the multiple sleep-aid music spectrums to obtain sleep-aid music spectrum chains, and then generate sleep-aid music spectrum chains according to the sleep-aid music spectrum chains. sleep music. Therefore, the frequency spectrum of the sleep aid music can be used as the genetic material, and the genetic algorithm can be used to generate the sleep aid music, thereby not only ensuring the effect and reliability of the sleep aid music, but also reducing the cost of the sleep aid music.
- steps may be reordered, added or deleted using the various forms of flow shown above.
- each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Biomedical Technology (AREA)
- Physics & Mathematics (AREA)
- Medical Informatics (AREA)
- Veterinary Medicine (AREA)
- Heart & Thoracic Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Pathology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Surgery (AREA)
- Anesthesiology (AREA)
- Cardiology (AREA)
- Physiology (AREA)
- Psychology (AREA)
- Theoretical Computer Science (AREA)
- Hematology (AREA)
- Acoustics & Sound (AREA)
- Pain & Pain Management (AREA)
- Dentistry (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Epidemiology (AREA)
- Primary Health Care (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Medicinal Chemistry (AREA)
- Developmental Disabilities (AREA)
- Psychiatry (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Vascular Medicine (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Social Psychology (AREA)
Abstract
一种助眠音乐的生成方法、装置、计算机设备及存储介质。助眠音乐的生成方法包括:获取多个助眠音乐频谱(101);利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链(102);根据助眠音乐频谱链,生成助眠音乐(103)。由此,可以将助眠音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而不仅保证了助眠音乐的效果和可靠性,而且降低了助眠音乐的成本。
Description
相关申请的交叉引用
本申请基于申请号为202110984332.8、申请日为2021年08月25日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本公开涉及计算机技术领域,具体涉及一种助眠音乐的生成方法、装置、计算机设备及存储介质。
睡眠除了可以消除疲劳,使人产生新的活力外,还与提高免疫力、抵抗疾病的能力有密切关系,良好免疫源于优质睡眠。音乐作为一种多媒体载体,易获得,易被人所接受,现已成为一种助眠的主流手段。基于音乐的助眠手段属于心理干预的范畴,其目的在于使人减压并且获得身心及精神上的放松,以达到助眠的效果。
相关技术中使用的助眠音乐多是由人工创作的。但是,人工创作的助眠音乐表达的情感带有音乐家的主观色彩,效果及适用范围有限。因而,如何科学有效地实现助眠音乐的生成是当前亟需解决的问题。
发明内容
本公开提供了一种用于助眠音乐的生成方法、装置、设备以及存储介质。
根据本公开的第一方面,提供了一种助眠音乐的生成方法,包括:
获取多个助眠音乐频谱;
利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链;
根据所述助眠音乐频谱链,生成助眠音乐。
在一些实施例中,所述获取多个助眠音乐频谱,包括:
获取m个参考音乐频谱;
利用训练生成的识别模型,对每个所述参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值;
将所述m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
在一些实施例中,所述利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,包括:
基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链。
在一些实施例中,所述基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对所 述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,包括:
根据多个助眠音乐频谱对应的助眠值,从所述多个助眠音乐频谱中选取待处理的目标助眠音乐频谱;
分别将所述目标助眠音乐频谱进行交叉运算和变异运算中的至少一种运算,以生成多个一级子助眠音乐频谱;
根据所述一级子助眠音频频谱对应的助眠值,从所述多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱;
基于所述目标一级子助眠音乐频谱,返回重复执行所述交叉运算和变异运算中的至少一种运算,直至运算次数达到预设值,根据所述目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定所述助眠音乐频谱链。
在一些实施例中,在所述生成助眠音乐之后,所述助眠音乐的生成方法还包括:
在播放所述助眠音乐的过程中,获取用户的睡眠状态;
根据所述睡眠状态,确定生成所述助眠音乐的助眠音乐频谱的助眠值;
在任一助眠音乐的助眠值小于第二阈值的情况下,将生成所述任一助眠音乐的助眠音乐频谱从所述多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
在一些实施例中,所述获取用户的睡眠状态,包括:
获取可穿戴设备采集的所述用户的多个生理参数,其中,所述生理参数包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率;
根据所述多个生理参数,确定所述用户的睡眠状态。
根据本公开的第二方面,提供了一种助眠音乐的生成装置,包括:
第一获取模块,用于获取多个助眠音乐频谱;
第二获取模块,用于利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链;
第一生成模块,用于根据所述助眠音乐频谱链,生成助眠音乐。
在一些实施例中,所述第一获取模块,具体用于:
获取m个参考音乐频谱;
利用训练生成的识别模型,对每个所述参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值;
将所述m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
在一些实施例中,所述第二获取模块,包括:
处理单元,用于基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音频频谱链。
在一些实施例中,所述处理单元,具体用于:
根据多个助眠音乐频谱对应的助眠值,从所述多个助眠音乐频谱中选取待处理的目标助眠音乐频谱;
分别将所述目标助眠音乐频谱进行交叉运算和变异运算中的至少一种运算,以生成多个一级子助眠音乐频谱;
根据所述一级子助眠音频频谱对应的助眠值,从所述多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱;
基于所述目标一级子助眠音乐频谱,返回重复执行所述交叉运算和变异运算中的至少一种运算,直至运算次数达到预设值,根据所述目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定所述助眠音乐频谱链。
在一些实施例中,所述第一生成模块,包括:
第一获取单元,用于在播放所述助眠音乐的过程中,获取用户的睡眠状态;
第一生成单元,用于根据所述睡眠状态,确定生成所述助眠音乐的助眠音乐频谱的助眠值;
第二生成单元,用于在任一助眠音乐的助眠值小于第二阈值的情况下,将生成所述任一助眠音乐的助眠音乐频谱从所述多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
在一些实施例中,所述第一获取单元,具体用于:
获取可穿戴设备采集的所述用户的多个生理参数,其中,所述生理参数包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率;
根据所述多个生理参数,确定所述用户的睡眠状态。
根据本公开的第三方面,提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述一方面实施例所述的方法。
根据本公开的第四方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其上存储有计算机程序,所述计算机指令用于使所述计算机执行上述一方面实施例所述的方法。
根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现上述一方面实施例所述的方法。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
本公开实施例中首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐。由此,可以将助眠音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而不仅保证了助眠音乐的效果和可靠性,而且降低了助眠音乐的成本。
进一步地,本公开实施例中首先获取多个参考音乐频谱,利用训练生成的识别模型,对每个参考音乐频谱进行识别,以确定每个参考音乐频谱对应的助眠值,然后将多个参 考音乐频谱中对应的助眠值大于第一阈值的参考音乐频谱,确定为助眠音乐频谱,之后基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音频频谱链,最后根据助眠音乐频谱链,生成助眠音乐。由此,通过将助眠值较高的音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而进一步提高了生成的助眠音乐的效果和可靠性。
进一步地,本公开实施例中首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐,其中,在播放助眠音乐的过程中,获取用户的睡眠状态参数,根据睡眠状态参数,确定生成助眠音乐的助眠音乐频谱的助眠值,然后在任一助眠音乐的助眠值小于第二阈值的情况下,将生成任一助眠音乐的助眠音乐频谱从多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱,最后基于更新后的助眠音乐频谱集,重复执行上述助眠音乐生成过程,以生成与用户对应的助眠音乐。由此,通过用户的睡眠情况反馈,可以提高助眠音乐生成的可靠性和有效性,实现用户个性化定制,可以科学、可靠的生成助眠效果较好的助眠音乐。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图用于更好地理解本方案,不构成对本公开的限定。其中:
图1是根据本公开提供的一种助眠音乐的生成方法的流程示意图;
图2是根据本公开提供的另一种助眠音乐的生成方法的流程示意图;
图3是根据本公开提供的又一种助眠音乐的生成方法的流程示意图;
图4为根据本公开提供的一种助眠音乐的生成装置的结构框图;
图5为根据本公开提供的电子设备的结构框图。
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
本公开提出的助眠音乐的生成方法可由本公开提供的助眠音乐的生成装置执行,也可以由本公开提供的电子设备执行,其中,电子设备可以包括但不限于台式电脑、平板电脑等终端设备,也可以是服务器,下面以由本公开提供的助眠音乐的生成装置来执行本公开提供的一种助眠音乐的生成方法,而不作为对本公开的限定,以下简称为“装置”。
下面参考附图对本公开提供的助眠音乐的生成方法、装置、计算机设备及存储介质进行详细描述。
图1是根据本公开实施例的助眠音乐的生成方法的流程示意图。
如图1所示,该助眠音乐的生成方法可以包括以下步骤101至步骤103。
步骤101,获取多个助眠音乐频谱。
助眠音乐可以通过结合助眠的旋律和音乐元素,辅助人减压和获得身心放松,从而达到助眠的效果。助眠音乐可以为脑波音乐、双耳音乐、固定频率重复播放的音乐和白噪声等。
其中,助眠音乐频谱是指具有助眠效果、且可以通过组合、变异等处理生成音乐的任意类型的音乐频谱。
步骤102,利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链。
具体来说,在获取助眠音乐频谱集之后,可以将助眠音乐频谱集所包含的各个助眠音乐频谱作为父代的频谱,之后可以将各父代的频谱进行遗传算法处理。比如,将多个父代的频谱进行交叉处理,或者,将任一父代的频谱进行变异处理后,再与其它的父代的频谱进行交叉处理,从而产生具有助眠效果的子代的频谱链。
需要说明的是,交叉和变异的方式可以有很多。交叉可以为单点交叉、多点交叉、均匀交叉、算术交叉等。变异可以为均匀变异、边界变异、高斯近似变异等。
步骤103,根据助眠音乐频谱链,生成助眠音乐。
具体的,对于助眠音乐频谱链,可以将其进行傅里叶反变换,从而实现对助眠音乐频谱链的解码,以得到助眠音乐。
需要说明的是,该助眠音乐的生成方法还可以根据用户预设的频率去除助眠音乐中的噪声信号。
在本公开实施例中,可以首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐。由此,可以将助眠音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而不仅保证了助眠音乐的效果和可靠性,而且降低了助眠音乐的成本。
图2是根据本公开又一实施例的助眠音乐的生成方法的流程示意图。
如图2所示,该助眠音乐的生成方法可以包括以下步骤201至步骤205。
步骤201,获取m个参考音乐频谱。
其中,m为大于1的自然数。
具体的,参考音乐频谱可以是对参考音乐的原始音频数据进行一定处理得到的。比如,对于参考音乐的原始音频数据,可以首先将原始音频数据分割成固定长度的音乐片段,之后通过对这些片段进行傅里叶变换,从而得到音乐片段对应的参考音乐频谱。
需要说明的是,由于助眠音乐中也可能包含助眠效果一般的音乐片段,而非助眠音乐中也可能包含助眠效果较好的音乐片段,因此本公开实施例中为了更好的为用户制定帮助用户实现优质睡眠的助眠音乐,可以预先从海量的音频数据中选取多种类型的参考音乐,其可以为任意类型的音乐。
其中,参考音乐频谱可以为包含有助眠音乐和非助眠音乐的音乐频谱,比如,重金 属、摇滚、嘻哈等非助眠音乐的音乐频谱和脑波音乐、双耳音乐、固定频率重复播放的音乐和白噪声等助眠音乐的音乐频谱。
步骤202,利用训练生成的识别模型,对每个参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值。
其中,识别模型可以由标注的助眠音乐频谱和非助眠音乐频谱训练得到,通过训练生成的识别模型,可以对各个参考音乐频谱进行识别。识别模型可以采用卷积神经网络结构或循环神经网络架构。
具体来说,在将各个参考音乐频谱输入识别模型之后,通过识别模型的识别,可以确定该参考音乐频谱助眠功效。其中,可以将识别模型的最后一层神经元的输出作为助眠值,通过助眠值来表征助眠音乐频谱的助眠效果。
步骤203,将m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
其中,第一阈值可以为预先设定的助眠阈值。若任一参考音乐频谱对应的助眠值大于第一阈值,则说明该参考音乐频谱对应的助眠效果比较好,因而,可以将其确定为助眠音乐频谱。
举例来说,若参考音乐频谱有4个,也即n为4,分别为a、b、c、d,其中a、b、c、d对应的助眠值分别为16、36、84、77。若预设的第一阈值为75,则可以将参考音乐频谱中的c和d确定为助眠音乐频谱。
步骤204,基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音频频谱链。
在一些实施例中,可以首先根据多个助眠音乐频谱对应的助眠值,从多个助眠音乐频谱中选取待处理的目标助眠音乐频谱,之后分别将目标助眠音乐频谱进行交叉运算和/或变异运算,以生成多个一级子助眠音乐频谱。
其中,目标助眠音乐频谱可以为从各个助眠音乐频谱中选中的、助眠值较高的助眠音乐频谱。通过对目标音乐频谱进行交叉运算和/或变异运算可以模拟遗传和探索过程以获得更加满足助眠条件的一级子助眠音乐频谱。需要说明的是,交叉和变异的方式可以有很多,其中,交叉可以为单点交叉、多点交叉、均匀交叉、算术交叉等,变异可以为均匀变异、边界变异、高斯近似变异等。
进一步地,可以根据一级子助眠音频频谱对应的助眠值,从多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱,然后基于目标一级子助眠音乐频谱,返回重复执行所述交叉运算和/或变异运算,直至运算次数达到预设值,最后根据目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定助眠音乐频谱链。
可以理解的是,通过交叉运算和变异运算可以选择性的保留适应度高且助眠效果好的子代,也即一级子助眠音乐频谱。其中,目标一级子助眠音乐频谱可以为更加满足助眠要求的一级子助眠音乐频谱。通过基于目标一级子助眠音乐频谱,返回重复执行所述交叉运算和/或变异运算,可以不断的进行迭代和优选,以获取目标子助眠音乐频谱,进 而获得助眠音乐频谱链。
需要说明的是,该助眠音乐的生成方法在利用遗传算法对助眠音乐频谱进行处理时,可以将多个助眠音乐频谱对应的助眠值作为该音乐频谱的适应度,从而对通过遗传算法对助眠值高于预设助眠阈值的助眠音乐频谱进行处理。由此,可以使生成的助眠音乐的音乐属性更趋于助眠。
步骤205,根据助眠音乐频谱链,生成助眠音乐。
需要说明的是,步骤205的具体实现过程可以参照上述实施例的具体实现过程,本公开在此不进行赘述。
本公开实施例中,首先获取m个参考音乐频谱,利用训练生成的识别模型,对每个参考音乐频谱进行识别,以确定每个参考音乐频谱对应的助眠值,然后将m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,之后基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音频频谱链,最后根据助眠音乐频谱链,生成助眠音乐。由此,通过将助眠值较高的音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而进一步提高了生成的助眠音乐的效果和可靠性。
图3是根据本公开另一实施例的助眠音乐的生成方法的流程示意图。
如图3所示,该助眠音乐的生成方法可以包括以下步骤301至步骤307。
步骤301,获取多个助眠音乐频谱。
步骤302,利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链。
步骤303,根据助眠音乐频谱链,生成助眠音乐。
需要说明的是,步骤301、302、303的具体实现过程可以参照上述实施例的具体实现过程,本公开在此不进行赘述。
步骤304,在播放助眠音乐的过程中,获取用户的睡眠状态参数。
需要说明的是,获取用户的睡眠状态参数参数的方式可以有很多,比如,可以利用可穿戴设备,采集用户的多个生理参数。其中生理参数包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率。然后可以根据多个生理参数,确定用户的睡眠状态参数。
其中,可以通过可穿戴设备,比如,手表、手环等采集用户的多个生理参数。具体的,生理参数可以为辗转次数、心率、血压、呼吸率、头动频率等等。
其中,睡眠状态参数可以用于表征用户的睡眠状态,比如,深睡、熟睡、浅睡、入睡等。
具体的,可以预设辗转次数阈值、心率阈值、血压阈值、呼吸率阈值、头动频率阈值等生理参数的阈值,然后通过将用户的生理参数与各生理参数的阈值进行比较,从而对用户的睡眠状态进行推断。举例来说,若用户在听某一助眠音乐A时,辗转次数、头动频率和心率均低于预设的生理参数阈值,则表明当前用户可能属于熟睡状态。
其中,可以预先设定生理参数和睡眠状态参数的映射关系,然后根据采集的生理参 数确定当前用户在播放某一特定助眠音乐时的睡眠状态参数。
在一些实施例中,还可以通过可穿戴设备监测用户在播放助眠音乐时的位置和姿态的空间变化量,确定用户的睡眠参数。
需要说明的是,在顺序播放多个助眠音乐时,可以获取各个助眠音乐对应的用户的睡眠状态参数。
步骤305,根据睡眠状态参数,确定生成助眠音乐的助眠音乐频谱的助眠值。
通过睡眠状态参数,可以确定各个助眠音乐对用户睡眠状况的影响程度,也即助眠效果。
具体的,可以通过将睡眠状态参数输入至预先训练好的助眠识别网络中,由此,可以确定根据各个助眠音乐对应的睡眠状态参数对应的助眠值。其中,助眠识别网络可以由各种深度神经网络(Deep Neural Networks,DNN)实现。
步骤306,在任一助眠音乐的助眠值小于第二阈值的情况下,将生成任一助眠音乐的助眠音乐频谱从多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
可以理解的是,通过将任一助眠音乐的助眠音乐频谱的助眠值与第二阈值进行比较,该装置可以对助眠音乐的功效进行判别。比如,若任一助眠音乐的助眠值高于第二阈值,则说明当前的助眠音乐为适应度高,助眠能力较强的助眠音乐。通过去除生成该助眠音乐的助眠音乐频谱,可以实现助眠音乐频谱集的更新,以产生更新之后能够更适应用户的助眠音乐频谱集。
步骤307,基于更新后的助眠音乐频谱集,重复执行上述助眠音乐生成过程,以生成与用户对应的助眠音乐。
具体的,通过不断的重复助眠音乐的生成过程,可以使助眠音乐频谱集不断的适应用户的睡眠特点,以实现快速的适应和满足用户的助眠需求。
在本公开实施例中,首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐。其中,在播放助眠音乐的过程中,获取用户的睡眠状态参数,根据睡眠状态参数,确定生成助眠音乐的助眠音乐频谱的助眠值,然后在任一助眠音乐的助眠值小于第二阈值的情况下,将生成任一助眠音乐的助眠音乐频谱从多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱,最后基于更新后的助眠音乐频谱集,重复执行上述助眠音乐生成过程,以生成与用户对应的助眠音乐。由此,通过用户的睡眠情况反馈,可以提高助眠音乐生成的可靠性和有效性,实现用户个性化定制,可以科学、可靠的生成助眠效果较好的助眠音乐。
为了实现上述实施例,本公开实施例还提出一种助眠音乐的生成装置。图4为本公开实施例提供的一种助眠音乐的生成装置的结构框图。
如图4所示,该助眠音乐的生成装置包括:第一获取模块410、第二获取模块420、第一生成模块430。
第一获取模块410,用于获取多个助眠音乐频谱。
第二获取模块420,用于利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链。
第一生成模块430,用于根据所述助眠音乐频谱链,生成助眠音乐。
在一些实施例中,所述第一获取模块410,具体用于:
获取m个参考音乐频谱;
利用训练生成的识别模型,对每个所述参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值;
将所述m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
在一些实施例中,所述第二获取模块420,包括:
处理单元,用于基于多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音频频谱链。
在一些实施例中,所述处理单元,具体用于:
根据多个助眠音乐频谱对应的助眠值,从所述多个助眠音乐频谱中选取待处理的目标助眠音乐频谱;
分别将所述目标助眠音乐频谱进行交叉运算和/或变异运算,以生成多个一级子助眠音乐频谱;
根据所述一级子助眠音频频谱对应的助眠值,从所述多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱;
基于所述目标一级子助眠音乐频谱,返回重复执行所述交叉运算和/或变异运算,直至运算次数达到预设值,根据所述目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定所述助眠音乐频谱链。
在一些实施例中,所述第一生成模块430,包括:
第一获取单元,用于在播放所述助眠音乐的过程中,获取用户的睡眠状态;
第一生成单元,用于根据所述睡眠状态,确定生成所述助眠音乐的助眠音乐频谱的助眠值;
第二生成单元,用于在任一助眠音乐的助眠值小于第二阈值的情况下,将生成所述任一助眠音乐的助眠音乐频谱从所述多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
在一些实施例中,所述第一获取单元,具体用于:
获取可穿戴设备采集的所述用户的多个生理参数,其中,所述生理参数,包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率;
根据所述多个生理参数,确定所述用户的睡眠状态。
本公开实施例中该装置可以首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐。由此,可以将助眠音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从 而不仅保证了助眠音乐的效果和可靠性,而且降低了助眠音乐的成本。
根据本公开的实施例,本公开还提供了一种可穿戴设备、一种可读存储介质、一种计算机程序产品。
图5示出了可以用来实施本公开实施例的电子设备500的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图5所示,设备500包括计算单元501,其可以根据存储在只读存储器(ROM)502中的计算机程序或者从存储单元508加载到随机访问存储器(RAM)503中的计算机程序,来执行各种适当的动作和处理。在RAM 503中,还可存储设备500操作所需的各种程序和数据。计算单元501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
设备500中的多个部件连接至I/O接口505,包括:输入单元506,例如键盘、鼠标等;输出单元507,例如各种类型的显示器、扬声器等;存储单元508,例如磁盘、光盘等;以及通信单元509,例如网卡、调制解调器、无线通信收发机等。通信单元509允许设备500通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
计算单元501可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元501的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元501执行上文所描述的各个方法和处理,例如助眠音乐的生成方法。例如,在一些实施例中,助眠音乐的生成方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元508。在一些实施例中,计算机程序的部分或者全部可以经由ROM 502和/或通信单元509而被载入和/或安装到设备500上。当计算机程序加载到RAM 503并由计算单元501执行时,可以执行上文描述的助眠音乐的生成方法的一个或多个步骤。在一些实施例中,计算单元501可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行助眠音乐的生成方法。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至 少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务(“Virtual Private Server”,或简称“VPS”)中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。
本公开实施例中该装置可以首先获取多个助眠音乐频谱,之后利用遗传算法,对多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,然后根据助眠音乐频谱链,生成助眠音乐。由此,可以将助眠音乐频谱作为遗传物质,利用遗传算法,生成助眠音乐,从而不仅保证了助眠音乐的效果和可靠性,而且降低了助眠音乐的成本。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。
Claims (15)
- 一种助眠音乐的生成方法,包括:获取多个助眠音乐频谱;利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链;根据所述助眠音乐频谱链,生成助眠音乐。
- 如权利要求1所述的方法,其中,所述获取多个助眠音乐频谱,包括:获取m个参考音乐频谱;利用训练生成的识别模型,对每个所述参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值;将所述m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
- 如权利要求2所述的方法,其中,所述利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,包括:基于所述多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链。
- 如权利要求3所述的方法,其中,所述基于所述多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链,包括:根据所述多个助眠音乐频谱对应的助眠值,从所述多个助眠音乐频谱中选取待处理的目标助眠音乐频谱;分别将所述目标助眠音乐频谱进行交叉运算和变异运算中的至少一种运算,以生成多个一级子助眠音乐频谱;根据所述一级子助眠音频频谱对应的助眠值,从所述多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱;基于所述目标一级子助眠音乐频谱,返回重复执行所述交叉运算和变异运算中的至少一种运算,直至运算次数达到预设值,根据所述目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定所述助眠音乐频谱链。
- 如权利要求1至4中任一项所述的方法,其中,在所述生成助眠音乐之后,还包括:在播放所述助眠音乐的过程中,获取用户的睡眠状态;根据所述睡眠状态,确定生成所述助眠音乐的助眠音乐频谱的助眠值;在任一助眠音乐的助眠值小于第二阈值的情况下,将生成所述任一助眠音乐的助眠音乐频谱从所述多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
- 如权利要求5所述的方法,其中,所述获取用户的睡眠状态,包括:获取可穿戴设备采集的所述用户的多个生理参数,其中,所述生理参数包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率;根据所述多个生理参数,确定所述用户的睡眠状态。
- 一种助眠音乐的生成装置,包括:第一获取模块,用于获取多个助眠音乐频谱;第二获取模块,用于利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音乐频谱链;第一生成模块,用于根据所述助眠音乐频谱链,生成助眠音乐。
- 如权利要求7所述的装置,其中,所述第一获取模块,具体用于:获取m个参考音乐频谱;利用训练生成的识别模型,对每个所述参考音乐频谱进行识别,以确定每个所述参考音乐频谱对应的助眠值;将所述m个参考音乐频谱中对应的助眠值大于第一阈值的n个参考音乐频谱,确定为助眠音乐频谱,其中,m大于n,n为大于1的自然数。
- 如权利要求7所述的装置,其中,所述第二获取模块,包括:处理单元,用于基于所述多个助眠音乐频谱对应的助眠值,利用遗传算法,对所述多个助眠音乐频谱进行处理,以获取助眠音频频谱链。
- 如权利要求9所述的装置,其中,所述处理单元,具体用于:根据所述多个助眠音乐频谱对应的助眠值,从所述多个助眠音乐频谱中选取待处理的目标助眠音乐频谱;分别将所述目标助眠音乐频谱进行交叉运算和变异运算中的至少一种运算,以生成多个一级子助眠音乐频谱;根据所述一级子助眠音频频谱对应的助眠值,从所述多个一级子助眠音频频谱中选取目标一级子助眠音乐频谱;基于所述目标一级子助眠音乐频谱,返回重复执行所述交叉运算和变异运算中的至少一种运算,直至运算次数达到预设值,根据所述目标助眠音乐频谱及生成的各级目标子助眠音乐频谱,确定所述助眠音乐频谱链。
- 如权利要求7至10中任一项所述的装置,其中,所述第一生成模块,包括:第一获取单元,用于在播放所述助眠音乐的过程中,获取用户的睡眠状态;第一生成单元,用于根据所述睡眠状态,确定生成所述助眠音乐的助眠音乐频谱的助眠值;第二生成单元,用于在任一助眠音乐的助眠值小于第二阈值的情况下,将生成所述任一助眠音乐的助眠音乐频谱从所述多个助眠音乐频谱中去除,以获取更新后的多个助眠音乐频谱。
- 如权利要求7所述的装置,其中,所述第一获取单元,具体用于:获取可穿戴设备采集的所述用户的多个生理参数,其中,所述生理参数包括以下参数中的至少一个:辗转次数、心率、血压、呼吸率、头动频率;根据所述多个生理参数,确定所述用户的睡眠状态。
- 一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至6中任一项所述的方法。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1至6中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1至6中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22830358.2A EP4166185A4 (en) | 2021-08-25 | 2022-07-06 | METHOD AND APPARATUS FOR GENERATING SLEEP AID MUSIC |
| US18/499,549 US20240058568A1 (en) | 2021-08-25 | 2023-11-01 | Methods And Apparatuses For Generating Sleeping Aid Audio |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110984332.8 | 2021-08-25 | ||
| CN202110984332.8A CN115721830B (zh) | 2021-08-25 | 助眠音乐的生成方法,装置,计算机设备及存储介质 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/499,549 Continuation US20240058568A1 (en) | 2021-08-25 | 2023-11-01 | Methods And Apparatuses For Generating Sleeping Aid Audio |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023024717A1 true WO2023024717A1 (zh) | 2023-03-02 |
Family
ID=85289805
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/104139 Ceased WO2023024717A1 (zh) | 2021-08-25 | 2022-07-06 | 助眠音乐的生成方法及装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20240058568A1 (zh) |
| EP (1) | EP4166185A4 (zh) |
| WO (1) | WO2023024717A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120022500B (zh) * | 2025-01-21 | 2025-08-15 | 智象未来(合肥)信息技术有限公司 | 助眠音频生成方法、装置、设备、存储介质 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2475096A (en) * | 2009-11-06 | 2011-05-11 | Sony Comp Entertainment Europe | Generating a sound synthesis model for use in a virtual environment |
| CN103768698A (zh) * | 2014-01-15 | 2014-05-07 | 黄汝逸 | 一种催眠器音效处理电路 |
| CN105374347A (zh) * | 2015-09-22 | 2016-03-02 | 中国传媒大学 | 一种基于混合算法的江南小调计算机辅助作曲的方法 |
| CN106652984A (zh) * | 2016-10-11 | 2017-05-10 | 张文铂 | 一种使用计算机自动创作歌曲的方法 |
| US20170140743A1 (en) * | 2015-11-18 | 2017-05-18 | Pandora Media, Inc. | Procedurally Generating Background Music for Sponsored Audio |
| CN111821556A (zh) * | 2020-07-03 | 2020-10-27 | 林万佳 | 一种变动频差助眠双频音乐的制作方法 |
| CN113032615A (zh) * | 2021-03-22 | 2021-06-25 | 平安科技(深圳)有限公司 | 冥想音乐的生成方法、装置、设备及存储介质 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3669922A1 (en) * | 2018-12-17 | 2020-06-24 | Koninklijke Philips N.V. | A system and method for delivering an audio output |
-
2022
- 2022-07-06 EP EP22830358.2A patent/EP4166185A4/en active Pending
- 2022-07-06 WO PCT/CN2022/104139 patent/WO2023024717A1/zh not_active Ceased
-
2023
- 2023-11-01 US US18/499,549 patent/US20240058568A1/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2475096A (en) * | 2009-11-06 | 2011-05-11 | Sony Comp Entertainment Europe | Generating a sound synthesis model for use in a virtual environment |
| CN103768698A (zh) * | 2014-01-15 | 2014-05-07 | 黄汝逸 | 一种催眠器音效处理电路 |
| CN105374347A (zh) * | 2015-09-22 | 2016-03-02 | 中国传媒大学 | 一种基于混合算法的江南小调计算机辅助作曲的方法 |
| US20170140743A1 (en) * | 2015-11-18 | 2017-05-18 | Pandora Media, Inc. | Procedurally Generating Background Music for Sponsored Audio |
| CN106652984A (zh) * | 2016-10-11 | 2017-05-10 | 张文铂 | 一种使用计算机自动创作歌曲的方法 |
| CN111821556A (zh) * | 2020-07-03 | 2020-10-27 | 林万佳 | 一种变动频差助眠双频音乐的制作方法 |
| CN113032615A (zh) * | 2021-03-22 | 2021-06-25 | 平安科技(深圳)有限公司 | 冥想音乐的生成方法、装置、设备及存储介质 |
Non-Patent Citations (2)
| Title |
|---|
| See also references of EP4166185A4 * |
| WU YUE-BEI: "On the Technique of Spectral Composition Based on Algorithm", HUANGZHONG (JOURNAL OF WUHAN CONSERVATORY OF MUSIC,CHINA), no. 4, 25 October 2010 (2010-10-25), pages 3 - 10+203, XP009543801, ISSN: 1003-7721 * |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4166185A1 (en) | 2023-04-19 |
| US20240058568A1 (en) | 2024-02-22 |
| EP4166185A4 (en) | 2024-01-24 |
| CN115721830A (zh) | 2023-03-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110853663A (zh) | 基于人工智能的语音增强方法、服务器及存储介质 | |
| JP7357114B2 (ja) | 生体検出モデルのトレーニング方法、装置、電子機器および記憶媒体 | |
| US20210168223A1 (en) | Biomimetic codecs and biomimetic coding techniques | |
| US20230084055A1 (en) | Method for generating federated learning model | |
| Lv et al. | Clinical feedback and technology selection of game based dysphonic rehabilitation tool | |
| Ghosh et al. | Musicality of human brain through fractal analytics | |
| CN111724806B (zh) | 一种基于深度神经网络的双视角单通道语音分离方法 | |
| Behrman et al. | Correlation dimension of electroglottographic data from healthy and pathologic subjects | |
| JP2022078286A (ja) | データ処理モデルのトレーニング方法、装置、電子機器及び記憶媒体 | |
| WO2023024717A1 (zh) | 助眠音乐的生成方法及装置 | |
| CN111986659B (zh) | 建立音频生成模型的方法以及装置 | |
| WO2023035647A1 (zh) | 基于可穿戴设备的音乐推荐方法、装置、设备及存储介质 | |
| CN113689867B (zh) | 一种语音转换模型的训练方法、装置、电子设备及介质 | |
| CN114969543A (zh) | 推广方法、系统、电子设备和存储介质 | |
| CN115721830B (zh) | 助眠音乐的生成方法,装置,计算机设备及存储介质 | |
| CN114529945A (zh) | 一种情感识别方法、装置、设备及存储介质 | |
| CN113229799A (zh) | 一种ppg心率估计方法、系统、存储介质、设备 | |
| CN116983531B (zh) | 一种基于vr、ar的智能心理宣泄与减压放松的方法和装置 | |
| CN109119089B (zh) | 对音乐进行通透处理的方法及设备 | |
| CN115115920B (zh) | 一种图数据自监督训练方法及装置 | |
| CN115064177A (zh) | 基于声纹编码器的语音转换方法、装置、设备及介质 | |
| CN117056728A (zh) | 一种时间序列生成方法、装置、设备和存储介质 | |
| CN116458843A (zh) | 睡眠环境与质量的评估方法、装置、电子设备及存储介质 | |
| Ekici et al. | Deception detection From speech signals | |
| CN119541533A (zh) | 音乐流派转换方法、装置、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2022830358 Country of ref document: EP Effective date: 20230105 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |