Music search model training method, music search method, device and medium

By splicing intent-related features and irrelevant features into the music search model and using a multi-task tower structure for training, the problem of traditional models favoring accuracy over personalization is solved, achieving a balance between personalization and accuracy.

CN116701927BActive Publication Date: 2025-09-12TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310593483.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2025-09-12
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

Traditional music search models tend to focus on accuracy during training, weaken personalization, and are unable to provide satisfactory search results based on different search intents.

Method used

By obtaining intent-related features and intent-irrelevant features and splicing them together, the first task tower of the music search model is used to obtain click-through rate and conversion rate, and the second task tower obtains search intent prediction classification, and model training is performed based on these values.

Benefits of technology

The trained model can better take into account different search intentions and provide personalized and accurate search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701927B_ABST
    Figure CN116701927B_ABST
Patent Text Reader

Abstract

The present application relates to a training method for a music search model, a music search method, a computer device, and a storage medium. The training method for a music search model includes: obtaining intent-related features and intent-irrelevant features in a music search data sample; splicing the intent-related features and the intent-irrelevant features to obtain model input features; inputting the model input features into the music search model to be trained, obtaining the click-through rate and conversion rate through the first task tower, and obtaining the search intent prediction classification through the second task tower; obtaining a first loss value based on the click-through rate and conversion rate, and obtaining a second loss value based on the search intent prediction classification; using the first loss value and the second loss value to train the music search model to obtain a trained music search model. The use of this method enables the trained music search model to well take into account the different search intents and provide different search results to meet the user's search intent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of music search, and in particular to a music search model training method, a music search method, a computer device, and a storage medium. Background Art

[0002] With the development of music search technology, a new approach has emerged to implement music searches based on search intent. These include precise searches, which search by specific song titles, and general searches, which search by specific artists or semantics. Different search intents also require different search rankings. Precise searches generally require guaranteed search results, while general searches typically need to meet the user's personalized needs.

[0003] In traditional technology, in order to enable the music search model to combine search intent to realize music search, during the training process of the music search model, the search intent is usually input as a feature vector into the task tower contained in the model, and vector splicing is implemented in the task tower, thereby affecting the output of the music search model through the intent feature.

[0004] However, in the process of training the music search model, the model is usually dominated by precise search intent, which leads to the model being biased towards precision and weakly personalized, and unable to provide different search results based on different search intents. Therefore, the results output by the trained music search model cannot meet the user's search intent. Summary of the Invention

[0005] Based on this, it is necessary to provide a music search model training method, music search method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides a method for training a music search model, the method comprising:

[0007] Obtaining intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample;

[0008] Concatenating the intention-related features and the intention-irrelevant features to obtain model input features;

[0009] Inputting the model input features into a music search model to be trained, obtaining a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtaining a search intent prediction classification corresponding to the model input features through a second task tower of the music search model;

[0010] Based on the click-through rate and the conversion rate, obtaining a first loss value of the music search model, and based on the search intent prediction classification, obtaining a second loss value of the music search model;

[0011] The music search model to be trained is trained using the first loss value and the second loss value to obtain a trained music search model.

[0012] In one embodiment, the intention-related features and the intention-irrelevant features are spliced ​​to obtain model input features, including: obtaining the importance of the intention-related features in the search intent; performing feature change processing on the intention-related features according to the importance, and splicing the intention-related features after the change processing with the intention-irrelevant features to obtain the model input features.

[0013] In one embodiment, obtaining the importance of the intention-related feature in the search intention includes: obtaining an intention feature vector representing the search intention; obtaining an association feature vector representing the intention-related feature; cross-processing the intention feature vector and the association feature vector, and obtaining the importance of the intention-related feature in the search intention through an attention mechanism.

[0014] In one embodiment, the obtaining of the intention feature vector representing the search intention includes: performing preset feature processing on the intention feature corresponding to the search intention, and performing feature mapping on the processing result of the preset feature processing on the intention feature to obtain the intention feature vector; the obtaining of the associated feature vector representing the intention associated feature includes: performing preset feature processing on the intention associated feature, and performing feature mapping on the processing result of the preset feature processing on the intention associated feature to obtain the associated feature vector; wherein, the preset feature processing includes: at least one of one-hot encoding processing and discretization processing.

[0015] In one embodiment, the importance is represented by an importance coefficient; the feature change processing of the intention-related feature according to the importance includes: convolving the importance coefficient with the associated feature vector, and using the convolution result as the intention-related feature after the change processing.

[0016] In one embodiment, obtaining the second loss value of the music search model based on the search intent prediction classification includes: obtaining the actual search intent classification corresponding to the music search data sample; and obtaining the second loss value according to the actual search intent classification and the search intent prediction classification.

[0017] In one embodiment, the music search model to be trained is trained using the first loss value and the second loss value to obtain a trained music search model, including: obtaining a first weight corresponding to the first loss value and a second weight corresponding to the second loss value; weighting the first loss value and the second loss value according to the first weight and the second weight to obtain a total loss value of the music search model; and training the music search model to be trained using the total loss value to obtain a trained music search model.

[0018] In a second aspect, the present application further provides a music search method, the method comprising:

[0019] Obtaining music search information used by a user account to search for music, and music search features corresponding to the music search information;

[0020] Inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method described in any embodiment of the first aspect;

[0021] The candidate recommended music is sorted based on the click rate and the conversion rate, target recommended music is selected from the candidate recommended music according to the result of the sorting process, and the target recommended music is returned to the user account according to the result of the sorting process.

[0022] In a third aspect, the present application further provides a training device for a music search model, the device comprising:

[0023] a sample feature acquisition module configured to acquire intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample;

[0024] An input feature acquisition module is configured to perform concatenation of the intent-related features and the intent-irrelevant features to obtain model input features;

[0025] a sample feature input module configured to input the model input features into a music search model to be trained, obtain a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtain a search intent prediction classification corresponding to the model input features through a second task tower of the music search model;

[0026] A model loss acquisition module, configured to acquire a first loss value of the music search model based on the click-through rate and the conversion rate, and to acquire a second loss value of the music search model based on the search intent prediction classification;

[0027] The search model training module is used to train the music search model to be trained using the first loss value and the second loss value to obtain a trained music search model.

[0028] In a fourth aspect, the present application further provides a music search device, comprising:

[0029] A search feature acquisition module, configured to acquire music search information used by a user account for searching music, and music search features corresponding to the music search information;

[0030] a search feature input module for inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method as described in any embodiment of the first aspect;

[0031] The recommended music feedback module is used to sort each candidate recommended music based on the click-through rate and conversion rate, filter out target recommended music from the candidate recommended music according to the result of the sorting process, and return the target recommended music to the user account according to the result of the sorting process.

[0032] In a fifth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0033] Obtaining intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample;

[0034] Concatenating the intention-related features and the intention-irrelevant features to obtain model input features;

[0035] Inputting the model input features into a music search model to be trained, obtaining a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtaining a search intent prediction classification corresponding to the model input features through a second task tower of the music search model;

[0036] Based on the click-through rate and the conversion rate, obtaining a first loss value of the music search model, and based on the search intent prediction classification, obtaining a second loss value of the music search model;

[0037] Training the music search model to be trained using the first loss value and the second loss value to obtain a trained music search model;

[0038] When the processor executes the computer program, the processor further implements the following steps:

[0039] Obtaining music search information used by a user account to search for music, and music search features corresponding to the music search information;

[0040] Inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method described in any embodiment of the first aspect;

[0041] The candidate recommended music is sorted based on the click rate and the conversion rate, target recommended music is selected from the candidate recommended music according to the result of the sorting process, and the target recommended music is returned to the user account according to the result of the sorting process.

[0042] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0043] Obtaining intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample;

[0044] Concatenating the intention-related features and the intention-irrelevant features to obtain model input features;

[0045] Inputting the model input features into a music search model to be trained, obtaining a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtaining a search intent prediction classification corresponding to the model input features through a second task tower of the music search model;

[0046] Based on the click-through rate and the conversion rate, obtaining a first loss value of the music search model, and based on the search intent prediction classification, obtaining a second loss value of the music search model;

[0047] Training the music search model to be trained using the first loss value and the second loss value to obtain a trained music search model;

[0048] When the computer program is executed by a processor, the following steps are further implemented:

[0049] Obtaining music search information used by a user account to search for music, and music search features corresponding to the music search information;

[0050] Inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method described in any embodiment of the first aspect;

[0051] The candidate recommended music is sorted based on the click rate and the conversion rate, target recommended music is selected from the candidate recommended music according to the result of the sorting process, and the target recommended music is returned to the user account according to the result of the sorting process.

[0052] In a seventh aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0053] Obtaining intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample;

[0054] Concatenating the intention-related features and the intention-irrelevant features to obtain model input features;

[0055] Inputting the model input features into a music search model to be trained, obtaining a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtaining a search intent prediction classification corresponding to the model input features through a second task tower of the music search model;

[0056] Based on the click-through rate and the conversion rate, obtaining a first loss value of the music search model, and based on the search intent prediction classification, obtaining a second loss value of the music search model;

[0057] Training the music search model to be trained using the first loss value and the second loss value to obtain a trained music search model;

[0058] When the computer program is executed by a processor, the following steps are also implemented:

[0059] Obtaining music search information used by a user account to search for music, and music search features corresponding to the music search information;

[0060] Inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method described in any embodiment of the first aspect;

[0061] The candidate recommended music is sorted based on the click rate and the conversion rate, target recommended music is selected from the candidate recommended music according to the result of the sorting process, and the target recommended music is returned to the user account according to the result of the sorting process.

[0062] The training method, music search method, apparatus, computer equipment, storage medium and computer program product of the above-mentioned music search model obtain intent-related features associated with the search intent and intent-irrelevant features not associated with the search intent in the music search data sample; splice the intent-related features and the intent-irrelevant features to obtain model input features; input the model input features into the music search model to be trained, obtain the click-through rate and conversion rate corresponding to the model input features through the first task tower contained in the music search model, and obtain the search intent prediction classification corresponding to the model input features through the second task tower of the music search model; obtain a first loss value of the music search model based on the click-through rate and conversion rate, and obtain a second loss value of the music search model based on the search intent prediction classification; use the first loss value and the second loss value to train the music search model to be trained to obtain a trained music search model. In the process of training the model, the present application first splices the intent-related features and intent-irrelevant features in the music search data sample as the input features of the music search model, and can obtain the click-through rate and conversion rate through the first task tower of the music search model, and obtain the search intent prediction classification through the second task tower of the music search model, so that the first loss value can be obtained by using the click-through rate and conversion rate, and the second loss value can be obtained by using the search intent prediction classification, and then the music search model is trained based on the first loss value and the second loss value. Compared with directly inputting the search intent as a feature vector into the task tower to realize vector splicing for model training, the present application can first splice the intent-related features and the intent-irrelevant features, and input the spliced ​​model input features into the music search model. At the same time, a second task tower for obtaining the search intent prediction classification can be added to the music search model, so that the model training can be realized based on the second loss value obtained by the second task tower, so that the trained music search model can well take into account the different search intents and provide different search results, so that the results output by the music search model can meet the user's search intent. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 1 is a flow chart of a method for training a music search model in one embodiment;

[0064] Figure 2 A schematic diagram of a process for obtaining model input features in one embodiment;

[0065] Figure 3 A schematic diagram of a process for obtaining the importance of intent-related features in one embodiment;

[0066] Figure 4 A schematic diagram of a process for training a music search model in one embodiment;

[0067] Figure 5 1 is a flow chart of a music search method according to an embodiment;

[0068] Figure 6 is a schematic structural diagram of a music search model in one embodiment;

[0069] Figure 7 is a structural diagram of a music search model in another embodiment;

[0070] Figure 8 is a structural block diagram of a training device for a music search model in one embodiment;

[0071] Figure 9 is a structural block diagram of a music search device in one embodiment;

[0072] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0074] In one embodiment, Figure 1 As shown, a method for training a music search model is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0075] Step S101: Acquire intent-related features associated with the search intent and intent-unrelated features unrelated to the search intent in the music search data sample.

[0076] Among them, intent-related features refer to data sample features in music search data samples that will be affected by search intent, such as click-through rate features and recording rate features in music search data samples, while intent-independent features refer to data sample features in music search data samples that are irrelevant to search intent, that is, they will not be affected by search intent. Music search data samples refer to music search sample data used to train music search models, and search intent characterizes the user's search intent in music search sample data, such as precise intent and general intent.

[0077] In this embodiment, after obtaining the music search data samples used to train the music search model, the server can extract intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent from the music search data samples.

[0078] Step S102: Concatenate intent-related features and intent-irrelevant features to obtain model input features.

[0079] Model input features refer to the features that are ultimately input into the music search model to implement model training for the music search model. After obtaining the intent-related features and the intent-irrelevant features, the server can first concatenate the intent-related features and the intent-irrelevant features to obtain the model input features for inputting the music search model to be trained. This process can be represented by the following formula:

[0080] final_input=concat(intent_input, other_input)

[0081] Among them, final_input represents the model input features of the final input to the music search model to be trained, intent_input represents the intent-related features associated with the search intent, and other_input represents the intent-unrelated features that are not related to the search intent.

[0082] Step S103: Input the model input features into the music search model to be trained, obtain the click-through rate and conversion rate corresponding to the model input features through the first task tower contained in the music search model, and obtain the search intention prediction classification corresponding to the model input features through the second task tower of the music search model.

[0083] The music search model to be trained refers to the music search model that needs to be trained. The music search model can be an MMoe model, which includes multiple task towers. The first task tower is a task tower used to obtain the click-through rate corresponding to the model input feature, or to obtain the conversion rate corresponding to the model input feature. That is, the first task tower can be composed of two task towers, namely Task Tower A and Task Tower B, where Task Tower A is used to calculate the click-through rate, and Task Tower B is used to calculate the conversion rate. The second task tower is a task tower used to obtain the search intent prediction classification corresponding to the model input feature. This task tower can predict the search intent classification corresponding to the model input feature based on the model input feature.

[0084] Specifically, after the server obtains the model input features, it can input the model input features into the music search model including the first task tower and the second task tower. The first task tower can then output the click-through rate and conversion rate corresponding to the model input features, while the second task tower can output the search intent prediction classification corresponding to the model input features.

[0085] Step S104: obtaining a first loss value of the music search model based on the click-through rate and the conversion rate, and obtaining a second loss value of the music search model based on the search intent prediction classification;

[0086] Step S105 , using the first loss value and the second loss value to train the music search model to be trained to obtain a trained music search model.

[0087] The first loss value refers to the model loss value obtained by the music search model based on the click-through rate and conversion rate output by the first task tower, while the second loss value is the model loss value obtained by the music search model based on the search intent prediction classification. After the server obtains the model outputs using the first task tower and the second task tower respectively, it can use the first loss value and the second loss value to treat the trained music search model, so that the music search model can learn the search intent target, so that the trained music search model can take into account the different search intents to provide different search results.

[0088] In the training method of the above-mentioned music search model, intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent are obtained from the music search data samples; the intent-related features and the intent-irrelevant features are spliced ​​to obtain model input features; the model input features are input into the music search model to be trained, and the click-through rate and conversion rate corresponding to the model input features are obtained through the first task tower contained in the music search model, and the search intent prediction classification corresponding to the model input features is obtained through the second task tower of the music search model; based on the click-through rate and conversion rate, a first loss value of the music search model is obtained, and based on the search intent prediction classification, a second loss value of the music search model is obtained; the music search model to be trained is trained using the first loss value and the second loss value to obtain a trained music search model. In the process of training the model, the present application first splices the intent-related features and intent-irrelevant features in the music search data sample as the input features of the music search model, and can obtain the click-through rate and conversion rate through the first task tower of the music search model, and obtain the search intent prediction classification through the second task tower of the music search model, so that the first loss value can be obtained by using the click-through rate and conversion rate, and the second loss value can be obtained by using the search intent prediction classification, and then the music search model is trained based on the first loss value and the second loss value. Compared with directly inputting the search intent as a feature vector into the task tower to realize vector splicing for model training, the present application can first splice the intent-related features and the intent-irrelevant features, and input the spliced ​​model input features into the music search model. At the same time, a second task tower for obtaining the search intent prediction classification can be added to the music search model, so that the model training can be realized based on the second loss value obtained by the second task tower, so that the trained music search model can well take into account the different search intents and provide different search results, so that the results output by the music search model can meet the user's search intent.

[0089] In one embodiment, Figure 2 As shown, step S102 may further include:

[0090] Step S201: Obtain the importance of the intent-related feature in the search intent.

[0091] Importance refers to the importance of each intent-related feature in different search intents. The importance can be expressed in the form of weight. For different search intents, the importance of each intent-related feature is also different. The server can obtain the importance of each intent-related feature in different search intents.

[0092] In step S202 , feature change processing is performed on the intention-related features according to the importance, and the intention-related features after the change processing are spliced ​​with the intention-irrelevant features to obtain model input features.

[0093] Feature change processing can refer to scaling intent-related features. After obtaining the importance weight of the intent-related features in the search intent, the server can also scale the intent-related features according to the aforementioned weights, and use the weighted intent-related features to splice with intent-irrelevant features to obtain the model input features. By setting the importance, different intents can be scaled to different degrees, and then the important features of each intent can be selected to prevent the model from being affected by the main image samples. As a result, the model learns different feature performances under different search intents, so that the individuality and accuracy of the precise and general demand intents can be maintained.

[0094] In this embodiment, the server can also obtain the importance of intent-related features, and only after the intent-related features are processed according to the importance, they are spliced ​​with intent-irrelevant features. That is, by setting the importance, different intents can be scaled to different degrees, and then the important features in each intent can be selected to avoid the model being affected by the main image samples, so that the model can learn different feature performances under different search intentions, so that the precise demand intentions and general demand intentions can maintain their respective personalization and accuracy.

[0095] Furthermore, if Figure 3 As shown, step S201 may further include:

[0096] Step S301, obtaining an intention feature vector representing the search intention;

[0097] Step S302: Obtain a correlation feature vector representing intention correlation features.

[0098] The intent feature vector represents the search intent, while the association feature vector represents the intent association features. These feature vectors can be obtained through feature mapping. Specifically, the server can obtain the intent features corresponding to each search intent and use feature mapping to obtain the intent feature vector. Similarly, for intent association features, the server can also use feature mapping to obtain the association feature vector.

[0099] In step S303, the intention feature vector and the associated feature vector are cross-processed, and the importance of the intention associated feature in the search intention is obtained through the attention mechanism.

[0100] After obtaining the intent feature vector and the associated feature vector, we can cross them and use the attention mechanism to obtain the importance of the intent-associated feature in the search intent, that is, to obtain the weight coefficient of the intent-associated feature in each search intent. For example, this process can be calculated using the following formula:

[0101] weight=Attention(BEmb,IntentEmb)

[0102] Among them, weight represents the importance of intent-related features in search intent, BEmb represents the associated feature vector, IntentEmb represents the intent feature vector, and Attention() represents the attention mechanism.

[0103] In this embodiment, the server can obtain the importance of the intent-related features in the search intent through the attention mechanism, that is, obtain the weight, thereby improving the efficiency and accuracy of obtaining the importance.

[0104] In addition, step S301 may further include: performing preset feature processing on the intention features corresponding to the search intention, and performing feature mapping on the processing results of the preset feature processing on the intention features to obtain an intention feature vector; step S302 may further include: performing preset feature processing on the intention-associated features, and performing feature mapping on the processing results of the preset feature processing on the intention-associated features to obtain an associated feature vector; wherein the preset feature processing includes: at least one of: one-hot encoding processing and discretization processing.

[0105] Among them, preset feature processing refers to feature processing in a preset manner for the above-mentioned intent features and intent-related features. The feature processing method may include: one-hot encoding processing, i.e. onehot encoding processing, and discretization processing.

[0106] In this embodiment, in the process of generating the intent feature vector and the associated feature vector, the intent features and the intent associated features are first subjected to preset feature processing, and then feature mapping is further performed on the intent features and the intent associated features after the preset feature processing. For example, with respect to the intent features, the server may first perform one-hot encoding processing, discretization processing, etc. on the intent features, thereby converting them into intent feature vectors, i.e., {IntentionFea}=>{IntentEmb1, IntentEmb2,…, IntentEmb3}, where IntentionFea represents the intent feature, and IntentEmb1, IntentEmb2,…, IntentEmb3 respectively represent various intent feature vectors. For intent-related features, the server can also first perform one-hot encoding and discretization on the intent-related features to convert them into related feature vectors, that is, {fea1, fea2,…, fea3}=>{BEmb1, BEmb2,…, BEmb3}, where fea1, fea2,…, fea3 represent various intent-related features, and BEmb1, BEmb2,…, BEmb3 represent various related feature vectors respectively.

[0107] In this embodiment, the server can first perform hot encoding processing and discretization processing on the intent features and intent-related features before performing feature mapping to obtain the intent feature vector and the related feature vector, thereby obtaining a more accurate intent feature vector and the related feature vector.

[0108] In one embodiment, the importance is represented by an importance coefficient; step S302 may further include: performing convolution processing on the importance coefficient and the associated feature vector, and using the convolution processing result as the intention-associated feature after the change processing.

[0109] The importance coefficient refers to a coefficient used to characterize the importance, for example, it can be a scaling coefficient or a weight coefficient used to scale the intent-related feature. In this embodiment, the scaling of the intent-related feature can be achieved through convolution, that is, the importance coefficient is convolved with the associated feature vector, and the convolution cross processing result is used as the intent-related feature after the change processing. For example, this process can be calculated by the following formula:

[0110]

[0111] Among them, intent_input is the intent-related feature after the change processing. This feature can be used to splice with intent-irrelevant features to obtain the model input feature. Weight represents the importance coefficient, and BEmb refers to the associated feature vector.

[0112] In this embodiment, the importance coefficient can be convolved with the associated feature vector, and the convolution result can be used as the intention-related feature after the change processing, and the features unrelated to the intention are spliced ​​as the input features of the model, so that the intention-related features can be scaled differently under different intentions, that is, the important intention-related features in each intention can be selected, so that the music search model can learn different feature performances under different intentions more accurately.

[0113] In one embodiment, step S104 may further include: obtaining an actual classification of the search intent corresponding to the music search data sample; and obtaining a second loss value based on the actual classification of the search intent and the predicted classification of the search intent.

[0114] Among them, the actual classification of search intent corresponds to the real search intent classification of the music search data sample. This classification can be pre-labeled by the user. In this embodiment, the user can label the corresponding search intent classification for the music search data sample as the actual classification of search intent. The server can then calculate the loss value based on the actual classification of search intent labeled by the above user and the predicted classification of search intent obtained through the output of the second task tower, thereby obtaining a second loss value.

[0115] In this embodiment, the second loss value can be calculated by actual classification of search intent of pre-labeled music search data samples and predicted classification of search intent obtained by the output of the second task tower. The second loss value can be obtained more accurately, that is, the calculated second loss value can be used to train the music search model, so that the music search model can learn the intention target more accurately.

[0116] In one embodiment, Figure 4 As shown, step S105 may further include:

[0117] Step S401: Obtain a first weight corresponding to a first loss value and a second weight corresponding to a second loss value.

[0118] The first weight refers to the weight ratio of the first loss value to the total loss value of the model, and the second weight refers to the weight ratio of the second loss value to the total loss value of the model. In this embodiment, the server can pre-set corresponding weight ratios for the first loss value and the second loss value respectively. In the process of calculating the total loss value of the model, the server can first obtain the first weight corresponding to the first loss value and the second weight corresponding to the second loss value respectively, and then use the above-mentioned first weight and second weight, as well as the first loss value and the second loss value to obtain the total loss value of the model.

[0119] Step S402: performing weighted processing on the first loss value and the second loss value according to the first weight and the second weight to obtain a total loss value of the music search model;

[0120] Step S403: Use the total loss value to train the music search model to be trained to obtain a trained music search model.

[0121] After obtaining the first weight and the second weight, the server can use the first weight and the second weight to perform weighted processing on the first loss value and the second loss value, so as to obtain the total loss value of the music search model, and then implement the training of the music search model based on the total loss value of the model to obtain the final trained music search model.

[0122] Taking the first and second weights as 1 as an example, the total loss value of the music search model can be calculated by the following formula:

[0123] final_loss=Intent_loss+otherTower_loss

[0124] Among them, final_loss represents the total loss value of the music search model, intent_loss represents the second loss value of the music search model obtained by the second task tower, and otherTower_loss represents the first loss value of the music search model obtained by the first task tower.

[0125] In this embodiment, the training of the music search model can also be carried out by weighting the first loss value and the second loss value through the first weight and the second weight. After the total loss value is obtained, the training is completed. By setting the first weight and the second weight, a variety of fusion methods of the first loss value and the second loss value can be set, thereby further improving the accuracy of the trained music search model.

[0126] In one embodiment, Figure 5 As shown, a music search method is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0127] Step S501: Obtain music search information used by a user account to search for music, and music search features corresponding to the music search information.

[0128] Among them, the user account refers to the user who needs to perform music search. The user account can trigger a music search request to the server through its terminal to request the server to return the corresponding music search results, and the music search information is the search information carried by the user account when initiating a music search request, such as the search terms used for music search, etc., and the music search feature is the feature related to the music search information. It can be understood that the feature can include intent-related features associated with the search intent, and can also include intent-unrelated features that are not related to the search intent.

[0129] Specifically, when a user account initiates a search request for music, the server can obtain music search information that matches the search request and extract music search features corresponding to the music search information.

[0130] Step S502: Input the music search features into the trained music search model, and obtain the corresponding click rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein, the music search model is trained by the training method of the music search model of any of the above embodiments.

[0131] The music search model can be a music search model trained through the above embodiments. The music search model can include a first task tower and a second task tower. During the training process, the click-through rate and conversion rate can be obtained through the first task tower, and then the first loss value of the model can be obtained. At the same time, the predicted classification of the search intent can be obtained through the second task tower, and the second loss value of the model can be obtained based on the predicted classification, so as to train the music search model using the first loss value and the second loss value. In the process of performing music search, the intent task, that is, the output of the second task tower, can be excluded, and only the output of the first task tower can be considered, that is, the click-through rate and conversion rate of each recommended music that can be returned to the user account as a music search result, that is, the candidate recommended music.

[0132] Specifically, in the process of performing music search through the music search model, the output of the music search model can be calculated by the following formula:

[0133] Output=MMoeModel(otherTower_output)

[0134] Output represents the output of the music search model in the music search process, and MMoeModel(otherTower_output) represents the output of the first task tower in the music search model, that is, the output of the music search model in the music search process, that is, the output of the first task tower in the music search model.

[0135] Step S503 , sorting the candidate recommended music based on the click rate and the conversion rate, filtering out target recommended music from the candidate recommended music according to the sorting result, and returning the target recommended music to the user account according to the sorting result.

[0136] After obtaining the click-through rate and conversion rate of each candidate recommended music through the music search model, the server can further use the click-through rate and conversion rate to sort each candidate recommended music. For example, the server can calculate the output score of each candidate recommended music based on the click-through rate and conversion rate, and then use the output score to sort the candidate recommended music. The sorting results can also be used to filter out the target recommended music that is ultimately recommended to the user account from the candidate recommended music. For example, a preset number of candidate recommended music with the largest output scores can be used as the target recommended music that is ultimately returned to the user account, and the above-filtered target recommended music can be returned to the user account according to the results of the sorting of the candidate recommended music.

[0137] In the above-mentioned music search method, the music search information used by the user account to search for music and the music search features corresponding to the music search information are obtained; the music search features are input into the trained music search model, and the corresponding click-through rate and conversion rate of each candidate recommended music are obtained through the first task tower contained in the music search model; wherein the music search model is trained by the training method of the music search model of any of the above embodiments; each candidate recommended music is sorted based on the click-through rate and conversion rate, and the target recommended music is screened out from the candidate recommended music according to the results of the sorting process, and the target recommended music is returned to the user account according to the results of the sorting process. In the present application, during the model training process, the intent-related features and the intent-irrelevant features in the music search data sample are first spliced ​​as the input features of the music search model, and the click-through rate and conversion rate can be obtained through the first task tower of the music search model, and the search intent prediction classification can be obtained through the second task tower of the music search model, so that the first loss value can be obtained by using the click-through rate and conversion rate, and the second loss value can be obtained by using the search intent prediction classification, and then the music search model is trained based on the first loss value and the second loss value. Compared with directly inputting the search intent as a feature vector into the task tower to realize vector splicing for model training, the present application can first splice the intent-related features and the intent-irrelevant features, and input the spliced ​​model input features into the music search model. At the same time, a second task tower for obtaining the search intent prediction classification can be added to the music search model, so that the model training is realized based on the second loss value obtained by the second task tower. This allows the trained music search model to well take into account the different search intents and provide different search results. In the music search process, the output results of the first task tower can be used to obtain the final target recommended music, which is returned to the user account as the music search result, so that the music search results provided by the music search model can meet the user's search intent.

[0138] In one embodiment, a method for sorting searches by intent in the music field is also provided, which can solve the problem that the music search process in traditional technology cannot well take into account the user needs under different intents, resulting in the music search results not being able to well meet the user's search intent.

[0139] In traditional technology, the music ranking system mainly learns the intention as a one-dimensional feature input model, and introduces it as a feature into the multi-task MMOE model by learning the feature vector embedding representation of the intention. The specific model structure can be shown as follows: Figure 6 shown.

[0140] As can be seen, intent feature vector embedding only involves vector concatenation in the task tower of the MMOE model. The neural network learns the influence of intent and ultimately influences the output. However, due to the black-box nature of deep learning and the difficulty in controlling the training process, the model suffers from poor interpretability, prone to bad cases, and ineffectively learned intent features.

[0141] In the above process, intent features are vectorized and added to the MMOE model, resulting in a final ranking result through deep learning. However, due to the black-box nature of deep learning, the training direction and results may not be as expected, resulting in a failure to learn user intent. Furthermore, due to interference between samples, the model is influenced by the primary intent—the precise demand intent. This results in a model that is biased towards accuracy and lacks personalization. The intent dimension cannot be well learned.

[0142] To address this issue, this embodiment designs a music-specific intent ranking method based on the MMoe model. This method adds intent learning constraints and sample differentiation to the MMoe model. The model input differentiates intents and applies different scaling to input features such as click-through rate (CTR) and recording rate, selecting key features from each intent. This prevents the model from being influenced by the main image sample and allows it to learn the different feature representations for different intents, ensuring that both precise and general intents maintain their respective strengths in personalization and accuracy.

[0143] At the same time, an intent objective is added to the model output. During training, the loss of the intent-assisted tower is calculated to learn the intent objective. However, this loss is not included in the output and is only used during the training process. This constrains the model training process and guides the model to learn the intent dimension.

[0144] The specific model structure can be as follows Figure 7 As shown in the figure, based on MMoe, a new feature cross module and an intention auxiliary tower are added. Intent processing is performed separately at the input and output. The model training steps are as follows:

[0145] 1. Select the features related to the intent in the input sample, and then obtain a dense feature embedding vector through feature mapping.

[0146] 2. Discretize the intent features in the input sample into one-hot form and obtain an abstract feature embedding vector through feature mapping.

[0147] 3. Use the intent vector and intent-related features as input, and cross-reference them to obtain scaling coefficients for different features under different intents, thereby improving the model's ability to focus on and process intent information.

[0148] 4. Convolve the scaling factor with intent-related features and concatenate them with other intent-irrelevant features as input and output to the multi-task model.

[0149] 5. Add intent auxiliary towers and tasks to constrain the model's training and learning process, predict the intent classification of the current sample, and calculate the auxiliary loss.

[0150] 6. Combine the loss of this part of the intention with the loss of other tasks as the final loss for model training and transmission.

[0151] 7. After multiple rounds of iteration and learning, the model finally converges. When calculating the output, the output of the intent task is excluded to obtain the final model output.

[0152] 8. Based on the final output, sort the output scores of each doc to obtain the ranking of search intents in the music field.

[0153] Ultimately, this embodiment, by designing an intent input and output transmission module, learns the differences in personalization and precision under different search intents, thereby meeting different search needs according to different user search intents. This ensures the authority of the search while improving user search satisfaction.

[0154] The specific calculation process may include the following steps:

[0155] 1. One-hot, discretize, etc. the intent-related features such as ctr and convert them into embeddings:

[0156] {fea1,fea2,…,fea3}=>{BEmb1,BEmb2,…,BEmb3}

[0157] 2. One-hot-encode the intent features, discretize them, and convert them into embeddings:

[0158] {IntentionFea}=>{IntentEmb1,IntentEmb2,…,IntentEmb3}

[0159] 3. Attention is performed on the embedding of intent-related features and the intent embedding to obtain the weight:

[0160] weight=Attention(BEmb,IntentEmb)

[0161] 4. Intersect the calculated weight with BEmb to obtain the importance of intent-related features under different intents:

[0162]

[0163] 5. Concatenate the scaled intent-related feature input with other non-intent-related features as the input to the model:

[0164] final_input=concat(intent_input, other_input)

[0165] 6. Add an intention auxiliary tower and use the final intention result as the target constraint model for learning. The loss calculation formula is:

[0166] final_loss=Intent_loss+otherTower_loss

[0167] 7. After training the mmoe model, the final output is obtained:

[0168] Output=MMoeModel(otherTower_output)

[0169] This embodiment simultaneously addresses user needs for different intents, balancing personalization and accuracy for each intent. Furthermore, it allows the model to learn the differences in features across different intents and rank results differently for each intent. This fully considers the importance of intent in search scenarios and satisfies users' diverse search intents. Furthermore, it avoids interference between samples with different intents, highlighting the characteristics of different intents while complementing each other. Furthermore, the model's learning process is controllable, with guidance and constraints allowing the model to learn relevant features of intent.

[0170] The specific technical effects are as follows: If a user searches for song name A and there are popular online songs and original versions, the original and popular versions can be ranked higher, ensuring the authority and accuracy of the search results, highlighting strong precision under precise intent and weak personalization. On the other hand, if a user searches for singer A, since singers represent a general intent, different users prefer different songs, styles, and versions. The model can prioritize songs favored by different users and ensure that the top-ranked songs are singer A's popular versions. This emphasizes strong personalization under general intent and maintains a certain level of accuracy.

[0171] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0172] Based on the same inventive concept, the embodiments of the present application also provide a music search model training device for implementing the aforementioned music search model training method, as well as a music search device. The implementation solution provided by the device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of the one or more music search model training devices or music search device embodiments provided below can be found in the aforementioned music search model training method and the limitations of the music search method, and will not be repeated here.

[0173] In one embodiment, Figure 8 As shown, a training device for a music search model is provided, comprising: a sample feature acquisition module 801, an input feature acquisition module 802, a sample feature input module 803, a model loss acquisition module 804, and a search model training module 805, wherein:

[0174] The sample feature acquisition module 801 is configured to acquire intent-related features associated with the search intent and intent-irrelevant features not associated with the search intent in the music search data sample;

[0175] Input feature acquisition module 802 is configured to perform concatenation of intent-related features and intent-irrelevant features to obtain model input features;

[0176] The sample feature input module 803 is configured to input the model input features into the music search model to be trained, obtain the click-through rate and conversion rate corresponding to the model input features through the first task tower included in the music search model, and obtain the search intent prediction classification corresponding to the model input features through the second task tower of the music search model;

[0177] A model loss acquisition module 804 is configured to acquire a first loss value of the music search model based on the click-through rate and the conversion rate, and to acquire a second loss value of the music search model based on the search intent prediction classification;

[0178] The search model training module 805 is used to train the music search model to be trained using the first loss value and the second loss value to obtain a trained music search model.

[0179] In one embodiment, Figure 9 As shown, a music search device is provided, comprising: a search feature acquisition module 901, a search feature input module 902 and a recommended music feedback module 903, wherein:

[0180] Search feature acquisition module 901, used to obtain music search information used by a user account to search for music, and music search features corresponding to the music search information;

[0181] Search feature input module 902 is configured to input music search features into a trained music search model and obtain the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained using the music search model training method of any of the above embodiments;

[0182] The recommended music feedback module 903 is used to sort the candidate recommended music based on the click rate and conversion rate, filter out the target recommended music from the candidate recommended music according to the sorting result, and return the target recommended music to the user account according to the sorting result.

[0183] The music search model training device and the various modules within the music search device may be implemented in whole or in part via software, hardware, or a combination thereof. Each of the modules may be embedded in or independent of a processor within a computer device in hardware form, or may be stored in a computer device memory in software form, allowing the processor to call and execute the corresponding operations of each module.

[0184] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store music search data samples. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for training a music search model or a music search method is implemented.

[0185] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0186] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0188] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0190] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0191] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0192] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for training a music search model, characterized in that: The method comprises: Obtaining intent-related features associated with the search intent and intent-irrelevant features unrelated to the search intent in the music search data sample; The intention-related features and the intention-irrelevant features are spliced ​​to obtain model input features; including: obtaining the importance of the intention-related features in the search intent; performing feature change processing on the intention-related features according to the importance, and splicing the changed intention-related features with the intention-irrelevant features to obtain the model input features; Inputting the model input features into a music search model to be trained, obtaining a click-through rate and a conversion rate corresponding to the model input features through a first task tower included in the music search model, and obtaining a search intent prediction classification corresponding to the model input features through a second task tower of the music search model; Based on the click-through rate and the conversion rate, obtaining a first loss value of the music search model, and based on the search intent prediction classification, obtaining a second loss value of the music search model; The music search model to be trained is trained using the first loss value and the second loss value to obtain a trained music search model.

2. The method according to claim 1, characterized in that The obtaining of the importance of the intention-related feature in the search intention includes: Obtaining an intent feature vector representing the search intent; Obtaining a correlation feature vector representing the intention correlation feature; The intention feature vector and the associated feature vector are cross-processed, and the importance of the intention associated feature in the search intention is obtained through the attention mechanism.

3. The method according to claim 2, characterized in that The obtaining of the intention feature vector representing the search intention includes: Performing preset feature processing on the intention feature corresponding to the search intention, and performing feature mapping on the processing result of the preset feature processing on the intention feature to obtain the intention feature vector; The acquiring of the associated feature vector representing the intention associated feature includes: Performing preset feature processing on the intention-related feature, and performing feature mapping on a result of the preset feature processing on the intention-related feature to obtain the associated feature vector; The preset feature processing includes at least one of one-hot encoding processing and discretization processing.

4. The method according to claim 2, characterized in that The importance is represented by an importance coefficient; The performing feature change processing on the intention-related feature according to the importance includes: The importance coefficient is convolved with the associated feature vector, and the convolution result is used as the intention-associated feature after the change process.

5. The method according to claim 1, wherein The obtaining a second loss value of the music search model based on the search intent prediction classification includes: Obtaining an actual classification of search intent corresponding to the music search data sample; The second loss value is obtained according to the actual classification of the search intent and the predicted classification of the search intent.

6. The method according to any one of claims 1 to 5, characterized in that The step of training the music search model to be trained by using the first loss value and the second loss value to obtain a trained music search model includes: Obtaining a first weight corresponding to the first loss value and a second weight corresponding to the second loss value; performing weighted processing on the first loss value and the second loss value according to the first weight and the second weight to obtain a total loss value of the music search model; The music search model to be trained is trained using the total loss value to obtain a trained music search model.

7. A music search method, characterized in that: The method comprises: Obtaining music search information used by a user account to search for music, and music search features corresponding to the music search information; Inputting the music search features into a trained music search model, and obtaining the corresponding click-through rate and conversion rate of each candidate recommended music through the first task tower included in the music search model; wherein the music search model is trained by the music search model training method according to any one of claims 1 to 6; The candidate recommended music is sorted based on the click rate and the conversion rate, target recommended music is selected from the candidate recommended music according to the result of the sorting process, and the target recommended music is returned to the user account according to the result of the sorting process.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data search processing method and device

    CN104778176A

  • Multi-target prediction method and device, equipment and storage medium

    CN113392359A