CN107241511B - Music playing method, device, storage medium and terminal - Google Patents

Music playing method, device, storage medium and terminal Download PDF

Info

Publication number
CN107241511B
CN107241511B CN201710526367.0A CN201710526367A CN107241511B CN 107241511 B CN107241511 B CN 107241511B CN 201710526367 A CN201710526367 A CN 201710526367A CN 107241511 B CN107241511 B CN 107241511B
Authority
CN
China
Prior art keywords
song
music playing
playing
terminal
songs
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.)
Active
Application number
CN201710526367.0A
Other languages
Chinese (zh)
Other versions
CN107241511A (en
Inventor
梁昆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710526367.0A priority Critical patent/CN107241511B/en
Publication of CN107241511A publication Critical patent/CN107241511A/en
Application granted granted Critical
Publication of CN107241511B publication Critical patent/CN107241511B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files

Abstract

The embodiment of the invention discloses a music playing method, a device, a storage medium and a terminal; the embodiment of the invention determines whether the telephone application is started or not when the terminal is detected to be accessed to the earphone; if not, automatically running the corresponding music playing application, acquiring the historical playing times of the songs in the corresponding song set in the music playing application, determining the target song to be played from the song set according to the historical playing times, and playing the target song; according to the scheme, the music playing application can be automatically opened when the earphone is inserted into the terminal, corresponding songs are played, and a user does not need to perform complicated operation, so that the music playing efficiency can be improved.

Description

Music playing method, device, storage medium and terminal
Technical Field
The invention relates to the technical field of communication, in particular to a music playing method, a music playing device, a storage medium and a terminal.
Background
With the development of terminal technology, mobile terminals have begun to change from simply providing telephony devices to a platform for running general-purpose software. The platform no longer aims at providing call management, but provides an operating environment including various application programs such as call management, game and entertainment, office events, mobile payment and the like, and with a great deal of popularization, the platform has been deeply developed to the aspects of life and work of people.
At present, music playing application programs (music playing application for short) are more and more widely applied, and users can install the music playing application on a terminal and play and download songs through the music playing application.
In some scenarios, if a user wants to listen to music through headphones, the user needs to insert the headphones into the terminal, and then manually open a music playing application on the terminal and select a song to be played. Therefore, the operation of the user is very complicated, which results in low efficiency of music playing.
Disclosure of Invention
The embodiment of the invention provides a music playing method, a music playing device, a storage medium and a terminal, which can improve the music playing efficiency.
In a first aspect, an embodiment of the present invention provides a music playing method, including:
when the condition that the terminal is accessed to the earphone is detected, determining whether a telephone application is started within a preset time period;
if not, automatically running a corresponding music playing application;
acquiring historical playing times of songs in a corresponding song set in the music playing application;
determining a target song to be played from the song set according to the historical playing times;
and playing the target song.
In a second aspect, an embodiment of the present invention further provides a music playing apparatus, including:
the starting determining module is used for determining whether the telephone application is started within a preset time period when the condition that the terminal is accessed to the earphone is detected;
the operation module is used for automatically operating the corresponding music playing application when the determination module determines that the telephone music is not started;
the acquisition module is used for acquiring the historical playing times of the songs in the corresponding song set in the music playing application;
the song determining module is used for determining a target song to be played from the song set according to the historical playing times;
and the playing module is used for playing the target song.
In a third aspect, the present invention further provides a storage medium, where the storage medium stores instructions, and the instructions, when executed by a processor, implement the steps of the music playing method provided in any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a terminal, including a memory and a processor, where the memory stores instructions, and the processor loads the instructions to execute the steps of the music playing method provided in any one of the embodiments of the present invention.
The embodiment of the invention determines whether the telephone application is started or not when the terminal is detected to be accessed to the earphone; if not, automatically running the corresponding music playing application, acquiring the historical playing times of the songs in the corresponding song set in the music playing application, determining the target song to be played from the song set according to the historical playing times, and playing the target song. According to the scheme, the music playing application can be automatically opened when the earphone is inserted into the terminal, corresponding songs are played, and a user does not need to perform complicated operation, so that the music playing efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of an audio playing system according to an embodiment of the present invention.
Fig. 2 is a schematic flowchart of a music playing method according to an embodiment of the present invention.
Fig. 3 is a schematic interface diagram of a music playing application according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a song playing interface according to an embodiment of the present invention.
Fig. 5 is another schematic diagram of a music playing method according to an embodiment of the present invention.
Fig. 6 is a schematic view of another scene of a music playing method according to an embodiment of the present invention.
Fig. 7 is a schematic view of a first structure of a music playing device according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a second music playing device according to an embodiment of the present invention.
Fig. 9 is a schematic structural diagram of a third music playing device according to an embodiment of the present invention.
Fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
The principles of the present invention are operational with numerous other general purpose or special purpose computing, communication environments or configurations. Examples of well known computing systems, environments, and configurations that may be suitable for use with the invention include, but are not limited to, hand-held telephones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe-based computers, and distributed computing environments that include any of the above systems or devices.
The details will be described below separately.
The embodiment will be described from the perspective of a music playing device, which may be specifically integrated in a terminal, where the terminal may be an electronic device such as a smart phone and a tablet computer.
The embodiment of the invention provides a music playing system which comprises a terminal, wherein the terminal is integrated with any music playing device provided by the embodiment of the invention. In addition, the system may also include other devices, such as headphones and the like.
For example, referring to fig. 1, an embodiment of the present invention provides a music playing system; the music playing system may include a terminal 11 and an earphone 12; the terminal 11 is integrated with any music playing device provided by the embodiment of the invention. The music playing process is as follows (standing at the terminal 11):
when the terminal 11 detects that the earphone 12 is inserted, the terminal 11 determines whether a phone application is opened; if not, automatically running the corresponding music playing application, acquiring the historical playing times of the songs in the corresponding song set in the music playing application, determining the target song to be played from the song set according to the historical playing times, and playing the target song.
In an embodiment, an embodiment of the present invention provides a music playing method, and with reference to fig. 2, a specific flow of the music playing method is as follows:
101. when the terminal is detected to be connected to the earphone, whether the telephone application is started within a preset time period is determined, if not, step 102 is executed, and if yes, no processing is performed or the process is ended.
Generally, when a terminal accesses a headset, a user may generally perform two operations, one is to make a call and the other is to listen to music, and if the call is made, the user will generally open a telephone application on the terminal through the operation. Therefore, the present embodiment identifies the actual use of the user for inserting the headset by determining whether the phone application is turned on within a preset time period, and if not, indicates that the user wants to listen to music, and if so, indicates that the user wants to listen to music.
The preset time period may be set empirically, for example, may be 10s, and the starting point of the preset time period is the time when the terminal is detected to access the earphone.
102. The corresponding music playing application is automatically run.
For example, when the terminal does not start the music playing application, the music playing application can be automatically started and run, and when the terminal starts the music playing application, the music playing application can be switched to the foreground to run.
103. And acquiring historical playing times of songs in the corresponding song set in the music playing application.
The song collection may include several song identifications, and the song collection may be a song list set in the music playing application, where the song list includes corresponding song identifications. For example, the collection of songs may be a collection of downloaded songs, a collection of recently played songs, a collection of already collected songs, a collection of purchased songs, a collection of user-preferred songs, etc. in a music playing application. Referring to fig. 3, the song collection may be a collection of songs corresponding to "download song", "recently played song", "i like", "favorite song", "purchased song", etc. in a music playing application.
In addition, the song collection may also be a song list in a music playing application, such as a song list created by the user himself, a song list collected by the user, and the like.
The historical playing times of the songs may be the playing times of the songs before the current time, and the terminal may record the playing times of the songs in the application in real time in this embodiment, so that the songs can be acquired later.
The manner in which the song collection is determined in embodiments of the present invention may be various, for example, in one embodiment, the song collection may be determined based on the current system time and/or geographic location of the terminal. That is, the step of "obtaining the historical playing times of the songs in the corresponding song collection in the music playing application" may include:
acquiring the current system time and/or geographic position of a terminal;
determining a song set to be played in the music playing application according to the system time and/or the geographic position;
and acquiring the historical playing times of the songs in the song set.
In an embodiment, the song set to be played in the music playing application may be determined according to the system time, for example, a mapping relationship between preset time and the song set is pre-established to obtain a time mapping relationship set, so that subsequently, the song set corresponding to the system time in the music playing application may be determined according to the current system time and the time mapping relationship set. The presentation form of the time mapping relationship set is various, and for example, the presentation form may be embodied in a table form.
For example, table 1 below may be established in advance, so that after a music playing application is subsequently run, a corresponding song collection may be looked up in table 1 based on the current system time.
Figure BDA0001338563410000051
Figure BDA0001338563410000061
TABLE 1
In one embodiment, in order to save resources and quickly determine the song set, a preset time interval may be set, and the song set may be determined based on the time interval in which the current system time falls. That is, the step of "determining the set of songs to be played in the music playing application according to the system time" may include:
determining a target preset time interval in which the system time falls;
and determining a song set corresponding to the target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played.
For example, the current system time may be 9:08, and the preset time zone in which the system time falls is determined to be 9:00-10:00, at this time, the downloaded song set corresponding to the time interval of 9:00-10:00 may be used as the song set to be played, and so on.
In order to quickly obtain a song set corresponding to a target preset time interval, the embodiment of the invention can also preset a mapping relation between the time interval and the song set to obtain a time interval mapping relation set; in this way, subsequently, after the target preset time interval in which the system time falls is determined, the song set corresponding to the target preset time interval may be determined based on the target preset time interval and the time interval mapping relationship set. The expression form of the mapping relation set is also various, such as a table form.
For example, table 2 below may be pre-established, and then the corresponding set of songs may be looked up in table 2 below based on the time interval in which the current system time falls.
Time interval Song collection
8:00-8:30 Downloaded song collection
9:00-10:00 Collection of songs
10:00-10:30 Favorite song collection
…… ……
TABLE 2
In an embodiment, the set of songs to be played may be determined according to the current geographic location of the terminal, for example, a song type corresponding to the geographic location may be acquired, and then the songs to be played are determined based on the song type. That is, the step of determining the set of songs to be played in the music playing application according to the geographic location may include:
acquiring a song type corresponding to the geographic position;
and selecting a song set to be played from the song sets in the music playing application according to the song type.
The song type may be defined according to actual requirements, for example, the song type may include: rock, pop, ballad, jazz, blues, rap, etc. For another example, each can be defined as: wound, happy, melancholy, etc.
The manner of selecting the song set to be played according to the song type may be various, for example, the song set including the song of the song type may be selected as the song set to be played.
Taking the song collection as the song list as an example, the song type corresponding to the acquired geographic position is the popular music, and then the song list containing the popular music song can be selected from the song lists in the music playing application.
For another example, the types of songs may be compared with the characteristics in each song collection, and the song collection to be played may be determined based on the comparison result. For example, the description information of each song list is obtained, the song list characteristics corresponding to the song list are obtained from the description information, a song set with the song list characteristics matched with or close to the song types corresponding to the geographic positions is selected as a song set to be played, and for example, the song list with the song list characteristics matched with the popular music is selected as the song list to be played.
Wherein, the type of the song list is the common characteristics of the songs contained in the song list, such as the song list 'popular music in 6 months' arrangement, at the moment, the characteristics of the song list comprise popular music; the song list 'who can understand when separating', the characteristics of the song list include 'separating', 'hurting', etc.
In an embodiment, the set of songs to be played may also be determined in combination with the system time and the geographic location, for example, the set of songs may be selected according to the geographic location, and then the set of songs to be played may be determined from the selected set of songs based on the system time. For example, the step "determining a set of songs to be played in the music playing application according to the system time and the geographic location" may include:
determining the current place of the terminal according to the geographic position;
acquiring a plurality of song collections corresponding to the place in the music playing application;
and selecting a song set to be played from the plurality of song sets according to the system time.
The places can be divided according to actual needs, for example, the places can be divided into office places, entertainment places, living places, transportation places and the like.
The embodiment of the invention can firstly acquire a plurality of song collections corresponding to places, such as downloaded song collections, recently played song collections and collected song collections, and then can select the song collections to be played from the song collections according to the system time, such as selecting the downloaded song collections as the song collections to be played.
For example, taking a song list as an example, it is determined that the current location is an office location, at this time, a song set corresponding to the office location, such as the song list 1, the song list 2, the song list 3, and the song list 4, may be obtained, and then, the song list to be played may be selected from the song lists based on the system time, such as the system time is 10:01, at this time, the song list 4 corresponding to 10:01 may be selected as the song list to be played.
In addition to the above-described manner of determining a song set to be played, in an embodiment, the number of times that a user plays a song set in a historical time may be recorded by the electronic device, and the recorded number of times that the song set is played may be analyzed and learned by using a learning algorithm, and the electronic device generates the play preference of the song set of the user through a self-analysis and learning process, and at this time, the song combination to be played may be determined according to the song set obtained by the analysis. Such as recording the number of times a collection of songs was played in the past month; the electronic equipment can analyze a favorite played song set of the user through a learning algorithm and take the song set as a song set to be played.
104. And determining a target song to be played from the song set according to the historical playing times.
The specific selection rule can be set according to actual requirements. Specifically, the song with the highest historical playing time may be selected as the target song to be played, for example, the song with the highest playing time may be selected from the downloaded song set as the target song.
For another example, a song with a history playing time within a certain time range may be selected as the target song to be played. For example, songs having a history of playing times between 10-15 may be selected as target songs. The frequency range can be set according to actual requirements.
105. And playing the target song.
Referring to fig. 4, the terminal may play the corresponding song "love me for one person" in the collection of songs after the headset is inserted and display the corresponding song play interface.
In an embodiment, to save traffic, the target song may be played only when the terminal caches audio data of the song, that is, the step "playing the target song" may include:
detecting whether the terminal caches the audio data of the target song;
and if so, playing the target song.
In an embodiment, in order to save the process and play the favorite songs of the user and improve the user experience, other songs may be selected from the song collection to be played without buffering the audio data of the target song. For example, the music playing method according to the embodiment of the present invention may further include:
when the terminal does not cache the audio data of the target song, acquiring attribute information corresponding to the target song;
selecting songs with cached audio data from other songs according to the attribute information corresponding to the target song, wherein the other songs are songs in the song set except the target song;
and playing the selected song.
The attribute information of the song includes a song type, an artist, an album title, a release time, and the like.
For example, after selecting a target song from the recently played song set, if the terminal does not cache the audio data of the song at this time, a singer of the target song may be obtained, and then, other songs of the singer are selected from the recently played song set for playing.
For another example, after selecting a target song from the recently played song set, if the terminal does not cache the audio data of the song at this time, the album name of the target song may be obtained, and then, other songs located in the album corresponding to the album name may be selected from the recently played song set for playing.
Therefore, the embodiment of the invention determines whether the telephone application is started or not when the terminal is detected to be accessed to the earphone; if not, automatically running the corresponding music playing application, acquiring the historical playing times of the songs in the corresponding song set in the music playing application, determining the target song to be played from the song set according to the historical playing times, and playing the target song. According to the scheme, the music playing application can be automatically opened when the earphone is inserted into the terminal, corresponding songs are played, and a user is not required to perform complicated operations, so that the music playing efficiency can be improved, the terminal resources are saved, and the terminal is more intelligent.
In an embodiment, another music playing method is further provided in an embodiment of the present invention. As shown in fig. 5, the specific flow of the music playing method is as follows:
201. the terminal determines whether to access the earphone, if so, step 202 is executed, and if not, the process is ended.
202. The terminal determines whether the phone application is started within a preset time period, if not, step 203 is executed, and if so, the process is ended.
Generally, when a terminal accesses a headset, a user may generally perform two operations, one is to make a call and the other is to listen to music, and if the call is made, the user will generally open a telephone application on the terminal through the operation. Therefore, the present embodiment identifies the actual use of the user for inserting the headset by determining whether the phone application is turned on within a preset time period, and if not, indicates that the user wants to listen to music, and if so, indicates that the user wants to listen to music.
The preset time period may be set empirically, for example, may be 8s, and a time start point of the preset time period is a time when the terminal is detected to access the earphone.
203. The terminal automatically runs the corresponding music playing application.
For example, when the terminal does not start the music playing application, the music playing application can be automatically started and run.
204. The terminal acquires the current system time and/or the current geographical position of the terminal.
205. And the terminal determines a song set to be played in the music playing application according to the system time and/or the geographic position.
For example, the terminal may determine a target preset time interval in which the system time falls; and determining a song set corresponding to the target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played. The manner in which the target song set is determined based on time may be as described with reference to the above embodiments.
For another example, the terminal may obtain a song type corresponding to the geographic location, and select a song set to be played from a song set in the music playing application according to the song type. The manner in which the set of target songs is determined based on geographic location may be as described with reference to the above embodiments.
The terminal may further determine a song set to be played in combination with the system time and the geographic location, for example, the song set may be selected according to the geographic location, and then the song set to be played may be determined from the selected song set based on the system time.
For example, the terminal may determine a current location of the terminal according to the geographic location; acquiring a plurality of song collections corresponding to the place in the music playing application; and selecting a song set to be played from the plurality of song sets according to the system time. The manner in which the set of songs is determined based on location and time may be as described with reference to the above embodiments.
206. And the terminal acquires the historical playing times of the songs in the song collection.
The historical playing times of the songs may be the playing times of the songs before the current time, and the terminal may record the playing times of the songs in the application in real time in this embodiment, so that the songs can be acquired later.
207. And the terminal determines a target song to be played from the song set according to the historical playing times.
The specific selection rule can be set according to actual requirements. Specifically, the song with the highest historical playing time may be selected as the target song to be played, for example, the song with the highest playing time may be selected from the downloaded song set as the target song.
For another example, a song with a history playing time within a certain time range may be selected as the target song to be played. For example, songs having a history of playing times between 14-17 may be selected as target songs. The frequency range can be set according to actual requirements.
208. The terminal detects whether the audio data of the target song is cached locally, if so, step 209 is executed, and if not, step 210 is executed.
For example, the terminal may detect whether audio data of a target song is stored in a database corresponding to the music playing application, if so, extract the audio data from the database for playing, and if not, execute step 210 to re-select the song for playing.
209. And the terminal plays the target song.
210. And the terminal selects the songs with cached audio data from other songs according to the attribute information corresponding to the target song and plays the selected songs.
The attribute information of the song includes a song type, an artist, an album title, a release time, and the like.
For example, after selecting a target song from the collection of songs, if the terminal does not cache the audio data of the song at this time, the singer of the target song may be obtained, and then, other songs of the singer may be selected from the collection of songs for playing.
Referring to fig. 6, when a user inserts an earphone into a terminal, the terminal may enter a playing interface to play a corresponding song through the music playing method provided by the embodiment of the present invention.
Therefore, the embodiment of the invention determines whether the telephone application is started or not when the terminal is detected to be accessed to the earphone; if not, automatically running the corresponding music playing application, acquiring the historical playing times of the songs in the corresponding song set in the music playing application, determining the target song to be played from the song set according to the historical playing times, and playing the target song. According to the scheme, the music playing application can be automatically opened when the earphone is inserted into the terminal, corresponding songs are played, and a user is not required to perform complicated operations, so that the music playing efficiency can be improved, the terminal resources are saved, and the terminal is more intelligent.
In order to better implement the music playing method provided by the embodiment of the invention, a music playing device is also provided in an embodiment. The meaning of the noun is the same as that in the music playing method, and the specific implementation details can refer to the description in the method embodiment.
As shown in fig. 7, the music playing device 30 may include: an opening determination module 301, an operation module 302, an acquisition module 303, a song determination module 304 and a playing module 305;
an opening determining module 301, configured to determine whether a phone application is opened within a preset time period when it is detected that the terminal accesses the headset;
an operation module 302, configured to automatically operate a corresponding music playing application when the determination module 301 determines that the phone music is not turned on;
an obtaining module 303, configured to obtain historical playing times of songs in a corresponding song set in the music playing application;
a song determining module 304, configured to determine a target song to be played from the song set according to the historical playing times;
a playing module 305, configured to play the target song.
In one embodiment, referring to fig. 8, the song determination module 304 may include:
an information obtaining submodule 3041, configured to obtain a current system time and/or a current geographical location of the terminal;
a set determining submodule 3042, configured to determine, according to the system time and/or the geographic location, a set of songs to be played in the music playing application;
the number obtaining sub-module 3043 is configured to obtain the historical playing number of the songs in the song collection.
In an embodiment, the set determination submodule 3042 may be configured to:
determining a target preset time interval in which the system time falls;
and determining a song set corresponding to the target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played.
In an embodiment, the set determination submodule 3042 may be configured to:
acquiring a song type corresponding to the geographic position;
and selecting a song set to be played from the song sets in the music playing application according to the song type.
In an embodiment, the set determination submodule 3042 may be configured to:
determining the current place of the terminal according to the geographic position;
acquiring a plurality of song collections corresponding to the place in the music playing application;
and selecting a song set to be played from the plurality of song sets according to the system time.
In an embodiment, referring to fig. 9, the playing module 305 may include:
the detection submodule 3051 is configured to detect whether the terminal caches audio data of the target song;
and the playing sub-module 3052, configured to play the target song when the detection sub-module 3051 detects that the audio data is cached.
In an embodiment, the playing sub-module 3052 may be further configured to:
when the detection submodule 3051 detects that the terminal does not cache the audio data of the target song, acquiring attribute information corresponding to the target song;
and selecting the songs with cached audio data from other songs according to the attribute information corresponding to the target song, wherein the other songs are the songs in the song set except the target song.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the music playing device 30 provided in the embodiment of the present invention determines whether the phone application is turned on by the turn-on determining module 301 when it is detected that the terminal accesses the headset; if not, the running module 302 automatically runs the corresponding music playing application, the obtaining module 303 obtains the historical playing times of the songs in the corresponding song collection in the music playing application, the song determining module 304 determines the target song to be played from the song collection according to the historical playing times, and the playing module 305 plays the target song. According to the scheme, the music playing application can be automatically opened when the earphone is inserted into the terminal, corresponding songs are played, and a user is not required to perform complicated operations, so that the music playing efficiency can be improved, the terminal resources are saved, and the terminal is more intelligent.
In an embodiment, the present invention further provides a storage medium, which stores instructions that, when executed by a processor, implement the steps of the music playing method provided in any one of the embodiments of the present invention.
In an embodiment, the present invention further provides a terminal, including a memory and a processor, where the memory stores instructions, and the processor loads the instructions to execute the steps of the music playing method provided in any embodiment of the present invention.
Referring to fig. 10, fig. 10 is a schematic view of a terminal structure according to an embodiment of the present invention. The terminal 400 may include Radio Frequency (RF) circuitry 401, memory 402 including one or more computer-readable storage media, an input unit 403, a display unit 404, a sensor 404, audio circuitry 406, a wireless fidelity (WiFi) module 407, a processor 408 including one or more processing cores, and a power supply 409. Those skilled in the art will appreciate that the terminal structure shown in fig. 10 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The rf circuit 401 may be used for receiving and transmitting information, or receiving and transmitting signals during a call, and in particular, receives downlink information of a base station and then sends the received downlink information to one or more processors 408 for processing; in addition, data relating to uplink is transmitted to the base station.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 408 executes various functional applications and data processing by running application programs stored in the memory 402. The memory 402 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 by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 402 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. Accordingly, the memory 402 may also include a memory controller to provide the processor 408 and the input unit 403 access to the memory 402.
The input unit 403 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control.
The display unit 404 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 404 may include a display panel.
Although in FIG. 10 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors.
The audio circuitry 406 may provide an audio interface between the user and the terminal through a speaker, microphone.
Wireless fidelity (WiFi) belongs to short-distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web pages, access streaming media and the like through the wireless fidelity module 407, and provides wireless broadband internet access for the user.
The processor 408 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the terminal as a whole. Optionally, processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 408.
The terminal also includes a power source 409 (such as a battery) to power the various components. Although not shown in fig. 10, the terminal may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
Wherein the processor 408 loads instructions or programs in the memory 402 to implement the steps of:
when the condition that the terminal is accessed to the earphone is detected, determining whether a telephone application is started within a preset time period; if not, automatically running a corresponding music playing application; acquiring historical playing times of songs in a corresponding song set in the music playing application; determining a target song to be played from the song set according to the historical playing times; and playing the target song.
In one embodiment, processor 408 is configured to perform the following steps:
acquiring the current system time and/or geographic position of a terminal;
determining a song set to be played in the music playing application according to the system time and/or the geographic position;
and acquiring the historical playing times of the songs in the song set.
In one embodiment, processor 408 is configured to perform the following steps:
determining a target preset time interval in which the system time falls;
and determining a song set corresponding to a target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played.
In one embodiment, processor 408 is configured to perform the following steps:
acquiring a song type corresponding to the geographic position;
and selecting a song set to be played from the song sets in the music playing application according to the song types.
In one embodiment, processor 408 is configured to perform the following steps:
determining the current place of the terminal according to the geographic position;
acquiring a plurality of song collections corresponding to the places in the music playing application;
and selecting a song set to be played from the plurality of song sets according to the system time.
As can be seen from the above, the terminal 400 according to the embodiment of the present invention can automatically open the music playing application when the earphone is inserted, and play the corresponding song without performing a complicated operation by the user, so that the efficiency of music playing can be improved.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the various methods of the above embodiments may be implemented by relevant hardware instructed by a program, where the program may be stored in a computer-readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and during the execution, the flow of the embodiments such as the information distribution method may be included. Among others, the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The music playing method, the music playing device, the storage medium and the terminal provided by the embodiment of the invention are described in detail above, and each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (16)

1. A music playing method, comprising the steps of:
when the condition that the terminal accesses the earphone is detected, determining whether a telephone application is started within a preset time period, wherein the starting time of the preset time period is the moment when the condition that the terminal accesses the earphone is detected;
if not, automatically running the corresponding music playing application, and if the terminal opens the corresponding music playing application, switching the opened music playing application to the foreground for running;
determining a corresponding song set in the music playing application and historical playing times of songs in the corresponding song set by recording the playing times of the song set in a period of historical time and utilizing a processing process of self-analysis and learning of a learning algorithm;
determining a target song to be played from the song set according to the historical playing times;
and playing the target song.
2. The music playing method of claim 1, wherein obtaining historical playing times of songs in a corresponding collection of songs in the music playing application comprises:
acquiring the current system time and/or geographic position of a terminal;
determining a song set to be played in the music playing application according to the system time and/or the geographic position;
and acquiring the historical playing times of the songs in the song set.
3. The music playing method of claim 2, wherein determining the set of songs to be played in the music playing application according to the system time comprises:
determining a target preset time interval in which the system time falls;
and determining a song set corresponding to a target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played.
4. The music playing method of claim 2, wherein determining the set of songs to be played in the music playing application according to the geographic location comprises:
acquiring a song type corresponding to the geographic position;
and selecting a song set to be played from the song sets in the music playing application according to the song types.
5. The music playing method according to claim 2, wherein determining the set of songs to be played in the music playing application according to the system time and the geographic location comprises:
determining the current place of the terminal according to the geographic position;
acquiring a plurality of song collections corresponding to the places in the music playing application;
and selecting a song set to be played from the plurality of song sets according to the system time.
6. The music playing method of claim 1, wherein playing the target song comprises:
detecting whether the terminal caches the audio data of the target song or not;
and if so, playing the target song.
7. The music playing method of claim 5, further comprising:
when the terminal does not cache the audio data of the target song, acquiring attribute information corresponding to the target song;
selecting songs with cached audio data from other songs according to the attribute information corresponding to the target song, wherein the other songs are songs in the song set except the target song;
and playing the selected song.
8. A music playing apparatus, comprising:
the starting determining module is used for determining whether the telephone application is started within a preset time period when the terminal is detected to be accessed to the earphone, wherein the starting time of the preset time period is the moment when the terminal is detected to be accessed to the earphone;
the operation module is used for automatically operating the corresponding music playing application when the determination module determines that the telephone music is not started, and switching the started music playing application to foreground operation if the terminal already starts the corresponding music playing application;
the acquisition module is used for determining a corresponding song set in the music playing application and the historical playing times of the songs in the corresponding song set by recording the times of playing the song set within a period of historical time and utilizing the processing process of self-analysis and learning of a learning algorithm;
the song determining module is used for determining a target song to be played from the song set according to the historical playing times;
and the playing module is used for playing the target song.
9. The music playback device of claim 8, wherein the song determination module includes;
the information acquisition submodule is used for acquiring the current system time and/or the current geographical position of the terminal;
the set determining submodule is used for determining a song set to be played in the music playing application according to the system time and/or the geographic position;
and the frequency acquisition submodule is used for acquiring the historical playing frequency of the songs in the song set.
10. The music playing apparatus of claim 9, wherein the set determination sub-module is configured to:
determining a target preset time interval in which the target in which the system time falls;
and determining a song set corresponding to a target preset time interval in the music playing application, and taking the song set corresponding to the target preset time interval as a target song set to be played.
11. The music playing apparatus of claim 9, wherein the set determination sub-module is configured to:
acquiring a song type corresponding to the geographic position;
and selecting a song set to be played from the song sets in the music playing application according to the song types.
12. The music playing apparatus of claim 9, wherein the set determination sub-module is configured to:
determining the current place of the terminal according to the geographic position;
acquiring a plurality of song collections corresponding to the places in the music playing application;
and selecting a song set to be played from the plurality of song sets according to the system time.
13. The music playing apparatus of claim 8, wherein the playing module comprises:
the detection submodule is used for detecting whether the terminal caches the audio data of the target song;
and the playing sub-module is used for playing the target song when the detection sub-module detects that the audio data is cached.
14. The music playing apparatus of claim 13, wherein the playing sub-module is further configured to:
when the detection submodule detects that the terminal does not cache the audio data of the target song, acquiring attribute information corresponding to the target song;
and selecting songs with cached audio data from other songs according to the attribute information corresponding to the target song, wherein the other songs are the songs in the song collection except the target song.
15. A storage medium storing instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 7.
16. A terminal comprising a memory storing instructions and a processor, the processor loading the instructions to perform the steps of the method according to any one of claims 1 to 7.
CN201710526367.0A 2017-06-30 2017-06-30 Music playing method, device, storage medium and terminal Active CN107241511B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710526367.0A CN107241511B (en) 2017-06-30 2017-06-30 Music playing method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710526367.0A CN107241511B (en) 2017-06-30 2017-06-30 Music playing method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN107241511A CN107241511A (en) 2017-10-10
CN107241511B true CN107241511B (en) 2020-04-10

Family

ID=59991300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710526367.0A Active CN107241511B (en) 2017-06-30 2017-06-30 Music playing method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN107241511B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948408B (en) * 2017-11-14 2020-10-09 维沃移动通信有限公司 Media file playing method and device
CN110545467B (en) * 2018-05-29 2023-05-02 北京字节跳动网络技术有限公司 Media file loading control method, device and storage medium
CN113903346A (en) * 2018-06-05 2022-01-07 安克创新科技股份有限公司 Sound range balancing method, device and system based on deep learning
CN110750722A (en) * 2019-10-21 2020-02-04 出门问问信息科技有限公司 Method for pushing audio content through earphone, computing equipment and pushing system
CN115277922A (en) * 2022-07-27 2022-11-01 深圳传音通讯有限公司 Processing method, intelligent terminal and storage medium
CN115643339B (en) * 2022-11-18 2023-08-04 荣耀终端有限公司 Method for adjusting volume, electronic device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242604A (en) * 2008-01-22 2008-08-13 深圳华为通信技术有限公司 An automatic operation method and device for plugged earphone of terminal device
CN103218438A (en) * 2013-04-18 2013-07-24 广东欧珀移动通信有限公司 Method of recommending online music based on playing record of mobile terminal and mobile terminal
CN103631613A (en) * 2012-08-24 2014-03-12 上海斐讯数据通信技术有限公司 Terminal unlocking and program running triggering method
CN105872226A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Unlocking method and device of mobile terminal and the mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101769798B1 (en) * 2011-06-08 2017-08-21 삼성전자 주식회사 Characteristic Configuration Method For Accessory of Portable Device And Accessory operation System supporting the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242604A (en) * 2008-01-22 2008-08-13 深圳华为通信技术有限公司 An automatic operation method and device for plugged earphone of terminal device
CN103631613A (en) * 2012-08-24 2014-03-12 上海斐讯数据通信技术有限公司 Terminal unlocking and program running triggering method
CN103218438A (en) * 2013-04-18 2013-07-24 广东欧珀移动通信有限公司 Method of recommending online music based on playing record of mobile terminal and mobile terminal
CN105872226A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Unlocking method and device of mobile terminal and the mobile terminal

Also Published As

Publication number Publication date
CN107241511A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
CN107241511B (en) Music playing method, device, storage medium and terminal
US8155505B2 (en) Hybrid playlist
US10558698B2 (en) Lyric page generation method and lyric page generation apparatus
US7930367B2 (en) Low storage portable media player
US10283168B2 (en) Audio file re-recording method, device and storage medium
CN111050203B (en) Video processing method and device, video processing equipment and storage medium
US20090177966A1 (en) Content Sheet for Media Player
CN105979312B (en) Information sharing method and device
CN106126176B (en) A kind of audio collocation method and mobile terminal
CN105488154A (en) Theme application recommendation method and device
US20160306880A1 (en) Method and apparatus for identifying audio information
CN107329985B (en) Page collection method and device and mobile terminal
US20200258517A1 (en) Electronic device for providing graphic data based on voice and operating method thereof
CN109657236B (en) Guidance information acquisition method, apparatus, electronic apparatus, and storage medium
WO2009153628A1 (en) Music browser apparatus and method for browsing music
KR101746049B1 (en) Method and apparatus for providing content in mobile terminal
CN108184143B (en) Method and device for acquiring resources
CN110599989B (en) Audio processing method, device and storage medium
CN104091596A (en) Music identifying method, system and device
CN103456329A (en) Method and device for multi-media playing and mobile terminal
CN105160009B (en) Resource downloading method and device
WO2017016382A1 (en) Method and apparatus for generating song menu
CN110737784A (en) Application program control method and electronic equipment
CN108882015B (en) Method and device for adjusting playing speed of recall video, electronic equipment and storage medium
CN105843865B (en) Media file playing method and device

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
CB02 Change of applicant information
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.

GR01 Patent grant
GR01 Patent grant