Method, apparatus, device and storage medium for determining associated playlists
By calculating the playlist feature vector and comparing the similarity with other playlists, the problem of low accuracy of associated playlists in the prior art is solved, and a more accurate recommendation of associated playlists is achieved.
Patent Information
- Application Number
- CN202011388415.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2040-12-01
AI Technical Summary
In the prior art, the accuracy of determining the associated playlist by the playlist name and classification tag is low, because this information may inaccurately describe the characteristics of the song.
The associated playlist is determined by determining the playlist description information and song feature vectors of the target playlist, calculating the playlist feature vectors, and comparing the similarity with the feature vectors of other playlists.
Improve the accuracy of determining the associated playlist, and provides more accurate associated playlist recommendations by combining the playlist description information and song feature vectors.
Smart Images

Figure CN112487236B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a method, apparatus, device, and storage medium for determining associated playlists. Background Art
[0002] With the development of Internet technologies, it is a common way to play music through a music application on a mobile terminal.
[0003] Some playlists including songs with the same characteristics will be displayed in a music application. For example, each song included in the playlist is a song from the 1990s or an English song, etc. These playlists can be set by users. For example, users can set some songs with the same characteristics or their favorite songs in the same playlist, set the name of the playlist, and add classification tags for describing the characteristics of the songs in the playlist, etc., and then can share their playlists in the music application. Users can also select different playlists in the music application to listen to according to their preferences for music.
[0004] In order to meet users' preferences for music and achieve intelligent playlist pushing, some music applications can push associated playlists corresponding to the playlists selected by users after the users select a playlist to listen to. Among them, the songs in the associated playlists can have the same characteristics as the songs in the playlists selected by users, such as all being Chinese pop songs, all being songs from the 1990s, etc.
[0005] In the process of implementing this application, the inventors found that the related technologies have at least the following problems:
[0006] In the related technologies, generally, it is determined whether two playlists are associated playlists based on whether the names and classification tags of the two playlists are relevant. However, since most of the names or classification tags of the playlists are set by users themselves, the description of the characteristics of the songs in the playlists may not be accurate. Therefore, the accuracy of determining whether two playlists are associated playlists only by the names or classification tags of the playlists is relatively low. Summary of the Invention
[0007] Embodiments of this application provide a method, apparatus, device, and storage medium for determining associated playlists, which can improve the problem of the accuracy of determining associated playlists. The technical solutions are as follows:
[0008] In a first aspect, a method for determining an associated playlist is provided. The method includes:
[0009] Determine a description information feature vector corresponding to the playlist description information of a target playlist, and determine a song feature vector corresponding to each song included in the target playlist, where the song feature vector corresponding to the song is used to represent one or more playlists to which the song belongs in a playlist library;
[0010] Based on the song feature vector and the description information feature vector, determine the playlist feature vector of the target playlist;
[0011] Determine the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and determine the other playlists corresponding to the target similarity that meet the preset conditions as the associated playlists of the target playlist.
[0012] Optionally, the playlist description information includes the playlist name and the classification label of the playlist;
[0013] The determining the description information feature vector corresponding to the playlist description information of the target playlist includes:
[0014] Based on the pre-set correspondence between phrases and phrase vectors, determine the phrase vectors corresponding to each phrase included in the playlist name of the target playlist;
[0015] Based on the pre-set correspondence between the classification label and each position in the preset label vector, determine the first position corresponding to at least one classification label of the target playlist, set the value at the first position in the preset label vector to the first value, and set the values at other positions in the preset label vector except the first position to the second value, to obtain the label vector corresponding to at least one label of the target playlist;
[0016] The determining the song feature vectors corresponding to each song included in the target playlist includes:
[0017] Based on the pre-set correspondence between songs and song feature vectors, determine the song feature vectors corresponding to each song included in the target playlist.
[0018] Optionally, the based on the song feature vector and the description information feature vector, determining the playlist feature vector of the target playlist includes:
[0019] Combine the song feature vector and the description information feature vector into a composite vector, and input the composite vector into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist.
[0020] Optionally, before the inputting the composite vector into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist, the method further includes:
[0021] Obtain a first composite vector of a target sample playlist, a second composite vector of a positive sample playlist corresponding to the target sample playlist, and a third composite vector of a negative sample playlist corresponding to the target sample playlist, where the positive sample playlist is an associated playlist of the target sample playlist, and the negative sample playlist is a non-associated playlist of the target sample playlist;
[0022] Input the first composite vector, the second composite vector, and the third composite vector into the playlist feature extraction model to be trained, respectively, to obtain a first playlist feature vector corresponding to the target sample playlist, a second playlist feature vector corresponding to the positive sample playlist, and a third playlist feature vector corresponding to the negative sample playlist;
[0023] Determine residual values corresponding to the first song feature vector, the second song feature vector, and the third song feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain a trained playlist feature extraction model.
[0024] Optionally, before obtaining the first composite vector of the target sample playlist, the second composite vector of the positive sample playlist corresponding to the target sample playlist, and the third composite vector of the negative sample playlist corresponding to the target sample playlist, the method further includes:
[0025] Obtain a first playlist set listened to by each user within a preset time period;
[0026] For each first playlist set listened to by a user, delete first playlists in the first playlist set whose listening duration is not within a preset listening duration range to obtain a second playlist set;
[0027] For each second playlist set, determine second playlists in the second playlist set whose listening times exceed a first preset number of times, determine a deletion probability corresponding to each second playlist based on the listening times of the second playlist and the corresponding relationship between the first preset number of times and the deletion probability, and perform playlist deletion processing on the second playlist set based on the deletion probability corresponding to each second playlist to obtain each third playlist set;
[0028] Determine any playlist as the target sample playlist, determine playlists that coexist with the target sample playlist in the same third playlist set and whose number of times exceeds a second preset number of times as positive sample playlists corresponding to the target sample playlist, and determine other playlists in the third playlist set except the positive sample playlists as negative sample playlists corresponding to the target sample playlist.
[0029] In a second aspect, a device for determining associated playlists is provided, and the device includes:
[0030] A first determination module, configured to determine a description information feature vector corresponding to the playlist description information of a target playlist, and determine a song feature vector corresponding to each song included in the target playlist, where the song feature vector corresponding to the song is used to represent one or more playlists to which the song belongs in the playlist library;
[0031] A second determination module, configured to determine a playlist feature vector of the target playlist based on the song feature vector and the description information feature vector;
[0032] A third determination module, configured to determine the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and determine, as the associated playlists of the target playlist, the other playlists corresponding to the target similarities that meet the preset conditions.
[0033] Optionally, the playlist description information includes a playlist name and a classification label of the playlist;
[0034] The first determination module is configured to:
[0035] Based on the pre-set correspondence between phrases and phrase vectors, determine the phrase vectors corresponding to the phrases included in the playlist name of the target playlist; based on the correspondence between the classification labels and the positions in the preset label vector, determine the first positions corresponding to at least one classification label of the target playlist, set the values at the first positions in the preset label vector to a first value, and set the values at the other positions except the first positions in the preset label vector to a second value, to obtain the label vectors corresponding to at least one label of the target playlist;
[0036] Based on the pre-set correspondence between songs and song feature vectors, determine the song feature vectors corresponding to the songs included in the target playlist.
[0037] Optionally, the second determination module is configured to:
[0038] Combine the song feature vector and the description information feature vector into a composite vector, and input the composite vector into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist.
[0039] Optionally, the second determination module is further configured to:
[0040] Obtain a first composite vector of a target sample playlist, a second composite vector of a positive sample playlist corresponding to the target sample playlist, and a third composite vector of a negative sample playlist corresponding to the target sample playlist, where the positive sample playlist is an associated playlist of the target sample playlist, and the negative sample playlist is a non-associated playlist of the target sample playlist;
[0041] Input the first synthetic vector, the second synthetic vector, and the third synthetic vector into the playlist feature extraction model to be trained respectively, to obtain the first playlist feature vector corresponding to the target sample playlist, the second playlist feature vector corresponding to the positive sample playlist, and the third playlist feature vector corresponding to the negative sample playlist;
[0042] Determine the residual values corresponding to the first song feature vector, the second song feature vector, and the third song feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain a trained playlist feature extraction model.
[0043] Optionally, the second determination module is further configured to:
[0044] Obtain the first playlist set listened to by each user within a preset time period;
[0045] For the first playlist set listened to by each user, delete the first playlists in the first playlist set whose listening duration is not within the preset listening duration range to obtain a second playlist set;
[0046] For each second playlist set, determine the second playlists in the second playlist set whose listening times exceed a first preset number of times, determine the deletion probability corresponding to the second playlist based on the listening times of the second playlist and the corresponding relationship between the first preset number of times and the deletion probability, and perform playlist deletion processing on the second playlist set based on the deletion probability corresponding to each second playlist to obtain each third playlist set;
[0047] Determine any playlist as the target sample playlist, determine the playlists that coexist with the target sample playlist in the same third playlist set and whose number of times exceeds a second preset number of times as the positive sample playlists corresponding to the target sample playlist, and determine the other playlists in the third playlist set except the positive sample playlists as the negative sample playlists corresponding to the target sample playlist.
[0048] In a third aspect, a computer device is provided. The computer device includes a processor and a memory. At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the method for determining associated playlists as described above.
[0049] In a fourth aspect, a computer-readable storage medium is provided, characterized in that at least one instruction is stored in the storage medium, and the instruction is loaded and executed by the processor to implement the operations performed by the method for determining associated playlists as described above.
[0050] The beneficial effects brought by the technical solutions provided in the embodiments of the present application are:
[0051] Determine the playlist feature vector of the target playlist through the description information feature vector of the playlist's description information and the song feature vectors corresponding to each song in the playlist. Then, determine the playlist corresponding to the playlist feature vector with the highest similarity to the playlist feature vector of the target playlist as the associated playlist of the target playlist. It can be seen that in the embodiments of the present application, when determining the associated playlist, in addition to using the playlist description information, the song feature vectors of the songs in the playlist are also used, increasing the reference information for determining the associated playlist, thereby improving the accuracy of determining the associated playlist. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0053] Figure 1 is a flowchart of the method for determining the associated playlist provided by the embodiments of the present application;
[0054] Figure 2 is a schematic diagram of the method for determining the associated playlist provided by the embodiments of the present application;
[0055] Figure 3 is a schematic diagram of the method for determining the associated playlist provided by the embodiments of the present application;
[0056] Figure 4 is a flowchart of the method for obtaining the sample playlist pair in the embodiments of the present application;
[0057] Figure 5 is a schematic diagram of the structure of the device for determining the associated playlist provided by the embodiments of the present application;
[0058] Figure 6 is a schematic diagram of the structure of the server provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the drawings.
[0060] A method for determining associated playlists provided by an embodiment of the present application can be implemented by a terminal or a server. Among them, the terminal can run a music playback application for playing music. The terminal can be equipped with components such as a camera, a microphone, and headphones. The terminal has a communication function and can access the Internet. The terminal can be a mobile phone, a tablet computer, a smart wearable device, a desktop computer, a laptop computer, etc. The server can be the background server of the above music playback application, and the server can establish communication with the terminal. The server can be a single server or a server group. If it is a single server, the server can be responsible for all the processing in the following solutions. If it is a server group, different servers in the server group can be responsible for different processing in the following solutions. The specific processing allocation can be arbitrarily set by technicians according to actual needs and will not be elaborated here.
[0061] In a music playback application, there is generally a song recommendation interface. Different songs and different playlists can be displayed in the song recommendation interface. A playlist can include multiple songs with the same characteristics. For example, each song included in the playlist is a song from the 1990s, or all are English songs, etc. When displaying a playlist in the song recommendation interface, the playlist cover, playlist name, and classification label corresponding to the playlist can be displayed. Users can select a playlist according to their preferences in the song recommendation interface and listen to each song in the selected playlist. Users can also set playlists in the music playback application. For example, some songs that they like to listen to can be set in a playlist, and the playlist cover, playlist name, and classification label of the playlist can be set. For example, the playlist name can be "The Most Favorite Songs in Middle School", and classification labels such as "Campus", "Youth", "Post-90s", "Love Songs" can be added. A method for determining associated playlists provided by an embodiment of the present application can recommend corresponding associated playlists for users according to the playlists listened to by users, that is, the songs in the recommended playlists have the same characteristics as the songs in the playlists listened to by users.
[0062] Figure 1 It is a flowchart of a method for determining associated playlists provided by an embodiment of the present application. Refer to Figure 1 This embodiment includes steps 101 - step 103.
[0063] Step 101: Determine the description information feature vector corresponding to the playlist description information of the target playlist, and determine the song feature vectors corresponding to each song included in the target playlist.
[0064] Among them, the playlist library may include all playlists in the corresponding music playback application. The target playlist can be any playlist in the playlist library. The playlist description information includes the playlist name, the detailed description of the playlist, and the classification tags of the playlist, etc. The song feature vectors corresponding to the songs in the target playlist are used to represent one or more playlists to which the song belongs in the playlist library, and can be obtained by feature extraction from the identification information of one or more playlists to which the song belongs.
[0065] In this embodiment, the determination process of the description information feature vector is described by taking the playlist name and the classification tag as examples.
[0066] In implementation, the server can obtain the playlist name and the classification tag of the target playlist, then obtain the description keywords in the playlist name and the classification tag, and then input the description keywords into a pre-trained semantic recognition model to extract the feature vectors corresponding to the description keywords, and determine the feature vectors corresponding to the description keywords as the description information feature vectors corresponding to the playlist description information. For each song in the target playlist, the identification information of one or more playlists containing the song can be obtained, and then the identification information of the one or more playlists is formed into a vector, and the song feature vector of the song is obtained by feature extraction through a trained neural network model. Among them, the identification information of the playlist can be the identifier of the playlist, such as the ID (Identity document, identification serial number) of the playlist.
[0067] Optionally, the corresponding relationship between the description information and the description information feature vector, and the corresponding relationship between each song and the song feature vector can be pre-stored in the server, and then the description information feature vector corresponding to the playlist description information of the target playlist and the song feature vectors corresponding to each song in the target playlist are determined according to the pre-stored corresponding relationship. The corresponding processing is as follows:
[0068] Step 1011: Determine the phrase vectors corresponding to the phrases included in the playlist name of the target playlist based on the pre-set corresponding relationship between the phrase and the phrase vector.
[0069] Among them, the phrase can be a descriptive keyword that may appear in the playlist name. A technician can pre-establish a phrase library, and then use a neural network model, such as the word2vec model, to perform unsupervised training on each phrase to obtain a phrase vector corresponding to each phrase. Then, the corresponding relationship between each phrase and the phrase vector can be stored. After obtaining the playlist name of the target playlist, the playlist name can be segmented according to the pre-set corpus and stop words, that is, the descriptive keywords appearing in the playlist name are extracted. For example, if the playlist name is "Love songs that people in the 1990s must listen to", the corresponding descriptive keywords can be "1990s" and "love songs", etc. After determining the descriptive keywords appearing in the playlist name, the phrase vectors corresponding to each descriptive keyword can be determined according to the corresponding relationship between the phrase and the phrase vector.
[0070] Since the number of descriptive keywords corresponding to different playlist names may be different, the number of obtained phrase vectors will also be different. Therefore, the obtained phrase vectors can be processed. For example, min-pooling processing, max-pooling processing, and average-pooling processing can be performed on all the phrase vectors corresponding to the playlist name to obtain the min-pooling vector, max-pooling vector, and average-pooling vector of all the phrase vectors corresponding to the playlist name, respectively. Then, the min-pooling vector, max-pooling vector, and average-pooling vector are combined into the phrase vector corresponding to the target playlist. In this way, although different playlist names correspond to different numbers of descriptive keywords, through pooling processing, different numbers of descriptive keywords can be represented by vectors of a fixed dimension.
[0071] Step 1012: Based on the corresponding relationship between the preset classification label and each position in the preset label vector, determine the first position corresponding to at least one classification label of the target playlist, set the value at the first position in the preset label vector to the first value, and set the values at other positions except the first position in the preset label vector to the second value to obtain the label vector corresponding to at least one label of the target playlist.
[0072] Among them, the preset label vector can be a vector with a fixed dimension. Technicians can pre-statistically establish a classification label library for the classification labels that appear in each playlist, or can pre-establish a classification label library for users to select classification labels from the classification label library and add them to the corresponding playlists. Technicians can set the correspondence between all the classification labels in the classification label library and each position of the preset label vector. After obtaining the classification labels of the target playlist, at least one label vector corresponding to the classification labels of the target playlist can be generated according to the one-hot encoding. For example, if the number of all classification labels in the classification label library is 100, the preset label vector can include 100 positions. If the target playlist includes 4 classification labels corresponding to the first position, the second position, the tenth position, and the twenty-second position of the preset label vector respectively, the first position, the second position, the tenth position, and the twenty-second position can be collectively referred to as the first position. Then, the value of the first position in the preset label vector can be set to the first value, such as 1, and the value of the second position except the first position in the preset label vector can be set to the second value, such as 0. In this way, at least one label vector corresponding to the target playlist can be obtained.
[0073] In addition, generally, the preset label vector is a one-dimensional vector, so the at least one label vector can also be dimensionally increased, for example, through TF-IDF processing, to obtain a high-dimensional label vector corresponding to at least one label of the target playlist.
[0074] Step 1013: Based on the pre-set correspondence between songs and song feature vectors, determine the song feature vectors corresponding to each song included in the target playlist.
[0075] Among them, each song can correspond to a unique song identifier, such as a song ID. Each playlist can correspond to a unique playlist identifier information, and the identifier information of the playlist can be a playlist identifier, such as a playlist ID. Technicians can pre-select a part of the songs in the song library as sample songs. For each sample song, obtain the identifier information of all playlists including the sample song in the sample playlist library, and then use the vector composed of the identifier information of all playlists including the sample song to perform vector unsupervised training on the neural network model to obtain a trained neural network model. Among them, the neural network model can be a word2vec model, and the sample playlist library can be a playlist library composed of a part of the playlists pre-selected in the playlist library. For example, by setting a date, all playlists established before a certain date are composed into the sample playlist library.
[0076] After obtaining the trained neural network model, for each song in the song library, the identification information of all playlists to which each song belongs in the playlist library can be input into the trained neural network model for feature extraction to obtain the song feature vector corresponding to each song. Then, the corresponding relationship between the song ID and the song feature vector can be stored. For each song in the target playlist, the song feature vector corresponding to each song in the target playlist can be determined according to the song ID of each song and the corresponding relationship between the stored song ID and the song feature vector.
[0077] In addition, based on the pre-trained neural network model, the feature vectors of the songs in the target playlist can also be obtained in the following way. For the songs in the target playlist, determine all the playlists to which the song belongs and obtain the identification information of each playlist. Then, input the identification information of all the playlists of the song into the trained neural network model for feature extraction to obtain the song feature vector corresponding to the song. Each song in the target playlist is subjected to feature extraction in this way, and the song feature vectors of each song can be obtained.
[0078] It should be noted that for any two songs, if all the playlists containing these two songs are roughly the same, the song feature vectors corresponding to these two songs can have a relatively high similarity.
[0079] Since the number of songs included in different playlists may be different, the number of obtained song feature vectors will also be different. Therefore, the obtained song feature vectors can be processed. For example, min-pooling processing, max-pooling processing, and average-pooling processing can be performed on all the song feature vectors corresponding to the playlist to obtain the min-pooling vector, max-pooling vector, and average-pooling vector of all the song feature vectors corresponding to the playlist respectively. Then, the corresponding min-pooling vector, max-pooling vector, and average-pooling vector are combined to form the song feature vector corresponding to the target playlist. In this way, although the number of songs corresponding to different playlists is different, through pooling processing, different numbers of songs can be represented by vectors of a fixed dimension.
[0080] It should be noted that there is no chronological order in the processing through the above steps 1011, 1012, and 1013. As Figure 2 shown, after obtaining the phrase vector, label vector, and song feature vector corresponding to the target playlist, the phrase vector, label vector, and song feature vector can be combined to form the composite vector corresponding to the target playlist, that is, the playlist feature vector.
[0081] Step 102: Determine the playlist feature vector of the target playlist based on the song feature vector and the description information feature vector.
[0082] In implementation, after obtaining the song feature vector and the description information feature vector of the target playlist, the song feature vector and the description information feature vector can be concatenated to form the playlist feature vector of the target playlist.
[0083] Optionally, the song feature vector and the description information feature vector can be combined into a composite vector, and the composite vector is input into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist.
[0084] In implementation, the song feature vector and the description information feature vector can be combined into a composite vector, and then the composite vector is input into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist.
[0085] The training process of the playlist feature extraction model can be as follows:
[0086] Step 1021: Obtain the first composite vector of the target sample playlist, the second composite vector of the positive sample playlist corresponding to the target sample playlist, and the third composite vector of the negative sample playlist corresponding to the target sample playlist.
[0087] Among them, the target sample playlist can be any sample playlist, the positive sample playlist is the associated playlist of the target sample playlist, and the negative sample playlist is the non-associated playlist of the target sample playlist. For ease of understanding, the target sample playlist and the positive sample playlist can be referred to as the positive sample playlist pair, and the target sample playlist and the negative sample playlist can be referred to as the negative sample playlist pair.
[0088] Step 1022: Input the first composite vector, the second composite vector, and the third composite vector into the playlist feature extraction model to be trained respectively, to obtain the first playlist feature vector corresponding to the target sample playlist, the second playlist feature vector corresponding to the positive sample playlist, and the third playlist feature vector corresponding to the negative sample playlist;
[0089] In implementation, three identical playlist feature extraction models to be trained can be set, such as playlist feature extraction model A, playlist feature extraction model B, and playlist feature extraction model C. Figure 3As shown in the figure, the first synthetic vector is respectively input into the playlist feature extraction model A, the second synthetic vector is input into the playlist feature extraction model B, and the third synthetic vector is input into the playlist feature extraction model C. These three playlist feature extraction models can form a playlist feature extraction model training framework, which respectively includes an input layer, a representation layer, and a matching layer. In the input layer, the 780-dimensional first synthetic vector, second synthetic vector, and third synthetic vector can be respectively input into the playlist feature extraction model training framework. In the representation layer, features can be respectively extracted from the first synthetic vector, second synthetic vector, and third synthetic vector to obtain the first playlist feature vector corresponding to the target sample playlist, the second playlist feature vector corresponding to the positive sample playlist, and the third playlist feature vector corresponding to the negative sample playlist. In the matching layer, the corresponding first cosine similarity is calculated between the first playlist feature vector and the second playlist feature vector, and the corresponding second cosine similarity is calculated between the first playlist feature vector and the third playlist feature vector. That is to say, the matching layer can calculate the cosine similarity between two playlists in the positive sample playlist pair, and calculate the cosine similarity between two playlists in the negative sample playlist pair. As shown in the figure, R(S, Q+) represents the calculation of the cosine similarity between the first playlist feature vector S and the second playlist feature vector Q+, and P(D+|S) is the calculated corresponding first cosine similarity. R(S, Q-) represents the calculation of the cosine similarity between the first playlist feature vector S and the third playlist feature vector Q-, and P(D-|S) is the calculated second cosine similarity. The representation layer uses a two-layer fully connected network, W i represents the weight matrix of the i-th layer, b i represents the bias term of the i-th layer. Therefore, the first hidden layer vector l1 (a 256-dimensional vector) and the output vector y (a 128-dimensional vector) can be respectively expressed as:
[0090] l1 = f(W1x + b1)
[0091] y = f(W2l1 + b2)
[0092] where f represents the activation function of the hidden layer and the output. In the embodiment of the present application, the tanh activation function is used. The final output y is a 128-dimensional playlist low-dimensional semantic vector. x is the input vector of the input layer. The first synthetic vector, second synthetic vector, and third synthetic vector can be respectively used as the input vector and substituted into the above formula to respectively obtain the corresponding hidden layer vector l1. The first synthetic vector, second synthetic vector, and third synthetic vector can be obtained by the processing in step 101 above, which will not be elaborated here.
[0093] Step 1023: Determine the residual values corresponding to the first song feature vector, the second song feature vector, and the third song feature vector of the song feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain the trained playlist feature extraction model.
[0094] In implementation, the corresponding residual value can be determined according to the first cosine similarity, the second cosine similarity, and a preset loss function, and then the playlist feature extraction models A, B, and C can be trained respectively according to the determined residual value to obtain the trained playlist feature extraction models.
[0095] Among them, in the embodiments of the present application, a DSSM (Deep Structured Semantic Models) can be established to train the playlist feature extraction models, that is, by setting multiple groups of playlist sample spaces, the playlist feature extraction models can be trained respectively. Each playlist sample space can include a preset number of playlists, and both positive sample playlist pairs and negative sample playlist pairs are included in the preset number of playlists. The corresponding loss function is as follows:
[0096]
[0097]
[0098] where γ is the softmax smoothing factor, D + is the confidence similar playlist corresponding to the target sample playlist S (i.e., the positive sample playlist), and D` is the entire playlist sample space. R(S, D + ) is the cosine similarity between the first playlist feature vector of the target sample playlist and the second playlist feature vector of the corresponding positive sample playlist, and R(S, D`) is the cosine similarity between the first playlist feature vector of the target sample playlist and the playlist feature vector of any sample playlist in the corresponding playlist sample space. L(Λ) is the residual value. During the training process, the residual value will backpropagate in the fully connected layer of the representation layer, and the model converges through stochastic gradient descent to obtain the parameters of each network layer in the playlist feature extraction model.
[0099] In addition, it should be noted that the trained playlist feature extraction models A, B, and C are the same playlist feature extraction model. In application, any one of the playlist feature extraction models can be used.
[0100] Step 103: Determine the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and determine the other playlists corresponding to the target similarity that meet the preset conditions as the associated playlists of the target playlist.
[0101] In implementation, when the server receives a notification to push an associated playlist of a target playlist to a terminal, it can obtain the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and then calculate the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists, such as calculating the spatial distance value between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists. Then, among the multiple similarities corresponding to the target playlist obtained by calculation, a target similarity is determined according to a preset condition, and then the playlist corresponding to the target similarity is determined as the associated playlist of the target playlist. The preset condition can be set by technicians in advance. For example, the similarity exceeding the similarity threshold among the multiple similarities can be determined as the target similarity, or the preset number of similarities with the highest similarity among the multiple similarities can be determined as the target similarity, etc. Then, the playlist corresponding to the target similarity is determined as the associated playlist of the target playlist. For example, the 3 playlists with the highest similarity are determined as the associated playlists of the target playlist. Then the server can send a push notification including an associated playlist playing option to the terminal.
[0102] In an embodiment of the present application, the playlist feature vector of the target playlist is determined through the description information feature vector of the description information of the playlist and the song feature vectors corresponding to each song in the playlist, and then the playlist corresponding to the playlist feature vector with the highest similarity to the playlist feature vector of the target playlist is determined as the associated playlist of the target playlist. It can be seen that in the embodiment of the present application, the corresponding associated playlist can be determined jointly by the songs in the playlist and the description information of the playlist, enriching the reference information for determining the associated playlist and improving the accuracy of determining the associated playlist.
[0103] Figure 4 It is a flowchart of a method for obtaining a sample playlist pair in an embodiment of the present application. This method can be used to obtain the behavior data of users listening to playlists before training a playlist feature extraction model, that is, before performing steps 1021-1023. According to the behavior data of users listening to playlists, the positive sample playlist and negative sample playlist corresponding to each training sample playlist are determined. The method includes:
[0104] Step 401: Obtain the first playlist set listened to by each user within a preset time period.
[0105] Among them, the preset time period can be set by technicians and can be one week or one month, etc. The length of the specific time period is not limited here. The first playlist set listened to by the user is the set of all playlists listened to by the user within the preset time period.
[0106] Step 402: For each first playlist set listened to by a user, delete the first playlists in the first playlist set whose listening duration is not within the preset listening duration range to obtain a second playlist set.
[0107] In implementation, after some users select a certain playlist to listen to, they may switch to other playlists after a short period because the songs in the playlist are not of their favorite style. There are also some users who may randomly select some playlists and play them in a loop only for playing music on certain occasions, such as playing background music in a mall. Therefore, technicians can calculate the average listening duration of users for playlists, set the corresponding listening duration range, and then delete the first playlists in the first playlist set listened to by each user whose listening duration is not within the preset listening duration range, to obtain the playlist listening behavior set of each user, that is, the second playlist set. Additionally, playlists with meaningless names and playlists lacking classification labels in the second playlist set can be cleared. The names of playlists with meaningless names can be pre-stored in the server in advance. When the name of a playlist is the name of a playlist with a meaningless name pre-stored, the corresponding playlist can be deleted.
[0108] Step 403: For each second playlist set, determine the second playlists in the second playlist set whose listening times exceed the first preset number of times. Based on the listening times of the second playlists and the corresponding relationship between the first preset number of times and the deletion probability, determine the deletion probability corresponding to each second playlist. Based on the deletion probability corresponding to each second playlist, perform playlist deletion processing on the second playlist set to obtain each third playlist set.
[0109] In implementation, since some playlists are popular playlists, that is, the number of listens to the playlist exceeds a first preset number. For example, a playlist with more than 1 million listens is a popular playlist. And because the number of listens to popular playlists is relatively large, popular playlists may appear in the second playlist sets of each user. That is to say, even two popular playlists with quite different song styles may exist in multiple second playlist sets at the same time, which will affect the accuracy of subsequent determination of positive sample playlist pairs. Therefore, technicians can set corresponding deletion probabilities according to the number of listens to the playlist. For the second playlist set corresponding to each user, the deletion probability value corresponding to the popular playlist in the second playlist can be determined according to the corresponding relationship between the preset number of listens and the deletion probability, and then the popular playlist can be deleted according to the deletion probability to reduce the probability that the second playlist set includes the popular playlist. Then, the second playlist set after playlist deletion processing is determined as the third playlist set. For example, among the second playlist sets of 1000 users obtained, popular playlist A appears in 500 second playlist sets, and the determined deletion probability of popular playlist A is 50%. Then, after the playlist deletion processing of popular playlist A, the number of third playlist sets including popular playlist A can be approximately 250. In this way, by setting the deletion probability to delete the popular playlists in the playlist set, the probability that the popular playlist exists in the playlist set can be reduced to avoid determining popular playlists with different styles as positive sample playlist pairs in subsequent step 404 processing.
[0110] Step 404: Determine any playlist as the target sample playlist, determine the playlist that exists in the same third playlist set as the target sample playlist and whose number of occurrences exceeds the second preset number as the positive sample playlist corresponding to the target sample playlist, and determine the other playlists in the third playlist set except the positive sample playlist as the negative sample playlist corresponding to the target sample playlist.
[0111] In implementation, for any playlist, if there is a playlist that exists in the same third playlist set as it and whose number of occurrences exceeds the second preset number, that is, there are relatively many users who listen to these two playlists at the same time, then these two playlists can be determined as a positive sample playlist pair. Among all the third playlist sets, the playlists except the positive sample playlist pair can be determined as the negative sample playlists of this playlist.
[0112] In the embodiment of the present application, by obtaining the listening behavior data of each user for the playlists, screening the playlist sets listened to by the users according to the listening behavior data of the users for the playlists, and then determining the associated positive sample playlist pairs and unassociated negative sample playlist pairs according to the listening data of the users for the screened playlists, training samples are provided for the song feature extraction model.
[0113] Any combination of the above optional technical solutions can form an optional embodiment of the present disclosure, which will not be elaborated one by one here.
[0114] Figure 5 FIG. 4 is a schematic structural diagram of a device for determining an associated playlist provided by an embodiment of the present application. The device may be the server in the above embodiment. The device includes:
[0115] A first determination module 510, configured to determine a description information feature vector corresponding to the playlist description information of the target playlist, and determine a song feature vector corresponding to each song included in the target playlist, where the song feature vector corresponding to the song is used to represent one or more playlists to which the song belongs in the playlist library;
[0116] A second determination module 520, configured to determine a playlist feature vector of the target playlist based on the song feature vector and the description information feature vector;
[0117] A third determination module 530, configured to determine the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and determine the other playlists corresponding to the target similarity that meet the preset conditions as the associated playlists of the target playlist.
[0118] Optionally, the playlist description information includes a playlist name and a classification label of the playlist;
[0119] The first determination module 510 is configured to:
[0120] Based on the pre-set correspondence between phrases and phrase vectors, determine the phrase vectors corresponding to each phrase included in the playlist name of the target playlist; based on the pre-set correspondence between classification labels and positions in the pre-set label vector, determine at least one first position corresponding to the classification label of the target playlist, set the value at the first position in the pre-set label vector to a first value, and set the values at other positions in the pre-set label vector except the first position to a second value, to obtain a label vector corresponding to at least one label of the target playlist;
[0121] Based on the pre-set correspondence between songs and song feature vectors, determine the song feature vectors corresponding to each song included in the target playlist.
[0122] Optionally, the second determination module 520 is configured to:
[0123] Combine the song feature vector and the description information feature vector into a composite vector, and input the composite vector into a trained playlist feature extraction model to obtain a playlist feature vector of the target playlist.
[0124] Optionally, the second determination module 520 is further configured to:
[0125] Obtain a first composite vector of a target sample playlist, a second composite vector of a positive sample playlist corresponding to the target sample playlist, and a third composite vector of a negative sample playlist corresponding to the target sample playlist, where the positive sample playlist is an associated playlist of the target sample playlist, and the negative sample playlist is a non-associated playlist of the target sample playlist;
[0126] Input the first composite vector, the second composite vector, and the third composite vector into the playlist feature extraction model to be trained, respectively, to obtain a first playlist feature vector corresponding to the target sample playlist, a second playlist feature vector corresponding to the positive sample playlist, and a third playlist feature vector corresponding to the negative sample playlist;
[0127] Determine the residual values corresponding to the first song feature vector, the second song feature vector, and the third song feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain a trained playlist feature extraction model.
[0128] Optionally, the second determination module 520 is further configured to:
[0129] Obtain a first playlist set listened to by each user within a preset time period;
[0130] For each first playlist set listened to by a user, delete the first playlists in the first playlist set whose listening duration is not within a preset listening duration range to obtain a second playlist set;
[0131] For each second playlist set, determine the second playlists in the second playlist set whose listening times exceed a first preset number of times, determine the deletion probability corresponding to the second playlist based on the listening times of the second playlist and the corresponding relationship between the first preset number of times and the deletion probability, and perform playlist deletion processing on the second playlist set based on the deletion probability corresponding to each second playlist to obtain each third playlist set;
[0132] Determine any playlist as the target sample playlist, determine the playlists that coexist with the target sample playlist in the same third playlist set and whose number of times exceeds a second preset number of times as the positive sample playlists corresponding to the target sample playlist, and determine the other playlists in the third playlist set except the positive sample playlists as the negative sample playlists corresponding to the target sample playlist.
[0133] It should be noted that when the device for determining associated playlists provided in the above embodiments determines the associated playlists, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining associated playlists provided in the above embodiments and the method embodiments for determining associated playlists belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0134] Figure 6 FIG. 4 is a schematic structural diagram of a server provided in an embodiment of the present application. The server 600 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 601 and one or more memories 602. Among them, at least one instruction is stored in the memory 602, and the at least one instruction is loaded and executed by the processor 601 to implement the methods provided in the above method embodiments. Of course, the server may also have components such as wired or wireless network interfaces, keyboards, and input / output interfaces for input / output. The server may also include other components for implementing the functions of the device, which will not be elaborated here.
[0135] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions. The above instructions can be executed by a processor in a terminal to complete the method for determining associated playlists in the above embodiments. The computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0136] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a magnetic disk, or an optical disc, etc.
[0137] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining associated playlists, characterized in that, The method includes: Based on the correspondence between pre-set phrases and phrase vectors, determining the phrase vectors corresponding to each phrase included in the playlist name of the target playlist; based on the correspondence between pre-set classification tags and each position in the pre-set tag vector, determining the first positions corresponding to at least one classification tag of the target playlist, setting the values at the first positions in the pre-set tag vector to a first value, and setting the values at other positions in the pre-set tag vector except the first positions to a second value, to obtain the tag vectors corresponding to at least one tag of the target playlist; and for each song included in the target playlist, determining all playlists to which the song belongs and obtaining the identification information of each playlist, inputting the identification information of all playlists of the song into a trained neural network model for feature extraction, to obtain the song feature vector corresponding to the song; Wherein, the song feature vector corresponding to the song is used to represent one or more playlists to which the song belongs in the playlist library; combining the song feature vector, the phrase vector and the tag vector corresponding to the target playlist into a composite vector, and inputting the composite vector into a trained playlist feature extraction model, to obtain the playlist feature vector of the target playlist; Determining the similarity between the playlist feature vector of the target playlist and the playlist feature vectors of other playlists in the playlist library except the target playlist, and determining the playlists corresponding to the target similarities that meet the preset conditions in the similarities as the associated playlists of the target playlist; Wherein, before training the playlist feature extraction model, the method further includes: obtaining a first playlist set listened to by each user within a preset time period; for each first playlist set listened to by a user, deleting the first playlists in the first playlist set whose listening duration is not within the preset listening duration range, to obtain a second playlist set; for each second playlist set, determining the second playlists in the second playlist set whose listening times exceed a first preset number of times, determining the deletion probability corresponding to the second playlist based on the listening times of the second playlist and the correspondence between the first preset number of times and the deletion probability, and performing playlist deletion processing on the second playlist set based on the deletion probability corresponding to each second playlist, to obtain each third playlist set; Determining any playlist as a target sample playlist, determining the playlists that coexist with the target sample playlist in the same third playlist set and whose number of times exceeds a second preset number of times as the positive sample playlists corresponding to the target sample playlist, and determining the other playlists in the third playlist set except the positive sample playlists as the negative sample playlists corresponding to the target sample playlist, to provide training samples for the playlist feature extraction model.
2. The method according to claim 1, characterized in that, Before the step of inputting the composite vector into a trained playlist feature extraction model to obtain the playlist feature vector of the target playlist, the method further includes: Obtain a first composite vector of a target sample playlist, a second composite vector of a positive sample playlist corresponding to the target sample playlist, and a third composite vector of a negative sample playlist corresponding to the target sample playlist, where the positive sample playlist is an associated playlist of the target sample playlist, and the negative sample playlist is a non-associated playlist of the target sample playlist; Input the first composite vector, the second composite vector, and the third composite vector into a playlist feature extraction model to be trained, respectively, to obtain a first playlist feature vector corresponding to the target sample playlist, a second playlist feature vector corresponding to the positive sample playlist, and a third playlist feature vector corresponding to the negative sample playlist; Determine residual values corresponding to the first playlist feature vector, the second playlist feature vector, and the third playlist feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain a trained playlist feature extraction model.
3. A device for determining associated playlists, characterized in that, The device includes: A first determination module, configured to determine phrase vectors corresponding to each phrase included in the playlist name of a target playlist based on a correspondence between a preset phrase and a phrase vector; determine a first position corresponding to at least one classification label of the target playlist based on a correspondence between a preset classification label and each position in a preset label vector, set a value at the first position in the preset label vector to a first value, and set values at other positions except the first position in the preset label vector to a second value to obtain a label vector corresponding to at least one label of the target playlist; and for each song included in the target playlist, determine all playlists to which the song belongs and obtain identification information of each playlist, and input the identification information of all playlists of the song into a trained neural network model for feature extraction to obtain a song feature vector corresponding to the song, where the song feature vector corresponding to the song is used to represent one or more playlists to which the song belongs in a playlist library; A second determination module, configured to form a composite vector from the song feature vector, the phrase vector, and the label vector corresponding to the target playlist, and input the composite vector into a trained playlist feature extraction model to obtain a playlist feature vector of the target playlist; A third determination module, configured to determine a similarity between the playlist feature vector of the target playlist and playlist feature vectors of other playlists in the playlist library except the target playlist, and determine, as the associated playlist of the target playlist, other playlists corresponding to target similarities that satisfy a preset condition among the similarities; The second determination module is further configured to: Obtain a first playlist set listened to by each user within a preset time period; For the first playlist set listened to by each user, delete first playlists in the first playlist set whose listening duration is not within a preset listening duration range to obtain a second playlist set; For each second playlist set, determine the second playlists in the second playlist set whose play count exceeds a first preset count. Based on the play count of the second playlists and the corresponding relationship between the first preset count and the deletion probability, determine the deletion probability corresponding to the second playlists. Based on the deletion probability corresponding to each second playlist, perform playlist deletion processing on the second playlist set to obtain each third playlist set; Determine any playlist as the target sample playlist. Determine the playlists that coexist with the target sample playlist in the same third playlist set and whose coexistence count exceeds a second preset count as the positive sample playlists corresponding to the target sample playlist. Determine the other playlists in the third playlist set except the positive sample playlists as the negative sample playlists corresponding to the target sample playlist, and provide training samples for the playlist feature extraction model.
4. The device according to claim 3, characterized in that, The second determination module is further configured to: Obtain a first composite vector of the target sample playlist, a second composite vector of the positive sample playlists corresponding to the target sample playlist, and a third composite vector of the negative sample playlists corresponding to the target sample playlist, where the positive sample playlists are the associated playlists of the target sample playlist, and the negative sample playlists are the non-associated playlists of the target sample playlist; Input the first composite vector, the second composite vector, and the third composite vector into the playlist feature extraction model to be trained, respectively, to obtain a first playlist feature vector corresponding to the target sample playlist, a second playlist feature vector corresponding to the positive sample playlists, and a third playlist feature vector corresponding to the negative sample playlists; Determine the residual values corresponding to the first playlist feature vector, the second playlist feature vector, and the third playlist feature vector based on a preset loss function, and train the playlist feature extraction model to be trained based on the residual values to obtain a trained playlist feature extraction model.
5. A computer device, characterized in that, The computer device includes a processor and a memory. At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the method for determining associated playlists according to any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that, At least one instruction is stored in the storage medium, and the instruction is loaded and executed by the processor to implement the operations performed by the method for determining associated playlists according to any one of claims 1 to 2.
Citation Information
Patent Citations
Song list identification sending method and device
CN106844504A
Audio similarity matching method and device and storage medium
CN111143604A