技术领域technical field
本发明涉及终端应用技术领域,特别是涉及一种在终端上进行音乐专属播放的方法和系统。The present invention relates to the technical field of terminal applications, and in particular, to a method and a system for playing music exclusively on a terminal.
背景技术Background technique
随着终端技术的发展和人们生活水平的提高,各种终端特别是诸如手机、平板电脑等移动终端已成为现代人必不可少的工具,给人们的生活带来了很大的便利。在某些场合下,用户可能只想使用终端播放音乐,但由于终端应用众多,在播放音乐时,常常被各种应用的消息铃声打断或干扰,影响用户体验。With the development of terminal technology and the improvement of people's living standards, various terminals, especially mobile terminals such as mobile phones and tablet computers, have become indispensable tools for modern people, bringing great convenience to people's lives. In some occasions, a user may only want to use the terminal to play music, but due to numerous terminal applications, when playing music, the user is often interrupted or disturbed by message ringtones of various applications, which affects the user experience.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种在终端上进行音乐专属播放的方法和系统,可以避免在终端播放音乐时给用户造成不必要的打扰,提升用户体验。The purpose of the present invention is to provide a method and system for exclusive music playback on a terminal, which can avoid unnecessary disturbance to users when the terminal plays music, and improve user experience.
本发明的目的通过如下技术方案实现:The object of the present invention is achieved through the following technical solutions:
一种在终端上进行音乐专属播放的方法,包括如下步骤:A method for exclusive music playback on a terminal, comprising the following steps:
在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式;When the music playing application of the terminal is playing music, if an instruction for enabling the exclusive music playing mode is received, the exclusive music playing mode is enabled, wherein the exclusive music playing mode is a pre-added music playing mode on the terminal. a music playback mode;
获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中;Obtain the first identification information of the music playback application, and add the first identification information as an identification code to a preset music-exclusive playback file path;
检测所述终端的第一应用发送的音频播放请求,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略。The audio playback request sent by the first application of the terminal is detected, and the audio playback strategy of the first application is determined according to the audio playback request and the identification code.
一种在终端上进行音乐专属播放的系统,包括:A system for exclusive music playback on a terminal, comprising:
开启模块,用于在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式;The opening module is used to start the music exclusive playing mode if an opening instruction of the music exclusive playing mode is received when the music playing application of the terminal performs music playing, wherein the music exclusive playing mode is in the music exclusive playing mode. A music playback mode added in advance on the terminal;
获取模块,用于获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中;an acquisition module, configured to acquire the first identification information of the music playback application, and add the first identification information as an identification code to a preset music-specific playback file path;
控制模块,用于检测所述终端的第一应用发送的音频播放请求,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略。The control module is configured to detect the audio playing request sent by the first application of the terminal, and determine the audio playing strategy of the first application according to the audio playing request and the identification code.
依据上述本发明的方案,其是在终端上预先增设了音乐专属播放模式,在所述终端的音乐播放应用进行音乐播放时,若接收到开启该音乐专属播放模式的指令,则开启该音乐专属播放模式,并获取所述音乐播放应用的第一标识信息,将该第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,检测所述终端的第一应用发送的音频播放请求,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略,即控制第一应用的音频的是否被播放,由于在终端上增设了音乐专属播放模式,且由于将正在播放的音乐的第一标识信息作为标识码添加到了预设的音乐专属播放文件路径中,并可以根据检测到音频播放请求以及所述标识码控制第一应用的音频的播放与否,因而,避免了在终端播放音乐时给用户造成不必要的打扰,提升了用户体验。According to the above-mentioned solution of the present invention, a music exclusive playback mode is pre-added on the terminal, and when the music playback application of the terminal performs music playback, if an instruction to enable the music exclusive playback mode is received, the music exclusive playback mode is turned on. play mode, and obtain the first identification information of the music playback application, add the first identification information as an identification code to the preset music-specific playback file path, and detect the audio playback request sent by the first application of the terminal , determine the audio playback strategy of the first application according to the audio playback request and the identification code, that is, control whether the audio of the first application is played, because a music exclusive playback mode is added on the terminal, and since the audio of the first application is being played The first identification information of the music is added to the preset music exclusive play file path as an identification code, and can control whether the audio of the first application is played or not according to the detected audio playback request and the identification code. When the terminal plays music, unnecessary disturbance is caused to the user, which improves the user experience.
附图说明Description of drawings
图1为本发明的在终端上进行音乐专属播放的方法的实施例一的流程示意图;1 is a schematic flowchart of Embodiment 1 of a method for performing exclusive music playback on a terminal according to the present invention;
图2为本发明的在终端上进行音乐专属播放的方法的实施例二的流程示意图;FIG. 2 is a schematic flowchart of Embodiment 2 of the method for performing exclusive music playback on a terminal according to the present invention;
图3为本发明的在终端上进行音乐专属播放的方法的实施例三的流程示意图;3 is a schematic flowchart of Embodiment 3 of the method for performing exclusive music playback on a terminal according to the present invention;
图4为本发明的在终端上进行音乐专属播放的方法的实施例四的流程示意图;4 is a schematic flowchart of Embodiment 4 of the method for performing exclusive music playback on a terminal according to the present invention;
图5为本发明的在终端上进行音乐专属播放的方法的实施例五的流程示意图;5 is a schematic flowchart of Embodiment 5 of the method for performing exclusive music playback on a terminal according to the present invention;
图6为本发明的在终端上进行音乐专属播放的系统的在其中一个实施例中的结构示意图;FIG. 6 is a schematic structural diagram of a system for performing music exclusive playback on a terminal according to one embodiment of the present invention;
图7为本发明的在终端上进行音乐专属播放的系统的在另一个实施例中的结构示意图;FIG. 7 is a schematic structural diagram of a system for performing exclusive music playback on a terminal according to another embodiment of the present invention;
图8为本发明的在终端上进行音乐专属播放的系统的在第三个实施例中的结构示意图;FIG. 8 is a schematic structural diagram of a system for performing exclusive music playback on a terminal of the present invention in a third embodiment;
图9为本发明的在终端上进行音乐专属播放的系统的在第四个实施例中的结构示意图;9 is a schematic structural diagram of a system for performing exclusive music playback on a terminal according to the present invention in a fourth embodiment;
图10为本发明的在终端上进行音乐专属播放的系统的在第五个实施例中的结构示意图;10 is a schematic structural diagram of a system for performing exclusive music playback on a terminal according to the present invention in a fifth embodiment;
图11为本发明的在终端上进行音乐专属播放的系统的在第六个实施例中的结构示意图;11 is a schematic structural diagram of a system for performing exclusive music playback on a terminal according to the present invention in the sixth embodiment;
图12为本发明的在终端上进行音乐专属播放的系统的在第七个实施例中的结构示意图。FIG. 12 is a schematic structural diagram of a system for exclusive music playing on a terminal in the seventh embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不限定本发明的保护范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in 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 invention, and do not limit the protection scope of the present invention.
在下述说明中,首先针对本发明在终端上进行音乐专属播放的方法的实施例进行说明,再对本发明的在终端上进行音乐专属播放的系统的各实施例进行说明。In the following description, the embodiments of the method for exclusive music playing on a terminal of the present invention are first described, and then the embodiments of the system for exclusive music playing on a terminal of the present invention are explained.
实施例一Example 1
参见图1所示,为本发明的在终端上进行音乐专属播放的方法的实施例一的流程示意图。如图1所示,本实施例中的在终端上进行音乐专属播放的方法包括如下步骤:Referring to FIG. 1 , it is a schematic flowchart of Embodiment 1 of the method for performing exclusive music playback on a terminal according to the present invention. As shown in FIG. 1 , the method for exclusively playing music on a terminal in this embodiment includes the following steps:
步骤S101:在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,进入步骤S102;Step S101: When the music playback application of the terminal is performing music playback, if an instruction for enabling a music-exclusive playback mode is received, the music-exclusive playback mode is enabled, wherein the music-exclusive playback mode is on the terminal. A pre-added music playing mode, enter step S102;
其中,在所述终端的音乐播放应用进行音乐播放时,可以向用户提示是否进入音乐专属播放模式,提示的方式可以通过图表、声音、菜单等方式实现,用户可以通过手动设置、声音控制等方式向终端发送开启指令,终端接收到该开启指令后,开启音乐专属播放模式,音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,在该音乐专属播放模式下,并通过后续的步骤可以实现音乐播放免打扰;Wherein, when the music playing application of the terminal is playing music, it can prompt the user whether to enter the music exclusive playing mode, and the prompting method can be realized by means of charts, sounds, menus, etc., and the user can set manually, voice control, etc. Send an opening instruction to the terminal, and after receiving the opening instruction, the terminal starts the music exclusive play mode, and the music exclusive play mode is a music play mode added in advance on the terminal. In the music exclusive play mode, and through the subsequent The steps can realize music playback without disturbing;
本实施例中的在终端上进行音乐专属播放的方法还可以进一步包括步骤:向用户指示当前的音乐播放模式为音乐专属播放模式,其中,指示的方式可以通过声音、菜单、图标等方式实现;The method for performing exclusive music playback on the terminal in this embodiment may further include the steps of: indicating to the user that the current music playback mode is the music exclusive playback mode, wherein the instruction can be implemented by means of sounds, menus, icons, etc.;
步骤S102:获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,进入步骤S103;Step S102: Obtain the first identification information of the music playback application, add the first identification information as an identification code to the preset music-exclusive playback file path, and enter step S103;
其中,第一标识信息的可以包括所述音乐播放应用的进程名称、程序包名或进程号等中的任意一个;Wherein, the first identification information may include any one of the process name, program package name or process number of the music playback application;
步骤S103:检测所述终端的第一应用发送的音频播放请求,在检测到终端的第一应用发送的音频播放请求时,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略;Step S103: Detect the audio playback request sent by the first application of the terminal, and when detecting the audio playback request sent by the first application of the terminal, determine the audio playback request of the first application according to the audio playback request and the identification code. play strategy;
本实施例中的第一应用包括所述终端中的各种需要进行音频播放的应用,也可以包括上述的音乐播放应用,播放策略主要包括播放与不播放两种;The first application in this embodiment includes various applications in the terminal that need to perform audio playback, and may also include the above-mentioned music playback application, and the playback strategy mainly includes two types of playback and non-playing;
由于将第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,且由于每当有应用消息推送或收到通知等需要播放音乐、提示声、铃声时,都需要向终端的音频相关服务(如音频处理模块,或者称为音频处理流程)发送音频播放请求,这时,则可以获取第一应用的进程名称、程序包名或者进程号,将获取到的进程名称、程序包名或者进程号与所述标识码匹配,根据匹配结果控制控制所述第一应用的音频的播放策略;Since the first identification information is added as an identification code to the preset music-specific playback file path, and whenever there is an application message push or notification received, etc. that need to play music, prompt sounds, and ringtones, it is necessary to send an audio message to the terminal. Related services (such as audio processing modules, or audio processing processes) send audio playback requests. At this time, the process name, package name or process number of the first application can be obtained, and the obtained process name, program package name Or the process number is matched with the identification code, and the playback strategy of the audio of the first application is controlled according to the matching result;
具体地,在其中一个实施例中,根据所述音频播放请求获取所述第一应用的第二标识信息;判断所述第二标识信息是否与所述标识码匹配;若匹配,则对所述第一应用的音频进行播放,即播放策略为播放;若不匹配,则返回所述检测第一应用的音频播放请求的步骤,也即播放策略为不播放;其中,第二标识信息可以包括第一应用的进程名称、程序包名或者进程号中的任意一种,所述第一应用的音频进行播放的过程主要包括解析(解码)第一应用指定的音频文件,然后通过耳机或外放播放出来等。Specifically, in one embodiment, the second identification information of the first application is obtained according to the audio playback request; it is judged whether the second identification information matches the identification code; The audio of the first application is played, that is, the playback strategy is to play; if it does not match, then return to the step of detecting the audio playback request of the first application, that is, the playback strategy is not to play; wherein, the second identification information may include the first Any one of the process name, package name or process number of an application, and the process of playing the audio of the first application mainly includes parsing (decoding) the audio file specified by the first application, and then playing it through headphones or external speakers Come out and wait.
此外,本实施例中的在终端上进行音乐专属播放的方法还可以进一步包括步骤:在接收到所述音乐专属播放模式的关闭指令或者暂停指令时,或者在所述正在播放的音乐结束播放或者停止播放时,关闭音乐专属播放模式,这样可以,恢复所有应用(或者也可以称为第一应用)的音频播放功能。In addition, the method for performing exclusive music playback on a terminal in this embodiment may further include the step of: upon receiving a closing instruction or a pause instruction for the exclusive music playback mode, or when the currently playing music finishes playing or When the playback is stopped, the music-specific playback mode is turned off, so that the audio playback function of all applications (or also called the first application) can be restored.
据此,依据上述实施例的方案,其是在终端上预先增设了音乐专属播放模式,在所述终端的音乐播放应用进行音乐播放时,若接收到开启该音乐专属播放模式的指令,则开启该音乐专属播放模式,并获取所述音乐播放应用的第一标识信息,将该第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,检测所述终端的第一应用发送的音频播放请求,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略,即控制第一应用的音频的是否被播放,由于在终端上增设了音乐专属播放模式,且由于将正在播放的音乐的第一标识信息作为标识码添加到了预设的音乐专属播放文件路径中,并可以根据检测到音频播放请求以及所述标识码控制第一应用的音频的播放与否,因而,避免了在终端播放音乐时给用户造成不必要的打扰,提升了用户体验。Accordingly, according to the solution of the above-mentioned embodiment, an exclusive music playing mode is pre-added on the terminal, and when the music playing application of the terminal is playing music, if an instruction to enable the exclusive music playing mode is received, the music exclusive playing mode will be enabled. the music-exclusive play mode, and obtain the first identification information of the music-playing application, add the first identification information as an identification code to the preset music-exclusive play file path, and detect the information sent by the first application of the terminal. Audio playback request, determine the audio playback strategy of the first application according to the audio playback request and the identification code, that is, control whether the audio of the first application is played, because a music exclusive playback mode is added on the terminal, and due to The first identification information of the music being played is added to the preset music exclusive play file path as the identification code, and the audio playback request of the first application can be controlled according to the detection of the audio playback request and the identification code. , which avoids unnecessary disturbance to the user when the terminal plays music, and improves the user experience.
实施例二Embodiment 2
考虑到在所述终端进入音乐专属播放模式时,用户可能仍然希望部分应用的消息铃声(也可以被认为是音乐)被播放,例如,短信、来电的铃声,因此,还可以增加将这些应用的第三标识信息作为标识码添加到所述音乐专属播放文件路径中的步骤。Considering that when the terminal enters the music-exclusive play mode, the user may still want the message ringtones (which can also be considered as music) of some applications to be played, such as the ringtones of short messages and incoming calls. The step of adding the third identification information as an identification code to the path of the music-specific playback file.
如图2所示,本实施例中的在终端上进行音乐专属播放的方法包括如下步骤:As shown in FIG. 2 , the method for exclusively playing music on a terminal in this embodiment includes the following steps:
步骤S201:在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,进入步骤S202;Step S201: When the music playing application of the terminal is playing music, if an instruction for enabling a music exclusive play mode is received, the music exclusive play mode is enabled, wherein the music exclusive play mode is on the terminal. A pre-added music playing mode, enter step S202;
步骤S202:获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,进入步骤S203;Step S202: Obtain the first identification information of the music playback application, add the first identification information as an identification code to the preset music-specific playback file path, and enter step S203;
步骤S203:接收添加指令,将该添加指令对应的第二应用的第三标识信息作为标识码添加到所述音乐专属播放文件路径中,进入步骤S204;Step S203: Receive the adding instruction, and add the third identification information of the second application corresponding to the adding instruction as an identification code to the music-exclusive play file path, and enter step S204;
本实施例中的第二应用包括所述终端中的各种需要进行音频播放的应用,一般不包括上述的音乐播放应用;The second application in this embodiment includes various applications in the terminal that need to perform audio playback, and generally does not include the above-mentioned music playback application;
其中,可以根据需要将第二应用的第三标识信息作为标识码添加到所述音乐专属播放文件路径中,第三标识信息这些(或者这个)应用的进程名称、程序包名或进程号等中的任意一个;Wherein, the third identification information of the second application can be added as an identification code to the music-exclusive playback file path as required, and the third identification information is in the process name, program package name or process number of these (or this) applications, etc. any one of ;
步骤S204:检测所述终端的第一应用发送的音频播放请求,在检测到终端的第一应用发送的音频播放请求时,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略。Step S204: Detect the audio playback request sent by the first application of the terminal, and when detecting the audio playback request sent by the first application of the terminal, determine the audio status of the first application according to the audio playback request and the identification code. Play strategy.
本实施例中的其他技术特征与上述实施例一中的相同,在此不予赘述。Other technical features in this embodiment are the same as those in the above-mentioned first embodiment, and will not be repeated here.
需要说明的是,本实施例中的将其他应用的第三标识信息作为标识码添加到音乐专属播放文件路径中并不限于在步骤S202之后执行,例如,还可以在步骤S202之前执行,在此不予赘述。It should be noted that, in this embodiment, adding the third identification information of other applications as an identification code to the music-specific playback file path is not limited to be executed after step S202, for example, it can also be executed before step S202, here I won't go into details.
实施例三Embodiment 3
如图3所示,为本发明的在终端上进行音乐专属播放的方法实施例三的流程示意图。在本实施例中,与上述实施例一的不同之处在于,考虑到用户在听音乐时,特别是在听高品质的音乐时,若该音乐为在线音乐且终端的后台有其他应用也在使用wifi、数据网络下载或更新,会导致在线音乐下载带宽不够,缓冲时间长,因而,增加了当前使用网络且除所述音乐播放应用以外的应用的运行的步骤,以提高用户的使用体验。As shown in FIG. 3 , it is a schematic flowchart of Embodiment 3 of the method for performing exclusive music playback on a terminal according to the present invention. In this embodiment, the difference from the first embodiment above is that when the user is listening to music, especially when listening to high-quality music, if the music is online music and there are other applications in the background of the terminal Using wifi or data network to download or update will result in insufficient bandwidth for online music download and long buffering time. Therefore, steps for running applications other than the music playing application currently using the network are added to improve user experience.
如图3所示,本实施例中在终端上进行音乐专属播放的方法包括如下步骤:As shown in FIG. 3 , the method for exclusively playing music on a terminal in this embodiment includes the following steps:
步骤S301:在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,进入步骤S302;Step S301: When the music playback application of the terminal performs music playback, if an instruction for enabling a music-exclusive playback mode is received, the music-exclusive playback mode is turned on, wherein the music-exclusive playback mode is on the terminal. A pre-added music playing mode, enter step S302;
步骤S302:获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,进入步骤S303;Step S302: Obtain the first identification information of the music playback application, add the first identification information as an identification code to the preset music-specific playback file path, and enter step S303;
步骤S303:判断当前正在播放的音乐是否是在线音乐,若是,进入步骤S304,若否,进入步骤S305;Step S303: determine whether the currently playing music is online music, if so, go to step S304, if not, go to step S305;
步骤S304:保持运行所述音乐播放应用,并禁用或暂停当前使用网络且除所述音乐播放应用以外的应用的运行,进入步骤S305;Step S304: Keep running the music playing application, and disable or suspend the running of applications that currently use the network and other than the music playing application, and go to step S305;
步骤S305:检测所述终端的第一应用发送的音频播放请求,在检测到终端的第一应用发送的音频播放请求时,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略;Step S305: Detect the audio playback request sent by the first application of the terminal, and when detecting the audio playback request sent by the first application of the terminal, determine the audio playback request of the first application according to the audio playback request and the identification code. play strategy;
判断当前正在播放的音乐是否是在线音乐的实现方式可以是:判断所述音乐播放应用的平均下载速度是否达到预设的下载阈值,若是,则可以判定为当前正在播放的音乐是在线音乐,若否,则可以判定为当前正在播放的音乐是本地音乐,其中,下载阈值可以根据实际需要设定,例如20KB/s。The implementation manner of judging whether the music currently being played is online music may be: judging whether the average download speed of the music playing application reaches a preset download threshold, if so, it can be determined that the music currently being played is online music, if If not, it can be determined that the music currently being played is local music, wherein the download threshold can be set according to actual needs, for example, 20KB/s.
本实施例中的其他技术特征与上述实施例一中的相同,在此不予赘述。Other technical features in this embodiment are the same as those in the above-mentioned first embodiment, and will not be repeated here.
需要说明的是,本实施例中的步骤S303、步骤S304并不限于在步骤S302之后执行,例如,还可以在步骤S302之前执行,在此不予赘述。It should be noted that, step S303 and step S304 in this embodiment are not limited to be executed after step S302, for example, they may also be executed before step S302, which will not be repeated here.
实施例四Embodiment 4
如图4所示,为本发明的在终端上进行音乐专属播放的方法实施例四的流程示意图。在本实施例中,与上述实施例一的不同之处在于,考虑到在终端上运行的进程占用cpu(Central Processing Unit,中央处理器)较多时,会导致播放音乐解码速度不够,出现音乐播放过程中卡顿的用户体验,因而,增加了关闭或暂停非关键进程的步骤,以提高用户的使用体验。As shown in FIG. 4 , it is a schematic flowchart of Embodiment 4 of the method for performing exclusive music playback on a terminal according to the present invention. In this embodiment, the difference from the above-mentioned first embodiment is that considering that the process running on the terminal occupies a large amount of CPU (Central Processing Unit, central processing unit), the decoding speed of playing music will be insufficient, and music playback will occur. The user experience is stuck during the process. Therefore, steps to close or suspend non-critical processes are added to improve the user experience.
如图4所示,本实施例中在终端上进行音乐专属播放的方法包括如下步骤:As shown in FIG. 4 , the method for exclusively playing music on a terminal in this embodiment includes the following steps:
步骤S401:在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,进入步骤S402;Step S401: When the music playback application of the terminal is performing music playback, if an instruction for enabling a music-exclusive playback mode is received, the music-exclusive playback mode is enabled, wherein the music-exclusive playback mode is on the terminal. A pre-added music playing mode, enter step S402;
步骤S402:获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中,进入步骤S403;Step S402: Obtain the first identification information of the music playback application, add the first identification information as an identification code to the preset music-exclusive playback file path, and enter step S403;
步骤S403:判断所述终端是否处于屏幕关闭状态,若所述没有处于所述终端处于屏幕关闭状态,进入步骤S404,若所述终端处于屏幕关闭状态,进入步骤S405;Step S403: judging whether the terminal is in the screen-off state, if the terminal is not in the screen-off state, go to step S404; if the terminal is in the screen-off state, go to step S405;
步骤S404:判断音乐播放界面是否是全屏界面,若所述音乐播放界面是全屏界面,进入步骤S405,若所述音乐播放界面不是全屏界面,进入步骤S408;Step S404: determine whether the music playing interface is a full-screen interface, if the music playing interface is a full-screen interface, go to step S405, if the music playing interface is not a full-screen interface, go to step S408;
步骤S405:查询所述终端的当前运行进程的进程分组,进入步骤S406;Step S405: query the process grouping of the current running process of the terminal, and enter step S406;
步骤S406:根据所述进程分组判断该进程分组是否是预设的关键进程分组,若不是预设的关键进程分组,则进入步骤S407;Step S406: According to the process grouping, determine whether the process grouping is a preset key process grouping, and if it is not a preset key process grouping, enter step S407;
步骤S407:终止或暂停所述当前运行进程,进入步骤S408;Step S407: Terminate or suspend the current running process, and go to Step S408;
步骤S408:检测所述终端的第一应用发送的音频播放请求,在检测到终端的第一应用发送的音频播放请求时,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略;Step S408: Detect the audio playback request sent by the first application of the terminal, when detecting the audio playback request sent by the first application of the terminal, determine the audio playback request of the first application according to the audio playback request and the identification code. play strategy;
在Android系统中,进程分组包括root、system、radio、media、user等,关键进程指进程分组为root、system,radio的进程,则其他进程分组的进程均可视为非关键进程,在音乐专属播放模式,可以被终止或暂停。In the Android system, the process grouping includes root, system, radio, media, user, etc. The key process refers to the process grouped into root, system, and radio, and the processes grouped by other processes can be regarded as non-critical processes. Play mode, which can be terminated or paused.
本实施例中的其他技术特征与上述实施例一中的相同,在此不予赘述。Other technical features in this embodiment are the same as those in the above-mentioned first embodiment, and will not be repeated here.
需要说明的是,本实施例中的步骤S403~步骤S407并不限于在步骤S402之后执行,例如,还可以在步骤S402之前执行,在此不予赘述。It should be noted that, steps S403 to S407 in this embodiment are not limited to be executed after step S402, for example, they may also be executed before step S402, which will not be repeated here.
此外,本实施例中的判断所述终端是否处于屏幕关闭状态和判断音乐播放界面是否是全屏界面也可以不按照上述的顺序执行,例如,还可以是先执行判断音乐播放界面是否是全屏界面的步骤,再执行判断所述终端是否处于屏幕关闭状态,同时,上述实施例中,是同时包括判断所述终端是否处于屏幕关闭状态和判断音乐播放界面是否是全屏界面的方式,也可以仅包括判断所述终端是否处于屏幕关闭状态的方式,或者仅包括判断音乐播放界面是否是全屏界面的方式,在此不予赘述。In addition, in this embodiment, judging whether the terminal is in a screen-off state and judging whether the music playing interface is a full-screen interface may not be performed in accordance with the above-mentioned order. For example, it may be performed first to determine whether the music playing interface is a full-screen interface. step, and then execute the judgment of whether the terminal is in the screen-off state. Meanwhile, in the above-mentioned embodiment, it includes both judging whether the terminal is in the screen-off state and judging whether the music playing interface is a full-screen interface, or it may only include judging Whether the terminal is in a screen-off state, or only includes a method for judging whether the music playing interface is a full-screen interface, will not be described here.
实施例五Embodiment 5
如图5所示,为本发明的在终端上进行音乐专属播放的方法实施例四的流程示意图。在本实施例中,与上述实施例四的不同之处在于,采用另外的一种方式实现终止或暂停非关键进程,以提高用户的使用体验。As shown in FIG. 5 , it is a schematic flowchart of Embodiment 4 of the method for performing exclusive music playback on a terminal according to the present invention. In this embodiment, the difference from the fourth embodiment above is that another method is used to terminate or suspend non-critical processes, so as to improve the user experience.
如图5所示,本实施例中在终端上进行音乐专属播放的方法包括如下步骤:As shown in FIG. 5 , the method for exclusively playing music on a terminal in this embodiment includes the following steps:
步骤S501:在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式,进入步骤S502;Step S501: When the music playback application of the terminal is performing music playback, if an instruction for enabling a music-exclusive playback mode is received, the music-exclusive playback mode is enabled, wherein the music-exclusive playback mode is on the terminal. A pre-added music playing mode, enter step S502;
步骤S502:获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中;Step S502: Obtain the first identification information of the music playback application, and add the first identification information as an identification code to a preset music-specific playback file path;
步骤S503:判断所述终端是否处于屏幕关闭状态,若所述没有处于所述终端处于屏幕关闭状态,进入步骤S504,若所述终端处于屏幕关闭状态,进入步骤S505;Step S503: Determine whether the terminal is in the screen-off state, if the terminal is not in the screen-off state, go to step S504; if the terminal is in the screen-off state, go to step S505;
步骤S504:判断音乐播放界面是否是全屏界面,若所述音乐播放界面是全屏界面,进入步骤S505,若所述音乐播放界面不是全屏界面,进入步骤S507;Step S504: determine whether the music playing interface is a full-screen interface, if the music playing interface is a full-screen interface, go to step S505, if the music playing interface is not a full-screen interface, go to step S507;
步骤S505:查询所述终端的当前运行进程的进程标识是否在预设的关键进程标识列表中,则不在预设的关键进程标识列表中,进入步骤S506;Step S505: Query whether the process identifier of the currently running process of the terminal is in the preset key process identifier list, if not in the preset key process identifier list, go to step S506;
步骤S506:终止或暂停所述当前运行进程;Step S506: Terminate or suspend the current running process;
步骤S507:检测所述终端的第一应用发送的音频播放请求,在检测到终端的第一应用发送的音频播放请求时,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略;Step S507: Detect the audio playback request sent by the first application of the terminal, and when detecting the audio playback request sent by the first application of the terminal, determine the audio playback request of the first application according to the audio playback request and the identification code. play strategy;
本实施例中,可以预先将一些进程作为关键进程,将这些进程的进程标识添加到关键进程标识列表,则进程标识不在关键进程标识列表的进程视为非关键进程被终止或暂停,可以为高品质音乐的解码提供充裕的cpu资源与内存资源。In this embodiment, some processes may be preliminarily regarded as key processes, and the process IDs of these processes may be added to the key process ID list, then the processes whose process IDs are not in the key process ID list are regarded as non-critical processes that are terminated or suspended, which may be high. The decoding of high-quality music provides ample cpu resources and memory resources.
本实施例中的其他技术特征与上述实施例一中的相同,在此不予赘述。Other technical features in this embodiment are the same as those in the above-mentioned first embodiment, and will not be repeated here.
需要说明的是,本实施例中的步骤S503~步骤S506并不限于在步骤S502之后执行,例如,还可以在步骤S502之前执行,在此不予赘述。It should be noted that, steps S503 to S506 in this embodiment are not limited to be executed after step S502, for example, they may also be executed before step S502, which will not be repeated here.
此外,本实施例中的判断所述终端是否处于屏幕关闭状态和判断音乐播放界面是否是全屏界面也可以不按照上述的顺序执行,例如,还可以是先执行判断音乐播放界面是否是全屏界面的步骤,再执行判断所述终端是否处于屏幕关闭状态,同时,上述实施例中,是同时包括判断所述终端是否处于屏幕关闭状态和判断音乐播放界面是否是全屏界面的方式,也可以仅包括判断所述终端是否处于屏幕关闭状态的方式,或者仅包括判断音乐播放界面是否是全屏界面的方式,在此不予赘述。In addition, in this embodiment, judging whether the terminal is in a screen-off state and judging whether the music playing interface is a full-screen interface may not be performed in accordance with the above-mentioned order. For example, it may be performed first to determine whether the music playing interface is a full-screen interface. step, and then execute the judgment of whether the terminal is in the screen-off state. Meanwhile, in the above-mentioned embodiment, it includes both judging whether the terminal is in the screen-off state and judging whether the music playing interface is a full-screen interface, or it may only include judging Whether the terminal is in a screen-off state, or only includes a method for judging whether the music playing interface is a full-screen interface, will not be described here.
根据上述本发明的在终端上进行音乐专属播放的方法,本发明还提供一种在终端上进行音乐专属播放的系统,以下就本发明的在终端上进行音乐专属播放的系统的实施例进行详细说明。图6中示出了本发明的在终端上进行音乐专属播放的系统的实施例的结构示意图。为了便于说明,在图6中只示出了与本发明相关的部分。According to the above-mentioned method for exclusive music playing on a terminal of the present invention, the present invention also provides a system for exclusive music playing on a terminal. The following describes the embodiments of the system for exclusive music playing on a terminal of the present invention in detail. illustrate. FIG. 6 shows a schematic structural diagram of an embodiment of a system for playing music exclusively on a terminal according to the present invention. For the convenience of description, only the parts related to the present invention are shown in FIG. 6 .
如图6所示,本实施例中的在终端上进行音乐专属播放的系统,包括开启模块601、获取模块602、控制模块603,其中:As shown in FIG. 6 , the system for exclusive music playback on a terminal in this embodiment includes an opening module 601, an acquisition module 602, and a control module 603, wherein:
开启模块601,用于在所述终端的音乐播放应用进行音乐播放时,若接收到音乐专属播放模式的开启指令,则开启所述音乐专属播放模式,其中,所述音乐专属播放模式为在所述终端上预先增设的一音乐播放模式;The enabling module 601 is configured to, when the music playing application of the terminal performs music playing, if an enabling instruction of the music exclusive playing mode is received, the music exclusive playing mode is enabled, wherein the music exclusive playing mode is the a music playback mode pre-installed on the terminal;
获取模块602,用于获取所述音乐播放应用的第一标识信息,将所述第一标识信息作为标识码添加到预设的音乐专属播放文件路径中;The obtaining module 602 is used for obtaining the first identification information of the music playing application, and adding the first identification information as an identification code to a preset music-exclusive play file path;
控制模块603,用于检测所述终端的第一应用发送的音频播放请求,根据音频播放请求以及所述标识码确定所述第一应用的音频的播放策略。The control module 603 is configured to detect the audio playback request sent by the first application of the terminal, and determine the audio playback strategy of the first application according to the audio playback request and the identification code.
在其中一个实施例中,控制模块603可以根据所述音频播放请求获取所述第一应用的第二标识信息,判断所述第二标识信息是否与所述标识码匹配,若匹配,则对所述第一应用的音频进行播放,若不匹配,则返回所述检测第一应用的音频播放请求的步骤。In one embodiment, the control module 603 may obtain the second identification information of the first application according to the audio playback request, and determine whether the second identification information matches the identification code, and if so, then The audio of the first application is played, and if it does not match, the step of detecting the audio playback request of the first application is returned.
在其中一个实施例中,如图7所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 7 , the system for exclusively playing music on a terminal of the present invention may further include:
添加模块604,用于接收添加指令,将该添加指令对应的第二应用的第三标识信息作为标识码添加到所述音乐专属播放文件路径中。The adding module 604 is configured to receive an adding instruction, and add the third identification information of the second application corresponding to the adding instruction as an identification code to the music-specific playback file path.
在其中一个实施例中,如图8所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 8 , the system for exclusive music playback on a terminal of the present invention may further include:
网络控制模块605,用于判断当前正在播放的音乐是否是在线音乐,若是,保持运行所述音乐播放应用,并禁用或暂停当前使用网络且除所述音乐播放应用以外的应用的运行。The network control module 605 is used to determine whether the music currently being played is online music, and if so, keep running the music playing application, and disable or suspend the running of applications currently using the network except the music playing application.
在其中一个实施例中,如图9所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 9 , the system for exclusive music playback on a terminal of the present invention may further include:
第一进程处理模块606,用于判断所述终端是否处于屏幕关闭状态,若所述终端处于屏幕关闭状态,则查询所述终端的当前运行进程的进程分组,根据所述进程分组判断该进程分组是否是预设的关键进程分组,若不是预设的关键进程分组,则终止或暂停所述当前运行进程;The first process processing module 606 is configured to determine whether the terminal is in a screen-off state, and if the terminal is in a screen-off state, query the process grouping of the current running process of the terminal, and determine the process grouping according to the process grouping Whether it is a preset key process grouping, if it is not a preset key process grouping, terminate or suspend the currently running process;
在其中一个实施例中,如图10所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 10 , the system for exclusively playing music on a terminal of the present invention may further include:
第二进程处理模块607,用于判断音乐播放界面是否是全屏界面,若所述音乐播放界面是全屏界面,则查询所述终端的当前运行进程的进程分组,根据所述进程分组判断该进程分组是否是预设的关键进程分组,若不是预设的关键进程分组,则终止或暂停所述当前运行进程。The second process processing module 607 is configured to determine whether the music playing interface is a full-screen interface, if the music playing interface is a full-screen interface, query the process grouping of the current running process of the terminal, and determine the process grouping according to the process grouping Whether it is a preset key process grouping, if it is not a preset key process grouping, terminate or suspend the currently running process.
在其中一个实施例中,如图11所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 11 , the system for exclusive music playback on the terminal of the present invention may further include:
第三进程处理模块608,用于判断所述终端是否处于屏幕关闭状态,若所述终端处于屏幕关闭状态,则查询所述终端的当前运行进程的进程标识是否在预设的关键进程标识列表中,若不在预设的关键进程标识列表中,则终止或暂停所述当前运行进程。The third process processing module 608 is configured to determine whether the terminal is in the screen off state, and if the terminal is in the screen off state, query whether the process identifier of the current running process of the terminal is in the preset key process identifier list , if it is not in the preset key process identification list, terminate or suspend the current running process.
在其中一个实施例中,如图12所示,本发明的在终端上进行音乐专属播放的系统还可以包括:In one of the embodiments, as shown in FIG. 12 , the system for exclusive music playback on a terminal of the present invention may further include:
第四进程处理模块609,用于判断音乐播放界面是否是全屏界面,若所述音乐播放界面是全屏界面,则查询所述终端的当前运行进程的进程标识是否在预设的关键进程标识列表中,若不在预设的关键进程标识列表中,则终止或暂停所述当前运行进程。The fourth process processing module 609 is used to judge whether the music playing interface is a full-screen interface, and if the music playing interface is a full-screen interface, query whether the process identifier of the current running process of the terminal is in the preset key process identifier list , if it is not in the preset key process identification list, terminate or suspend the current running process.
本发明的在终端上进行音乐专属播放的系统与本发明的在终端上进行音乐专属播放的方法一一对应,在上述在终端上进行音乐专属播放的方法的实施例阐述的技术特征及其有益效果均适用于在终端上进行音乐专属播放的系统的实施例中,特此声明。The system for exclusive music playing on a terminal of the present invention corresponds to the method for exclusive music playing on a terminal of the present invention, and the technical features and benefits described in the above embodiments of the method for exclusive music playing on a terminal The effects are all applicable to the embodiments of the system for exclusive music playback on the terminal, which is hereby declared.
此外,在本发明的描述中,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或者暗示相对重要性。Furthermore, in the description of the present invention, the terms "first", "second" and "third" are only used for descriptive purposes and should not be construed as indicating or implying relative importance.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present invention, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the patent of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can also be made, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410342026.4ACN104102717B (en) | 2014-07-17 | 2014-07-17 | Method and system for exclusively playing music on terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410342026.4ACN104102717B (en) | 2014-07-17 | 2014-07-17 | Method and system for exclusively playing music on terminal |
| Publication Number | Publication Date |
|---|---|
| CN104102717A CN104102717A (en) | 2014-10-15 |
| CN104102717Btrue CN104102717B (en) | 2019-12-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410342026.4AExpired - Fee RelatedCN104102717B (en) | 2014-07-17 | 2014-07-17 | Method and system for exclusively playing music on terminal |
| Country | Link |
|---|---|
| CN (1) | CN104102717B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105426218A (en)* | 2015-12-10 | 2016-03-23 | 小米科技有限责任公司 | Method and device for controlling audio playing |
| CN108184193B (en)* | 2017-12-28 | 2021-03-30 | 西安Tcl软件开发有限公司 | Play control method of Bluetooth play terminal, Bluetooth device and computer storage medium |
| CN110191227A (en)* | 2019-05-20 | 2019-08-30 | 维沃移动通信有限公司 | Message reminder method and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1703059A (en)* | 2004-05-28 | 2005-11-30 | 乐金电子(中国)研究开发中心有限公司 | Method of realizing special mode functions of mp3 of mobile communication terminal |
| CN101277334A (en)* | 2008-05-06 | 2008-10-01 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal with play mode and method for implementing play mode |
| CN102868809A (en)* | 2012-08-30 | 2013-01-09 | 广东欧珀移动通信有限公司 | Method for playing music on mobile phone and mobile phone |
| CN102982263A (en)* | 2012-11-19 | 2013-03-20 | 中国联合网络通信集团有限公司 | Application program protection method and equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1703059A (en)* | 2004-05-28 | 2005-11-30 | 乐金电子(中国)研究开发中心有限公司 | Method of realizing special mode functions of mp3 of mobile communication terminal |
| CN101277334A (en)* | 2008-05-06 | 2008-10-01 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal with play mode and method for implementing play mode |
| CN102868809A (en)* | 2012-08-30 | 2013-01-09 | 广东欧珀移动通信有限公司 | Method for playing music on mobile phone and mobile phone |
| CN102982263A (en)* | 2012-11-19 | 2013-03-20 | 中国联合网络通信集团有限公司 | Application program protection method and equipment |
| Publication number | Publication date |
|---|---|
| CN104102717A (en) | 2014-10-15 |
| Publication | Publication Date | Title |
|---|---|---|
| CN104135556B (en) | Call method and call device based on mobile terminal | |
| US8953471B2 (en) | Counteracting spam in voice over internet protocol telephony systems | |
| WO2015067081A1 (en) | Method and device for processing incoming call prompt of mobile terminal, and storage medium | |
| WO2014043876A1 (en) | Method for detecting interception behaviour and terminal device | |
| CN105718284A (en) | Application program starting method and device for communication terminal | |
| WO2017024696A1 (en) | Bluetooth connection control method and apparatus for multiple playback devices, and music playback system | |
| WO2017166603A1 (en) | Sound quality adjustment method, terminal, electronic device, and non-volatile computer storage medium | |
| CN103167184A (en) | Terminal device control method and terminal device | |
| CN104506991B (en) | A kind of information prompting method and device | |
| CN112040057B (en) | Device control method, device, electronic device, control system and storage medium | |
| CN103747326B (en) | The continuous playing method and device of multimedia file | |
| CN114489558A (en) | Disturbance-free method and terminal | |
| WO2017045535A1 (en) | Processing method, system and device for system telephone in voice call | |
| KR101584887B1 (en) | Method and system of supporting multitasking of speech recognition service in in communication device | |
| CN104102717B (en) | Method and system for exclusively playing music on terminal | |
| CN105337822A (en) | Main playback device selection method and related device | |
| CN105303908A (en) | Entertainment function control method and device for learning machine | |
| CN108055404A (en) | Notification reminding method, device, terminal and storage medium | |
| CN103701994A (en) | Automatic responding method and automatic responding device | |
| WO2016150191A1 (en) | Data sharing method and device | |
| EP3298698A1 (en) | Transferring playback of media content between mobile device and vehicle | |
| CN104851446A (en) | voice management method and system | |
| CN105679350A (en) | Audio playing method and device | |
| CN112565876A (en) | Screen projection method, device, equipment, system and storage medium | |
| CN106375350A (en) | Brush verification method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20191227 | |
| CF01 | Termination of patent right due to non-payment of annual fee |