CN110750676B - Method, device, server and storage medium for recommending songs - Google Patents

Method, device, server and storage medium for recommending songs Download PDF

Info

Publication number
CN110750676B
CN110750676B CN201910999285.7A CN201910999285A CN110750676B CN 110750676 B CN110750676 B CN 110750676B CN 201910999285 A CN201910999285 A CN 201910999285A CN 110750676 B CN110750676 B CN 110750676B
Authority
CN
China
Prior art keywords
determining
information
sliding
song
beat information
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
CN201910999285.7A
Other languages
Chinese (zh)
Other versions
CN110750676A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201910999285.7A priority Critical patent/CN110750676B/en
Publication of CN110750676A publication Critical patent/CN110750676A/en
Application granted granted Critical
Publication of CN110750676B publication Critical patent/CN110750676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/635Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a method, a device, a server and a storage medium for recommending songs, and belongs to the technical field of Internet. The method comprises the following steps: receiving a song recommendation request sent by a terminal, wherein the song recommendation request carries gesture track information input by a user in a touch screen of the terminal; determining target beat information based on gesture track information; determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library; and sending the songs to be recommended to the terminal. By adopting the method and the device, the flexibility of recommending songs can be improved, the interest of a user to the recommended songs is increased, and the recommendation effectiveness is further improved.

Description

Method, device, server and storage medium for recommending songs
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a server, and a storage medium for recommending songs.
Background
In the related art, when a music playing platform recommends songs for a user, the songs to be recommendable which are possibly interested by the user are determined according to the historical song playing records of the user, the user labels, the music types preferred by the user and the like, and the determined songs to be recommendable are recommended to the user. Or, the music playing platform can search for the song to be recommended similar to the song currently being played according to the song currently being played by the user, and recommend the searched song to be recommended to the user.
In carrying out the present disclosure, the inventors found that there are at least the following problems:
the method for determining the songs to be recommended is single, and the users may not be interested in the songs to be recommended, so that the recommendation effectiveness is poor.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides the following technical solutions:
according to a first aspect of embodiments of the present disclosure, there is provided a method of recommending songs, the method comprising:
receiving a song recommendation request sent by a terminal, wherein the song recommendation request carries gesture track information input by a user in a touch screen of the terminal;
determining target beat information based on the gesture track information;
determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library;
and sending the songs to be recommended to the terminal.
Optionally, the gesture track information is arc track information, and determining the target beat information based on the gesture track information includes:
determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on the gesture track information;
Determining the circumference of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point;
and determining target beat information based on the circumference of the circle and the arc track length.
Optionally, the song recommendation request further carries current beat information of a song currently played in the terminal and a sliding duration corresponding to the gesture track information, and the determining the target beat information based on the circumference of the circle and the arc track length includes:
if the length of the arc track is smaller than the circumference of the circle, determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song;
and if the length of the circular arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the circular arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed.
Optionally, the determining the target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song includes:
If the sliding direction corresponding to the gesture track information is clockwise, determining beat information larger than the current beat information of the currently played song as target beat information;
and if the sliding direction corresponding to the gesture track information is a counterclockwise direction, determining beat information smaller than the current beat information of the currently played song as target beat information.
Optionally, if the circular arc track length is greater than or equal to the circumference of the circle, the method further comprises:
determining the number of sliding turns based on the arc track length and the circumference of the circle;
determining the target number of songs to be recommended based on the sliding turns;
in the preset song library, determining the song to be recommended with the beat information matched with the target beat information includes:
and in a preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number.
Optionally, the determining the target beat information based on the sliding linear velocity includes:
determining the sliding time length corresponding to each sliding ring respectively;
determining sliding linear speeds corresponding to the sliding rings respectively based on the circumference of the circle and the sliding time length corresponding to the sliding rings respectively;
Determining target beat information corresponding to each sliding ring based on the sliding linear speed corresponding to each sliding ring;
in the preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number, including:
and determining the target number of songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring, in a preset song library.
Optionally, the determining the number of sliding turns based on the arc track length and the circumference of the circle includes:
if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is an integer, determining the quotient as the number of sliding turns;
and if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is not an integer, determining the arc distance from the track end position to the track start position along the sliding direction in the gesture track information, if the arc distance is smaller than or equal to a preset threshold value, determining the value obtained by adding 1 to the integer part of the quotient as the number of sliding turns, and if the arc distance is larger than the preset threshold value, determining the integer part of the quotient as the number of sliding turns.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for recommending songs, the apparatus comprising:
the receiving module is used for receiving a song recommendation request sent by a terminal, wherein the song recommendation request carries gesture track information input by a user in a touch screen of the terminal;
the determining module is used for determining target beat information based on the gesture track information; determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library;
and the sending module is used for sending the songs to be recommended to the terminal.
Optionally, the gesture track information is arc track information, and the determining module is configured to:
determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on the gesture track information;
determining the circumference of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point;
and determining target beat information based on the circumference of the circle and the arc track length.
Optionally, the song recommendation request further carries current beat information of a song currently played in the terminal and a sliding duration corresponding to the gesture track information, and the determining module is configured to:
If the length of the arc track is smaller than the circumference of the circle, determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song;
and if the length of the circular arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the circular arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed.
Optionally, the determining module is configured to:
if the sliding direction corresponding to the gesture track information is clockwise, determining beat information larger than the current beat information of the currently played song as target beat information;
and if the sliding direction corresponding to the gesture track information is a counterclockwise direction, determining beat information smaller than the current beat information of the currently played song as target beat information.
Optionally, if the arc track length is greater than or equal to the circumference of the circle, the determining module is configured to:
determining the number of sliding turns based on the arc track length and the circumference of the circle;
determining the target number of songs to be recommended based on the sliding turns;
And in a preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number.
Optionally, the determining module is configured to:
determining the sliding time length corresponding to each sliding ring respectively;
determining sliding linear speeds corresponding to the sliding rings respectively based on the circumference of the circle and the sliding time length corresponding to the sliding rings respectively;
determining target beat information corresponding to each sliding ring based on the sliding linear speed corresponding to each sliding ring;
and determining the target number of songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring, in a preset song library.
Optionally, the determining module is configured to:
if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is an integer, determining the quotient as the number of sliding turns;
and if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is not an integer, determining the arc distance from the track end position to the track start position along the sliding direction in the gesture track information, if the arc distance is smaller than or equal to a preset threshold value, determining the value obtained by adding 1 to the integer part of the quotient as the number of sliding turns, and if the arc distance is larger than the preset threshold value, determining the integer part of the quotient as the number of sliding turns.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising a processor, a communication interface, a memory and a communication bus, wherein:
the processor, the communication interface and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory, so as to implement the method for recommending songs.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of recommending songs described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method and the device for recommending the songs, the target beat information of the songs to be recommended can be determined based on gesture track information input by a user in a touch screen of the terminal, and then the songs to be recommended with some beat information as the target beat information can be selected from a song library, and the selected songs are recommended to the user. The method and the device can improve the flexibility of recommending songs, increase the interest of the user in recommending songs, and further improve the effectiveness of recommendation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. In the drawings:
FIG. 1 is a schematic diagram illustrating a system for recommending songs according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of recommending songs according to an exemplary embodiment;
FIG. 3 is a schematic diagram of a round wire slide and key shown in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating one calculated distance according to an example embodiment;
FIG. 5 is a schematic diagram illustrating an apparatus for recommending songs according to an exemplary embodiment;
fig. 6 is a schematic diagram illustrating a structure of a server according to an exemplary embodiment.
Specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The embodiment of the disclosure provides a method for recommending songs, which can be realized by a server and can be realized by terminal cooperation. As shown in fig. 1, a system for recommending songs according to an embodiment of the present disclosure may include a server and a terminal.
The terminal can be provided with a music playing application program, and a user can start the music playing application program in the terminal and play songs which the user wants to listen to through the music playing application program. The user can input the name of the song which the user wants to listen to in the music playing application program, or can trigger the music playing application program to recommend some songs through preset gesture operation, for example, the user can draw an arc on a touch screen of the terminal with a finger, the terminal can detect gesture track information input by the user, and trigger recommendation of some songs to the user.
An exemplary embodiment of the present disclosure provides a method for recommending songs, as shown in fig. 2, a process flow of the method may include the following steps:
step S201, a song recommendation request sent by the terminal is received.
The song recommendation request carries gesture track information input by a user in a touch screen of the terminal.
In implementation, when a user performs a sliding operation on a touch screen of the terminal with a finger, the terminal may detect a sliding signal and acquire gesture track information input by the user. The gesture track information can be position coordinates of a touch point, in a preset coordinate system, of a finger and touch screen contact acquired according to a preset sampling frequency and a corresponding acquisition time point, and the preset coordinate system can be a coordinate system established by taking a touch screen center point or other preset points in the touch screen as an origin.
After the terminal acquires gesture track information input by the user, a song recommendation request can be generated, the song recommendation request carrying the gesture track information is sent to the server, and the server can receive the song recommendation request sent by the terminal.
Step S202, determining target beat information based on gesture track information.
In an implementation, the server may determine a song to be recommended based on the gesture track information, and send the determined song to be recommended to the terminal. In the above process, the server may first determine the type of the song to be recommended, such as target beat information of the song to be recommended, based on the gesture track information. If the user is currently playing a song W through the terminal, the user wants to hear some songs having beats faster or slower than the song W, and the music playing application program can be triggered to recommend some such songs through a preset gesture operation. Different gesture track information corresponds to different beat information, so the server can determine target beat information of songs to be recommended based on the gesture track information sent by the terminal. The process of determining the target beat information based on the gesture track information will be described in detail later herein, and will not be described in detail herein.
In step S203, in a preset song library, a song to be recommended, in which the beat information and the target beat information are matched, is determined.
In implementation, the server may pre-establish a song library, store a large number of released songs in the song library, and store song related information corresponding to each released song in the song library, where the song related information includes a name of the song, singer information, release time, beat information, and the like. After the server determines the target beat information of the song to be recommended, the server can search the song to be recommended, of which the beat information is matched with the target beat information, in a preset song library based on the related information of the song.
Step S204, the songs to be recommended are sent to the terminal.
In an implementation, after the server determines the song to be recommended, the song to be recommended may be sent to the terminal. The song to be recommended may include a name of the song to be recommended, introduction information, audio data, and the like. The server may send the name and introduction information of the song to be recommended to the terminal, and when the user selects to play the target song to be recommended after looking up the name and introduction information of the song to be recommended, the server sends the audio data of the target song to be recommended to the terminal. Or the server can also directly send the name, the introduction information and the audio data of the song to be recommended to the terminal, and when the user selects to play the target song to be recommended after looking up the name and the introduction information of the song to be recommended, the audio data corresponding to the target song to be recommended which is received locally by the terminal is directly played.
The process of determining target beat information based on gesture trajectory information will be described in detail below.
Alternatively, when the user wants to hear some songs having a particular tempo, the user may draw an arc on the touch screen through a sliding operation, and the gesture track information may be arc track information. Based on the gesture track information, the step of determining target beat information may include: determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on gesture track information; determining the perimeter of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point; and determining target beat information based on the circumference of the circle and the length of the circular arc track.
In an implementation, the gesture track information may include position coordinates of touch points, in a preset coordinate system, of a finger and a touch screen, where the position coordinates are acquired according to a preset sampling frequency, and the server may calculate a length of the arc track based on the position coordinates of each touch point, and may also calculate a radius of the arc track relative to a preset point in the touch screen. Then, the server may determine a perimeter of a circle centered on the preset point, which may be a center point of the touch screen, based on a radius of the circular arc track with respect to the preset point. Finally, the server may determine whether the circle drawn by the user through the sliding operation on the touch screen is enough for one circle based on the circumference of the circle and the track length of the circle, and determine the target beat information based on the determination result.
In the embodiment of the present disclosure, in two cases, when the circle of the arc drawn by the user through the sliding operation on the touch screen is less than one circle, the target beat information may be determined by the first mode, and when the circle of the arc drawn by the user through the sliding operation on the touch screen is more than one circle, the target beat information may be determined by the second mode.
In practical application, when the terminal detects the sliding operation of the user, as shown in fig. 3, a preset circular line sliding rail and a key on a circular line may be displayed, the user may drag the key to move around the circular line, the center of the circular line is the center point of the touch screen, the radius of the circular line is fixed, the radius of the circular line may be used as the radius of the circular arc track, and the server may calculate the circumference of the circle based on the radius of the circular line.
Or if the preset circle line and the key on the circle line are not displayed in the terminal, the user can freely perform sliding operation, the circular arc drawn by the user may not be a standard circle, after the gesture track information is acquired, the position coordinates of the intersection point of the gesture track information and two straight lines passing through the preset point in the touch screen and perpendicular to each other can be determined, the average value of the distances between each intersection point and the preset point is calculated, the average value can be used as the radius of the approximate circular arc track relative to the preset point, and the server can calculate the circumference of a circle taking the preset point as the center of a circle based on the radius of the circular arc track relative to the preset point.
Optionally, when the circle of the arc drawn by the user through the sliding operation on the touch screen is less than one circle, the target beat information may be determined through the first mode, and when the circle of the arc drawn by the user through the sliding operation on the touch screen is more than one circle, the specific implementation manner of determining the target beat information through the second mode is as follows: the song recommendation request also carries the current beat information of the currently played song in the terminal and the sliding time length corresponding to the gesture track information, and if the arc track length is smaller than the circumference of the circle, the target beat information is determined based on the sliding direction of the gesture track information and the current beat information of the currently played song; if the length of the circular arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the circular arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed.
In implementation, if it is determined that the length of the arc track is smaller than the circumference of the circle, the arc marked by the user through the sliding operation is indicated to be less than one circle, and then the target beat information can be determined based on the sliding direction of the gesture track information and the current beat information of the currently played song. If the length of the arc track is determined to be greater than or equal to the circumference of the circle, the arc track indicates that the arc drawn by the user through the sliding operation is enough for one circle, then the sliding linear speed can be determined based on the length of the arc track and the sliding time length corresponding to the gesture track information, and the target beat information is determined based on the sliding linear speed.
In addition to the above manner, it may be determined in other manners whether the circle of the arc drawn by the user through the sliding operation on the touch screen is enough, for example, an initial position of the sliding operation may be obtained, if a continuous sliding signal is detected and the sliding signal ends at the initial position, or the initial position ends, it indicates that the circle of the arc drawn by the user through the sliding operation on the touch screen is enough, or it indicates that the circle of the arc drawn by the user through the sliding operation on the touch screen is less than one.
(1) For the case that the circle of the arc drawn by the user through the sliding operation on the touch screen is less than one circle, the gesture track information can be the position coordinates of the finger acquired according to the preset sampling frequency and the touch point contacted by the touch screen in the preset coordinate system and the corresponding acquisition time point, and the server can determine the sliding direction of the corresponding arc track based on the gesture track information and can comprise the clockwise direction or the anticlockwise direction. The song recommendation request may further carry current beat information of the song currently played in the terminal, and then the server may determine target beat information based on the sliding direction of the circular arc track and the current beat information of the song currently played.
Optionally, the step of determining the target beat information based on the sliding direction of the gesture track information and the current beat information of the currently played song may include: if the sliding direction corresponding to the gesture track information is clockwise, determining beat information larger than the current beat information of the currently played song as target beat information; and if the sliding direction corresponding to the gesture track information is in the anticlockwise direction, determining beat information smaller than the current beat information of the currently played song as target beat information.
In the implementation, if the sliding direction corresponding to the gesture track information is clockwise, the server may determine that the beat information of the current beat information larger than the currently played song is the target beat information, and if the sliding direction corresponding to the gesture track information is counterclockwise, the server may determine that the beat information of the current beat information smaller than the currently played song is the target beat information.
The server may further obtain a song currently played in the terminal, determine a target type of the song currently played in the terminal, determine candidate songs belonging to the target type except the song currently played in the song library, and determine a song to be recommended whose beat information is greater than the current beat information of the song currently played in the candidate songs. Alternatively, a song to be recommended whose tempo information is smaller than the current tempo information of the currently played song may be determined among the candidate songs.
Alternatively, an initial position and an end position of the slide operation may also be acquired, a slide angle may be calculated based on the initial position and the end position, and the target beat information may be determined based on the slide angle.
In practice, the larger the sliding angle, the larger the difference between the target tempo information and the current tempo information of the currently played song. In practical application, an initial position and an end position of a sliding operation can be obtained, a first distance between the initial position and a preset point in the touch screen and a second distance between the end position and the preset point are calculated respectively, a distance average value of the first distance and the second distance is calculated, a third distance between the initial position and the end position is determined, and the distance average value and the third distance are solved through a cosine theorem to obtain a sliding angle. The difference between the target beat information and the current beat information of the currently played song may be determined based on the sliding angle, and the target beat information may be determined based on the current beat information of the currently played song and the determined difference.
And when the sliding direction corresponding to the gesture track information is clockwise, determining the sum value obtained by adding the determined difference value to the current beat information of the currently played song as target beat information. And when the sliding direction corresponding to the gesture track information is in the anticlockwise direction, determining a target difference value obtained by subtracting the determined difference value from the current beat information of the currently played song as target beat information.
(2) For the case that the arc drawn by the user through the sliding operation is enough for one circle on the touch screen, the server can also determine the sliding time length corresponding to the gesture track information, the sliding linear speed is obtained by dividing the sliding time length by the arc track length, and the target beat information is determined based on the sliding linear speed. The target beat information is larger as the sliding linear velocity is larger.
Optionally, if the arc track length is greater than or equal to the circumference of the circle, the method provided by the embodiment of the disclosure may further include: determining the number of sliding turns based on the length of the arc track and the circumference of the circle; determining a target number of songs to be recommended based on the number of sliding turns; in the preset song library, the step of determining the song to be recommended, in which the beat information and the target beat information are matched, may include: and determining songs to be recommended, of which the number is the target number, in a preset song library, wherein the beat information is matched with the target beat information.
In practice, the number of turns n of the slide may be determined as the target number of songs to be recommended by dividing the length of the circular arc track by the circumference of the circle. Then, n songs to be recommended, of which the beat information and the target beat information are matched, can be determined in a preset song library. At this time, the slip linear velocity may also be calculated by equation 1:
Wherein v is the sliding linear speed, n is the number of sliding turns, t is the sliding time length, and r is the radius of the arc track relative to a preset point in the touch screen.
Alternatively, after the sliding linear velocity is determined, if the sliding linear velocity is less than a first preset velocity threshold A1 (e.g., 12 cm/s), a song whose tempo information is less than a first tempo threshold (e.g., 65 bpm) is determined as a song to be recommended. If the sliding linear velocity is greater than the first preset velocity threshold value A1 and less than the second preset velocity threshold value A2 (such as 24 cm/s), determining the song with beat information greater than the first beat threshold value and less than the second beat threshold value (such as 100 bpm) as the song to be recommended. And if the sliding linear velocity is larger than a second preset velocity threshold value A2, determining the song with the beat information larger than the second beat threshold value as the song to be recommended. The song to be recommended may also be a song of which the type and the song currently played by the terminal belong to the same type.
In addition, alternatively, after the sliding linear velocity is determined, the song to be recommended may be determined based on the current tempo information of the song currently played by the terminal and the sliding linear velocity. And if the sliding linear velocity is smaller than or equal to a third preset velocity threshold value A3 (such as 15 cm/s), determining the song with the beat information smaller than the current beat information of the song currently played by the terminal as the song to be recommended. And if the sliding linear speed is greater than a third preset speed threshold A3, determining the song with the beat information greater than the current beat information of the song currently played by the terminal as the song to be recommended.
Optionally, the step of determining the target beat information based on the sliding linear velocity may include: determining the sliding time length corresponding to each sliding ring respectively; determining sliding linear speeds corresponding to the sliding rings respectively based on the circumferences of the circles and the sliding time lengths corresponding to the sliding rings respectively; determining target beat information corresponding to each sliding ring based on the sliding linear speed corresponding to each sliding ring; in the preset song library, the step of determining that the beat information is matched with the target beat information and the number of the songs to be recommended is the target number may include: and determining target numbers of songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring respectively, in a preset song library.
In implementation, an average sliding linear velocity of n circles of sliding can be calculated, target beat information is determined based on the average sliding linear velocity, and n songs to be recommended are uniformly selected according to the target beat information. Alternatively, a corresponding target beat information may be determined for each song to be recommended, where different songs to be recommended have different target beat information.
The sliding time length corresponding to each sliding ring can be determined based on gesture track information, the circumference of the circle is divided by the sliding time length corresponding to each sliding ring to obtain the sliding linear speed corresponding to each sliding ring, and the target beat information corresponding to each sliding ring is determined based on the sliding linear speed corresponding to each sliding ring. The target beat information is larger as the sliding linear velocity is larger. And finally, determining n songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring, in a preset song library.
For example, the user slides for 4 circles altogether, and the calculation determines that the sliding linear velocity of the first circle is 10cm/s, the sliding linear velocity of the second circle is 15cm/s, the sliding linear velocity of the third circle is 20cm/s, and the sliding linear velocity of the fourth circle is 8cm/s. The target tempo information of the first to fourth songs to be recommended may be determined to be 50bpm, 65bpm, 84bpm,45bpm in order based on the sliding linear velocities respectively corresponding to the sliding rings.
Since the user is not necessarily able to complete one circle at the end when sliding the multi-circle arc trajectory, the number of sliding circles may be determined in the following manner. Optionally, the step of determining the number of sliding turns based on the arc track length and the circumference of the circle may include: if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is an integer, determining the quotient as the number of sliding turns; if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is not an integer, determining the arc distance between the track end position and the track start position in the sliding direction in the gesture track information, if the arc distance is smaller than or equal to a preset threshold value, determining the integer part of the quotient by adding 1 as the number of sliding turns, and if the arc distance is larger than the preset threshold value, determining the integer part of the quotient as the number of sliding turns.
In practice, for the case where the user can drag the preset button to move around the preset circle line, when the starting point position and the ending point position are not coincident, i.e. when the quotient of the length of the circular arc track divided by the circumference of the circle is not an integer, the distance from the ending point position to the starting point position along the sliding direction or the arc length therebetween can be determined, if the distance or the arc length is smaller than or equal to the preset threshold (e.g.) When the last incomplete sliding ring is calculated according to a complete sliding ring, the integral part of the quotient can be added with 1 to obtain the valueThe number of sliding turns is determined. If the distance or the arc length is greater than the preset threshold, the last incomplete slip ring is not counted as a complete slip ring, and then the integer part of the quotient can be determined as the slip number.
For the case that the user can freely slide, the arc drawn by the user may not be a standard circle, as shown in fig. 4, the radius of the approximated arc track relative to the preset point in the touch screen may be calculated based on the gesture track information, then the arc distance from the end position to the start position along the sliding direction may be determined, if the arc distance is less than or equal to the preset threshold (e.g. ) The last incomplete slip ring can then be calculated as a complete slip ring, and then the value obtained by adding 1 to the integer part of the quotient can be determined as the slip number. If the arc distance is greater than the preset threshold, the last incomplete slip ring is not calculated according to a complete slip ring, and then the integer part of the quotient can be determined as the slip number.
According to the method and the device for recommending the songs, the target beat information of the songs to be recommended can be determined based on gesture track information input by a user in a touch screen of the terminal, and then the songs to be recommended with some beat information as the target beat information can be selected from a song library, and the selected songs are recommended to the user. The method and the device can improve the flexibility of recommending songs, increase the interest of the user in recommending songs, and further improve the effectiveness of recommendation.
Yet another exemplary embodiment of the present disclosure provides an apparatus for recommending songs, as shown in fig. 5, the apparatus including:
the receiving module 501 is configured to receive a song recommendation request sent by a terminal, where the song recommendation request carries gesture track information input by a user in a touch screen of the terminal;
A determining module 502, configured to determine target beat information based on the gesture track information; determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library;
and the sending module 503 is configured to send the song to be recommended to the terminal.
Optionally, the gesture track information is arc track information, and the determining module 502 is configured to:
determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on the gesture track information;
determining the circumference of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point;
and determining target beat information based on the circumference of the circle and the arc track length.
Optionally, the song recommendation request further carries current beat information of a song currently played in the terminal and a sliding duration corresponding to the gesture track information, and the determining module 502 is configured to:
if the length of the arc track is smaller than the circumference of the circle, determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song;
And if the length of the circular arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the circular arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed.
Optionally, the determining module 502 is configured to:
if the sliding direction corresponding to the gesture track information is clockwise, determining beat information larger than the current beat information of the currently played song as target beat information;
and if the sliding direction corresponding to the gesture track information is a counterclockwise direction, determining beat information smaller than the current beat information of the currently played song as target beat information.
Optionally, if the arc track length is greater than or equal to the circumference of the circle, the determining module 502 is configured to:
determining the number of sliding turns based on the arc track length and the circumference of the circle;
determining the target number of songs to be recommended based on the sliding turns;
and in a preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number.
Optionally, the determining module 502 is configured to:
determining the sliding time length corresponding to each sliding ring respectively;
determining sliding linear speeds corresponding to the sliding rings respectively based on the circumference of the circle and the sliding time length corresponding to the sliding rings respectively;
determining target beat information corresponding to each sliding ring based on the sliding linear speed corresponding to each sliding ring;
and determining the target number of songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring, in a preset song library.
Optionally, the determining module 502 is configured to:
if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is an integer, determining the quotient as the number of sliding turns;
and if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is not an integer, determining the arc distance from the track end position to the track start position along the sliding direction in the gesture track information, if the arc distance is smaller than or equal to a preset threshold value, determining the value obtained by adding 1 to the integer part of the quotient as the number of sliding turns, and if the arc distance is larger than the preset threshold value, determining the integer part of the quotient as the number of sliding turns.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the method and the device for recommending the songs, the target beat information of the songs to be recommended can be determined based on gesture track information input by a user in a touch screen of the terminal, and then the songs to be recommended with some beat information as the target beat information can be selected from a song library, and the selected songs are recommended to the user. The method and the device can improve the flexibility of recommending songs, increase the interest of the user in recommending songs, and further improve the effectiveness of recommendation.
It should be noted that: in the song recommendation apparatus provided in the foregoing embodiment, only the division of the foregoing functional modules is used as an example for the purpose of recommending songs, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules to perform all or part of the functions described above. In addition, the device for recommending songs and the method embodiment for recommending songs provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the device and the method embodiment are detailed in the method embodiment, and are not repeated here.
Fig. 6 illustrates a schematic structure of a server 1900 provided in an exemplary embodiment of the present disclosure. The server 1900 may vary considerably in configuration or performance and may include one or more processors (central processing units, CPU) 1910 and one or more memories 1920. Wherein the memory 1920 has stored therein at least one instruction that is loaded and executed by the processor 1910 to implement the method for recommending songs described in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method of recommending songs, the method comprising:
receiving a song recommendation request sent by a terminal, wherein the song recommendation request carries gesture track information input by a user in a touch screen of the terminal, current beat information of a song currently played by the terminal and sliding time length corresponding to the gesture track information, and the gesture track information is arc track information;
determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on the gesture track information;
determining the circumference of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point;
if the length of the arc track is smaller than the circumference of the circle, determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song;
if the length of the arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed;
Determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library;
and sending the songs to be recommended to the terminal.
2. The method of claim 1, wherein the determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently playing song comprises:
if the sliding direction corresponding to the gesture track information is clockwise, determining beat information larger than the current beat information of the currently played song as target beat information;
and if the sliding direction corresponding to the gesture track information is a counterclockwise direction, determining beat information smaller than the current beat information of the currently played song as target beat information.
3. The method of claim 1, wherein if the circular arc track length is greater than or equal to the circumference of the circle, the method further comprises:
determining the number of sliding turns based on the arc track length and the circumference of the circle;
determining the target number of songs to be recommended based on the sliding turns;
in the preset song library, determining the song to be recommended with the beat information matched with the target beat information includes:
And in a preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number.
4. The method of claim 3, wherein the determining target beat information based on the sliding linear velocity comprises:
determining the sliding time length corresponding to each sliding ring respectively;
determining sliding linear speeds corresponding to the sliding rings respectively based on the circumference of the circle and the sliding time length corresponding to the sliding rings respectively;
determining target beat information corresponding to each sliding ring based on the sliding linear speed corresponding to each sliding ring;
in the preset song library, determining that the beat information is matched with the target beat information and the number of songs to be recommended is the target number, including:
and determining the target number of songs to be recommended, of which the beat information is matched with the target beat information corresponding to each sliding ring, in a preset song library.
5. A method according to claim 3, wherein said determining the number of sliding turns based on the arc track length and the circumference of the circle comprises:
if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is an integer, determining the quotient as the number of sliding turns;
And if the quotient obtained by dividing the length of the circular arc track by the circumference of the circle is not an integer, determining the arc distance from the track end position to the track start position along the sliding direction in the gesture track information, if the arc distance is smaller than or equal to a preset threshold value, determining the value obtained by adding 1 to the integer part of the quotient as the number of sliding turns, and if the arc distance is larger than the preset threshold value, determining the integer part of the quotient as the number of sliding turns.
6. An apparatus for recommending songs, the apparatus comprising:
the receiving module is used for receiving a song recommendation request sent by a terminal, wherein the song recommendation request carries gesture track information input by a user in a touch screen of the terminal, current beat information of a song currently played by the terminal and sliding time length corresponding to the gesture track information, and the gesture track information is arc track information;
the determining module is used for determining the length of the arc track and the radius of the arc track relative to a preset point in the touch screen based on the gesture track information;
determining the circumference of a circle taking the preset point as the center of the circle based on the radius of the arc track relative to the preset point;
If the length of the arc track is smaller than the circumference of the circle, determining target beat information based on the sliding direction corresponding to the gesture track information and the current beat information of the currently played song;
if the length of the arc track is greater than or equal to the circumference of the circle, determining a sliding linear speed based on the length of the arc track and the sliding time length corresponding to the gesture track information, and determining target beat information based on the sliding linear speed; determining songs to be recommended, of which the beat information is matched with the target beat information, in a preset song library;
and the sending module is used for sending the songs to be recommended to the terminal.
7. A server comprising a processor, a communication interface, a memory, and a communication bus, wherein:
the processor, the communication interface and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute a program stored on the memory to implement the method steps of any one of claims 1-5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-5.
CN201910999285.7A 2019-10-21 2019-10-21 Method, device, server and storage medium for recommending songs Active CN110750676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910999285.7A CN110750676B (en) 2019-10-21 2019-10-21 Method, device, server and storage medium for recommending songs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910999285.7A CN110750676B (en) 2019-10-21 2019-10-21 Method, device, server and storage medium for recommending songs

Publications (2)

Publication Number Publication Date
CN110750676A CN110750676A (en) 2020-02-04
CN110750676B true CN110750676B (en) 2024-01-23

Family

ID=69279058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910999285.7A Active CN110750676B (en) 2019-10-21 2019-10-21 Method, device, server and storage medium for recommending songs

Country Status (1)

Country Link
CN (1) CN110750676B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015155409A1 (en) * 2014-04-11 2015-10-15 Nokia Technologies Oy Method, apparatus, and computer program product for haptically providing information via a wearable device
CN106484302A (en) * 2016-10-31 2017-03-08 维沃移动通信有限公司 A kind of playback of songs method and mobile terminal
CN107515925A (en) * 2017-08-24 2017-12-26 北京小米移动软件有限公司 Method for playing music and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7783623B2 (en) * 2007-08-31 2010-08-24 Yahoo! Inc. System and method for recommending songs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015155409A1 (en) * 2014-04-11 2015-10-15 Nokia Technologies Oy Method, apparatus, and computer program product for haptically providing information via a wearable device
CN106484302A (en) * 2016-10-31 2017-03-08 维沃移动通信有限公司 A kind of playback of songs method and mobile terminal
CN107515925A (en) * 2017-08-24 2017-12-26 北京小米移动软件有限公司 Method for playing music and device

Also Published As

Publication number Publication date
CN110750676A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
US9612791B2 (en) Method, system and storage medium for monitoring audio streaming media
US9330505B2 (en) Automatic search based on detected user interest in vehicle
CN107978323B (en) Audio recognition method, device and storage medium
EP2945045B1 (en) Electronic device and method of playing music in electronic device
US20220391060A1 (en) Methods for displaying and providing multimedia resources
CN109508391B (en) Input prediction method and device based on knowledge graph and electronic equipment
CN109918669A (en) Entity determines method, apparatus and storage medium
CN108196675B (en) Interaction method and device for touch terminal and touch terminal
CN110209871A (en) Song comments on dissemination method and device
CN112988027B (en) Object control method and device
WO2018072336A1 (en) Line segment erasing method and device
CN103645848B (en) Terminal control method and terminal control device based on ultrasonic waves
CN110287161B (en) Image processing method and device
CN110750676B (en) Method, device, server and storage medium for recommending songs
CN115134670A (en) Multimedia playing method, device, storage medium and program product
CN107291564B (en) Information copying and pasting method and device and electronic equipment
CN111857482B (en) Interaction method, device, equipment and readable medium
CN104462276B (en) A kind of audio frequency playing method and device for desktop widget
CN116258435A (en) Logistics information display method, device, equipment, storage medium and product
WO2015183968A1 (en) Rule-based, preemptive download of digital media assets
WO2024001547A1 (en) Multimedia playback method, device, storage medium, and program product
CN106844504A (en) A kind of method and apparatus for sending the single mark of song
US8694509B2 (en) Method and apparatus for managing for handwritten memo data
CN110719367A (en) Cloud mobile phone friend recommendation method, device, equipment and storage medium
CN106528661B (en) Method and device for auditioning songs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant