Sample processing method, device, storage medium and program product

Through meticulous sample grading and multi-level training samples, a negative sample set is constructed for training sorting models, which solves the problem of slow training convergence caused by rough sample grading in the existing technology, and achieves more efficient sorting model training.

CN119782574APending Publication Date: 2025-04-08TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411872787.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, samples are divided into only positive and negative samples, and the sample grading is rough, resulting in slow convergence speed of the sorting model training process.

Method used

By obtaining the search ranking and clicking of media data during the target search process, selecting reference media data, determining the negative sample media data and its label ranking, and constructing a negative sample set for training the sorting model.

Benefits of technology

Through meticulous sample grading and multi-level training samples, the training convergence speed of the sorting model is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782574A_ABST
    Figure CN119782574A_ABST
Patent Text Reader

Abstract

The present disclosure provides a sample processing method, device, storage medium and program product, which belongs to the field of Internet technology. With this technical solution, negative samples are further classified into multiple label rankings, and the sample classification is fine. The sorting model is trained according to the training samples of multiple levels. In this way, the convergence speed of the sorting model training process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a sample processing method, device, storage medium and program product. Background Art

[0002] In scenarios such as search and recommendation that require large-scale sorting, such as searching for songs, the search results need to be roughly sorted first and then finely sorted. The training samples of the sorting model in the rough sorting process include positive samples and negative samples.

[0003] In the related art, a ranking model is trained using pairs of positive samples and negative samples.

[0004] However, using the above sample processing method, samples are only divided into positive samples and negative samples, and the sample classification is rough, resulting in a slow convergence speed of the training process. Summary of the invention

[0005] In order to solve the related technical problems, the present disclosure provides a sample processing method, device and storage medium. The technical solution is as follows:

[0006] In a first aspect, a sample processing method is provided, the method comprising:

[0007] Obtaining search rankings and click status of multiple media data as search results during a target search process;

[0008] Selecting reference media data from the plurality of media data based on the search ranking and the click status;

[0009] Based on the user satisfaction and search ranking of each of the media data and the reference media data, determining negative sample media data and a label ranking of each of the negative sample media data among the plurality of media data;

[0010] A negative sample set is constructed based on the negative sample media data and the label ranking of each of the negative sample media data; the negative sample set is used to train the sorting model, and if the training end condition is met, a sorting model that has completed the training is obtained.

[0011] In a possible implementation, the selecting reference media data from the plurality of media data based on the search ranking and the click status includes:

[0012] Based on the search ranking and click status, reference media data whose display distance from any clicked media data is less than a distance threshold is determined among the unclicked media data, wherein the display distance is used to indicate the difference in search ranking between different media data.

[0013] In a possible implementation, before determining the negative sample media data and the label ranking of each of the negative sample media data in the plurality of media data based on the user satisfaction and the search ranking of each of the media data and the reference media data, the method further includes:

[0014] Acquire media data that meets supplementary conditions as reference media data, wherein the supplementary conditions include: search results that do not belong to the target search process and search results that belong to a historical search process corresponding to a first search keyword; the first search keyword is the search keyword used by the target search process; and the historical search process does not include the target search process.

[0015] In a possible implementation, determining the negative sample media data and the label ranking of each of the negative sample media data in the plurality of media data based on the user satisfaction and search ranking of each of the media data and the reference media data includes:

[0016] Determining first negative sample media data from the plurality of media data based on user satisfaction and search ranking of each of the media data and the reference media data;

[0017] Determine second negative sample media data and third negative sample media data among the plurality of media data;

[0018] Assigning a first ranking level to the first negative sample media data, assigning a second ranking level to the second negative sample media data, and assigning a third ranking level to the third negative sample media data;

[0019] Based on the first ranking level, the second ranking level, and the third ranking level, a label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data is determined.

[0020] In a possible implementation, determining the first negative sample media data from the plurality of media data based on the user satisfaction and search ranking of each of the media data and the reference media data includes:

[0021] Determine, among the plurality of media data, first media data whose user satisfaction and search ranking meet specified conditions;

[0022] An intersection between each of the reference media data and each of the first media data is determined to obtain first negative sample media data.

[0023] In a possible implementation manner, determining the second negative sample media data includes:

[0024] Determine, among the plurality of media data, second media data whose user satisfaction and search ranking do not satisfy the specified condition;

[0025] In each of the second media data, determine the third media data whose playback volume is less than the playback volume threshold and whose collection volume meets the high collection volume condition as the second negative sample media data; and, in each of the reference media data, determine the fourth media data that is outside each of the first negative sample media data and whose collection volume is greater than that of all the third media data as the second negative sample media data.

[0026] In a possible implementation manner, determining the third negative sample media data includes:

[0027] In each of the second media data, fifth media data whose playback volume is less than the playback volume threshold and whose collection volume does not meet the high collection volume condition is determined as the third negative sample media data; and, in each of the reference media data, sixth media data that is outside of each of the first negative sample media data and whose collection volume is less than at least one third media data is determined as the third negative sample media data.

[0028] In a possible implementation, determining, among the plurality of media data, first media data whose user satisfaction and search ranking meet specified conditions includes:

[0029] Among the multiple media data, media data are acquired in descending order of user satisfaction; when the ratio of the sum of the user satisfaction of each acquired media data to the sum of the user satisfaction of the multiple media data exceeds a specified value, the maximum search rank corresponding to each acquired media data is determined; among the multiple media data, media data having a search rank less than or equal to the maximum search rank is determined as the first media data that meets the specified conditions.

[0030] In a possible implementation, determining the label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data based on the first ranking level, the second ranking level, and the third ranking level includes:

[0031] The first ranking level is determined as the label ranking of each of the first negative sample media data, the second ranking level is determined as the label ranking of each of the second negative sample media data, and the third ranking level is determined as the label ranking of each of the third negative sample media data.

[0032] In a possible implementation, determining the label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data based on the first ranking level, the second ranking level, and the third ranking level includes:

[0033] Based on the first ranking level, the second ranking level and the third ranking level, the search ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data is adjusted to obtain the label ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data.

[0034] In a possible implementation, the method further includes:

[0035] Inputting the attribute information and historical operation information of any two negative sample media data in the negative sample set into the sorting model to be trained, and obtaining the sorting scores of the two negative sample media data output by the sorting model to be trained;

[0036] Determining a loss value based on the ranking scores of the two negative sample media data and the label rankings of the two negative sample media data;

[0037] Based on the loss value, the parameters of the sorting model to be trained are adjusted. If the training end condition is met, a sorting model that has completed the training is obtained.

[0038] In a possible implementation, the method further includes:

[0039] Receiving a search request carrying a second search keyword;

[0040] Based on the second search keyword, determining a plurality of media data to be sorted as initial search results;

[0041] Inputting the attribute information and historical operation information of the plurality of media data to be sorted into the trained sorting model to obtain a sorting score corresponding to each media data to be sorted;

[0042] Determine a rough ranking of search results based on the ranking score corresponding to each media data to be ranked;

[0043] Based on the coarsely ranked search results, a final search result corresponding to the search request is determined.

[0044] In a second aspect, a sample processing device is provided, the device comprising:

[0045] An acquisition module, used to acquire search rankings and click conditions of multiple media data as search results during a target search process;

[0046] A selection module, configured to select reference media data from the plurality of media data based on the search ranking and the click status;

[0047] A determination module, configured to determine, among the plurality of media data, negative sample media data and a label ranking of each of the negative sample media data based on the user satisfaction and search ranking of each of the media data and the reference media data;

[0048] A construction module is used to construct a negative sample set based on the negative sample media data and the label ranking of each negative sample media data; the negative sample set is used to train the sorting model, and if the training end condition is met, a sorting model that has completed the training is obtained.

[0049] In a possible implementation, the selection module is used to:

[0050] Based on the search ranking and click status, reference media data whose display distance from any clicked media data is less than a distance threshold is determined among the unclicked media data, wherein the display distance is used to indicate the difference in search ranking between different media data.

[0051] In a possible implementation manner, the device further includes a supplementing module, configured to:

[0052] Acquire media data that meets supplementary conditions as reference media data, wherein the supplementary conditions include: search results that do not belong to the target search process and search results that belong to a historical search process corresponding to a first search keyword; the first search keyword is the search keyword used by the target search process; and the historical search process does not include the target search process.

[0053] In a possible implementation manner, the determining module is used to:

[0054] Determining first negative sample media data from the plurality of media data based on user satisfaction and search ranking of each of the media data and the reference media data;

[0055] Determine second negative sample media data and third negative sample media data among the plurality of media data;

[0056] Assigning a first ranking level to the first negative sample media data, assigning a second ranking level to the second negative sample media data, and assigning a third ranking level to the third negative sample media data;

[0057] Based on the first ranking level, the second ranking level, and the third ranking level, a label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data is determined.

[0058] In a possible implementation manner, the determining module is used to:

[0059] Determine, among the plurality of media data, first media data whose user satisfaction and search ranking meet specified conditions;

[0060] An intersection between each of the reference media data and each of the first media data is determined to obtain first negative sample media data.

[0061] In a possible implementation manner, the determining module is used to:

[0062] Determine, among the plurality of media data, second media data whose user satisfaction and search ranking do not satisfy the specified condition;

[0063] In each of the second media data, determine the third media data whose playback volume is less than the playback volume threshold and whose collection volume meets the high collection volume condition as the second negative sample media data; and, in each of the reference media data, determine the fourth media data that is outside each of the first negative sample media data and whose collection volume is greater than that of all the third media data as the second negative sample media data.

[0064] In a possible implementation manner, the determining module is used to:

[0065] In each of the second media data, fifth media data whose playback volume is less than the playback volume threshold and whose collection volume does not meet the high collection volume condition is determined as the third negative sample media data; and, in each of the reference media data, sixth media data that is outside of each of the first negative sample media data and whose collection volume is less than at least one third media data is determined as the third negative sample media data.

[0066] In a possible implementation manner, the determining module is used to:

[0067] Among the multiple media data, media data are acquired in descending order of user satisfaction; when the ratio of the sum of the user satisfaction of each acquired media data to the sum of the user satisfaction of the multiple media data exceeds a specified value, the maximum search rank corresponding to each acquired media data is determined; among the multiple media data, media data having a search rank less than or equal to the maximum search rank is determined as the first media data that meets the specified conditions.

[0068] In a possible implementation manner, the determining module is used to:

[0069] The first ranking level is determined as the label ranking of each of the first negative sample media data, the second ranking level is determined as the label ranking of each of the second negative sample media data, and the third ranking level is determined as the label ranking of each of the third negative sample media data.

[0070] In a possible implementation manner, the determining module is used to:

[0071] Based on the first ranking level, the second ranking level and the third ranking level, the search ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data is adjusted to obtain the label ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data.

[0072] In a possible implementation, the device further includes a training module, which is used to:

[0073] Inputting the attribute information and historical operation information of any two negative sample media data in the negative sample set into the sorting model to be trained, and obtaining the sorting scores of the two negative sample media data output by the sorting model to be trained;

[0074] Determining a loss value based on the ranking scores of the two negative sample media data and the label rankings of the two negative sample media data;

[0075] Based on the loss value, the parameters of the sorting model to be trained are adjusted. If the training end condition is met, a sorting model that has completed the training is obtained.

[0076] In a possible implementation manner, the device further includes an application module, which is used to:

[0077] Receiving a search request carrying a second search keyword;

[0078] Based on the second search keyword, determining a plurality of media data to be sorted as initial search results;

[0079] Inputting the attribute information and historical operation information of the plurality of media data to be sorted into the trained sorting model to obtain a sorting score corresponding to each media data to be sorted;

[0080] Determine a rough ranking of search results based on the ranking score corresponding to each media data to be ranked;

[0081] Based on the coarsely ranked search results, a final search result corresponding to the search request is determined.

[0082] In a third aspect, a computer device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor executes the computer instructions stored in the memory so that the computer device executes the method provided by the first aspect and its possible implementation methods.

[0083] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods.

[0084] In a fifth aspect, a computer program product is provided. The computer program product includes a computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods.

[0085] In the present disclosure, negative samples are further classified into multiple label rankings, and the sample classification is fine, and the sorting model is trained based on the training samples of multiple levels. In this way, the convergence speed of the sorting model training process is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 is a structural diagram of a server provided by an embodiment of the present disclosure;

[0087] Figure 2 is a flow chart of a sample processing method provided by an embodiment of the present disclosure;

[0088] Figure 3 is a schematic diagram of a display list of search results provided by an embodiment of the present disclosure;

[0089] Figure 4 is a schematic diagram of dividing media data provided by an embodiment of the present disclosure;

[0090] Figure 5 is a schematic diagram of dividing media data provided by an embodiment of the present disclosure;

[0091] Figure 6 is a schematic diagram of dividing media data provided by an embodiment of the present disclosure;

[0092] Figure 7 is a schematic diagram of dividing media data provided by an embodiment of the present disclosure;

[0093] Figure 8 It is a schematic diagram of a processing flow of a training sorting model provided by an embodiment of the present disclosure;

[0094] Fig. 9is a schematic diagram of a processing flow for applying a sorting model provided by an embodiment of the present disclosure;

[0095] Fig.10 It is a schematic diagram of a sample processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0096] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0097] The disclosed embodiment provides a sample processing method. The execution subject of the method may be a server, which may be a single server or a server group. If it is a single server, the server may be responsible for all the processing in the following scheme. If it is a server group, different servers in the server group may be responsible for different processing in the following scheme. The specific processing allocation may be arbitrarily set by the technician according to actual needs, and will not be described in detail here.

[0098] The server may be a background server of an application, and the application may be an audio player application, a video player application, a life service application, a shopping application, etc. The disclosed embodiment takes the background server search process of the music player software as an example to explain the detailed description of the scheme, and other situations are similar to them, which will not be described in detail in this embodiment.

[0099] Figure 1 is a schematic diagram of the structure of a server provided by an embodiment of the present disclosure. From the perspective of hardware composition, the structure of the server can be as follows Figure 1 As shown, it includes a processor 110 , a memory 120 and a communication component 130 .

[0100] The processor 110 may be a central processing unit (CPU) or a system on chip (SoC), etc. The processor 110 may be used to process various operation instructions, for example, to obtain the search ranking and click status of multiple media data as search results during a target search process.

[0101] The memory 120 may include various volatile memories or non-volatile memories, such as a solid state disk (SSD), a dynamic random access memory (DRAM), etc. The memory 120 may be used to store initial data, intermediate data, and result data used in the relevant processing process, for example, to store the search ranking and click status of multiple media data as search results in the target search process.

[0102] The communication component 130 may be a wired network connector, ultra wide band (UWB), wireless fidelity (WiFi) module, Bluetooth module, cellular network communication module, etc. The communication component 130 may be used to transmit data with other devices, which may be other servers or terminals, etc. For example, to obtain the user's click status on the media data.

[0103] In scenarios such as search and recommendation that require large-scale sorting, such as searching for songs, the search results need to be roughly sorted first and then finely sorted. The training samples of the sorting model include positive samples and negative samples. In the related art, the sorting model is trained by pairing positive samples and negative samples. However, using the above sample processing method, the samples are only divided into positive samples and negative samples, and the sample classification is rough, resulting in a slow convergence speed of the training process.

[0104] In order to solve the above technical problems, the present disclosure provides a sample processing method, and the corresponding processing flow can be as follows: Figure 2 As shown, the following steps are included:

[0105] 201 : Obtain search rankings and click status of multiple media data as search results during a target search process.

[0106] Users can search in various applications to obtain desired search results (the present disclosure embodiment uses a music application as an example for detailed description, other situations are similar and will not be repeated here). During the search process, after the user enters the search term, a display list of search results will be displayed on the display page of the application. There are multiple media data in the display list, and the user can operate in the display list, for example, clicking on a piece of media data as a search result can play the media data.

[0107] The click condition includes being clicked or not being clicked. The display list of search results can be, for example, Figure 3 As shown, the user can operate the search results in the display list, for example, click on a certain media data to play the media data. The click status of media data E is clicked, and the click status of media data A, B, C, D, F, G, and H is not clicked. The display ranking is the display order of each media data in the display list. For example, the display ranking of media data C is 3, and the display ranking of media data D is 4.

[0108] 202 : Select reference media data from multiple media data based on the search ranking and click status.

[0109] Based on the media data whose click condition is clicked, a positive sample set is constructed. The positive sample set is obtained by sampling the media data whose click condition is clicked. The technician can pre-set the number of media data in the positive sample set. For example Figure 3 As shown, media data E is a piece of media data in the positive sample set.

[0110] Based on the display ranking and click status of multiple media data, the unclicked media data D noclick In the process, reference media data whose display distance from any clicked media data is less than a distance threshold is determined to construct a negative sample set. Among the unclicked media data, media data whose display distance from any clicked media data is less than a distance threshold is sampled, and the display distance is used to indicate the difference in search ranking between different media data. For example, Figure 3 As shown, media data E is a media data in the positive sample set, and the distance threshold is 2. Then the reference media data is C, D, F, and G. Sampling is performed in the reference media data to obtain the negative sample set D in the exposure list. 0expose The number of samples can be preset by the technician, or can be the same as the number of clicked media data.

[0111] Optionally, the positive sample set and the negative sample set can also be determined based only on the display ranking, and the positive sample set is constructed based on the media data whose display ranking is less than the preset positive sample display ranking threshold, and the negative sample set is constructed based on the media data whose display ranking is greater than the preset negative sample display ranking threshold. The positive sample display ranking threshold and the negative sample display ranking threshold can be preset by a technician, and the positive sample display ranking threshold is less than the negative sample display ranking threshold. For example, if the positive sample display ranking threshold is 50 and the negative sample display ranking threshold is 200, then sampling is performed in the media data whose display ranking is less than 50 to obtain the positive sample set, and sampling is performed in the media data whose display ranking is greater than 200 to obtain the negative sample set. The number of media data in the positive sample set and the negative sample set can be preset by a technician.

[0112] Optionally, in addition to the reference media data obtained above, media data that meets supplementary conditions can also be obtained as reference media data, where the supplementary conditions include: search results that do not belong to the target search process and search results that belong to the historical search process corresponding to the first search keyword. The first search keyword is the search keyword used in the target search process, and the historical search process does not include the target search process. For example, for a certain search, determine the search results of the historical search process corresponding to the first search keyword, select the search with the most media data from all the search results, and record this search result as l q max , and then in l q maxRemove the media data contained in the search results and get D qino expose , and then in D qino expose The reference media data D is obtained by sampling Ono expose .

[0113] The reference media data D Ono expose And the negative sample set D of the above exposure list Oexpose The media data in the media data are used as reference media data D can0 .

[0114] 203 : Determine negative sample media data and a label ranking of each negative sample media data among multiple media data based on the user satisfaction and search ranking of each media data and the reference media data.

[0115] First, based on the user satisfaction and search ranking of each media data and the reference media data, first negative sample media data is determined from a plurality of media data.

[0116] The method of determining the first negative sample media data among multiple media data is as follows:

[0117] Determine the first media data among multiple media data whose user satisfaction and search ranking meet the specified conditions; determine each reference media data D can0 With each first media data D top The intersection of , obtains the first negative sample media data D top high 0 , reference media data D can0 In the first negative sample media data D top high 0 The media data outside is denoted as D top low 0 ,For example Figure 4 shown.

[0118] Satisfying the specified condition means that: among multiple media data, media data are obtained in descending order of user satisfaction, and when the ratio of the sum of the user satisfaction of each acquired media data to the sum of the user satisfaction of multiple media data exceeds a specified value (which can be preset by a technician, such as 75%, 80%, etc.), the maximum search ranking corresponding to each acquired media data is determined, and among the multiple media data, the media data whose search ranking is less than or equal to the maximum search ranking is determined as the first media data D that satisfies the specified condition. top .

[0119] For example, among multiple media data, media data are obtained in descending order of user satisfaction. When the ratio of the sum of the user satisfaction of each media data obtained to the sum of the user satisfaction of multiple media data exceeds 75% of the specified value, the largest search ranking is 9. Among the multiple media data, the media data with the search ranking of the first 9 is determined as the first media data D that meets the specified condition. top .

[0120] Then, the second negative sample media data is determined from the multiple media data. The corresponding method may be:

[0121] Among the multiple media data, second media data whose user satisfaction and search ranking do not meet the specified condition is determined, and the specified condition is the same as the above specified condition, that is, the second media data D not top Not D top ,For example Figure 5 As shown. In each second media data D not top There may be media data with low playback volume D low play , low-playing media data D low play The confidence of historical operation information such as completion is low due to the small number of playbacks. It can be determined that the playback volume is less than the playback volume threshold, and the collection volume meets the high collection volume condition. rank high , as the second negative sample media data. In addition, in each reference media data, a fourth media data D is determined that is outside each first negative sample media data and has a collection amount greater than all third media data. high uf change , as the second negative sample media data, for example Figure 6 and Figure 7 shown.

[0122] Among them, the playback volume threshold and high collection volume condition can be pre-set by technical personnel. For example, the playback volume threshold is 50, 100, etc., and the high collection volume condition is that the collection volume within a fixed time period is greater than the collection volume threshold. The fixed time period and the collection volume threshold can be pre-set by technical personnel. For example, the fixed time period is 3 days, one week, etc., and the collection volume threshold is 20, 50, etc.

[0123] Then, the third negative sample media data is determined from the multiple media data. The corresponding method may be:

[0124] In each second media data, determine the fifth media data D whose playback volume is less than the playback volume threshold and whose collection volume does not meet the high collection volume condition rank low , as the third negative sample media data, for example Figure 6 Furthermore, in each reference media data, a sixth media data is determined that is outside each first negative sample media data and has a collection amount that is less than at least one third media data, for example Figure 7As shown, it is used as the third negative sample media data.

[0125] Finally, the first negative sample media data is assigned a first ranking level, the second negative sample media data is assigned a second ranking level, and the third negative sample media data is assigned a third ranking level. Based on the first ranking level, the second ranking level, and the third ranking level, the label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data is determined.

[0126] Here are two ways to determine label ranking:

[0127] Method 1: The first ranking level can be determined as the label ranking of each first negative sample media data, the second ranking level can be determined as the label ranking of each second negative sample media data, and the third ranking level can be determined as the label ranking of each third negative sample media data. For example, the label ranking of the first negative sample media data is 2, the label ranking of the second negative sample media data is 1, and the label ranking of the third negative sample media data is 0.

[0128] Method 2: Based on the first ranking level, the second ranking level, and the third ranking level, the search ranking of each first negative sample media data, the second negative sample media data, and the third negative sample media data is adjusted to obtain the label ranking of each first negative sample media data, the second negative sample media data, and the third negative sample media data. For example, the search ranking and ranking level of the negative sample media data are weighted, and then the label ranking of each negative sample media data is determined based on the sorting of the weighted values.

[0129] 204 , construct a negative sample set based on the negative sample media data and the label ranking of each negative sample media data.

[0130] The negative sample set includes first negative sample media data, second negative sample media data, third negative sample media data and corresponding label rankings.

[0131] The negative sample set is used to train the sorting model. If the training end condition is met, a sorting model that has completed the training is obtained. The training process of the sorting model is described in detail in the following processing flow and will not be repeated here.

[0132] In one possible implementation, the process of training the sorting model can be as follows: Figure 8 As shown, the following steps are included:

[0133] 801 , inputting attribute information and historical operation information of any two negative sample media data in the negative sample set into the sorting model to be trained, and obtaining sorting scores of the two negative sample media data output by the sorting model to be trained.

[0134] For example, the attribute information and the second operation information of two media data are respectively input into the sorting model to be trained, and the sorting scores of the two media data output by the sorting model to be trained are 90 and 70 respectively.

[0135] 802 : Determine a loss value based on the ranking scores of the two negative sample media data and the label rankings of the two negative sample media data.

[0136] The smaller ranking score of the two media data is subtracted from the larger ranking score to obtain the difference between the two ranking scores. The difference can be normalized to obtain a normalized sample difference. For the benchmark label rankings of the two media data, if the benchmark label rankings of the two media data are different, the benchmark difference is determined to be 1; if the benchmark label rankings of the two media data are the same, the benchmark difference is determined to be 0. The benchmark difference is normalized to obtain a normalized benchmark difference. The normalized sample difference and the normalized benchmark difference are input into the loss function to obtain a loss value.

[0137] Optionally, the benchmark label ranking may correspond to a benchmark ranking score, and the correspondence between the label ranking and the ranking score may be pre-stored, such as shown in Table 1, and the benchmark ranking score corresponding to the benchmark label ranking is determined in the correspondence table. For any two media data, the benchmark ranking score is determined according to the benchmark label ranking, and for each media data, the ranking score output by the ranking model to be trained and the benchmark ranking score are input into the loss function to obtain the loss value.

[0138] Table 1

[0139] Ranking score Tag ranking 5 2 7 1 10 0 …… ……

[0140] 803. Based on the loss value, adjust the parameters of the sorting model to be trained. If the training end condition is met, a sorting model that has completed training is obtained.

[0141] Based on the loss value, the parameters of the sorting model to be trained are adjusted until the training end conditions are met, and a sorting model that has completed training is obtained.

[0142] The ranking model is a machine learning model, such as a decision tree model, a neural network model, etc.

[0143] The training end condition can be preset by the technicians, for example, the training end condition can be reaching the specified number of training times, or the loss value is less than the preset threshold value in N consecutive training times, etc. The above training parameter adjustment process is performed using the attribute information and historical operation information of each media data in the positive sample set and the negative sample set until the training end condition is met, and the adjusted sorting model is determined as the sorting model that has completed the training.

[0144] In one possible implementation, the process of applying the ranking model may be, for example, Fig. 9 As shown, the following steps are included:

[0145] 901, receiving a search request carrying a second search keyword.

[0146] The server receives a search request, which carries a second search keyword input by a user.

[0147] 902 : Based on the second search keyword, determine a plurality of media data to be sorted as initial search results.

[0148] Based on the second search keyword, the database is searched for media data whose similarity to the second search keyword is less than a similarity threshold, as multiple media data to be sorted in the initial search results. The similarity threshold can be preset by a technician, such as 95%, 90%, etc.

[0149] 903 , input the attribute information and historical operation information of the plurality of media data to be sorted into the trained sorting model to obtain a sorting score corresponding to each media data to be sorted.

[0150] The attribute information and historical operation information of the above-mentioned multiple media data to be sorted are input into the trained sorting model to obtain the sorting score of each media data output by the trained sorting model. For example, there are 5 media data to be sorted, A, B, C, D, and E, and the obtained sorting scores are 2, 5, 3, 8, and 6 respectively.

[0151] 904 : Determine a rough sorting search result based on the sorting score corresponding to each media data to be sorted.

[0152] The coarse sorting search results are determined in descending order of the sorting scores. For example, there are five media data to be sorted, A, B, C, D, and E, and the sorting scores are 2, 5, 3, 8, and 6 respectively. Then the coarse sorting search results are D, E, B, C, and A.

[0153] 905: Determine a final search result corresponding to the search request based on the roughly sorted search results.

[0154] After determining the rough ranking search results, select the media data whose ranking is less than the ranking threshold in the rough ranking search results, where the ranking threshold can be pre-set by the technician, such as 200, 250, etc., and perform fine ranking on it. The fine ranking result is the final search result.

[0155] In the disclosed embodiment, negative samples are further classified into multiple label rankings, and the sample classification is fine, and the sorting model is trained based on the training samples of multiple levels. In this way, the convergence speed of the sorting model training process is improved.

[0156] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0157] The present disclosure also provides a sample processing device, such as Fig.10 As shown, the device comprises:

[0158] The acquisition module 1010 is used to acquire the search ranking and click status of multiple media data as search results during the target search process, and can specifically implement the processing function of the above step 201 and other implicit steps.

[0159] The selection module 1020 is used to select reference media data from multiple media data based on the search ranking and click status, and can specifically implement the processing function of the above step 202 and other implicit steps.

[0160] The determination module 1030 is used to determine the negative sample media data and the label ranking of each negative sample media data in multiple media data based on the user satisfaction and search ranking of each media data and the reference media data. Specifically, it can realize the processing function of the above step 203 and other implicit steps.

[0161] The construction module 1040 is used to construct a negative sample set based on the negative sample media data and the label ranking of each negative sample media data; the negative sample set is used to train the sorting model, and if the training end condition is met, a sorting model that has completed the training is obtained. Specifically, the processing function of the above step 204 and other implicit steps can be realized.

[0162] In a possible implementation, the selection module 1020 is used to: based on the search ranking and the click status, determine, among the unclicked media data, reference media data whose display distance from any clicked media data is less than a distance threshold, wherein the display distance is used to indicate the difference in search ranking between different media data. Specifically, the processing function of the above step 202 and other implicit steps can be implemented.

[0163] In a possible implementation, the device further includes a supplementing module 1050, which is used to: obtain media data that meets the supplementing conditions as reference media data, wherein the supplementing conditions include: search results that do not belong to the target search process and belong to the search results of the historical search process corresponding to the first search keyword; the first search keyword is the search keyword used in the target search process; the historical search process does not include the target search process. Specifically, the processing function of the above step 202 and other implicit steps can be implemented.

[0164] In a possible implementation, the determination module 1030 is used to: determine the first negative sample media data among multiple media data based on the user satisfaction and search ranking of each media data, and the reference media data; determine the second negative sample media data among multiple media data, and determine the third negative sample media data; assign a first ranking level to the first negative sample media data, assign a second ranking level to the second negative sample media data, and assign a third ranking level to the third negative sample media data; determine the label ranking of each first negative sample media data, second negative sample media data, and third negative sample media data based on the first ranking level, the second ranking level, and the third ranking level. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0165] In a possible implementation, the determination module 1030 is used to: determine, among multiple media data, first media data whose user satisfaction and search ranking meet specified conditions; determine the intersection of each reference media data and each first media data to obtain first negative sample media data. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0166] In a possible implementation, the determination module 1030 is used to: determine, among multiple media data, second media data whose user satisfaction and search ranking do not meet the specified conditions; determine, among each second media data, third media data whose playback volume is less than the playback volume threshold and whose collection volume meets the high collection volume condition as the second negative sample media data; and, among each reference media data, determine fourth media data that is outside each first negative sample media data and whose collection volume is greater than all third media data as the second negative sample media data. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0167] In a possible implementation, the determination module 1030 is used to: determine, in each second media data, fifth media data whose playback volume is less than the playback volume threshold and whose collection volume does not meet the high collection volume condition as the third negative sample media data; and, in each reference media data, determine sixth media data that is outside each first negative sample media data and whose collection volume is less than at least one third media data as the third negative sample media data. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0168] In a possible implementation, the determination module 1030 is used to: obtain media data in the order of user satisfaction from large to small among multiple media data, and when the ratio of the sum of user satisfaction of each acquired media data to the sum of user satisfaction of multiple media data exceeds a specified value, determine the maximum search ranking corresponding to each acquired media data; and determine the media data whose search ranking is less than or equal to the maximum search ranking among multiple media data as the first media data that meets the specified condition. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0169] In a possible implementation, the determination module 1030 is used to: determine the first ranking level as the label ranking of each first negative sample media data, determine the second ranking level as the label ranking of each second negative sample media data, and determine the third ranking level as the label ranking of each third negative sample media data. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0170] In a possible implementation, the determination module 1030 is used to adjust the search ranking of each first negative sample media data, second negative sample media data, and third negative sample media data based on the first ranking level, the second ranking level, and the third ranking level to obtain the label ranking of each first negative sample media data, the second negative sample media data, and the third negative sample media data. Specifically, the processing function of the above step 203 and other implicit steps can be implemented.

[0171] In a possible implementation, the device further includes a training module 660, which is used to: input the attribute information and historical operation information of any two negative sample media data in the negative sample set into the sorting model to be trained, and obtain the sorting scores of the two negative sample media data output by the sorting model to be trained; determine the loss value based on the sorting scores of the two negative sample media data and the label rankings of the two negative sample media data; adjust the parameters of the sorting model to be trained based on the loss value, and obtain a sorting model that has completed training if the training end condition is met. Specifically, the processing functions of the above steps 801, 802, and 803, as well as other implicit steps, can be realized.

[0172] In a possible implementation, the device also includes an application module 670, which is used to: receive a search request carrying a second search keyword; determine multiple media data to be sorted as initial search results based on the second search keyword; input the attribute information and historical operation information of the multiple media data to be sorted into the trained sorting model to obtain the sorting score corresponding to each media data to be sorted; determine the rough sorting search results based on the sorting score corresponding to each media data to be sorted; determine the final search results corresponding to the search request based on the rough sorting search results. Specifically, the processing functions of the above steps 901, 902, 903, 904, and 905, as well as other implicit steps, can be implemented.

[0173] The acquisition module 1010, selection module 1020, determination module 1030, construction module 1040, supplementation module 1050, training module 1060, and application module 1070 may be implemented by a processor, or by a processor in conjunction with a memory and a display.

[0174] In the disclosed embodiment, negative samples are further classified into multiple label rankings, and the sample classification is fine, and the sorting model is trained based on the training samples of multiple levels. In this way, the convergence speed of the sorting model training process is improved.

[0175] It should be noted that: the sample processing device provided in the above embodiment only uses the division of the above functional modules as an example when performing sample processing. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the sample processing device provided in the above embodiment and the sample processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0176] The embodiments of the present disclosure also provide a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD (digital video disk)), or a semiconductor medium (e.g., a solid-state hard disk), etc. The computer-readable storage medium includes instructions that instruct the computing device to perform a business processing method, or instruct the computing device to perform a sample processing method.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A sample processing method, characterized in that: The method comprises: Obtaining search rankings and click status of multiple media data as search results during a target search process; Selecting reference media data from the plurality of media data based on the search ranking and the click status; Based on the user satisfaction and search ranking of each of the media data and the reference media data, determining negative sample media data and a label ranking of each of the negative sample media data among the plurality of media data; A negative sample set is constructed based on the negative sample media data and the label ranking of each of the negative sample media data; the negative sample set is used to train the sorting model, and if the training end condition is met, a sorting model that has completed the training is obtained.

2. The method according to claim 1, characterized in that: The selecting reference media data from the plurality of media data based on the search ranking and the click situation includes: Based on the search ranking and click status, reference media data whose display distance from any clicked media data is less than a distance threshold is determined among the unclicked media data, wherein the display distance is used to indicate the difference in search ranking between different media data.

3. The method according to claim 1 or 2, characterized in that: Before determining the negative sample media data and the label ranking of each of the negative sample media data in the plurality of media data based on the user satisfaction and search ranking of each of the media data and the reference media data, the method further comprises: Acquire media data that meets supplementary conditions as reference media data, wherein the supplementary conditions include: search results that do not belong to the target search process and search results that belong to a historical search process corresponding to a first search keyword; the first search keyword is the search keyword used by the target search process; and the historical search process does not include the target search process.

4. The method according to claim 1, characterized in that: The determining, based on the user satisfaction and search ranking of each of the media data and the reference media data, of negative sample media data and the label ranking of each of the negative sample media data in the plurality of media data comprises: Determining first negative sample media data from the plurality of media data based on user satisfaction and search ranking of each of the media data and the reference media data; Determine second negative sample media data and third negative sample media data among the plurality of media data; Assigning a first ranking level to the first negative sample media data, assigning a second ranking level to the second negative sample media data, and assigning a third ranking level to the third negative sample media data; Based on the first ranking level, the second ranking level, and the third ranking level, a label ranking of each of the first negative sample media data, the second negative sample media data, and the third negative sample media data is determined.

5. The method according to claim 4, characterized in that The determining, based on the user satisfaction and search ranking of each of the media data and the reference media data, of first negative sample media data from the plurality of media data comprises: Determine, among the plurality of media data, first media data whose user satisfaction and search ranking meet specified conditions; An intersection between each of the reference media data and each of the first media data is determined to obtain first negative sample media data.

6. The method according to claim 5, characterized in that The determining of the second negative sample media data includes: Determine, among the plurality of media data, second media data whose user satisfaction and search ranking do not satisfy the specified condition; In each of the second media data, determine the third media data whose playback volume is less than the playback volume threshold and whose collection volume meets the high collection volume condition as the second negative sample media data; and, in each of the reference media data, determine the fourth media data that is outside each of the first negative sample media data and whose collection volume is greater than that of all the third media data as the second negative sample media data.

7. The method according to claim 6, characterized in that The determining of the third negative sample media data includes: In each of the second media data, fifth media data whose playback volume is less than the playback volume threshold and whose collection volume does not meet the high collection volume condition is determined as the third negative sample media data; and, in each of the reference media data, sixth media data that is outside of each of the first negative sample media data and whose collection volume is less than at least one third media data is determined as the third negative sample media data.

8. The method according to claim 5, characterized in that The step of determining, among the plurality of media data, the first media data whose user satisfaction and search ranking meet the specified conditions comprises: Among the multiple media data, the media data are acquired in descending order of user satisfaction, and when the ratio of the sum of the user satisfaction of each acquired media data to the sum of the user satisfaction of the multiple media data exceeds a specified value, the maximum search ranking corresponding to each acquired media data is determined; Among the multiple media data, media data with a search rank less than or equal to the maximum search rank is determined as the first media data that meets the specified condition.

9. The method according to claim 4, characterized in that The determining, based on the first ranking level, the second ranking level, and the third ranking level, of the label rankings of the first negative sample media data, the second negative sample media data, and the third negative sample media data includes: The first ranking level is determined as the label ranking of each of the first negative sample media data, the second ranking level is determined as the label ranking of each of the second negative sample media data, and the third ranking level is determined as the label ranking of each of the third negative sample media data.

10. The method according to claim 4, characterized in that The determining, based on the first ranking level, the second ranking level, and the third ranking level, of the label rankings of the first negative sample media data, the second negative sample media data, and the third negative sample media data includes: Based on the first ranking level, the second ranking level and the third ranking level, the search ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data is adjusted to obtain the label ranking of each of the first negative sample media data, the second negative sample media data and the third negative sample media data.

11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Inputting the attribute information and historical operation information of any two negative sample media data in the negative sample set into the sorting model to be trained, and obtaining the sorting scores of the two negative sample media data output by the sorting model to be trained; Determining a loss value based on the ranking scores of the two negative sample media data and the label rankings of the two negative sample media data; Based on the loss value, the parameters of the sorting model to be trained are adjusted. If the training end condition is met, a sorting model that has completed the training is obtained.

12. The method according to claim 11, characterized in that The method further comprises: Receiving a search request carrying a second search keyword; Based on the second search keyword, determining a plurality of media data to be sorted as initial search results; Inputting the attribute information and historical operation information of the plurality of media data to be sorted into the trained sorting model to obtain a sorting score corresponding to each media data to be sorted; Determine a rough ranking of search results based on the ranking score corresponding to each media data to be ranked; Based on the coarsely ranked search results, a final search result corresponding to the search request is determined.

13. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory is used to store computer instructions; the processor executes the computer instructions stored in the memory, so that the computer device executes the method described in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1 to 12.

15. A computer program product, characterized in that The computer program product comprises a computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1 to 12.