Single-turn search coarse sorting method, device and medium

By performing windowing and long-tail sampling on the list of exposed singles in single search, and combining user ranking and satisfaction operation to generate a personalized negative sample set, the problem of coarse ranking result bias in the existing technology is solved, and more accurate single search results are achieved.

CN117763231BActive Publication Date: 2026-06-16TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
Filing Date
2023-12-25
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In single-song search, existing negative sample selection methods result in coarse ranking results that deviate significantly from user needs and fail to meet personalized requirements.

Method used

By obtaining the exposure list of singles corresponding to the search content of the target user, window sampling and long-tail sampling are performed. The tier labels are adjusted by combining the initial ranking single list and the system single list. Personalized negative sample sets are generated by using user satisfaction operations, and a training set is constructed for model training.

🎯Benefits of technology

The generated single-track search coarse ranking results are more accurate, meet users' personalized needs, reduce model complexity, and improve the accuracy of coarse ranking results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117763231B_ABST
    Figure CN117763231B_ABST
Patent Text Reader

Abstract

The application discloses a single song search coarse ranking method and device and a medium, relates to the field of single song coarse ranking, and comprises the following steps: obtaining a target exposure single song list corresponding to search content of a target user, and determining a negative sample candidate set based on the target exposure single song list; adjusting the gear label of the negative sample candidate set based on the target exposure single song list and an initial ranking single song list corresponding to the search content of the target user to obtain an adjusted negative sample set; sampling the adjusted negative sample set based on a system single song list of the target user and a satisfactory single song list corresponding to a satisfactory operation of the target user to obtain a target negative sample set; and training a search coarse ranking model by using a training set constructed based on the target negative sample set to coarsely rank a plurality of single songs corresponding to the search content of any user to obtain a coarse ranking result. The application generates a personalized negative sample set, so that the coarse ranking result generated based on the search coarse ranking model is more accurate and more in line with the personalized needs of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of coarse ranking of single tracks, and particularly to a method, apparatus, and medium for coarse ranking of single track searches. Background Technology

[0002] In scenarios requiring large-scale ranking, such as search, recommendation, and advertising, cascaded ranking architectures are widely used. The coarse-ranking layer has strict time requirements and needs to rank a larger number of samples than fine-ranking. Furthermore, the coarse-ranking layer not only needs to provide higher-quality samples for subsequent fine-ranking layers but also needs to maintain low model complexity. Therefore, the selection of negative samples in the coarse-ranking module is particularly important. Currently, negative sample selection can be broadly divided into two categories: In the first category, the selection of negative samples is similar to fine-ranking, based on user actions, using samples that have been exposed but not clicked as negative samples; in the second category, considering the ranking of fine-ranking, samples that are ranked too low, i.e., those with low fine-ranking scores, are used as negative samples. However, due to the complexity of music business, search results may differ when different users search for the same content. If the above two negative sample sampling methods are simply used in the scenario of single-song search coarse-ranking, the final single-song search coarse-ranking result generated by the search coarse-ranking model may deviate significantly from the user's needs. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a single-track search coarse ranking method, device, and medium, which can generate personalized negative sample sets, making the coarse ranking results generated based on the search coarse ranking model more accurate and better suited to users' personalized needs. The specific solution is as follows:

[0004] Firstly, this application provides a coarse ranking method for single-song search, including:

[0005] Obtain a list of target exposure singles corresponding to the search content of the target user, and perform window sampling and long-tail sampling on the list of target exposure singles to obtain a negative sample candidate set;

[0006] Determine an initial list of ranked singles corresponding to the search content of the target user, and perform a level tag adjustment operation on the negative sample candidate set based on the initial list of ranked singles and the target exposure singles list to obtain an adjusted negative sample set;

[0007] The adjusted negative sample set is sampled based on the target user's system single song list and the list of satisfactory single songs corresponding to the target user's preset satisfactory operation to obtain the target negative sample set;

[0008] A training set is constructed based on the target negative sample set, and a search coarse ranking model is obtained by training the model based on the training set. The search coarse ranking model is then used to coarsely rank several singles corresponding to the search content of any user to obtain the coarse ranking result.

[0009] Optionally, the step of performing window sampling and long-tail sampling on the target exposure singles list to obtain a negative sample candidate set includes:

[0010] Based on the clicked singles in the target exposure singles list, the target exposure singles list is window-sampled to obtain a window negative sample set;

[0011] Long-tail sampling is performed on the target exposure single list using a preset exposure single list to obtain a long-tail negative sample set;

[0012] Based on the window negative sample set and the long-tail negative sample set, a negative sample candidate set is determined, and based on the default gear, the gear label corresponding to each negative sample in the negative sample candidate set is determined.

[0013] Optionally, the step of performing window sampling on the target exposure singles list based on the clicked singles in the target exposure singles list to obtain a window negative sample set includes:

[0014] From the target exposure singles list, determine a number of clicked singles that correspond to the click operation of the target user;

[0015] From the target exposure single list, determine a number of unclicked singles that are adjacent to each clicked single before and after it, so as to obtain a first negative sample set corresponding to each clicked single;

[0016] The first negative sample sets corresponding to each of the clicked singles are merged to obtain a merged negative sample set;

[0017] Based on the number of clicked tracks, negative samples are sampled from the merged negative sample set to obtain the window negative sample set.

[0018] Optionally, determining from the target exposure singles list a plurality of unclicked singles adjacent to each clicked single to obtain a first negative sample set corresponding to each clicked single includes:

[0019] Based on a first preset number and a second preset number, several adjacent singles adjacent to each of the clicked singles are determined from the target exposure single list to obtain a set of adjacent negative samples corresponding to each of the clicked singles.

[0020] The clicked singles contained in each of the adjacent negative sample sets are deleted to obtain a first negative sample set corresponding to each of the clicked singles.

[0021] Optionally, determining from the target exposure singles list a plurality of unclicked singles adjacent to each clicked single to obtain a first negative sample set corresponding to each clicked single includes:

[0022] Based on the third and fourth preset quantities, several unclicked singles adjacent to each clicked single are directly determined from the target exposure single list to obtain the first negative sample set corresponding to each clicked single.

[0023] Optionally, before performing long-tail sampling on the target exposure single list using a preset exposure single list to obtain a long-tail negative sample set, the method further includes:

[0024] Perform several searches on the target user's search content to obtain several initial exposure single lists;

[0025] The list of singles with the largest number of singles in the plurality of initial exposure single lists is determined as the preset exposure single list.

[0026] Optionally, the step of using a preset exposure singles list to perform long-tail sampling on the target exposure singles list to obtain a long-tail negative sample set includes:

[0027] The singles in the preset exposure singles list that are located in the target exposure singles list are deleted to obtain the second negative sample set;

[0028] Negative sample sampling is performed on the second negative sample set to obtain the long-tailed negative sample set.

[0029] Optionally, determining the initial ranked singles list corresponding to the target user's search content includes:

[0030] Obtain all search tracks corresponding to the search content of the target user, and determine the satisfaction level of each of the search tracks.

[0031] Sort all the searched songs in descending order of satisfaction level to obtain a list of searched songs;

[0032] Based on the order of the singles, select several target search singles from the search single list starting from the first single to obtain the initial ranked single list; wherein, the sum of the satisfaction of the several target search singles is greater than or equal to a preset satisfaction threshold, and the sum of the satisfaction of the other search singles among the several target search singles, except for the last single, is less than the preset satisfaction threshold.

[0033] Optionally, determining the satisfaction level corresponding to each of the searched singles includes:

[0034] The satisfaction level of each searched song is determined based on its historical download count, historical favorite count, historical playlist addition count, and historical completion count.

[0035] Optionally, the step of adjusting the tier labels of the negative sample candidate set based on the initial ranking singles list and the target exposure singles list to obtain the adjusted negative sample set includes:

[0036] The last target exposure single located in the initial ranking singles list is determined from the target exposure singles list;

[0037] The target ranking list is determined based on the target exposure single and all singles in the target exposure single list that precede the target exposure single;

[0038] Filter all ranked negative samples in the target ranked singles list from the negative sample candidate set, and perform a tier increase operation on all ranked negative samples to obtain a high-tier negative sample set;

[0039] A low-end negative sample set is determined based on all negative samples in the negative sample candidate set that are not in the target ranking single list, and the high-end negative sample set and the low-end negative sample set are merged to obtain the adjusted negative sample set.

[0040] Optionally, the step of sampling the adjusted negative sample set based on the target user's system single song list and the list of satisfied single songs corresponding to the target user's preset satisfied operations to obtain the target negative sample set includes:

[0041] Determine the system single song list of the target user and the list of satisfactory single songs corresponding to the target user's preset satisfactory operation;

[0042] All high-end negative samples located in the system singles list and the satisfactory singles list from the high-end negative sample set are deleted to obtain the deleted high-end negative sample set;

[0043] A tier increase operation is performed on all low-tier negative samples in the low-tier negative sample set that are located in the system singles list and the satisfactory singles list to obtain an adjusted low-tier negative sample set.

[0044] The target negative sample set is determined based on the deleted high-end negative sample set and the adjusted low-end negative sample set.

[0045] Optionally, the system single song list includes a system favorite single song list, a first system completed single song list, and a second system completed single song list;

[0046] Accordingly, determining the system's singles list for the target user includes:

[0047] From the system's favorite playlist corresponding to the target user, determine the several favorite songs whose favorite time is closest to the current time, to obtain the system's favorite song list;

[0048] From the system's completed playlist corresponding to the target user, determine a number of first completed singles whose completion time is closest to the current time, so as to obtain the first system completed singles list;

[0049] From the system playlist corresponding to the target user, determine a number of second playlists that have been completed more than a preset threshold, so as to obtain the second system playlist.

[0050] Optionally, determining a list of satisfactory tracks corresponding to the target user's preset satisfactory actions includes:

[0051] Obtain a list of satisfactory singles corresponding to the preset satisfactory actions of the target user within a preset historical time period; the preset satisfactory actions include any one or a combination of several of the following: single collection action, single download action, and add to playlist action.

[0052] Optionally, before constructing the training set based on the target negative sample set, the method further includes:

[0053] Based on the target user's historical single-song playback records, determine the type of single song that the target user is interested in;

[0054] The negative samples corresponding to the type of the song of interest in the target negative sample set are deleted to obtain the target negative sample set after deletion, and the training set is constructed using the target negative sample set after deletion.

[0055] Secondly, this application provides an electronic device, comprising:

[0056] Memory, used to store computer programs;

[0057] A processor for executing the computer program to implement the aforementioned single-song search coarse ranking method.

[0058] Thirdly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the aforementioned single-track search coarse ranking method.

[0059] In this application, a target exposure singles list corresponding to the search content of a target user is obtained, and window sampling and long-tail sampling are performed on the target exposure singles list to obtain a negative sample candidate set; an initial ranking singles list corresponding to the search content of the target user is determined, and the negative sample candidate set is adjusted based on the initial ranking singles list and the target exposure singles list to obtain an adjusted negative sample set; the adjusted negative sample set is sampled based on the system singles list of the target user and the satisfied singles list corresponding to the preset satisfied operation of the target user to obtain a target negative sample set; a training set is constructed based on the target negative sample set, and a search coarse ranking model is trained based on the training set to obtain a coarse ranking result by coarsely ranking several singles corresponding to the search content of any user. Therefore, this application mitigates negative sample selection bias by performing window sampling and long-tail sampling on the target exposure singles list corresponding to the target user's search content to obtain a negative sample candidate set that considers the singles' exposure position. Furthermore, by combining the initial ranking singles list and the target exposure singles list corresponding to the target user's search content to adjust the negative sample candidate set, an adjusted negative sample set that further considers singles ranking can be obtained, thus solving the problem of fitting coarse ranking to fine ranking. Then, the adjusted negative sample set is further filtered using the user's satisfactory operation list and the system singles list to improve the personalization of the negative sample set, more accurately characterize user preferences, and provide better quality samples for subsequent fine ranking layers. Furthermore, using the training set constructed based on the target negative sample set for model training can reduce model complexity, making the singles coarse ranking results generated based on the search coarse ranking model more accurate and more in line with the user's personalized needs. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0061] Figure 1 This application discloses a single-song search coarse-ranking system architecture diagram;

[0062] Figure 2 This is a flowchart of a single-song search coarse ranking method disclosed in this application;

[0063] Figure 3 Here is a flowchart of the construction process for a negative sample candidate set disclosed in this application;

[0064] Figure 4This application discloses a flowchart for adjusting gear position labels;

[0065] Figure 5 This is a schematic diagram of the coarse ranking results of a single-song search disclosed in this application;

[0066] Figure 6 This application discloses a flowchart of a specific coarse ranking method for single-song search;

[0067] Figure 7 This is a flowchart of another specific single-song search coarse ranking method disclosed in this application;

[0068] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0070] Because the music search business is complex, search results may differ when different users search for the same content. If unexposed samples or samples ranked low in the fine-grained ranking are simply used as negative samples, the coarse ranking results generated by the model for single-track searches may deviate significantly from users' personalized needs. To address this, this application provides a coarse ranking method for single-track searches that generates a personalized set of negative samples, making the coarse ranking results generated based on the search coarse ranking model more accurate and better suited to users' personalized needs.

[0071] The system framework used in the single-song search coarse ranking method of this application can be found in [link to relevant documentation]. Figure 1 As shown, it may specifically include: client 01 and backend server 02 that establishes a communication connection with client 01.

[0072] In this application, the backend server 02 is used to execute the steps of the single-song search coarse ranking method, including obtaining a target exposure single list corresponding to the target user's search content; performing window sampling on the target exposure single list based on the clicked singles in the target exposure single list; and performing long-tail sampling on the target exposure single list using a preset exposure single list to obtain a negative sample candidate set; further, determining an initial ranking single list corresponding to the target user's search content, and determining a target ranking single list based on the initial ranking single list and the target exposure single list, so as to use the target ranking single list to perform a level tag adjustment operation on the negative sample candidate set to obtain an adjusted negative sample set; in order to improve the personalization of the negative sample set, sampling the adjusted negative sample set based on the target user's system single list and the satisfied single list corresponding to the target user's preset satisfied operation to obtain a target negative sample set; finally, using the training set constructed based on the target negative sample set to train the model to obtain a search coarse ranking model, so as to perform coarse ranking on several singles corresponding to any user's search content through the search coarse ranking model to obtain a coarse ranking result.

[0073] Furthermore, client 01 acquires the search content input by the target user and transmits it to backend server 02. Backend server 02 then determines the target exposure singles list and the initial ranking singles list corresponding to the target user's search content, and returns the target exposure singles list to client 01 for display. Client 01 acquires the target user's click operations on the exposed singles in the target exposure singles list to obtain several clicked singles, and transmits these clicked singles to backend server 02. Backend server 02 then performs window sampling on the target exposure singles list based on these clicked singles, and performs long-tail sampling on the target exposure singles list using the preset exposure singles list to obtain a negative sample candidate set. Finally, backend server 02 adjusts the negative sample candidate set based on the initial ranking singles list and the target exposure singles list to obtain an adjusted negative sample set. Furthermore, the backend server 02 retrieves several songs corresponding to the target user's preset satisfactory operations (download, favorite, add to playlist, etc.) within a historical time period to obtain a satisfactory song list. Based on the target user's system song list and the satisfactory song list, it samples the adjusted negative sample set to obtain the target negative sample set. Finally, the backend server 02 uses the training set constructed based on the target negative sample set to train the model, obtaining a trained coarse-ranking search model. In practical application, the client 01 retrieves any user's search content and transmits it to the backend server 02. The backend server 02 then uses the trained coarse-ranking search model to perform a coarse-ranking of the songs corresponding to any user's search content, obtaining the coarse-ranking result, which is then returned to the client 01 for display.

[0074] See Figure 2As shown, this embodiment of the invention discloses a coarse ranking method for single-song search, including:

[0075] Step S11: Obtain the target exposure single list corresponding to the target user's search content, and perform window sampling and long-tail sampling on the target exposure single list to obtain a negative sample candidate set.

[0076] In this embodiment, as Figure 3 As shown, the search content of the target user is obtained, and the search flow data corresponding to the target user's search content is determined to obtain the target exposure singles list. Based on the target user's click operations on the exposed singles in the target exposure singles list, several clicked singles are determined. Window sampling is performed on the target exposure singles list based on these clicked singles to obtain a window negative sample set considering unclicked singles. Simultaneously, several unexposed singles not located in the target exposure singles list corresponding to the target user are determined from the preset exposure singles list. Long-tail sampling is performed on the negative sample set determined based on these unexposed singles to obtain a long-tail negative sample set considering unexposed singles. The window negative sample set and the long-tail negative sample set are merged to obtain a negative sample candidate set. And based on the default gear, determine the gear label corresponding to each negative sample in the negative sample candidate set; that is, mark the gear label corresponding to each negative sample in the negative sample candidate set as gear 0.

[0077] It's important to note that the number of songs included in the target exposure singles list corresponding to the target user's search query varies depending on the user's search actions. For example, if the user enters their search query and clicks the search button, the backend server will search for 20 songs matching their query and return them to the client for display, resulting in a list of 20 songs. If the user scrolls down to the end of the 20 songs and continues scrolling, the backend server will return another 20 songs matching their query, bringing the list to 40 songs. This pattern continues, with the number of songs in the target exposure singles list corresponding to the user's search scrolling actions.

[0078] For window sampling, after determining several clicked tracks based on the click operations of target users on the exposed tracks in the target exposure track list, a non-negative sample set D can be constructed based on these clicked tracks. non_0 And based on the unclicked singles in the target exposure singles list, determine the unclicked candidate set D. no_clickBecause the client's display interface is limited, it can only display a limited number of tracks at a time. Therefore, not all tracks in the target exposure track list will necessarily be seen by the user. In other words, not all unclicked tracks in the unclicked candidate set will necessarily be seen by the user. Therefore, this application needs to filter unclicked tracks in the unclicked candidate set when generating the negative sample candidate set. Specifically, for several clicked tracks in the target exposure track list, unclicked tracks surrounding the clicked tracks are selected to construct a negative sample set. Then, the negative sample sets corresponding to several clicked tracks are merged to obtain the window negative sample set.

[0079] In long-tail sampling, each search result corresponds to a list of exposed singles in each search. Therefore, after several searches on the target user's search content, several initial lists of exposed singles can be obtained. The list of singles with the most singles in these initial lists is determined as the preset exposed singles list. Singles in the preset exposed singles list that are located in the target exposed singles list are deleted to determine a negative sample set based on the unexposed singles in the preset exposed singles list. Then, negative sample sampling is performed on the negative sample set determined based on the unexposed singles to obtain the long-tail negative sample set. It should be noted that multiple initial lists of exposed singles can be obtained by the same user searching the target user's search content multiple times, or by different users searching the target user's search content multiple times.

[0080] Understandably, the first search on the target user's search terms yields the initial list of singles for exposure. q_1 A second search is performed on the target user's search terms to obtain a second initial exposure list of singles. q_2 Similarly, by performing the i-th search on the target user's search content, the i-th initial exposure list of singles is obtained. q_i Depending on the user's search dropdown actions, the number of exposed singles contained in the first to the i-th initial exposure single lists may vary. Therefore, the initial exposure single list with the highest number of exposed singles is selected from the first to the i-th initial exposure single lists as the preset exposure single list corresponding to the target user's search content. q_max Then, based on the preset exposure singles list that do not appear in the target exposure singles list D... all The unexposed single d in the data determines the negative sample set D. q_i_noexpose And for the negative sample set D q_i_noexpose Negative sample sampling is performed to obtain the long-tailed negative sample set D. 0_noexpose The formulas involved are as follows:

[0081] l q_max =f max_lenth(l q_1 , l q_2 , ...l q_i )

[0082] D q_i_noexpose ={d|d in l q_max and not in D all}

[0083] D 0_noexpose =f sample_exp (D q_i_noexpose ).

[0084] Step S12: Determine the initial ranking list of singles corresponding to the search content of the target user, and perform a level label adjustment operation on the negative sample candidate set based on the initial ranking list of singles and the target exposure list of singles to obtain the adjusted negative sample set.

[0085] In this embodiment, determining the initial ranking list of singles corresponding to the target user's search content includes: obtaining the search content q of the target user. i Collect all the corresponding search tracks (all_doc) and determine the satisfaction level for each track. Sort all the search tracks in descending order of satisfaction level to obtain a list of search tracks. qi_order Based on the order of the individual tracks, a list of target search tracks is selected starting from the first track to obtain an initial ranked track list. The sum of the satisfaction scores of these target search tracks must be greater than or equal to a preset satisfaction threshold, and the sum of the satisfaction scores of all target search tracks except the last track must be less than the preset satisfaction threshold. It should be noted that for the search content q of the target user... i The corresponding search term "all_doc" will search for all songs related to singer A, taking the target user's search content as singer A as an example.

[0086] Specifically, obtain the search content q of the target user. i For all searched tracks (all_doc), the satisfaction level for each track is determined based on its historical download count, historical favorite count, historical playlist addition count, and historical playback count. For example, a weighted calculation is performed on these metrics to obtain the individual satisfaction levels for each track. All searched tracks are then sorted in descending order of satisfaction level to obtain the searched track list. qi_order Select the top n target search tracks from the search track list whose sum of satisfaction levels reaches a certain percentage to obtain the initial ranked track list D.basic_top For example, from a search list of singles. qi_order The first n target search tracks are selected whose sum of satisfaction percentages reaches 75%. That is, the sum of satisfaction percentages for the first n target search tracks is greater than or equal to 75%, and the sum of satisfaction percentages for the first n-1 target search tracks is less than 75%. Based on these first n target search tracks, an initial ranking list D is determined. basic_top The formulas involved are as follows:

[0087] list qi_order =f order_by_doc_satisfy (q i (all_doc)

[0088]

[0089] ;

[0090] in, This indicates the first target song to search for; and so on. This indicates that the nth target song is being searched.

[0091] In this embodiment, the negative sample candidate set is adjusted based on the initial ranking singles list and the target exposure singles list to obtain the adjusted negative sample set; considering that the single ranking score result is the single exposure order, it is necessary to adjust the negative sample set based on the initial ranking singles list D. basie_top From the target exposure singles list D corresponding to the search content of the target users all Select several high-quality singles from the list to construct the target ranking singles list D. top At this point, the singles in the target ranking singles list are those with higher exposure order, i.e., those with higher ranking scores. Further, based on the target ranking singles list D... top negative sample candidate set The negative samples in the dataset undergo a gear label adjustment operation to obtain the adjusted negative sample set D. top_change_0 .

[0092] The construction of the target ranking singles list includes: from the target exposure singles list D all The last track in the initial chart singles list D was determined. basic_top The target single was released. The target ranking single list D is determined based on the target exposure single and all singles in the target exposure single list that precede the target exposure single. top The formulas involved are as follows:

[0093]

[0094]

[0095] It should be noted that the singles in the target exposure singles list that appear in the initial ranking singles list are not necessarily sorted in the same order as those in the initial ranking singles list. Therefore, the last target exposure single in the target exposure singles list that is in the initial ranking singles list is not necessarily the last single in the initial ranking singles list, but may be any other single in the initial ranking singles list.

[0096] Furthermore, from the negative sample candidate set The filter is located in the target ranking singles list D. top All ranked negative samples are identified, and a tier increment operation is performed on all ranked negative samples to obtain the high-tier negative sample set D. top_high_0 For example, all negative samples in the negative sample candidate set that are located in the target ranking single list are incremented by two levels to obtain a high-level negative sample set; at this time, all negative samples in the high-level negative sample set correspond to two levels of level labels. Then, based on the negative sample candidate set... The song D did not appear in the target chart singles list. top All negative samples determine the low-level negative sample set D top_low_0 At this point, all negative samples in the low-level negative sample set correspond to the default level, such as level 0. The adjusted negative sample set D is obtained by merging the high-level and low-level negative sample sets. top_change_0 The formulas involved are as follows:

[0097]

[0098] f label_change (doc), if doc in D top ;

[0099] Among them, f label_change This indicates that the gear position label has been adjusted.

[0100] like Figure 4As shown, the process involves obtaining all search singles (docs) corresponding to the target user's search query and determining the satisfaction level for each single. The singles are then sorted in descending order of satisfaction level to obtain a singles list. The top n target search singles with a certain percentage of summed satisfaction levels are selected from this list to form an initial ranked singles list. Based on this initial ranked singles list, several high-quality singles (ranked high) are individually selected from the target exposure singles list corresponding to the target user's search query to construct a target ranked singles list. Finally, the negative samples in the negative sample candidate set are adjusted based on the target ranked singles list to obtain an adjusted negative sample set considering single ranking.

[0101] Step S13: Sample the adjusted negative sample set based on the target user's system single song list and the list of satisfactory single songs corresponding to the target user's preset satisfactory operation to obtain the target negative sample set.

[0102] In this embodiment, the system singles list of the target user is obtained, as well as the list of satisfactory singles corresponding to the target user's preset satisfactory operations (download, favorite, add to playlist, etc.) within a historical time period. The system singles list and the list of satisfactory singles can more accurately characterize the target user's preferences, thus allowing the adjusted negative sample set D to be analyzed using these lists. top_change_0 Negative sample sampling is performed to obtain the target negative sample set D. final_0 .

[0103] Step S14: Construct a training set based on the target negative sample set, and train the model based on the training set to obtain a coarse ranking model for searching. The coarse ranking model is then used to coarsely rank several singles corresponding to the search content of any user to obtain a coarse ranking result.

[0104] Before constructing the training set based on the target negative sample set, the types of songs of interest corresponding to the target user can be determined based on the target user's historical single song playback records. The negative samples corresponding to the types of songs of interest in the target negative sample set are deleted to obtain the deleted target negative sample set, which is then used to construct the training set.

[0105] In this embodiment, a training set is constructed based on the target negative sample set, wherein all training samples in the training set are labeled with corresponding gear level tags. An initial model is constructed based on the extreme gradient boosting (XGBoost) method, and the initial model is trained using the training set to obtain a trained coarse-ranking search model. Whether the trained coarse-ranking search model is a good coarse-ranking search model can be determined either by whether the model has reached a preset number of training epochs or by whether the model's accuracy has reached a preset accuracy threshold. After completing the training of the coarse-ranking search model, the trained coarse-ranking search model is used to coarsely rank several tracks corresponding to any user's search content to obtain the corresponding coarse-ranking search results.

[0106] like Figure 5 As shown, taking a user's search term "singer A" as an example, the left side represents the coarse ranking result determined by the method of this application, denoted as the experimental group; the right side represents the coarse ranking result determined by existing technology, denoted as the control group. Since the user has recently listened to song A frequently, completed many plays, and also added song A to their playlist, the experimental group ranks song A 5 places higher than the control group. Similarly, since the user has completed and added song C to their playlist, but in a relatively long time, the experimental group ranks song C 2 places higher than the control group, not by much. Since the user has played song G, but has never completed a playlist of it, nor is it in the user's playlist, the experimental group ranks song G significantly lower than the control group. It is worth noting that although the user doesn't pay much attention to song B, due to its high quality—meaning most users would likely add it to their playlist, download it, or add it to their playlist—song B still ranks second in the experimental group. It can be seen that the experimental group, compared to the control group, considers both the overall accuracy of the ranking and the user's personalized characteristics.

[0107] Therefore, this application mitigates negative sample selection bias by performing window sampling and long-tail sampling on the target exposure singles list corresponding to the target user's search content to obtain a negative sample candidate set that considers the singles' exposure position. Furthermore, by combining the initial ranking singles list and the target exposure singles list corresponding to the target user's search content to adjust the negative sample candidate set, an adjusted negative sample set that further considers singles ranking can be obtained, thus solving the problem of fitting coarse ranking to fine ranking. Then, the adjusted negative sample set is further filtered using the user satisfaction operation list and the system singles list to improve the personalization of the negative sample set, more accurately characterize user preferences, and provide better quality samples for subsequent fine ranking layers. Furthermore, using the training set constructed based on the target negative sample set for model training can reduce model complexity, making the singles coarse ranking results generated by the search coarse ranking model more accurate and more in line with user personalized needs.

[0108] As described in the previous embodiment, this application describes how a negative sample candidate set can be obtained by performing window sampling and long-tail sampling on the target exposure singles list respectively. Next, this application will elaborate on the window sampling process in detail. See [link to previous document]. Figure 6 As shown, this embodiment of the invention discloses a process for determining a window of negative samples, including:

[0109] Step S21: Determine several clicked singles from the target exposure singles list that correspond to the click operation of the target user.

[0110] In this embodiment, a list of target exposure singles corresponding to the target user's search content is displayed, and the click operations of the target user on some of the exposure singles in the target exposure singles list are obtained, so as to determine a number of clicked singles corresponding to the target user's click operations from the target exposure singles list. click_i .

[0111] Step S22: Determine several unclicked singles adjacent to each clicked single from the target exposure single list to obtain the first negative sample set corresponding to each clicked single.

[0112] In one specific implementation, based on a first preset number and a second preset number, several adjacent singles adjacent to each clicked single are determined from the target exposure single list to obtain a set of adjacent negative samples (doc) corresponding to each clicked single. window_i The clicked tracks in each adjacent negative sample set are deleted to obtain the first negative sample set corresponding to each clicked track. For example, the first preset number can be 8, and the second preset number can be 3. That is, the 8 adjacent tracks before the i-th clicked track and the 3 adjacent tracks after the i-th clicked track are determined from the target exposure track list to obtain the adjacent negative sample set corresponding to the i-th clicked track. Then, the clicked tracks in the adjacent negative sample set corresponding to the i-th clicked track are deleted to obtain the first negative sample set doc corresponding to the i-th clicked track. window_i It should be noted that the first negative sample set does not include clicked tracks; that is, it only contains unclicked tracks.

[0113] In another specific implementation, based on a third preset quantity and a fourth preset quantity, several unclicked singles adjacent to each clicked single are directly determined from the target exposure single list to obtain a first negative sample set corresponding to each clicked single. For example, the third preset quantity can be 8, and the fourth preset quantity can be 3, that is, 8 unclicked singles adjacent to the i-th clicked single before the i-th clicked single and 3 unclicked singles adjacent to the i-th clicked single after the i-th clicked single are determined from the target exposure single list to obtain the first negative sample set doc corresponding to the i-th clicked single. window_i .

[0114] Step S23: Merge the first negative sample sets corresponding to each of the clicked singles to obtain a merged negative sample set.

[0115] In this embodiment, the first negative sample set (doc) corresponding to each clicked single song is... window_i doc window_j ...doc window_k The negative samples are merged to obtain the merged negative sample set D. can_expose It should be noted that the merged negative sample set does not contain duplicate samples; the relevant formulas are as follows:

[0116] D can_expose =doC window_i UdoC window_j ∪...∪doC window_k

[0117] Step S24: Based on the number of clicked singles, perform negative sample sampling on the merged negative sample set to obtain a window negative sample set.

[0118] In this embodiment, the number of clicked tracks is determined, which is also the number of sets of first negative samples corresponding to each clicked track. Simultaneously, the ratio of the number of clicked tracks to the number of negative samples is obtained, i.e., the ratio of the set size to the number of negative samples, for example, 1:3. Based on this ratio, the number of negative samples corresponding to the number of clicked tracks is determined, and the merged negative sample set D is then analyzed based on the number of negative samples. can_expose Negative sample sampling is performed to obtain the window negative sample set D. 0_expose The formulas involved are as follows:

[0119]

[0120] Therefore, this application determines several clicked singles corresponding to the click operation of the target user from the target exposure singles list, and performs window sampling on the unclicked singles around the several clicked singles in the target exposure singles list to obtain a negative sample candidate set. In this way, by using window sampling, the negative sample selection bias can be alleviated, thereby improving the quality of negative samples in the negative sample candidate set, reducing the difficulty of training the search coarse ranking model, and improving the accuracy of the search coarse ranking model in single-song coarse ranking.

[0121] As described in the previous embodiment, this application describes the need to sample the adjusted negative sample set based on the system singles list and the satisfactory singles list to obtain the target negative sample set. Next, this application will elaborate on the sampling process of the adjusted negative sample set. See [link to previous application]. Figure 7 As shown, this embodiment of the invention discloses a process for determining a target negative sample set, including:

[0122] Step S31: Determine the system single song list of the target user and the list of satisfactory single songs corresponding to the preset satisfactory operation of the target user.

[0123] In this embodiment, the system song list for the target user includes a system favorites list, a first system completed songs list, and a second system completed songs list. Specifically, for the system favorites list, a number of favorited songs whose favorite time is closest to the current time are determined from the system favorites playlist corresponding to the target user. For example, m favorited songs whose favorite time is closest to the current time are determined from the system favorites playlist corresponding to the target user. For the first system completed songs list, a number of first completed songs whose completion time is closest to the current time are determined from the system completed songs playlist corresponding to the target user. For the second system completed songs list, a number of second completed songs whose number of completed plays exceeds a preset threshold are determined from the system completed songs playlist corresponding to the target user.

[0124] In this embodiment, the list of satisfactory singles corresponding to the preset satisfactory actions of the target user includes: obtaining a number of satisfactory singles corresponding to the preset satisfactory actions of the target user within a preset historical time period to obtain a list of satisfactory singles; wherein, the preset satisfactory actions include any one or a combination of single collection actions, single download actions, and add to playlist actions; it should be noted that the add to playlist action here includes collection of playlists and custom playlists.

[0125] Step S32: Delete all high-end negative samples in the high-end negative sample set that are located in the system single list and the satisfactory single list to obtain the deleted high-end negative sample set.

[0126] In this embodiment, the adjusted negative sample set D is determined. top_change_0 High-end negative sample set D top_high_0 Then, all high-end negative samples located in the system single list (system favorite single list, first system completed single list, second system completed single list) and the satisfactory single list in the high-end negative sample set are deleted to obtain the deleted high-end negative sample set.

[0127] Step S33: Perform a tier increase operation on all low-tier negative samples in the low-tier negative sample set that are located in the system single list and the satisfactory single list to obtain an adjusted low-tier negative sample set.

[0128] In this embodiment, the adjusted negative sample set D is determined. top_change_0 The low-end negative sample set D top_low_0 Furthermore, for all low-level negative samples located in the system singles list (system favorites singles list, first system completed singles list, second system completed singles list) and the satisfactory singles list in the low-level negative sample set, a level increase operation is performed. For example, two levels are added to the original level to obtain the adjusted low-level negative sample set.

[0129] Step S34: Determine the target negative sample set based on the deleted high-end negative sample set and the adjusted low-end negative sample set.

[0130] In this embodiment, the target negative sample set D is obtained by merging the deleted high-end negative sample set and the adjusted low-end negative sample set. final_0 It should be noted that each negative sample in the target negative sample set is labeled with a corresponding grade label.

[0131] Therefore, this application further filters the adjusted negative sample set by using the user satisfaction operation list and the system single song list to improve the personalization of the negative sample set, more accurately characterize user preferences, and provide better quality samples for subsequent fine ranking layers. This reduces model complexity during subsequent model training using the training set constructed based on the target negative sample set, making the single song coarse ranking results generated by the search coarse ranking model more accurate and better meet user personalized needs.

[0132] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 10 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0133] Figure 8 This is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of this application. Specifically, the electronic device 10 may include: at least one processor 11, at least one memory 12, a power supply 13, a communication interface 14, an input / output interface 15, and a communication bus 16. The memory 12 stores a computer program, which is loaded and executed by the processor 11 to implement the relevant steps in the image preview method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 10 in this embodiment may specifically be an electronic computer.

[0134] In this embodiment, the power supply 13 is used to provide operating voltage for each hardware device on the electronic device 10; the communication interface 14 can create a data transmission channel between the electronic device 10 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 15 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0135] In addition, the memory 12, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 121, computer program 122, etc., and the storage method can be temporary storage or permanent storage.

[0136] The operating system 121 is used to manage and control the various hardware devices on the electronic device 10 and the computer program 122, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the image preview method executed by the electronic device 10 as disclosed in any of the foregoing embodiments, the computer program 122 may further include a computer program capable of performing other specific tasks.

[0137] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned single-track search coarse ranking method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0138] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0139] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0140] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0141] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0142] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A coarse-ranking method for single-song search, characterized in that, include: Obtain a list of target exposure singles corresponding to the search content of the target user, and perform window sampling and long-tail sampling on the list of target exposure singles to obtain a negative sample candidate set; Determine an initial list of ranked singles corresponding to the search content of the target user, and perform a level tag adjustment operation on the negative sample candidate set based on the initial list of ranked singles and the target exposure singles list to obtain an adjusted negative sample set; The adjusted negative sample set is sampled based on the target user's system single song list and the list of satisfactory single songs corresponding to the target user's preset satisfactory operation to obtain the target negative sample set; A training set is constructed based on the target negative sample set, and a search coarse ranking model is obtained by training the model based on the training set. The search coarse ranking model is then used to coarsely rank several singles corresponding to the search content of any user to obtain the coarse ranking result.

2. The single-song search coarse ranking method according to claim 1, characterized in that, The step of performing window sampling and long-tail sampling on the target exposure singles list to obtain a negative sample candidate set includes: Based on the clicked singles in the target exposure singles list, the target exposure singles list is window-sampled to obtain a window negative sample set; Long-tail sampling is performed on the target exposure single list using a preset exposure single list to obtain a long-tail negative sample set; Based on the window negative sample set and the long-tail negative sample set, a negative sample candidate set is determined, and based on the default gear, the gear label corresponding to each negative sample in the negative sample candidate set is determined.

3. The single-song search coarse ranking method according to claim 2, characterized in that, The step of performing window sampling on the target exposure singles list based on the clicked singles in the target exposure singles list to obtain a window negative sample set includes: From the target exposure singles list, determine a number of clicked singles that correspond to the click operation of the target user; From the target exposure single list, determine a number of unclicked singles that are adjacent to each clicked single before and after it, so as to obtain a first negative sample set corresponding to each clicked single; The first negative sample sets corresponding to each of the clicked singles are merged to obtain a merged negative sample set; Based on the number of clicked tracks, negative samples are sampled from the merged negative sample set to obtain the window negative sample set.

4. The single-song search coarse ranking method according to claim 3, characterized in that, The step of determining, from the target exposure singles list, several unclicked singles adjacent to each clicked single to obtain a first negative sample set corresponding to each clicked single includes: Based on a first preset number and a second preset number, several adjacent singles adjacent to each of the clicked singles are determined from the target exposure single list to obtain a set of adjacent negative samples corresponding to each of the clicked singles. The clicked singles contained in each of the adjacent negative sample sets are deleted to obtain a first negative sample set corresponding to each of the clicked singles.

5. The single-song search coarse ranking method according to claim 3, characterized in that, The step of determining, from the target exposure singles list, several unclicked singles adjacent to each clicked single to obtain a first negative sample set corresponding to each clicked single includes: Based on the third and fourth preset quantities, several unclicked singles adjacent to each clicked single are directly determined from the target exposure single list to obtain the first negative sample set corresponding to each clicked single.

6. The single-song search coarse ranking method according to claim 2, characterized in that, Before performing long-tail sampling on the target exposure single list using a preset exposure single list to obtain a long-tail negative sample set, the method further includes: Perform several searches on the target user's search content to obtain several initial exposure single lists; The list of singles with the largest number of singles in the plurality of initial exposure single lists is determined as the preset exposure single list.

7. The single-song search coarse ranking method according to claim 6, characterized in that, The step of using a preset exposure singles list to perform long-tail sampling on the target exposure singles list to obtain a long-tail negative sample set includes: The singles in the preset exposure singles list that are located in the target exposure singles list are deleted to obtain the second negative sample set; Negative sample sampling is performed on the second negative sample set to obtain the long-tailed negative sample set.

8. The single-song search coarse ranking method according to claim 1, characterized in that, The process of determining the initial ranked singles list corresponding to the search content of the target user includes: Obtain all search tracks corresponding to the search content of the target user, and determine the satisfaction level of each of the search tracks. Sort all the searched songs in descending order of satisfaction level to obtain a list of searched songs; Based on the order of the singles, select several target search singles from the search single list starting from the first single to obtain the initial ranked single list; wherein, the sum of the satisfaction of the several target search singles is greater than or equal to a preset satisfaction threshold, and the sum of the satisfaction of the other search singles among the several target search singles, except for the last single, is less than the preset satisfaction threshold.

9. The single-song search coarse ranking method according to claim 8, characterized in that, Determining the satisfaction level for each of the searched singles includes: The satisfaction level of each searched song is determined based on its historical download count, historical favorite count, historical playlist addition count, and historical completion count.

10. The single-song search coarse ranking method according to claim 1, characterized in that, The step of adjusting the tier labels of the negative sample candidate set based on the initial ranking list and the target exposure list to obtain the adjusted negative sample set includes: The last target exposure single located in the initial ranking singles list is determined from the target exposure singles list; The target ranking list is determined based on the target exposure single and all singles in the target exposure single list that precede the target exposure single; Filter all ranked negative samples in the target ranked singles list from the negative sample candidate set, and perform a tier increase operation on all ranked negative samples to obtain a high-tier negative sample set; A low-end negative sample set is determined based on all negative samples in the negative sample candidate set that are not in the target ranking single list, and the high-end negative sample set and the low-end negative sample set are merged to obtain the adjusted negative sample set.

11. The single-song search coarse ranking method according to claim 10, characterized in that, The process of sampling the adjusted negative sample set based on the target user's system single song list and the satisfactory single song list corresponding to the target user's preset satisfactory operation to obtain the target negative sample set includes: Determine the system single song list of the target user and the list of satisfactory single songs corresponding to the target user's preset satisfactory operation; All high-end negative samples located in the system singles list and the satisfactory singles list from the high-end negative sample set are deleted to obtain the deleted high-end negative sample set; A tier increase operation is performed on all low-tier negative samples in the low-tier negative sample set that are located in the system singles list and the satisfactory singles list to obtain an adjusted low-tier negative sample set. The target negative sample set is determined based on the deleted high-end negative sample set and the adjusted low-end negative sample set.

12. The single-song search coarse ranking method according to claim 11, characterized in that, The system's singles list includes the system's favorite singles list, the first system's completed singles list, and the second system's completed singles list; Accordingly, determining the system's singles list for the target user includes: From the system's favorite playlist corresponding to the target user, determine the several favorite songs whose favorite time is closest to the current time, to obtain the system's favorite song list; From the system's completed playlist corresponding to the target user, determine a number of first completed singles whose completion time is closest to the current time, so as to obtain the first system completed singles list; From the system playlist corresponding to the target user, determine a number of second playlists that have been completed more than a preset threshold, so as to obtain the second system playlist.

13. The single-song search coarse ranking method according to claim 11, characterized in that, Determine the list of satisfactory tracks corresponding to the preset satisfactory actions of the target user, including: Obtain a list of satisfactory singles corresponding to the preset satisfactory actions of the target user within a preset historical time period; the preset satisfactory actions include any one or a combination of several of the following: single collection action, single download action, and add to playlist action.

14. The single-song search coarse ranking method according to any one of claims 1 to 13, characterized in that, Before constructing the training set based on the target negative sample set, the process also includes: Based on the target user's historical single-song playback records, determine the type of single song that the target user is interested in; The negative samples corresponding to the type of the song of interest in the target negative sample set are deleted to obtain the target negative sample set after deletion, and the training set is constructed using the target negative sample set after deletion.

15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the single-song search coarse ranking method as described in any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the single-track search coarse ranking method as described in any one of claims 1 to 14.