CN108429972B - Music playing method, device, terminal, earphone and readable storage medium - Google Patents
Music playing method, device, terminal, earphone and readable storage medium Download PDFInfo
- Publication number
- CN108429972B CN108429972B CN201810520742.5A CN201810520742A CN108429972B CN 108429972 B CN108429972 B CN 108429972B CN 201810520742 A CN201810520742 A CN 201810520742A CN 108429972 B CN108429972 B CN 108429972B
- Authority
- CN
- China
- Prior art keywords
- earphone
- music
- heart rate
- user
- preset position
- 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.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1041—Mechanical or electronic switches, or control elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/12—Circuits for transducers, loudspeakers or microphones for distributing signals to two or more loudspeakers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2201/00—Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
- H04R2201/10—Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2430/00—Signal processing covered by H04R, not provided for in its groups
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Otolaryngology (AREA)
- Reverberation, Karaoke And Other Acoustics (AREA)
- Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)
Abstract
本申请涉及一种音乐播放方法、装置、终端、耳机及可读存储介质。该方法包括:当耳机被佩戴在用户的预设位置时,获取耳机在预设位置处由于振动而产生的压力变化信号;根据压力变化信号获取心率信息;根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐,无需用户手动操作就可以为用户推荐并播放个性化的音乐,增加了用户使用耳机的愉悦感,满足了用户的个性化需求;同时,上述音乐播放方法,不需要在耳机中增加额外的传感器就能获取用户的心率信息,成本低,设计简单,扩充了普通耳机的使用功能,提高了用户体验度。
The present application relates to a music playing method, device, terminal, earphone and readable storage medium. The method includes: when the earphone is worn at a preset position of the user, obtaining a pressure change signal generated by the vibration of the earphone at the preset position; obtaining heart rate information according to the pressure change signal; pushing and playing music according to the earphone being worn at the preset position of the user and the heart rate information, and recommending and playing personalized music for the user without manual operation by the user, which increases the pleasure of the user in using the earphone and meets the personalized needs of the user; at the same time, the above-mentioned music playing method can obtain the user's heart rate information without adding additional sensors in the earphone, has low cost and simple design, expands the use function of ordinary earphones, and improves the user experience.
Description
技术领域technical field
本申请涉及通信技术领域,特别是涉及一种音乐播放方法、装置、终端、耳机及可读存储介质。The present application relates to the field of communication technologies, and in particular, to a music playing method, device, terminal, earphone and readable storage medium.
背景技术Background technique
随着通信技术的发展,智能设备已经密切融入人们生活中,大大改善了人们的生活,同时人们也越来越重视运动及以健康。其中,心率信息时判断用户是否健康的重要指标之一。With the development of communication technology, smart devices have been closely integrated into people's lives, greatly improving people's lives. At the same time, people are paying more and more attention to sports and health. Among them, the heart rate information is one of the important indicators for judging whether the user is healthy.
很多人在运动的过程中,喜欢带着耳机听音乐,为了能够测得运动过程中的心率,用户一般需要穿戴额外的血压计、计步器、心率仪、手环等辅助设备来监测用户的实时心率信息,给用户带来不便。同时,传统的耳机通常只能实现放音和收音的功能,无法识别用户,并满足不同用户的个性化需求。Many people like to listen to music with headphones in the process of exercising. In order to measure the heart rate during exercise, users generally need to wear additional auxiliary equipment such as blood pressure monitors, pedometers, heart rate monitors, and bracelets to monitor the user's heart rate. Real-time heart rate information brings inconvenience to users. At the same time, traditional earphones usually only realize the functions of playing and receiving sound, but cannot identify users and meet the individual needs of different users.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种音乐播放方法、装置、终端、耳机及可读存储介质,可以基于耳机获取用户的心率信息并推送音乐,成本低,能够满足不同用户的个性化需求。Embodiments of the present application provide a music playing method, device, terminal, earphone, and readable storage medium, which can acquire the user's heart rate information and push music based on the earphone, have low cost, and can meet the individual needs of different users.
一种音乐播放方法,包括:A music playing method, comprising:
当耳机被佩戴在用户的预设位置时,获取耳机在所述预设位置处采集的由于振动而产生的压力变化信号;When the earphone is worn at the preset position of the user, acquire the pressure change signal generated by the vibration collected by the earphone at the preset position;
根据所述压力变化信号获取心率信息;Obtain heart rate information according to the pressure change signal;
根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐。Push and play music according to the preset position of the headset worn by the user and heart rate information.
一种音乐播放装置,包括:A music playback device, comprising:
信号获取模块,用于当耳机被佩戴在用户的预设位置时,获取耳机在所述预设位置处采集的由于振动而产生的压力变化信号;a signal acquisition module, configured to acquire a pressure change signal generated by vibration collected by the earphone at the preset position when the earphone is worn at the preset position of the user;
心率获取模块,用于根据所述压力变化信号获取心率信息;a heart rate acquisition module, configured to acquire heart rate information according to the pressure change signal;
音乐播放模块,用于根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐。The music playback module is used to push and play music according to the preset position of the headset worn by the user and the heart rate information.
一种终端,包括存储器及处理器,该存储器中储存有计算机可读指令,所述指令被该处理器执行时,使得该处理器执行上述方法的步骤。A terminal includes a memory and a processor, the memory stores computer-readable instructions, and when the instructions are executed by the processor, the processor executes the steps of the above method.
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above method.
一种耳机,该耳机包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器与存储器电连接,该处理器执行计算机程序时实现上述方法的步骤。An earphone includes a memory, a processor and a computer program stored in the memory and running on the processor, the processor is electrically connected to the memory, and the processor implements the steps of the above method when executing the computer program.
上述音乐播放方法、装置、终端、耳机及计算机可读存储介质,当耳机被佩戴在用户的预设位置时,获取耳机在预设位置处采集的由于振动而产生的压力变化信号;根据压力变化信号获取心率信息;根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐,无需用户手动操作就可以为用户推荐并播放个性化的音乐,增加了用户使用耳机的愉悦感,满足了用户的个性化需求;同时,上述音乐播放方法,不需要在耳机中增加额外的传感器就能获取用户的心率信息,成本低,设计简单,扩充了普通耳机的使用功能,提高了用户体验度。The above-mentioned music playback method, device, terminal, earphone and computer-readable storage medium, when the earphone is worn at the preset position of the user, the pressure change signal collected by the earphone at the preset position due to vibration is obtained; according to the pressure change Signal to obtain heart rate information; push and play music according to the earphones are worn at the user's preset position and heart rate information, and can recommend and play personalized music for users without manual operation, which increases the user's pleasure in using earphones and satisfies At the same time, the above-mentioned music playback method can obtain the user's heart rate information without adding an additional sensor in the earphone, the cost is low, the design is simple, the use function of the ordinary earphone is expanded, and the user experience is improved.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为一个实施例中音乐播放方法的应用环境示意图;1 is a schematic diagram of an application environment of a music playing method in one embodiment;
图2为一个实施例中终端的内部结构示意图;2 is a schematic diagram of the internal structure of a terminal in one embodiment;
图3为一个实施例中音乐播放方法的流程示意图;3 is a schematic flowchart of a music playing method in one embodiment;
图4为一个实施例中获取在所述预设位置处由于振动而产生的压力变化信息的流程图;FIG. 4 is a flow chart of obtaining pressure change information due to vibration at the preset position in one embodiment;
图5为另一个实施例中音乐播放方法的流程图;Fig. 5 is the flow chart of the music playing method in another embodiment;
图6为一个实施例中根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐的流程图;6 is a flow chart of pushing and playing music according to the preset position of the headset being worn by the user and heart rate information in one embodiment;
图7为一个实施例中当状态标记为胎教标记时,播放音乐的流程图;7 is a flow chart of playing music when the state is marked as a prenatal education mark in one embodiment;
图8为另一个实施例中当状态标记为胎教标记时,播放音乐的流程图;8 is a flow chart of playing music when the state is marked as a prenatal education mark in another embodiment;
图9为一个实施例中当所述状态标记为运动标记时,播放音乐的流程图;9 is a flow chart of playing music when the state is marked as a motion mark in one embodiment;
图10为一个实施例中音乐播放装置的结构框图;10 is a structural block diagram of a music playback device in one embodiment;
图11为与本申请实施例提供的终端相关的手机的部分结构的框图。FIG. 11 is a block diagram of a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein in the specification of the application are for the purpose of describing specific embodiments only, and are not intended to limit the application.
图1为一个实施例中输入操作控制方法的应用环境示意图。如图1所示,该应用环境包括终端110和与该终端110进行通信的耳机120。FIG. 1 is a schematic diagram of an application environment of an input operation control method in one embodiment. As shown in FIG. 1 , the application environment includes a terminal 110 and a headset 120 that communicates with the terminal 110 .
其中,终端110上播放有音频信号,该音频信号包括但不限于歌曲、视频音、通话音等,终端110与耳机120进行通信连接。耳机120的类型可以是入耳式耳机、耳塞式耳机和头戴式耳机等,终端110与耳机120可以通过有线或无线的方式进行通信,实现数据的传输。Wherein, an audio signal is played on the terminal 110 , and the audio signal includes but is not limited to songs, video audio, call audio, etc., and the terminal 110 is connected to the earphone 120 for communication. The type of the earphone 120 may be an in-ear earphone, an earphone type, a headphone, etc., and the terminal 110 and the earphone 120 may communicate in a wired or wireless manner to realize data transmission.
终端110上安装有应用程序(Application,APP),应用程序指的是为完成某项或多项特定工作的计算机程序,它运行在用户模式,可以和用户进行交互,具有可视的用户界面。终端110通过应用程序与用户进行交互,例如终端110通过音乐播放应用可以播放用户喜欢的歌曲并向用户推荐歌曲等。An application program (Application, APP) is installed on the terminal 110. An application program refers to a computer program for completing one or more specific tasks. It runs in a user mode, can interact with a user, and has a visual user interface. The terminal 110 interacts with the user through an application program, for example, the terminal 110 can play the user's favorite songs and recommend songs to the user through a music playing application.
图2为一个实施例中终端的内部结构示意图。该终端110包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个终端110的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于终端110的音乐播放方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统、数据库和计算机程序。该数据库中存储有用于实现以上各个实施例所提供的一种音乐播放方法相关的数据。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种音乐播放方法。内存储器为非易失性存储介质中的操作系统、数据库和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示终端110的界面信息,显示屏包括亮屏状态和灭屏状态。该终端110可以是手机、平板电脑或者个人数字助理或穿戴式设备等。FIG. 2 is a schematic diagram of an internal structure of a terminal in an embodiment. The terminal 110 includes a processor, memory and a display screen connected by a system bus. Wherein, the processor is used to provide computing and control capabilities to support the operation of the entire terminal 110 . The memory is used for storing data, programs, and/or instruction codes, etc., and at least one computer program is stored in the memory, and the computer program can be executed by the processor to implement the music playing method applicable to the terminal 110 provided in the embodiments of the present application. The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, and a read-only memory (Read-Only Memory, ROM), or a random-access-memory (Random-Access-Memory, RAM) and the like. For example, in one embodiment, the memory includes a non-volatile storage medium and internal memory. The nonvolatile storage medium stores an operating system, a database, and a computer program. The database stores data related to implementing a music playing method provided by each of the above embodiments. The computer program can be executed by the processor to implement a music playing method provided by various embodiments of the present application. Internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of the terminal 110 , and the display screen includes a screen-on state and a screen-off state. The terminal 110 may be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or the like.
本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端110的限定,具体的终端110可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 2 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the terminal 110 to which the solution of the present application is applied. The specific terminal 110 may be Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
如图3所示,为一个实施例中音乐播放方法的流程图,本实施例中的音乐播放方法,以运行于图1中的终端和/或耳机上为例进行描述。该音乐播放方法,包括以下步骤302~步骤306:As shown in FIG. 3 , it is a flowchart of a music playing method in an embodiment. The music playing method in this embodiment is described by taking the terminal and/or the earphone in FIG. 1 as an example. The music playing method includes the following steps 302 to 306:
步骤302:当耳机被佩戴在用户的预设位置时,获取耳机在所述预设位置处采集的由于振动而产生的压力变化信号。Step 302: When the earphone is worn at the preset position of the user, acquire the pressure change signal generated by the vibration collected by the earphone at the preset position.
当用户需要使用耳机进行听音乐、看视频或接听电话等时,根据耳机的类型将耳机佩戴在预设位置以接收耳机上传播的音频信号。其中,预设位置可以为用户的耳道内、耳朵、肚皮等位置。例如,入耳式、耳塞式耳机可以放置在耳道内,头戴式耳机可以根据不同的用户群体佩戴在耳朵上或孕妇的肚皮上,用于为用户或孕妇的腹中胎儿播放音频信号。When the user needs to use the headset to listen to music, watch videos or answer calls, etc., the headset is worn at a preset position according to the type of the headset to receive audio signals propagated on the headset. The preset position may be a position in the user's ear canal, ear, belly, or the like. For example, in-ear and earphones can be placed in the ear canal, and headphones can be worn on the ears or on the belly of a pregnant woman according to different user groups to play audio signals for the user or the fetus in the pregnant woman's womb.
当耳机佩戴在用户耳朵上或耳道内时,耳机与用户耳朵之间会由于耳机堵住耳道而形成一个相对密闭的腔体,耳道壁的收缩振动会引起该腔体内压力的变化。其中,耳膜的运动通常与动脉的脉搏同步,耳道里压力大小的改变可以由耳机上的麦克风或电声换能器采集到。When the earphone is worn on the user's ear or in the ear canal, a relatively closed cavity is formed between the earphone and the user's ear because the earphone blocks the ear canal, and the contraction and vibration of the ear canal wall will cause the pressure change in the cavity. Among them, the movement of the eardrum is usually synchronized with the pulse of the artery, and the change of the pressure in the ear canal can be collected by the microphone on the earphone or the electroacoustic transducer.
当耳机佩戴在孕妇的肚皮上时,耳机与孕妇的肚皮之间会形成一个相对密闭的腔体,肚皮的收缩振动会引起该腔体内压力的变化。其中,肚皮的振动通常与腹中胎儿的心率同步,肚皮与耳机之间的腔体内压力大小的改变可以由耳机上的麦克风或电声换能器采集到。When the earphone is worn on the belly of a pregnant woman, a relatively closed cavity will be formed between the earphone and the belly of the pregnant woman, and the contraction and vibration of the belly will cause the pressure change in the cavity. Among them, the vibration of the belly is usually synchronized with the heart rate of the fetus in the abdomen, and the change of the pressure in the cavity between the belly and the earphone can be collected by a microphone or an electro-acoustic transducer on the earphone.
需要说明的是,步骤302中,获取耳机在所述预设位置处由于振动而产生的压力变化信号可以理解为,耳机内的处理器获取由耳机麦克风或电声换能器采集到的压力变化信号,也可以理解为,与该耳机进行通讯的终端获取由耳机麦克风或电声换能器采集到的压力变化信号,也即,耳机将获取的压力变化信号传输给终端进行后续相关处理。It should be noted that, in step 302, acquiring the pressure change signal generated by the vibration of the earphone at the preset position can be understood as that the processor in the earphone acquires the pressure change collected by the earphone microphone or the electro-acoustic transducer. Signal, it can also be understood that the terminal communicating with the headset acquires the pressure change signal collected by the headset microphone or the electro-acoustic transducer, that is, the headset transmits the acquired pressure change signal to the terminal for subsequent related processing.
步骤304:根据所述压力变化信号获取心率信息。Step 304: Acquire heart rate information according to the pressure change signal.
心脏的跳动具有一定的周期性,心脏的跳动会引起耳道壁的收缩振动,根据获取的压力变化信号的周期即可在一定程度上反映心脏的跳动规律,那么该压力变化信号的周期的倒数即为心率信息。The beating of the heart has a certain periodicity, and the beating of the heart will cause the contraction and vibration of the ear canal wall. According to the cycle of the obtained pressure change signal, the beating law of the heart can be reflected to a certain extent, then the reciprocal of the cycle of the pressure change signal That is heart rate information.
进一步的,还可以对麦克风采集到的信号进行滤波处理,以获取该压力变化信号,可以排除外界噪声对压力变化信号的干扰,也即可以得到周期较为明确的压力变化信号,根据该压力变化信号形成信号波形图,可以通过检测相邻两个波峰的间隔时间计算该压力变化信号的信号周期,该信号周期可在一定程度上反映心脏的跳动规律,那么该压力变化信号的周期的倒数即为心率信息。Further, the signal collected by the microphone can also be filtered to obtain the pressure change signal, which can eliminate the interference of external noise on the pressure change signal, that is, a pressure change signal with a relatively clear period can be obtained, according to the pressure change signal. To form a signal waveform diagram, the signal period of the pressure change signal can be calculated by detecting the interval between two adjacent peaks. The signal period can reflect the beating law of the heart to a certain extent, then the reciprocal of the period of the pressure change signal is Heart rate information.
需要说明的是,步骤302中,根据所述压力变化信号获取心率信息可以理解为,耳机内的处理器根据所述压力变化信号获取心率信息,也可以理解为,与该耳机进行通讯的终端获取压力变化信号,并根据压力变化信号获取心率信息,也即,与该耳机进行通讯的终端获取心率信息。It should be noted that in step 302, acquiring the heart rate information according to the pressure change signal can be understood as that the processor in the earphone acquires the heart rate information according to the pressure change signal, or it can be understood that the terminal that communicates with the earphone acquires the heart rate information. The pressure change signal is obtained, and heart rate information is obtained according to the pressure change signal, that is, the terminal that communicates with the earphone obtains the heart rate information.
步骤306:根据所述预设位置和心率信息推送并播放音乐。Step 306: Push and play music according to the preset position and heart rate information.
不同的心率信息可以用来表征不同的用户群,例如,不同年龄段用户的心率所处范围不一样,在怀孕20周前胎心率平均为162次/分钟,在怀孕21~30周胎心率平均为147次/分钟,在怀孕31~40孕周胎心率平均为139次/分钟;新生儿的正常心跳是120-140次/分;1月-1岁是110-130次/分;2-3岁是100-120次/分;成人正常心率为60~100次/分钟;老年人心跳比年轻人慢。同时,不同的心率信息还可以用于表征同一用户的运动状态信息,例如,睡眠状态(40-70次/分)、静止(60-90次/分)状态、步行状态、跑步运动状态等。Different heart rate information can be used to characterize different user groups. For example, users of different ages have different heart rates. The average fetal heart rate is 162 beats per minute before 20 weeks of pregnancy, and the fetal heart rate is 162 beats per minute before 20 weeks of pregnancy. The average rate is 147 beats/min, and the average fetal heart rate is 139 beats/min at 31 to 40 weeks of pregnancy; the normal heart rate of newborns is 120-140 beats/min; 1 month-1 year old is 110-130 beats/min 2-3 years old is 100-120 beats/min; the normal heart rate of adults is 60-100 beats/min; the heartbeat of the elderly is slower than that of the young. At the same time, different heart rate information can also be used to represent the exercise state information of the same user, for example, sleep state (40-70 times/min), resting (60-90 times/min) state, walking state, running exercise state, etc.
根据耳机佩戴的预设位置和获取的心率信息,可以为用户推送音乐列表,并播放音乐列表中的音乐。例如,当用户将耳机放置在耳道中时,根据当前的心率信息可以知晓当前用户的运动状态,根据当前的运动状态推送并播放符合当前运动状态的歌曲;当用户将耳机放置在用户的肚皮上时,根据当前获取的心率信息可以知晓用户腹中胎儿的孕周期,根据孕周期推送符合当前孕周期的胎教音乐,并播放该胎教音乐。According to the preset position of the headset and the obtained heart rate information, the music list can be pushed for the user, and the music in the music list can be played. For example, when the user puts the headset in the ear canal, the current user's exercise state can be known according to the current heart rate information, and the song that matches the current exercise state can be pushed and played according to the current exercise state; when the user places the headset on the user's belly At the time, according to the currently obtained heart rate information, the pregnancy cycle of the fetus in the user's womb can be known, the prenatal education music that matches the current pregnancy cycle is pushed according to the pregnancy cycle, and the prenatal education music is played.
上述音乐播放方法,可以根据用户佩戴耳机的预设位置,并在预设位置获取相应的心率信息,根据获取的心率信息为用户推送并播放与该心率信息相匹配的音乐,无需用户手动操作就可以为用户推荐并播放个性化的音乐,增加了用户使用耳机的愉悦感,满足了用户的个性化需求;同时,上述音乐播放方法,不需要在耳机中增加额外的传感器就能获取用户的心率信息,成本低,设计简单,扩充了普通耳机的使用功能,提高了用户体验度。The above music playback method can obtain the corresponding heart rate information at the preset position according to the preset position where the user wears the earphone, and push and play music that matches the heart rate information for the user according to the obtained heart rate information, without the need for manual operation by the user. It can recommend and play personalized music for users, which increases the user's sense of pleasure in using headphones and satisfies the user's personalized needs; at the same time, the above music playback method can obtain the user's heart rate without adding additional sensors to the headphones. Information, low cost, simple design, expands the use function of ordinary headphones, and improves user experience.
需要说明的是,步骤302-步骤306,各个步骤的执行主体可以是终端,也可以是耳机,在此,不做进一步的限定。It should be noted that, in steps 302 to 306, the execution subject of each step may be a terminal or an earphone, which is not further limited herein.
图4为一个实施例中获取在所述预设位置处由于振动而产生的压力变化信息的流程图。在一个实施例中,获取在所述预设位置处由于振动而产生的压力变化信息,包括:FIG. 4 is a flow chart of acquiring pressure change information at the preset position due to vibration in one embodiment. In one embodiment, acquiring pressure change information at the preset position due to vibration includes:
步骤402:获取耳机在所述预设位置处采集的检测信号。Step 402: Acquire the detection signal collected by the earphone at the preset position.
具体地,可以基于耳机的电声换能器来采集在预设位置处的检测信号。其中,电声换能器为扬声器,可以将音频信号对应的电信号转换成用户可以听到的声波信号。同时,电声换能器对用户耳朵内部结构(耳道)中的声波非常敏感,能够引起扬声器纸盆的振动,带动与纸盆相连的线圈在永久磁体的磁场中作切割磁力线的运动,从而产生随着声波的变化而变化的电流(产生电流的现象在物理学上称为电磁感应现象),同时,在线圈两端将输出音频的电动势。因此,电声转换器也可以用于采集由于耳道壁的收缩振动引起的压力变化产生的压力变化信号以及环境干扰信号。也即,电声换能器也可以作为麦克风来使用。Specifically, the detection signal at the preset position can be collected based on the electro-acoustic transducer of the earphone. The electro-acoustic transducer is a speaker, which can convert the electrical signal corresponding to the audio signal into a sound wave signal that the user can hear. At the same time, the electro-acoustic transducer is very sensitive to the sound waves in the internal structure of the user's ear (ear canal), which can cause the speaker cone to vibrate, and drive the coil connected to the paper cone to cut the magnetic field lines in the magnetic field of the permanent magnet. A current that changes with the change of the sound wave is generated (the phenomenon of generating current is called electromagnetic induction in physics), and at the same time, the electromotive force of the audio frequency will be output at both ends of the coil. Therefore, the electroacoustic transducer can also be used to collect pressure change signals and environmental disturbance signals generated by pressure changes caused by the contraction vibration of the ear canal wall. That is, the electroacoustic transducer can also be used as a microphone.
可以理解的是,检测信号包括由于耳道壁的收缩振动引起的压力变化产生的压力变化信号以及对心率信息检测造成干扰的噪声信号。噪声信号包括环境噪声和电路噪声,环境噪声为外界环境音,电路噪声为耳机内置电路中而引起的噪声,是耳机的固有属性。It can be understood that the detection signal includes a pressure change signal caused by a pressure change caused by the contraction and vibration of the ear canal wall and a noise signal that interferes with the heart rate information detection. The noise signal includes environmental noise and circuit noise. The environmental noise is the external ambient sound, and the circuit noise is the noise caused by the built-in circuit of the earphone, which is an inherent property of the earphone.
当采用耳机内的电声换能器来采集由于耳道壁的收缩振动引起的压力变化产生的压力变化信号以及噪声信号时,不需要通过在耳机内额外设置麦克风来采集声学回声信号,节约了成本,简化了耳机的内部结构。When the electro-acoustic transducer in the earphone is used to collect the pressure change signal and the noise signal generated by the pressure change caused by the contraction and vibration of the ear canal wall, it is not necessary to install an additional microphone in the earphone to collect the acoustic echo signal, saving energy cost, simplifies the internal structure of the headset.
可选的,还可以通过设置在耳机中的麦克风来采集由于耳道壁的收缩振动引起的压力变化产生的压力变化信号以及噪声信号。其中,在耳机内设置一个腔体,将麦克风安装在该腔体内,该腔体的口所贴合的耳机壳处有孔,当耳机被佩戴时该腔体和与孔贴合的耳廓构成密闭空间。Optionally, the pressure change signal and the noise signal generated by the pressure change caused by the contraction and vibration of the ear canal wall can also be collected by the microphone provided in the earphone. Wherein, a cavity is arranged in the earphone, the microphone is installed in the cavity, the earphone shell to which the mouth of the cavity is fitted has a hole, and when the earphone is worn, the cavity and the auricle that is fitted with the hole are formed. hermetic space.
步骤404:对所述检测信号进行滤波处理,以滤除所述检测信号中的干扰信号,获取所述压力变化信号。Step 404: Perform filtering processing on the detection signal to filter out interference signals in the detection signal, and obtain the pressure change signal.
由于脉搏振动的频率较低(0.3Hz-3Hz左右),而外界噪声信号的噪声频率相对较高,根据这一特点,通过低通滤波器可以消除外界高频噪声的影响。例如,低通滤波器可以选择截止频率为5Hz的FIR滤波器等。其中,低通滤波过程可以在耳机侧进行,也可以在终端侧进行,也即可以将滤波器设置在耳机内,也可以将滤波器设置在终端上,本实施例对此不进行限定。Because the frequency of pulse vibration is low (about 0.3Hz-3Hz), and the noise frequency of external noise signal is relatively high, according to this feature, the influence of external high-frequency noise can be eliminated by low-pass filter. For example, a low-pass filter can choose a FIR filter with a cutoff frequency of 5Hz, etc. The low-pass filtering process may be performed on the earphone side or the terminal side, that is, the filter may be set in the earphone or on the terminal, which is not limited in this embodiment.
具体地,先获取由麦克风在预设位置处采集的检测信号,然后用低通滤波器对麦克风采集的检测信号进行低通滤波,已获得压力变化信号,进而能够更精确的反映用户心率信息。Specifically, the detection signal collected by the microphone at the preset position is obtained first, and then the detection signal collected by the microphone is low-pass filtered with a low-pass filter to obtain a pressure change signal, which can more accurately reflect the user's heart rate information.
图5为另一个实施例中音乐播放方法的流程图。在一个实施例中,音乐播放方法还包括:FIG. 5 is a flowchart of a music playing method in another embodiment. In one embodiment, the music playing method further includes:
步骤502:获取用户对所述耳机的工作模式的状态标记,所述状态标记至少包括默认标记、运动标记和胎教标记。Step 502: Acquire a status mark of the working mode of the headset by the user, where the status mark includes at least a default mark, a sports mark and a prenatal education mark.
耳机的工作模式至少包括正常模式、运动模式和胎教模式,其对应的状态标记分别为默认标记、运动标记和胎教标记。用户可以根据自己的需求来通过耳机的物理按键或与耳机进行连接的终端来调节并设置相应的工作模式,例如,用户需要运动时,可以将工作模式切换为运动模式;用户需要为腹中胎儿进行胎教时,可以将工作模式切换为胎教模式等。The working modes of the earphone include at least a normal mode, a sports mode and a prenatal education mode, and the corresponding state marks are respectively a default mark, a sports mark and a prenatal education mark. Users can adjust and set the corresponding working mode through the physical buttons of the headset or the terminal connected to the headset according to their own needs. For example, when the user needs to exercise, the working mode can be switched to the exercise mode; the user needs to be a fetus in the womb. During prenatal education, the working mode can be switched to prenatal education mode, etc.
当耳机处于正常模式,即状态标记为默认标记时,基于该耳机可以获取任意佩戴该耳机的心率信息,并为该用户推荐音乐,也即不限定使用耳机的用户群体。When the headset is in the normal mode, that is, when the status is marked as the default mark, the heart rate information of any wearing of the headset can be obtained based on the headset, and music is recommended for the user, that is, the user group using the headset is not limited.
当耳机处于运动模式,即状态标记为运动标记。例如用户在进行走路、跑步、骑车、爬山等各种运动时,可以基于耳机获取用户当前的心率信息,根据该心率信息为用户推荐与当前用户心率信息相匹配的音乐,有了音乐的陪伴不仅会让人感到心情愉悦,此外激昂的音乐还会激发人们运动的潜能和培养坚强的意志,从而达到更好的运动效果。When the headset is in sport mode, the state is marked as sport flag. For example, when a user performs various sports such as walking, running, cycling, mountain climbing, etc., he can obtain the user's current heart rate information based on the headset, and recommend music that matches the current user's heart rate information based on the heart rate information. It will not only make people feel happy, but also exciting music will stimulate people's potential for sports and cultivate a strong will, so as to achieve better sports results.
当耳机处于胎教模式,即状态标记为胎教标记。将耳机佩戴在用户的肚皮上,基于耳机可以获取用户腹中胎儿的心率信息,根据该心率信息为胎儿推荐与该心率信息相匹配的音乐,为腹中胎儿进行胎教。其中,音乐胎教,是通过对胎儿不断地施以适当的乐声刺激,促使其神经元的轴突、树突及突触的发育,为优化后天的智力及发展音乐天赋奠定基础。在生理作用方面,胎教音乐通过悦耳怡人的音响效果对孕妇和胎儿听觉神经器官的刺激引起大脑细胞的兴奋。When the headset is in prenatal education mode, the status is marked as prenatal education mark. The headset is worn on the user's belly, and the heart rate information of the fetus in the user's abdomen can be obtained based on the headset, and based on the heart rate information, music that matches the heart rate information is recommended for the fetus, and prenatal education is performed for the fetus in the abdomen. Among them, music prenatal education is to promote the development of axons, dendrites and synapses of neurons by continuously applying appropriate musical stimulation to the fetus, laying the foundation for optimizing acquired intelligence and developing musical talent. In terms of physiological effects, prenatal music stimulates the brain cells to stimulate the auditory nerve organs of pregnant women and fetuses through pleasant sound effects.
需要说明的是,状态标记具有唯一性,可以用不同的数字、字符、字母等组合而形成,根据获取的状态标记就可以对应获取当前耳机的工作模式。It should be noted that the status mark is unique and can be formed by a combination of different numbers, characters, letters, etc., and the current working mode of the headset can be correspondingly obtained according to the obtained status mark.
步骤504:根据所述状态标记提示用户将所述耳机佩戴在所述预设位置。Step 504: Prompt the user to wear the earphone in the preset position according to the status mark.
根据获取的状态标记提示用户将耳机佩戴在预设位置,其中,预设位置可以为用户的耳朵(耳道),也可以为用户的肚皮。当状态标记为默认标记和运动标记时,其对应的预设位置为耳朵(耳道);当状态标记为胎教标记时,其对应的预设位置为肚皮。根据获取的状态标记可以提示用户将耳机佩戴在与状态标记相对应的预设位置。The user is prompted to wear the earphone at a preset position according to the acquired status mark, where the preset position may be the user's ear (ear canal) or the user's belly. When the status mark is the default mark and the motion mark, the corresponding preset position is the ear (ear canal); when the status mark is the prenatal education mark, the corresponding preset position is the belly. According to the acquired status mark, the user may be prompted to wear the headset at a preset position corresponding to the status mark.
其中,提示用户的提示方式可以为耳机语音提示,也可以为终端显示提示和/语音提示。耳机可以以语音播报的形式来提示用户,例如播放“将耳机放置在耳道中”或“将耳机放置在肚皮上”的预设音频。当然,终端也可以以以语音播报的形式来提示用户,还可以在终端上显示耳机需要放置的预设位置的图片或文字等。Wherein, the prompting method for prompting the user may be an earphone voice prompt, or a terminal display prompt and/or voice prompt. The headset can prompt the user in the form of a voice announcement, such as playing a preset audio of "Place the headset in the ear canal" or "Place the headset on the belly". Of course, the terminal may also prompt the user in the form of a voice broadcast, and may also display a picture or text of a preset position where the headset needs to be placed on the terminal.
步骤506:基于耳机播放的音频信号检测所述耳机是否佩戴在所述预设位置。Step 506: Detect whether the earphone is worn at the preset position based on the audio signal played by the earphone.
当用户佩戴耳机时,可以根据耳机播放的音频信号来检测该耳机是否佩戴在预设位置处。具体的,获取耳机当前播放的音频信号s(t),同时录制音频信号s(t)经耳道耳道或肚皮反射和振动而形成的声学回声信号r(t),根据获取的音频信号s(t)和声学回声信号r(t)就可以确定当前耳机所在位置的声学回声脉冲响应w(t)。其中,音频信号s(t)、声学回声信号r(t)以及声学回声脉冲响应w(t)可以用以下公式来表示:When the user wears the earphone, it can be detected whether the earphone is worn at the preset position according to the audio signal played by the earphone. Specifically, the audio signal s(t) currently played by the earphone is acquired, and the acoustic echo signal r(t) formed by the reflection and vibration of the audio signal s(t) through the ear canal or the belly is recorded. According to the acquired audio signal s (t) and the acoustic echo signal r(t), the acoustic echo impulse response w(t) of the current position of the earphone can be determined. Among them, the audio signal s(t), the acoustic echo signal r(t) and the acoustic echo impulse response w(t) can be expressed by the following formula:
r(t)=s(t)*w(t)r(t)=s(t)*w(t)
式中,w(t)是一个能够反映耳机和用户耳朵或肚皮耦合的参量,可以用来表征耳机被放置在用户耳朵(耳道)或放置在肚皮的空间声学特征。公式中,音频信号为s(t)、声学回声信号为r(t)可以通过耳机或电子设备设置的音频电路监测获得,进而可以获取与耳机当前位置相关联的回声脉冲响应w(t)。In the formula, w(t) is a parameter that can reflect the coupling between the earphone and the user's ear or belly, and can be used to characterize the spatial acoustic characteristics of the earphone placed in the user's ear (ear canal) or belly. In the formula, the audio signal is s(t) and the acoustic echo signal is r(t), which can be obtained by monitoring the audio circuit set by the earphone or electronic device, and then the echo impulse response w(t) associated with the current position of the earphone can be obtained.
进一步的,可以将耳机佩戴在第一预设位置处(耳道),并测得多个回声脉冲响应,以形成第一组回声脉冲响应;相应的,可以将耳机佩戴在第二预设位置处(肚皮),测得多个回声脉冲响应,以形成第二组回声脉冲响应,根据获取的第一回声脉冲响应和第二组回声脉冲响应形成数据库,将获取的回声脉冲响应与数据库内的数据进行对比,进而判断耳机是否佩戴在预设位置。例如,当获取的回声脉冲响应与数据库内的数据一致,则说明耳机佩戴在预设位置,同时也能确定预设位置的具体位置信息。Further, the earphone can be worn at the first preset position (ear canal), and multiple echo impulse responses can be measured to form a first group of echo impulse responses; correspondingly, the earphone can be worn at the second preset position At the place (belly), a plurality of echo impulse responses are measured to form a second set of echo impulse responses, a database is formed according to the acquired first echo impulse responses and the second set of echo impulse responses, and the acquired echo impulse responses are compared with those in the database. The data is compared to determine whether the headset is worn in the preset position. For example, when the acquired echo impulse response is consistent with the data in the database, it means that the earphone is worn at the preset position, and the specific position information of the preset position can also be determined.
图6为一个实施例中根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐的流程图。在一个实施例中,根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐,包括:FIG. 6 is a flow chart of pushing and playing music according to the earphones being worn at the preset position of the user and heart rate information in one embodiment. In one embodiment, the music is pushed and played according to the preset position where the headset is worn by the user and heart rate information, including:
步骤602:根据所述状态标记调用与所述状态标记对应的音乐数据库。Step 602: Call the music database corresponding to the state flag according to the state flag.
一种状态标记对应一个音乐数据库。具体地,默认标记对应与第一音乐数据库;运动标记对应与第二音乐数据库,胎教标记对应于第三数据库。其中,每个音乐数据库中包括多种风格的音乐等。例如,第一音乐数据库中的音乐可以包括适合不同年龄段(儿童、青少年、成年人、老年人)的儿歌、当下流行歌曲、红歌和广场舞歌曲等;第二音乐数据库中的音乐可以包括节奏感、韵律感适当且适合不同运动状态(静坐、步行、慢跑、爬山、快跑、冲刺)的健身音乐,健身音乐能够减少疲劳感并增强积极性,同时健身音乐会阻断疲劳感和费力感,提高运动效果。第三音乐数据库中的音乐可以包括适合不同孕产期(孕早期、孕中期、孕晚期)的具有节奏平缓、流畅,不带歌词,乐曲的情调应温柔、甜美的胎教音乐。A state flag corresponds to a music database. Specifically, the default mark corresponds to the first music database; the sports mark corresponds to the second music database, and the prenatal education mark corresponds to the third database. Among them, each music database includes multiple styles of music and the like. For example, the music in the first music database may include children's songs suitable for different age groups (children, teenagers, adults, the elderly), popular songs, red songs and square dance songs, etc.; the music in the second music database may include rhythm Fitness music with appropriate sense and rhythm and suitable for different sports states (sitting, walking, jogging, mountain climbing, fast running, sprinting), fitness music can reduce fatigue and enhance motivation, while fitness music blocks fatigue and effort. Improve exercise effect. The music in the third music database may include prenatal education music with gentle and smooth rhythm, without lyrics, suitable for different pregnancy and childbirth periods (first trimester, second trimester, and third trimester).
需要说明的是,音乐数据库中的音乐可以基于大数据统计而获得,用户可以对音乐数据库中的音乐进行更新、替换、删除等操作。其中,音乐数据库可以存储在终端,也可以存储在于终端进行通讯的服务器中。It should be noted that the music in the music database can be obtained based on big data statistics, and the user can perform operations such as updating, replacing, and deleting the music in the music database. The music database may be stored in the terminal, or may be stored in a server where the terminal communicates.
步骤604:在所述音乐数据库中获取与所述心率信息相匹配的音乐列表。Step 604: Acquire a music list matching the heart rate information in the music database.
根据获取的状态标记,可以获取与该状态标价相匹配的音乐数据库,并在该音乐数据库中获取与用户当前心率相匹配的音乐列表。According to the acquired state flag, a music database matching the state price tag can be acquired, and a music list matching the user's current heart rate can be acquired in the music database.
当状态标记为默认标记时,根据当前获取的心率信息,可以获取用户的年龄信息,在第一音乐数据库中,向该用户推送符合该年龄信息的音乐列表。具体地,不同年龄段用户心率所处范围不一样,新生儿的正常心跳是120-140次/分;1月-1岁是110-130次/分;2-3岁是100-120次/分;成人正常心率为60~100次/分钟;老年人心跳比年轻人慢。例如,获取的心率信息为100-120次/分,可以知晓当前使用耳机的用户为2-3岁的小朋友,则在该音乐数据库中向用户推送儿歌等。When the status flag is the default flag, the user's age information can be acquired according to the currently acquired heart rate information, and a music list that matches the age information is pushed to the user in the first music database. Specifically, the range of the heart rate of users in different age groups is different. The normal heart rate of a newborn is 120-140 beats/min; 1 month-1 year old is 110-130 beats/min; 2-3 years old is 100-120 beats/min The normal heart rate of adults is 60 to 100 beats per minute; the heart rate of the elderly is slower than that of the young. For example, if the obtained heart rate information is 100-120 beats/min, it can be known that the user currently using the earphone is a child of 2-3 years old, and the music database will push children's songs and the like to the user.
当状态标记为运动标记时,根据当前获取的心率信息,可以获取用户的运动状态,例如睡觉、静坐、步行、慢跑、爬山、快跑、冲刺等运动。其中,在静止状态下,用户心率值一般在60~90之间,健康成年人的最大心率=220-年龄,运动时一般不会超过该最大心率。如表1所示:When the state is marked as an exercise flag, the user's exercise state, such as sleeping, sitting, walking, jogging, mountain climbing, fast running, sprinting, etc., can be acquired according to the currently acquired heart rate information. Among them, in a static state, the user's heart rate is generally between 60 and 90, the maximum heart rate of a healthy adult = 220-age, and the maximum heart rate will generally not exceed the maximum heart rate during exercise. As shown in Table 1:
表1为心率信息与运动状态的对应关系表Table 1 is the correspondence table between heart rate information and exercise state
在第二音乐数据库中,根据当前用户的运动状态向该用户推送符合该运动状态的音乐列表。In the second music database, according to the movement state of the current user, a music list that conforms to the movement state is pushed to the user.
当状态标记为胎教标记时,可以根据当前获取的心率信息来获取孕妇腹中胎儿的年龄信息,也即可以获取孕妇的怀孕时期。例如,在怀孕20周前胎心率平均为162次/分钟,在怀孕21~30周平均为147次/分钟,在怀孕31~40孕周平均为139次/分钟。根据当前获取的心率信息可以知晓当前孕妇的怀孕阶段,例如:孕早期、孕中期和孕晚期。可以根据孕妇的怀孕阶段,可以为其推送相应的音乐列表。When the status is marked as a prenatal education mark, the age information of the fetus in the belly of the pregnant woman can be obtained according to the currently obtained heart rate information, that is, the pregnancy period of the pregnant woman can be obtained. For example, the fetal heart rate averaged 162 beats/min before 20 weeks of pregnancy, 147 beats/min at 21 to 30 weeks of pregnancy, and 139 beats/min at 31 to 40 weeks of pregnancy. According to the currently obtained heart rate information, the pregnancy stage of the current pregnant woman can be known, such as the first trimester, the second trimester and the third trimester. According to the pregnancy stage of pregnant women, corresponding music lists can be pushed for them.
例如,在孕早期,音乐的节律性振动对胎儿的脑发育也是一种良好的刺激,这将促使胎儿大脑发育。孕早期可以选择轻松愉快、诙谐有趣、优美动听的音乐,如美人鱼的呤唱、温暖的幸福、sunday park、橄榄树等;在孕中期,胎儿出现第一次胎动,标志着胎儿的中枢神经系统已经分化完成;胎儿的听力、视力开始迅速发育,并逐渐对外界施加的压力、动作、声音做出相应的反应,胎教音乐内容可以更丰富一些,增加轻松活泼,稍快节奏的乐曲,妈妈与宝宝增加互动,如降B小调第一钢琴协奏曲快乐的农夫抒情圣笛五重奏轻风吹,相留醉等;在孕晚期的胎宝宝处于身心逐渐稳定的生长的阶段,大脑神经元正在飞速的生长,听觉器官已经发育成熟,其结构基本上和出生时相同,这时可以选择既柔和而又充满希望的乐曲,如淡淡晚风起亲亲我的小宝贝海边的夏天的胎教音乐。For example, in the first trimester, the rhythmic vibration of music is also a good stimulus for fetal brain development, which will promote fetal brain development. In the first trimester, you can choose light-hearted, witty, and beautiful music, such as mermaid singing, warm happiness, sunday park, olive tree, etc.; in the second trimester, the fetus has the first fetal movement, which marks the central nervous system of the fetus The differentiation has been completed; the hearing and vision of the fetus begin to develop rapidly, and gradually respond to the pressure, movements, and sounds exerted by the outside world. The content of prenatal education music can be richer, adding more relaxed and lively, slightly faster rhythm music. Babies increase interaction, such as the Happy Farmer's Lyrical Sacred Flute Quintet in B-flat Minor's No. 1 Piano Concerto, Blowing in the Wind, Drunk Together, etc.; in the third trimester of pregnancy, the fetus is in the stage of stable physical and mental growth, and the neurons in the brain are rapidly developing. Growth, the hearing organ has matured, and its structure is basically the same as at birth. At this time, you can choose music that is both soft and full of hope, such as the prenatal education music in the summer when the wind rises and kisses my little baby by the sea.
步骤606:按照与所述状态标记相对应的预设播放策略播放所述音乐列表中的音乐。Step 606: Play the music in the music list according to the preset play strategy corresponding to the state flag.
在所述音乐数据库中获取与所述心率信息相匹配的音乐列表后,可以根据与状态标记相对应的预设播放策略来播放音乐列表中的音乐。例如,当状态标记为胎教标记时,其可以对所需要播放的音乐进行滤波处理,同时还可限定播放的音量、时间等信息,以保护胎儿宝宝的安全,避免对其造成不必要的伤害等。After the music list matching the heart rate information is acquired in the music database, the music in the music list can be played according to a preset play strategy corresponding to the status flag. For example, when the status is marked as a prenatal education mark, it can filter the music to be played, and at the same time, it can also limit the playing volume, time and other information to protect the safety of the fetus and avoid unnecessary harm to it, etc. .
本实施例中的音乐播放方法,可以基于耳机的状态标记,根据当前获取的心率信息用不同的用户群体推送不同的音乐,其推送的音乐还可以根据预设播放策略进行播放,增加用户的使用耳机的愉悦感,扩充了普通耳机的使用功能,提高了用户体验度,满足了用户的个性化需求。The music playing method in this embodiment can push different music to different user groups according to the currently obtained heart rate information based on the status mark of the earphone, and the pushed music can also be played according to the preset playing strategy, so as to increase the usage of users. The pleasant feeling of earphones expands the use functions of ordinary earphones, improves user experience, and meets the individual needs of users.
图7为再一个实施例播放音乐的流程图。在一个实施例中,当所述状态标记为胎教标记时,所述播放音乐,包括:FIG. 7 is a flow chart of playing music according to yet another embodiment. In one embodiment, when the state is marked as a prenatal education mark, the playing music includes:
步骤702:获取所述音乐中音频频率高于预设频率的待处理音频;Step 702: Acquire the to-be-processed audio whose audio frequency is higher than a preset frequency in the music;
其中,预设频率为胎儿所能接收到的音频信号值。具体地,预设频率可以设为2000赫兹。获取待播放的音乐中高于预设频率的待处理音频信号。The preset frequency is an audio signal value that the fetus can receive. Specifically, the preset frequency may be set to 2000 Hz. Acquire the to-be-processed audio signal higher than the preset frequency in the music to be played.
步骤704:对所述待处理音频进行低通滤波处理,以过滤所述待处理音频。Step 704: Perform low-pass filtering on the to-be-processed audio to filter the to-be-processed audio.
通过低通滤波器将所接收到的音乐中的音频频率高于预设频率的音频进行过滤,从而过滤掉对胎儿有害的音频,进而能够很好的保护胎儿的听力,避免了中高频声给胎儿的听力造成损伤。The low-pass filter is used to filter the audio frequency in the received music higher than the preset frequency, so as to filter out the audio harmful to the fetus, which can well protect the hearing of the fetus and avoid the medium and high frequency sound. damage to the hearing of the fetus.
步骤706:在预设时间内,根据预设音量播放处理后的所述音乐。Step 706: Play the processed music according to a preset volume within a preset time.
其中,预设时间内胎教时长,一般可以设为10-15分钟。在该设定的预设时间内,根据预设音量来播放经滤波处理后的音乐。其中预设音量的大小可以根据成人隔着手掌听到传声器中的音响强度,亦即相当于胎儿在子宫内所能听到的音响强度来调试;腹壁厚的孕妇,音量可以稍大一些;腹壁薄的孕妇,音量应适当小一些。Among them, the prenatal education time in the preset time can generally be set to 10-15 minutes. Within the set preset time, the filtered music is played according to the preset volume. The preset volume can be adjusted according to the sound intensity of the microphone heard by adults through the palm of the hand, which is equivalent to the sound intensity that the fetus can hear in the womb; pregnant women with thick abdominal walls, the volume can be slightly larger; abdominal wall Thin pregnant women, the volume should be appropriately small.
本实施例中,在播放音乐列表的音乐时,可对高于预设频率的音频进行滤波处理,从而过滤掉对胎儿有害的音频,进而能够很好的保护胎儿的听力,避免了中高频声给胎儿的听力造成损伤;同时,在播放滤波处理后的音乐时,通过控制播放的时长、音量的大小,可以进一步避免长时间、高分贝的播放音乐给胎儿的听力造成损伤。In this embodiment, when playing the music in the music list, the audio frequency higher than the preset frequency can be filtered, so as to filter out the audio frequency that is harmful to the fetus, so that the hearing of the fetus can be well protected and the medium and high frequency sound can be avoided. It can cause damage to the hearing of the fetus; at the same time, when playing the filtered music, by controlling the playing time and volume, it can further avoid the damage to the hearing of the fetus caused by playing music for a long time and high decibels.
图8为一个实施例中,当状态标记为胎教标记时,所述播放音乐的流程图。在一个实施例中,当状态标记为胎教标记时,所述播放音乐,还包括:FIG. 8 is a flow chart of playing music when the status is marked as a prenatal education mark in one embodiment. In one embodiment, when the status is marked as a prenatal education mark, the playing music further includes:
步骤802:提示用户是否对所述心率信号进行录制。Step 802: Prompt the user whether to record the heart rate signal.
当状态标记为胎教标记时,其获取的心率信号为胎儿的心率信号,也即,胎心率。当获取胎心率时,提示用户是否对该心率信号进行录制。提示方式可以为语音提示、显示提示等。例如,可以发出“是否录制胎心率”的语音提示,该语音提示可以通过耳机播放,也可以由终端直接播放;还可以通过显示图片和/或文字的方式,在终端上显示“是否录制胎心率”的提示信息。When the status flag is the prenatal education flag, the acquired heart rate signal is the fetal heart rate signal, that is, the fetal heart rate. When acquiring the fetal heart rate, the user is prompted whether to record the heart rate signal. The prompting method may be voice prompting, display prompting, and the like. For example, a voice prompt "whether to record fetal heart rate" can be issued, and the voice prompt can be played through headphones or directly played by the terminal; it can also be displayed on the terminal by displaying pictures and/or text "whether to record the fetal heart rate or not" Heart Rate" prompt.
需要说明的是,提示用户是否对心率信号进行录制的提示方式、提示内容再次均不作进一步的限定,可以根据用户的需要自定义设置。It should be noted that the prompting method and prompting content for prompting the user whether to record the heart rate signal are not further limited, and the settings can be customized according to the needs of the user.
步骤804:接收用户的触发操作,基于所述耳机录制所述心率信息。Step 804: Receive a user's trigger operation, and record the heart rate information based on the earphone.
接收用户的触发操作,该触发操作用于指示耳机执行录制该心率信息的操作。其中,触发操作可以为用户自定义的语音触发,例如“录制胎心率”,还可以为基于终端或耳机的点击、滑动等触控操作等。再次,不对用户的触发操作做进一步的限定。A trigger operation of the user is received, and the trigger operation is used to instruct the earphone to perform the operation of recording the heart rate information. Among them, the trigger operation can be a user-defined voice trigger, such as "record fetal heart rate", and can also be a touch operation such as clicking or sliding based on a terminal or an earphone. Again, the triggering operation of the user is not further limited.
当终端或耳机接收到用户的触发操作时,基于耳机的麦克风或电声换能器录制所述心率信息。When the terminal or the earphone receives the user's trigger operation, the earphone-based microphone or electro-acoustic transducer records the heart rate information.
本实施例中音乐播放方法,基于耳机可以对胎儿的心率信息进行录制,并对其录制的胎心率进行标记存储,可以留作作为纪念,提高用户的体验度。In the music playback method in this embodiment, the heart rate information of the fetus can be recorded based on the earphone, and the recorded fetal heart rate can be marked and stored, which can be kept as a souvenir to improve the user's experience.
图9为另一个实施例中播放音乐的流程图。在一个实施例中,当所述状态标记为运动标记时,所述播放音乐,包括:FIG. 9 is a flow chart of playing music in another embodiment. In one embodiment, when the state is marked as a motion mark, the playing music includes:
步骤902:播放音乐时,按照预设周期检测当前用户的心率信息。Step 902: When playing music, detect the heart rate information of the current user according to a preset period.
当耳机的状态标记为运动标记时,可以根据用户当前的心率信息播放与该心率信息相匹配的音乐。在播放音乐的过程中,按照预设周期检测当前用户的心率信息。其中,预设周期可以设置为10-30分钟。当需要检测用户的心率信息时,暂停当前正在播放的音乐,基于耳机采集耳道内由于振动而产生的压力变化信号,并获取当前用户的心率信息。When the state of the earphone is marked as a sports mark, music that matches the heart rate information can be played according to the user's current heart rate information. In the process of playing music, the heart rate information of the current user is detected according to a preset cycle. Wherein, the preset period may be set to 10-30 minutes. When the user's heart rate information needs to be detected, the currently playing music is paused, the pressure change signal in the ear canal due to vibration is collected based on the earphone, and the current user's heart rate information is obtained.
步骤904:当所述心率信息持续大于第一预设心率值时,执行提醒当前用户的操作。Step 904: When the heart rate information is continuously greater than the first preset heart rate value, perform an operation of reminding the current user.
当检测到的心率信息持续大于第一预设心率值时,执行提醒当前用户的操作。其中,第一预设心率值为80%~90%最大心率,健康成年人的最大心率=220-年龄。持续大于第一预设心率值可以理解为连续两次测得的心率信息均大于第一预设心率值。当所述心率信息持续大于第一预设心率值时,执行提醒当前用户的操作。其中,可以通过耳机提醒、铃声提醒、振动提醒、显示提醒等方式来提醒用户停止锻炼,注意休息等。在本实施例中,并不限定其提醒方式、提醒内容。When the detected heart rate information is continuously greater than the first preset heart rate value, the operation of reminding the current user is performed. The first preset heart rate value is 80% to 90% of the maximum heart rate, and the maximum heart rate of a healthy adult=220-age. Continuously greater than the first preset heart rate value can be understood as the heart rate information measured twice in a row is greater than the first preset heart rate value. When the heart rate information is continuously greater than the first preset heart rate value, an operation of reminding the current user is performed. Among them, the user can be reminded to stop exercising, pay attention to rest, etc. by means of earphone reminders, ringtone reminders, vibration reminders, display reminders, and the like. In this embodiment, the reminder method and reminder content are not limited.
步骤906:当所述心率信息小于第二预设心率值时,关闭或暂停当前正在播放的音乐。Step 906: When the heart rate information is less than the second preset heart rate value, turn off or pause the currently playing music.
当检测到的心率信息小于第二预设心率值时,关闭或暂停当前用于播放的音乐。其中,第二预设心率值可以设为40~60分/次,也即,当检测到的心率信息小于40~60分/次时,可以认为当前用户已进入睡眠状态,可以控制关闭或暂停当前正在播放的音乐,以减少因播放音乐而造成的功耗。When the detected heart rate information is less than the second preset heart rate value, the music currently being played is turned off or paused. Among them, the second preset heart rate value can be set to 40-60 minutes/time, that is, when the detected heart rate information is less than 40-60 minutes/time, it can be considered that the current user has entered a sleep state, and can be turned off or suspended. Currently playing music to reduce power consumption caused by playing music.
应该理解的是,虽然上述实施例对应的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图3-9中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flowcharts corresponding to the above embodiments are sequentially displayed according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 3-9 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. These sub-steps or stages are not necessarily completed at the same time. The order of execution of the steps is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.
如图10所示,在一个实施例中,提供一种音乐播放装置,该装置包括:As shown in Figure 10, in one embodiment, a music playback device is provided, the device comprising:
信号获取模块1010,用于当耳机被佩戴在用户的预设位置时,获取耳机在所述预设位置处由于振动而产生的压力变化信号;a signal acquisition module 1010, configured to acquire the pressure change signal of the earphone due to vibration at the preset position when the earphone is worn at the preset position of the user;
心率获取模块1020,用于根据所述压力变化信号获取心率信息;a heart rate acquisition module 1020, configured to acquire heart rate information according to the pressure change signal;
音乐播放模块1030,用于根据耳机被佩戴在用户的预设位置和心率信息推送并播放音乐。The music playing module 1030 is configured to push and play music according to the preset position where the headset is worn by the user and heart rate information.
上述音乐播放装置,可以根据用户佩戴耳机的预设位置,并在预设位置获取相应的心率信息,根据获取的心率信息为用户推送并播放与该心率信息相匹配的音乐,无需用户手动操作就可以为用户推荐并播放个性化的音乐,增加了用户使用耳机的愉悦感,满足了用户的个性化需求;同时,上述音乐播放方法,不需要在耳机中增加额外的传感器就能获取用户的心率信息,成本低,设计简单,扩充了普通耳机的使用功能,提高了用户体验度。The above-mentioned music playback device can obtain the corresponding heart rate information at the preset position according to the preset position where the user wears the earphone, and push and play music that matches the heart rate information for the user according to the obtained heart rate information, without the need for manual operation by the user. It can recommend and play personalized music for users, which increases the user's sense of pleasure in using headphones and satisfies the user's personalized needs; at the same time, the above music playback method can obtain the user's heart rate without adding additional sensors to the headphones. Information, low cost, simple design, expands the use function of ordinary headphones, and improves user experience.
在一个实施例中,音乐播放装置还包括:In one embodiment, the music playback device further includes:
标记获取模块,用于获取用户对所述耳机的工作模式的状态标记,所述状态标记至少包括默认标记、运动标记和胎教标记;a mark acquiring module, configured to acquire a status mark of the working mode of the earphone by the user, the status mark including at least a default mark, a sports mark and a prenatal education mark;
提示模块,用于根据所述状态标记提示用户将所述耳机佩戴在所述预设位置;a prompting module, used for prompting the user to wear the earphone in the preset position according to the status mark;
判断模块,用于基于耳机播放的音频信号检测所述耳机是否佩戴在所述预设位置。A determination module, configured to detect whether the earphone is worn at the preset position based on the audio signal played by the earphone.
在一个实施例中,信号获取模块,包括:In one embodiment, the signal acquisition module includes:
采集单元,用于获取耳机在所述预设位置处采集的检测信号;an acquisition unit, configured to acquire the detection signal acquired by the earphone at the preset position;
滤波单元,用于对所述检测信号进行滤波处理,以滤除所述检测信号中的噪声信号,获取所述压力变化信号。A filtering unit, configured to perform filtering processing on the detection signal, so as to filter out the noise signal in the detection signal, and obtain the pressure change signal.
在一个实施例中,音乐播放模块,包括:In one embodiment, the music playback module includes:
调用单元,用于根据所述状态标记调用与所述状态标记对应的音乐数据库;a calling unit, configured to call the music database corresponding to the status mark according to the status mark;
列表获取单元,用于在所述音乐数据库中获取与所述心率信息相匹配的音乐列表;a list acquisition unit, configured to acquire a music list matching the heart rate information in the music database;
播放单元,用于按照与所述状态标记相对应的预设播放策略播放所述音乐列表中的音乐。A playing unit, configured to play the music in the music list according to a preset playing strategy corresponding to the state flag.
在一个实施例中,当所述状态标记为胎教标记时,所述播放单元用于获取所述音乐中音频频率高于预设频率的待处理音频;对所述待处理音频进行低通滤波处理,以过滤所述待处理音频;在预设时间内,根据预设音量播放处理后的所述音乐。In one embodiment, when the status is marked as a prenatal education mark, the playback unit is configured to acquire the audio to be processed whose audio frequency is higher than a preset frequency in the music; perform low-pass filtering on the audio to be processed , to filter the audio to be processed; within a preset time, play the processed music according to a preset volume.
在一个实施例中,当所述状态标记为胎教标记时,所述播放单元还用于提示用户是否对所述心率信号进行录制;接收用户的触发操作,基于所述耳机录制所述心率信息。In one embodiment, when the state is marked as a prenatal education mark, the playback unit is further configured to prompt the user whether to record the heart rate signal; receive a trigger operation from the user, and record the heart rate information based on the earphone.
在一个实施例中,当所述状态标记为运动标记时,所述播放单元用于播放音乐时,按照预设周期检测当前用户的心率信息;当所述心率信息持续大于第一预设心率值时,执行提醒用户的操作;当所述心率信息小于第二预设心率值时,关闭或暂停当前正在播放的音乐。In one embodiment, when the state is marked as a sports mark, the playback unit is used to play music, and detect the current user's heart rate information according to a preset period; when the heart rate information is continuously greater than the first preset heart rate value When the heart rate information is less than the second preset heart rate value, the operation of reminding the user is performed; when the heart rate information is less than the second preset heart rate value, the currently playing music is turned off or paused.
上述音乐播放装置中各个模块的划分仅用于举例说明,在其他实施例中,可将音乐播放装置按照需要划分为不同的模块,以完成上述音乐播放装置的全部或部分功能。The division of each module in the above music playing device is only for illustration. In other embodiments, the music playing device can be divided into different modules as required to complete all or part of the functions of the above music playing device.
关于音乐播放装置的具体限定可以参见上文中对于音乐播放方法的限定,在此不再赘述。上述音乐播放装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the music playing device, reference may be made to the above limitations on the music playing method, which will not be repeated here. Each module in the above-mentioned music playing device can be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
本申请实施例中提供的音乐播放装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述的音乐播放方法的步骤。The implementation of each module in the music playing device provided in the embodiments of the present application may be in the form of a computer program. The computer program can be run on a terminal or server. The program modules constituted by the computer program can be stored in the memory of the terminal or the server. When the computer program is executed by the processor, the steps of the music playing method described in the embodiments of the present application are implemented.
本申请实施例还提供了一种耳机,该耳机包括采集模块、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器分别与所述采集模块、存储器电连接,所述采集模块用于在所述预设位置处采集由于振动而产生的压力变化信号,所述处理器执行所述计算机程序时实现如上述各实施例中所描述的音乐播放方法。The embodiment of the present application also provides an earphone, the earphone includes a collection module, a memory, a processor, and a computer program stored in the memory and running on the processor, the processor is electrically connected to the collection module and the memory, respectively. The acquisition module is configured to acquire the pressure change signal due to vibration at the preset position, and the processor implements the music playing method described in the above embodiments when the processor executes the computer program.
在一个实施例中,所述采集模块为电声换能器,所述电声换能器用于播放所述音频信号,并用于在所述预设位置处采集由于振动而产生的压力变化信号,其中,所述电声换能器为扬声器或喇叭。In one embodiment, the acquisition module is an electro-acoustic transducer, and the electro-acoustic transducer is used to play the audio signal and to collect the pressure change signal generated by vibration at the preset position, Wherein, the electro-acoustic transducer is a speaker or a horn.
在一个实施例中,所述采集模块为麦克风,用于在所述预设位置处采集由于振动而产生的压力变化信号。In one embodiment, the acquisition module is a microphone, which is used to acquire a pressure change signal generated by vibration at the preset position.
进一步的,当采集模块为麦克风时,该耳机还包括扬声器,该扬声器用于播放所述音频信号。Further, when the acquisition module is a microphone, the earphone further includes a speaker, and the speaker is used to play the audio signal.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如上述各实施例中所描述的音乐播放方法。The embodiment of the present application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform as described in the various embodiments above. Describes the music playback method.
本申请实施例还提供了一种计算机程序产品。一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各实施例中所描述的音乐播放方法。The embodiments of the present application also provide a computer program product. A computer program product containing instructions, when run on a computer, causes the computer to execute the music playing method described in the above embodiments.
本申请实施例还提供了一种终端设备。如图11所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售电子设备)、车载电脑、穿戴式设备等任意终端设备,以终端设备为手机为例:The embodiment of the present application also provides a terminal device. As shown in FIG. 11 , for the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The terminal device can be any terminal device including mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales electronic device), vehicle computer, wearable device, etc. example:
图11为与本申请实施例提供的终端设备相关的手机的部分结构的框图。参考图11,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、无线保真(wireless fidelity,WiFi)模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图11所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 11 is a block diagram of a partial structure of a mobile phone related to a terminal device provided by an embodiment of the present application. 11 , the mobile phone includes: a radio frequency (RF) circuit 1110 , a memory 1120 , an input unit 1130 , a display unit 1140 , a sensor 1150 , an audio circuit 1160 , a wireless fidelity (WiFi) module 1170 , and a processor 1180 , and power supply 1190 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 11 does not constitute a limitation on the mobile phone, and may include more or less components than shown, or combine some components, or arrange different components.
其中,RF电路1110可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1180处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System ofMobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband CodeDivision Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1110 can be used for receiving and sending signals during sending and receiving of information or during a call. After receiving the downlink information of the base station, it can be processed by the processor 1180; it can also send the uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 1110 may also communicate with networks and other devices via wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access) Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE)), email, Short Messaging Service (Short Messaging Service, SMS) and the like.
存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1120 can be used to store software programs and modules, and the processor 1180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1120 . The memory 1120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playback function, an application program for an image playback function, etc.), etc.; The data storage area may store data (such as audio data, address book, etc.) created according to the usage of the mobile phone, and the like. Additionally, memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元1130可用于接收输入的数字或字符信息,以及产生与手机1100的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括操作面板1131以及其他输入设备1132。操作面板1131,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在操作面板1131上或在操作面板1131附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,操作面板1131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现操作面板1131。除了操作面板1131,输入单元1130还可以包括其他输入设备1132。具体地,其他输入设备1132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1130 may be used to receive input numerical or character information, and generate key signal input related to user settings and function control of the mobile phone 1100 . Specifically, the input unit 1130 may include an operation panel 1131 and other input devices 1132 . The operation panel 1131, also known as a touch screen, can collect the user's touch operations on or near it (such as the user's operations on or near the operation panel 1131 using any suitable object or accessory such as a finger, a stylus, etc.) , and drive the corresponding connection device according to the preset program. In one embodiment, the operation panel 1131 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 1180, and can receive the commands sent by the processor 1180 and execute them. In addition, the operation panel 1131 can be implemented in various types such as resistive type, capacitive type, infrared ray, and surface acoustic wave. In addition to the operation panel 1131 , the input unit 1130 may further include other input devices 1132 . Specifically, other input devices 1132 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), and the like.
显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1140可包括显示面板1141。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1141。在一个实施例中,操作面板1131可覆盖显示面板1141,当操作面板1131检测到在其上或附近的触摸操作后,传送给处理器1180以确定触摸事件的类型,随后处理器1180根据触摸事件的类型在显示面板1141上提供相应的视觉输出。虽然在图11中,操作面板1131与显示面板1141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将操作面板1131与显示面板1141集成而实现手机的输入和输出功能。The display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1140 may include a display panel 1141 . In one embodiment, the display panel 1141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the operation panel 1131 may cover the display panel 1141. When the operation panel 1131 detects a touch operation on or near it, it transmits it to the processor 1180 to determine the type of the touch event, and then the processor 1180 determines the type of the touch event according to the touch event. The type provides corresponding visual output on the display panel 1141. Although in FIG. 11, the operation panel 1131 and the display panel 1141 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the operation panel 1131 and the display panel 1141 can be integrated to realize the mobile phone input and output functions.
手机1100还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及距离传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1141的亮度,距离传感器可在手机移动到耳边时,关闭显示面板1141和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。Cell phone 1100 may also include at least one sensor 1150, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor can include an ambient light sensor and a distance sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1141 according to the brightness of the ambient light, and the distance sensor can turn off the display panel 1141 and/or when the mobile phone is moved to the ear. or backlight. Motion sensors can include acceleration sensors, which can detect the magnitude of acceleration in all directions, and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of mobile phones (such as switching between horizontal and vertical screens), and vibration recognition related functions (such as Pedometer, tapping), etc.; in addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc.
音频电路1160、扬声器1161和传声器1162可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出;另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110可以发送给另一手机,或者将音频数据输出至存储器1120以便后续处理。Audio circuit 1160, speaker 1161 and microphone 1162 may provide an audio interface between the user and the cell phone. The audio circuit 1160 can convert the received audio data into an electrical signal, and transmit it to the speaker 1161, and the speaker 1161 converts it into a sound signal for output; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 1160 After receiving, the audio data is converted into audio data, and then the audio data is output to the processor 1180 for processing, and can be sent to another mobile phone through the RF circuit 1110, or the audio data can be output to the memory 1120 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图11示出了WiFi模块1170,但是可以理解的是,其并不属于手机1100的必须构成,可以根据需要而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 1170, which provides users with wireless broadband Internet access. Although FIG. 11 shows the WiFi module 1170, it can be understood that it is not a necessary component of the mobile phone 1100 and can be omitted as required.
处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监听。在一个实施例中,处理器1180可包括一个或多个处理单元。在一个实施例中,处理器1180可集成应用处理器和调制解调器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调器主要处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1180中。比如,该处理器1180可集成应用处理器和基带处理器,基带处理器与和其它外围芯片等可组成调制解调器。手机1100还包括给各个部件供电的电源1190(比如电池),优选的,电源可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The processor 1180 is the control center of the mobile phone, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the memory 1120, and calling the data stored in the memory 1120. Various functions of the mobile phone and processing data, so as to monitor the mobile phone as a whole. In one embodiment, the processor 1180 may include one or more processing units. In one embodiment, the processor 1180 may integrate an application processor and a modem, wherein the application processor mainly handles the operating system, user interface and application programs, etc.; the modem mainly handles wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1180. For example, the processor 1180 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem. The mobile phone 1100 also includes a power supply 1190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1180 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
在一个实施例中,手机1100还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 1100 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该手机所包括的处理器执行存储在存储器上的计算机程序时实现上述所描述的音乐播放方法。In the embodiment of the present application, the above-described music playing method is implemented when the processor included in the mobile phone executes the computer program stored in the memory.
在处理器上运行的计算机程序的执行时,节省了监测用户健康数据的设备成本,使用户获取健康数据的方式更便捷,并提升用户的人机交互体验。When the computer program running on the processor is executed, the equipment cost for monitoring the user's health data is saved, the way for the user to obtain the health data is more convenient, and the user's human-computer interaction experience is improved.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to a memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810520742.5A CN108429972B (en) | 2018-05-28 | 2018-05-28 | Music playing method, device, terminal, earphone and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810520742.5A CN108429972B (en) | 2018-05-28 | 2018-05-28 | Music playing method, device, terminal, earphone and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108429972A CN108429972A (en) | 2018-08-21 |
CN108429972B true CN108429972B (en) | 2019-12-27 |
Family
ID=63164242
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810520742.5A Expired - Fee Related CN108429972B (en) | 2018-05-28 | 2018-05-28 | Music playing method, device, terminal, earphone and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108429972B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109765784A (en) * | 2019-01-11 | 2019-05-17 | 深圳市迷购网络科技有限公司 | Headset control method, earphone and computer readable storage medium |
CN109688503B (en) * | 2019-01-15 | 2020-11-06 | 浙江强脑科技有限公司 | Psychological perception state detection system and method |
CN112416285A (en) * | 2019-08-20 | 2021-02-26 | 奇酷互联网络科技(深圳)有限公司 | Intelligent earphone playing method, intelligent earphone and storage medium |
US11632614B2 (en) * | 2020-01-29 | 2023-04-18 | Google Llc | Different head detection in headphones |
CN111966319B (en) * | 2020-07-16 | 2024-04-23 | 珠海市杰理科技股份有限公司 | Audio control method, device, system, storage medium and terminal |
CN113425276A (en) * | 2021-06-28 | 2021-09-24 | 南昌勤胜电子科技有限公司 | Heart rate monitoring method, earphone and computer storage medium |
CN113536027B (en) * | 2021-07-27 | 2024-10-22 | 咪咕音乐有限公司 | Music recommendation method, device, equipment and computer-readable storage medium |
CN115914934A (en) * | 2021-08-05 | 2023-04-04 | 深圳市云动创想科技有限公司 | Intelligent audio playback system based on human body state recognition |
CN113891209A (en) * | 2021-09-27 | 2022-01-04 | 深圳艾创力科技有限公司 | Earphone noise reduction method, system, device and storage medium |
CN114385108B (en) * | 2021-12-23 | 2024-03-22 | 咪咕音乐有限公司 | Comment display method, device and storage medium during music playback |
CN114936302A (en) * | 2022-05-17 | 2022-08-23 | 深圳市爱都科技有限公司 | Music recommendation method, apparatus, electronic device, and computer-readable storage medium |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2710074Y (en) * | 2004-07-13 | 2005-07-13 | 黄茂雄 | Auditory device for listening fetal heart sound |
CN201015222Y (en) * | 2007-02-08 | 2008-01-30 | 杨健飞 | Earmuff music player |
WO2010079257A1 (en) * | 2009-01-07 | 2010-07-15 | Tampereen Teknillinen Yliopisto | A device, an apparatus and a method for measuring biological information |
CN202352116U (en) * | 2011-12-21 | 2012-07-25 | 王洪芬 | Novel antenatal training device |
CN202601189U (en) * | 2012-05-17 | 2012-12-12 | 深圳市达人电器有限公司 | Music playing apparatus and device for fetus and infant |
CN104244127B (en) * | 2014-08-25 | 2017-12-19 | 歌尔股份有限公司 | A kind of heart rate detection method applied to earphone and the earphone that heart rate can be detected |
US9866941B2 (en) * | 2015-10-20 | 2018-01-09 | Bragi GmbH | Multi-point multiple sensor array for data sensing and processing system and method |
CN106340314A (en) * | 2016-08-23 | 2017-01-18 | 乐视控股(北京)有限公司 | Music playing method and headphone |
CN106658256A (en) * | 2016-10-27 | 2017-05-10 | 努比亚技术有限公司 | Earphone, terminal and terminal control method |
WO2018103028A1 (en) * | 2016-12-08 | 2018-06-14 | 深圳市汇顶科技股份有限公司 | Audio playback device, system, and method |
CN107569217A (en) * | 2017-08-29 | 2018-01-12 | 上海展扬通信技术有限公司 | A kind of control method of intelligent earphone and the intelligent earphone |
-
2018
- 2018-05-28 CN CN201810520742.5A patent/CN108429972B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN108429972A (en) | 2018-08-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108429972B (en) | Music playing method, device, terminal, earphone and readable storage medium | |
US12182474B2 (en) | Wireless earpiece with a passive virtual assistant | |
US12265757B2 (en) | Voice assistant for wireless earpieces | |
US10313779B2 (en) | Voice assistant system for wireless earpieces | |
CN111736451A (en) | Smart watch with embedded wireless headset and information broadcasting method | |
CN101677763B (en) | Sleeping mode accessory | |
CN101467875B (en) | Ear-worn Physiological Feedback Devices | |
CN106535044A (en) | Intelligent sound equipment playing control method and music playing control system | |
JP6837407B2 (en) | Electronic devices, servers, data structures, physical condition management methods and physical condition management programs | |
CN108391207A (en) | Data processing method, device, terminal, earphone and readable storage medium | |
TW201510740A (en) | Method and system for communicatively coupling a wearable computer with one or more non-wearable computers | |
CN108874130B (en) | Playback control method and related products | |
CN204467155U (en) | A kind of Intelligent bracelet | |
CN109413537A (en) | Audio signal playback method, device and earphone | |
CN109086027A (en) | A kind of audio signal playback method and terminal | |
CN205160790U (en) | Take osteoacusis intelligence wrist -watch audiphone of bluetooth and speech exchange | |
CN112543247B (en) | Intelligent bracelet and control method thereof | |
WO2022161067A1 (en) | Pre-sleep state detection method and device | |
CN108540665A (en) | Based on flexible terminal and its massage method, computer readable storage medium | |
CN113134218B (en) | Exercise and fitness method and related device | |
CN107833585A (en) | A kind of Intelligent adjustment music player | |
CN108922224A (en) | Position indicating method and Related product | |
CN205143594U (en) | Intelligence belt | |
CN108282717A (en) | Method and device for adjusting and inducing output volume of microphone, microphone and medium | |
KR20170067950A (en) | System for pregnant women on parental care |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20191227 |