Media resource sorting method, media resource sorting model training method, device and equipment

By adjusting the coarse-ranking parameters of media resources and training the ranking model, and by utilizing virtual resource features and perturbation factors, the problem of inconsistency between coarse-ranking and fine-ranking results was solved, thereby improving the accuracy of media resource display.

CN115357815BActive Publication Date: 2025-11-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211015221.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-11-18
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In existing technologies, there is insufficient consistency between coarse and fine sorting results, making it difficult to guarantee the accuracy of media resources.

Method used

By acquiring the primary features of media resources and the features of virtual resources, the coarse ranking parameters are adjusted to improve their correlation with the features of virtual resources. The ranking model is then trained in conjunction with perturbation factors to ensure the consistency between the coarse ranking results and the fine ranking results.

Benefits of technology

It improved the accuracy of media resource display, enhanced the matching between coarse and fine layout results, and improved the accuracy of media resources returned by the terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357815B_ABST
    Figure CN115357815B_ABST
Patent Text Reader

Abstract

The application provides a media resource sorting method, a sorting model training method, an apparatus and a device, and belongs to the technical field of artificial intelligence. The method comprises: in response to a media resource display request of a terminal, obtaining a plurality of media resources; for each media resource in the plurality of media resources, obtaining a first rough sorting parameter based on a first feature of the media resource; obtaining a second rough sorting parameter based on the first feature of the media resource and a virtual resource feature, the second rough sorting parameter being positively correlated with the virtual resource feature; adjusting the first rough sorting parameter based on the second rough sorting parameter to obtain a target rough sorting parameter of the media resource, the target rough sorting parameter being positively correlated with the second rough sorting parameter; and performing rough sorting on the plurality of media resources based on the target rough sorting parameters of the plurality of media resources. The consistency between the rough sorting result and the fine sorting result obtained based on the target rough sorting parameter is high, thereby improving the accuracy of the media resources returned to the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method for sorting media resources, a method for training a sorting model, an apparatus, and a device. Background Technology

[0002] When a user views an application, the platform pushes media resources to the user, displaying these resources at a specific exposure position within the application. The selection of which media resource to push to which exposure position is typically achieved through coarse-ranking and fine-ranking processes. In coarse-ranking, multiple media resources are ranked based on their parameters, resulting in a coarse-ranked list. In fine-ranking, a target number of media resources from the coarse-ranked list are selected, and the estimated cost per mile (ecpm) value for each resource is determined. This ecpm value is then used as the parameter for fine-ranking, resulting in a final ranking. Finally, the media resources ranked at the top of the preset positions are returned to the user for display. High consistency between the coarse-ranking and fine-ranking results is crucial for improving the accuracy of the media resources returned to the user; therefore, ensuring consistency between the two is extremely important. Summary of the Invention

[0003] This application provides a method for sorting media resources, a method for training a sorting model, an apparatus, and a device. The coarse sorting results obtained based on target coarse sorting parameters show high consistency with the fine sorting results, thereby improving the accuracy of the media resources returned to the terminal. The technical solution is as follows:

[0004] On the one hand, a method for sorting media resources is provided, the method comprising:

[0005] In response to the terminal's request to display media resources, multiple media resources are retrieved;

[0006] For each media resource among multiple media resources, a first coarse ranking parameter is obtained based on the first feature of the media resource. The first feature includes the user object feature of the terminal, the media resource feature, and the display scenario feature of the media resource. The user object feature is used to describe the user of the terminal, the media resource feature is used to describe the media resource, and the display scenario feature is used to describe the display scenario of the media resource.

[0007] Based on the first feature of the media resource and the virtual resource feature, a second coarse ranking parameter is obtained. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is transformed in the display scenario. The second coarse ranking parameter is positively correlated with the virtual resource feature.

[0008] Based on the second coarse ranking parameter, the first coarse ranking parameter is adjusted to obtain the target coarse ranking parameter of the media resource. The target coarse ranking parameter is positively correlated with the second coarse ranking parameter. The target coarse ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scene.

[0009] Based on the target coarse ranking parameters of the multiple media resources, the multiple media resources are coarsely ranked.

[0010] On the other hand, a method for training a ranking model is provided, the method comprising:

[0011] Multiple first sample feature groups are obtained. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource.

[0012] For each first sample feature group, the virtual resource features of the first media resource are adjusted based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0013] A point-level ranking model is obtained by iterative training based on multiple sets of first sample pairs. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

[0014] On the other hand, a method for training a ranking model is provided, the method comprising:

[0015] Multiple third sample feature groups are obtained. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource.

[0016] For each third sample feature group, based on the perturbation factor, the virtual resource features of the first media resource are adjusted to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0017] For each third sample feature group, the virtual resource features of the second media resource are adjusted based on the perturbation factor to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource.

[0018] A hierarchical ranking model is obtained by iterative training based on multiple sets of second sample pairs. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources.

[0019] On the other hand, a media resource sorting device is provided, the device comprising:

[0020] The media resource acquisition module is used to acquire multiple media resources in response to the terminal's media resource display request;

[0021] The first coarse ranking parameter determination module is used to obtain a first coarse ranking parameter for each media resource among multiple media resources based on a first feature of the media resource. The first feature includes the user object feature of the terminal, the media resource feature, and the display scenario feature of the media resource. The user object feature is used to describe the user of the terminal, the media resource feature is used to describe the media resource, and the display scenario feature is used to describe the display scenario of the media resource.

[0022] The second coarse ranking parameter determination module is used to obtain a second coarse ranking parameter based on the first feature of the media resource and the virtual resource feature. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is transformed in the display scenario. The second coarse ranking parameter is positively correlated with the virtual resource feature.

[0023] The target coarse-ranking parameter determination module is used to adjust the first coarse-ranking parameter based on the second coarse-ranking parameter to obtain the target coarse-ranking parameter of the media resource. The target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter. The target coarse-ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scene.

[0024] The media resource sorting module is used to perform coarse sorting of the multiple media resources based on the target coarse sorting parameters of the multiple media resources.

[0025] In some embodiments, the coarse ranking parameters of the media resources are obtained based on a ranking model, which includes an embedding layer, a first network, and a second network. The first coarse ranking parameter determination module is used for:

[0026] The first feature is input into the ranking model, and a first feature vector is obtained based on the embedding layer;

[0027] The first feature vector of the first feature is input into the first network, and the first feature vector is subjected to dot product processing and nonlinear transformation to obtain the first coarse-sorting parameters.

[0028] The second coarse-sorting parameter determination module is used for:

[0029] The virtual resource features are input into the ranking model, and a virtual resource feature vector is obtained based on the embedding layer;

[0030] The first feature vector is input into the second network to obtain adaptive coefficients. The product of the adaptive coefficients and the virtual resource feature vector is output as the second coarse-ranking parameter. The adaptive coefficients are used to represent the difference between the first coarse-ranking parameter and the second coarse-ranking parameter.

[0031] In some embodiments, the target coarse-sorting parameter determination module is configured to:

[0032] The sum of the first coarse-sorting parameters and the second coarse-sorting parameters is obtained.

[0033] The target function is called to process the sum value to obtain the target coarse-sort parameters.

[0034] In some embodiments, the media resource corresponds to a plurality of candidate virtual resource values, wherein the plurality of candidate virtual resource values ​​are virtual resource values ​​corresponding to a plurality of conversion targets of the media resource; the apparatus further includes:

[0035] The feature determination module is used to obtain the current status information of the media resource, obtain the target virtual resource value corresponding to the current status information from the plurality of candidate virtual resource values, and use the target virtual resource value as the virtual resource feature.

[0036] On the other hand, a training apparatus for a ranking model is provided, the apparatus comprising:

[0037] The sample feature group acquisition module is used to acquire multiple first sample feature groups. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource.

[0038] The feature adjustment module is used to adjust the virtual resource features of the first media resource based on a perturbation factor for each first sample feature group to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0039] The point-level ranking model training module is used to iteratively train based on multiple sets of first sample pairs to obtain a point-level ranking model. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

[0040] In some embodiments, the point-level ranking model training module is used for:

[0041] Based on the multiple sets of first sample pairs, the following steps are iteratively performed to train the point-level ranking model until the iteration stopping condition is met:

[0042] In any iteration, the first sample feature group is input into the point-level ranking model, and the first prediction parameter is output. Based on the first prediction parameter and the first true parameter, the first loss value is obtained. The first prediction parameter represents the ranking competitiveness of the first media resource among multiple media resources.

[0043] The second sample feature group is input into the point-level ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The first intermediate prediction parameter corresponding to the second feature and the fourth feature is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The first intermediate prediction parameter represents the ranking competitiveness of the first simulated media resource among multiple media resources. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. The estimated cost refers to the estimated cost per thousand impressions of the media resource.

[0044] Based on the first loss value and the second loss value, a first target loss value is determined, and the model parameters of the point-level sorting model in this iteration are adjusted based on the first target loss value.

[0045] In some embodiments, the point-level ranking model includes an embedding layer and a neural network layer, and the point-level ranking model training module is used for:

[0046] The second sample feature group is input into the point-level ranking model, and based on the embedding layer, the second feature vector of the second feature, the third feature vector of the third feature, and the fourth feature vector of the fourth feature are obtained.

[0047] The second feature vector and the third feature vector are input into the neural network layer to obtain the first prediction parameter. The second feature vector and the fourth feature vector are input into the neural network layer to obtain the first intermediate prediction parameter.

[0048] In some embodiments, the point-level ranking model training module is used for:

[0049] The first target loss value is obtained by weighted summation of the first loss value and the second loss value.

[0050] In some embodiments, the apparatus further includes:

[0051] The parameter configuration module is used to configure the second real parameter as a first sub-parameter when the virtual resource characteristics of the first media resource are reduced based on the disturbance factor. The first sub-parameter indicates that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource.

[0052] The parameter configuration module is further configured to configure the second real parameter as a second sub-parameter when the virtual resource characteristics of the first media resource are not changed based on the disturbance factor, wherein the second sub-parameter indicates that the estimated cost of the first media resource is the same as the estimated cost of the first simulated media resource.

[0053] The parameter configuration module is further configured to configure the second real parameter as a third sub-parameter when the virtual resource characteristics of the first media resource are increased based on the disturbance factor, wherein the third sub-parameter indicates that the estimated cost of the first media resource is less than the estimated cost of the first simulated media resource.

[0054] On the other hand, a training apparatus for a ranking model is provided, the apparatus comprising:

[0055] The sample feature group acquisition module is used to acquire multiple third sample feature groups. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource.

[0056] The feature adjustment module is used to adjust the virtual resource features of the first media resource based on a perturbation factor for each third sample feature group to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0057] The feature adjustment module is also used to adjust the virtual resource features of the second media resource based on the perturbation factor for each third sample feature group to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource.

[0058] The hierarchical ranking model training module is used to iteratively train based on multiple sets of second sample pairs to obtain the hierarchical ranking model. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources.

[0059] In some embodiments, the hierarchical ranking model training module is configured to:

[0060] Based on the multiple sets of second sample pairs, the following steps are iteratively performed to train the pairwise ranking model until the iteration stopping condition is met:

[0061] In any iteration, the third sample feature group is input into the hierarchical ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The second intermediate prediction parameter corresponding to the second feature and the fifth feature is output. Based on the first prediction parameter and the second intermediate prediction parameter, the third prediction parameter is obtained. Based on the third prediction parameter and the third true parameter, the third loss value is obtained. The third prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the second media resource. The estimated cost refers to the estimated cost per thousand impressions of the media resource.

[0062] The second sample feature group is input into the hierarchical ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The first intermediate prediction parameter corresponding to the second feature and the fourth feature is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource.

[0063] The fourth sample feature group is input into the hierarchical ranking model, and the second intermediate prediction parameter corresponding to the second feature and the fifth feature is output. The third intermediate prediction parameter corresponding to the second feature and the sixth feature is output. Based on the second intermediate prediction parameter and the third intermediate prediction parameter, the fourth prediction parameter is obtained. Based on the fourth prediction parameter and the fourth true parameter, the fourth loss value is obtained. The fourth prediction parameter represents the probability that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource.

[0064] Based on the third loss value, the second loss value, and the fourth loss value, a second target loss value is obtained, and the model parameters of the hierarchical ranking model in this iteration are adjusted based on the second target loss value.

[0065] In some embodiments, the hierarchical ranking model training module is used to: weightedly sum the second loss value and the fourth loss value with the third loss value to obtain the second target loss value.

[0066] In some embodiments, the apparatus further includes:

[0067] The parameter configuration module is used to configure the fourth real parameter as a fourth sub-parameter when the virtual resource characteristics of the second media resource are reduced based on the disturbance factor. The fourth sub-parameter indicates that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource.

[0068] The parameter configuration module is further configured to configure the fourth real parameter as a fifth sub-parameter when the virtual resource characteristics of the second media resource are not changed based on the disturbance factor, wherein the fifth sub-parameter indicates that the estimated cost of the second media resource is the same as the estimated cost of the second simulated media resource.

[0069] The parameter configuration module is further configured to configure the fourth real parameter as a sixth sub-parameter when the virtual resource characteristics of the second media resource are increased based on the disturbance factor, wherein the sixth sub-parameter indicates that the estimated cost of the second media resource is less than the estimated cost of the second simulated media resource.

[0070] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded and executed by the processor to implement the media resource sorting method or sorting model training method in the embodiments of this application.

[0071] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, the at least one computer program being loaded and executed by a processor to implement the media resource sorting method or the sorting model training method as described in the embodiments of this application.

[0072] On the other hand, a computer program product is provided, the computer program product including computer program code stored in a computer-readable storage medium, a processor of a computer device reading the computer program code from the computer-readable storage medium, the processor executing the computer program code, causing the computer device to execute the media resource sorting method or sorting model training method described in any of the above implementations.

[0073] In this embodiment, a first coarse-ranking parameter is obtained based on a first feature of the media resource, and a second coarse-ranking parameter is obtained based on the first feature of the media resource and a virtual resource feature. Then, the first coarse-ranking parameter is adjusted based on the second coarse-ranking parameter to obtain a target coarse-ranking parameter for the media resource. Since the target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter, and the second coarse-ranking parameter is positively correlated with the virtual resource feature, the target coarse-ranking parameter is also positively correlated with the virtual resource feature. Since the parameters used in the fine-ranking process are also positively correlated with the virtual resource feature, the coarse-ranking result obtained based on the target coarse-ranking parameter has high consistency with the fine-ranking result, thereby improving the accuracy of the media resources returned to the terminal. Attached Figure Description

[0074] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0075] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application;

[0076] Figure 2 This is a flowchart of a training method for a ranking model provided in an embodiment of this application;

[0077] Figure 3 This is a flowchart of a training method for a ranking model provided in an embodiment of this application;

[0078] Figure 4 This is a flowchart of a training method for a ranking model provided in an embodiment of this application;

[0079] Figure 5 This is a flowchart of a training method for a ranking model provided in an embodiment of this application;

[0080] Figure 6 This is a flowchart of a training method for a ranking model provided in an embodiment of this application;

[0081] Figure 7 This is a flowchart of a media resource sorting method provided in an embodiment of this application;

[0082] Figure 8 This is a flowchart of a media resource sorting method provided in an embodiment of this application;

[0083] Figure 9 This is a schematic diagram of a sorting model provided in an embodiment of this application;

[0084] Figure 10 This is a block diagram of a media resource sorting device provided in an embodiment of this application;

[0085] Figure 11 This is a block diagram of a training device for a ranking model provided in an embodiment of this application;

[0086] Figure 12 This is a block diagram of a training device for a ranking model provided in an embodiment of this application;

[0087] Figure 13 This is a block diagram of a terminal provided in an embodiment of this application;

[0088] Figure 14 This is a block diagram of a server provided in an embodiment of this application. Detailed Implementation

[0089] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0090] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0091] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the media resources involved in this application were all obtained with full authorization.

[0092] The following is an explanation of the terms used in this application.

[0093] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0094] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0095] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learn-by-doing.

[0096] The following describes the implementation environment involved in this application:

[0097] The media resource sorting method provided in this application can be executed by a computer device. In some embodiments, the computer device is configured as at least one of a terminal and a server. See also Figure 1 , Figure 1 This is a schematic diagram illustrating an implementation environment for a media resource sorting method provided in this application. The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0098] In this embodiment, terminal 101 is equipped with shopping applications, news applications, search applications, video applications, and social applications, etc., and server 102 is the backend server for the applications installed on terminal 101 or the web pages accessed by terminal 101. Terminal 101 can send a media resource display request for a target application to server 102 to obtain media resources to be displayed at a certain exposure position of the target application from server 102; or terminal 101 can send a media resource display request for a target web page to server 102 to obtain media resources to be displayed at a certain exposure position of the target web page from server 102; or server 102 can directly push media resources for a target application or target web page to terminal 101 so that terminal 101 can display media resources at a certain exposure position of the target application or target web page.

[0099] In this embodiment, the exposure location of the target application can be the application's launch screen or other interfaces within the application. Media resources are displayed in a certain exposure location of the target application or on a certain exposure location of the target webpage to indicate a certain product or service, thereby promoting that product or service.

[0100] In this embodiment of the application, multiple media resources can be displayed at the exposure position targeted by the media resource display request. The server 102 is used to respond to the media resource display request, perform coarse and fine sorting on the multiple media resources, and send the media resource ranked first in the fine sorting result to the terminal 101. Then the terminal 101 displays the media resource at the exposure position.

[0101] In some embodiments, terminal 101 may be a smartphone, tablet computer, laptop computer, desktop computer, smart voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., but is not limited thereto. In some embodiments, server 102 may be an independent server, a server cluster or distributed system composed of multiple servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0102] Figure 2 This is a flowchart of a training method for a ranking model according to an embodiment of this application. See also... Figure 2 In this embodiment, the method is illustrated using server execution as an example. This method is used to train a point-level ranking model, which is used to obtain the competitiveness of any media resource among multiple media resources. The method includes the following steps:

[0103] 201. The server obtains multiple first sample feature groups. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resources and the virtual resource characteristics of the first media resources.

[0104] In this embodiment, the user characteristics are used to describe the user, including at least one of the user's gender, age, place of origin, employment status, marital status, consumption patterns, and viewing history of media resources. The media resource display scenario characteristics are used to describe the media resource display scenario, including at least one of the media resource's exposure location ID (Identity Document), the trigger time of the media resource display request, the terminal's network connection method, and the terminal's configuration. Media resource characteristics are used to describe the media resource, including at least one of the media resource's industry, the media resource's target audience, the product type corresponding to the media resource, the media resource's ID, and the media resource's creative type. In this embodiment, the media resource characteristics do not include the media resource's virtual resource characteristics. Virtual resource characteristics describe the value of virtual resources required for conversion after the media resource is displayed in a display scenario; that is, after the media resource is displayed at a certain exposure location and converted at that exposure location, the virtual resources required by the target audience of the media resource. Conversion includes at least one of clicks, registrations, and payments.

[0105] In this embodiment, multiple first sample feature groups are obtained based on historical fine-ranking results. Historical fine-ranking results refer to the fine-ranking results obtained by the server for multiple media resources based on any previous media resource display request. The first media resource in each first sample feature group can be one of the media resources in the fine-ranking results. This achieves training the point-level ranking model with the fine-ranking results as the target, thereby improving the consistency between the coarse-ranking results and the fine-ranking results.

[0106] 202. For each first sample feature group, the server adjusts the virtual resource features of the first media resource based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0107] In this embodiment, the perturbation factor is a randomly generated non-negative number used to increase, decrease, or maintain the virtual resource characteristics. The first simulated media resource is used to simulate a new media resource. The first simulated media resource and the first media resource are identical in all characteristics except for the virtual resource characteristics.

[0108] 203. The server performs iterative training based on multiple sets of first sample pairs to obtain a point-level ranking model. Each set of first sample pairs includes a first sample feature group and a second sample feature group. This point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

[0109] In this embodiment of the application, the point-level ranking model is used to obtain the coarse ranking parameters of media resources based on the user characteristics of the terminal, the display scenario characteristics of the media resources, the characteristics of the media resources, and the virtual resource characteristics of the media resources. The coarse ranking parameters represent the ranking competitiveness of the media resources among multiple media resources.

[0110] In this embodiment, since the virtual resource features of the first media resource are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted virtual resource features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the point-level ranking model is trained together with the original samples and the new samples, so that the coarse ranking parameters output by the point-level ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the coarse ranking parameters output by the point-level ranking model.

[0111] The above Figure 2 The basic process for training a point-level ranking model is as follows: Figure 3 The training process of the point-level ranking model is further elaborated. Figure 3 This is a flowchart illustrating a training method for a ranking model according to an embodiment of this application. See also... Figure 3 In this embodiment, the method is described using an example of execution by a server. The method includes the following steps:

[0112] 301. The server obtains multiple first sample feature groups. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resources and the virtual resource characteristics of the first media resources.

[0113] This step is the same as step 201, and will not be repeated here. In the embodiments of this application, each first sample feature group can be represented as <second feature, third feature>.

[0114] 302. For each first sample feature group, the server adjusts the virtual resource features of the first media resource based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0115] In this embodiment, the perturbation factor is a randomly generated non-negative number. Each first sample feature group can correspond to multiple perturbation factors, thereby obtaining multiple second sample feature groups, further enriching the number of samples. In this embodiment, the second sample feature group can be represented as <second feature, third feature, fourth feature>.

[0116] In this embodiment, the server can adjust virtual resource characteristics using at least one of the following implementation methods. In one implementation, the server can multiply a perturbation factor by the virtual resource characteristic to obtain the adjusted virtual resource characteristic; correspondingly, if the perturbation factor is less than 1, the virtual resource characteristic will be lowered; if the perturbation factor is greater than 1, the virtual resource characteristic will be increased; and if the perturbation factor is equal to 1, the virtual resource characteristic will remain unchanged. In another implementation, the server can also add or subtract the perturbation factor to the virtual resource characteristic to obtain the adjusted virtual resource characteristic; correspondingly, if the perturbation factor is subtracted, the virtual resource characteristic will be lowered; if the perturbation factor is added, the virtual resource characteristic will be increased; and if no addition or subtraction is performed or the perturbation factor is 0, the virtual resource characteristic will remain unchanged. In this embodiment, multiplying or adding / subtracting the perturbation factor by the virtual resource characteristic to adjust the virtual resource characteristic improves the convenience of adjusting the virtual resource characteristic.

[0117] In this embodiment, the server iteratively trains based on multiple sets of first sample pairs to obtain a point-level ranking model. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources. Accordingly, during the process of iteratively training based on multiple sets of first sample pairs to obtain the point-level ranking model, steps 303-305 are iteratively executed based on multiple sets of first sample pairs to train the point-level ranking model until the iteration stopping condition is reached.

[0118] 303. In any iteration, the server inputs the first sample feature group into the point-level ranking model, outputs the first prediction parameter, and obtains the first loss value based on the first prediction parameter and the first true parameter. The first prediction parameter represents the ranking competitiveness of the first media resource among multiple media resources.

[0119] In this embodiment, to improve the consistency between the coarse and fine ranking results, the first true parameter is obtained based on the historical fine ranking results of the first media resource. Specifically, different sub-parameters are configured for the first true parameter depending on whether the first media resource is ranked in the top preset position or not ranked in the top preset position. In this embodiment, a point-level ranking model is trained using the fine ranking results as the training target, thereby improving the consistency between the fine and coarse ranking results. In this embodiment, the first true parameter is labeled on the first sample feature group in the form of a tag.

[0120] In this embodiment of the application, the point-level ranking model includes an embedding layer and a neural network layer. Accordingly, the server inputs the first sample feature group into the point-level ranking model and outputs the first prediction parameter, including the following steps: the server inputs the first sample feature group into the point-level ranking model, obtains the second feature vector of the second feature and the third feature vector of the third feature based on the embedding layer, and inputs the second feature vector and the third feature vector into the neural network layer to obtain the first prediction parameter.

[0121] 304. The server inputs the second sample feature group into the point-level ranking model, outputs the first prediction parameter corresponding to the second and third features, outputs the first intermediate prediction parameter corresponding to the second and fourth features, obtains the second prediction parameter based on the first prediction parameter and the first intermediate prediction parameter, and obtains the second loss value based on the second prediction parameter and the second true parameter. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. The estimated cost refers to the estimated cost of thousands of times the media resource is displayed.

[0122] In this embodiment, the point-level ranking model includes an embedding layer and a neural network layer. Accordingly, the server inputs the second sample feature group into the point-level ranking model and outputs the first prediction parameters corresponding to the second and third features, and the first intermediate prediction parameters corresponding to the second and fourth features. This includes the following steps: the server inputs the second sample feature group into the point-level ranking model, and based on the embedding layer, obtains the second feature vector of the second feature, the third feature vector of the third feature, and the fourth feature vector of the fourth feature; the second and third feature vectors are input into the neural network layer to obtain the first prediction parameters; the second and fourth feature vectors are input into the neural network layer to obtain the first intermediate prediction parameters. The first intermediate prediction parameters represent the ranking competitiveness of the first simulated media resource among multiple media resources. In this embodiment, the prediction parameters corresponding to the first media resource and the first simulated media resource are obtained based on the neural network layer, thereby enabling the acquisition of the second prediction parameters representing the estimated cost relationship between the two media resources.

[0123] In this embodiment of the application, the estimated cost is the ecpm value; accordingly, the process by which the server obtains the second prediction parameter based on the first prediction parameter and the first intermediate prediction parameter can be implemented by the following formula (1).

[0124]

[0125] Among them, P ij The second prediction parameter is represented by i, the first media resource is represented by j, and the first simulated media resource is represented by s. i s represents the first prediction parameter. j Represents the first intermediate prediction parameter, ecpm i Ecpm represents the estimated cost of primary media resources. j This represents the estimated cost of the first simulated media resource.

[0126] Accordingly, the process by which the above server obtains the second loss value based on the second prediction parameter and the second true parameter can be achieved by the following formula (2).

[0127] Loss = -y ij log(P ij )-(1-y ij log(1-P) ij (2);

[0128] Where Loss represents the second loss value, P ij y represents the second prediction parameter. ij This represents the second true parameter.

[0129] In this embodiment, since the virtual resource characteristics are positively correlated with the estimated cost, and the second true parameter represents the relationship between the estimated costs of the first media resource and the first simulated media resource, the second true parameter can be obtained based on the perturbation factor. Accordingly, configuring the second true parameter includes the following cases: when the virtual resource characteristics of the first media resource are lowered based on the perturbation factor, the server configures the second true parameter as a first sub-parameter, indicating that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource; when the virtual resource characteristics of the first media resource are not changed based on the perturbation factor, the server configures the second true parameter as a second sub-parameter, indicating that the estimated cost of the first media resource is the same as the estimated cost of the first simulated media resource; when the virtual resource characteristics of the first media resource are increased based on the perturbation factor, the server configures the second true parameter as a third sub-parameter, indicating that the estimated cost of the first media resource is less than the estimated cost of the first simulated media resource. In this embodiment, the second true parameter is labeled on the second sample feature group in the form of a tag.

[0130] In the embodiments of this application, the first sub-parameter, the second sub-parameter and the third sub-parameter can be set and changed as needed. For example, the first sub-parameter, the second sub-parameter and the third sub-parameter can be 1, 0.5 and 0 respectively, and the second real parameter can be configured by the following formula (3).

[0131]

[0132] Where label represents the second true parameter, factor a This represents the disturbance factor of primary media resources.

[0133] In this embodiment, since the virtual resource characteristics are positively correlated with the estimated cost, the actual adjustment of the estimated cost can be obtained based on the adjustment of the virtual resource characteristics by the disturbance factor. Then, the second true parameter is determined based on the actual adjustment of the estimated cost, so that the second true parameter is more consistent with the actual situation, thereby improving the accuracy of the configured second true parameter.

[0134] In this embodiment, the neural network layer in the point-level ranking model corresponds to the main task tower, which is used to learn how to obtain the coarse ranking parameters of media resources based on multiple features of the media resources. In order to improve training efficiency, a contrastive learning tower that shares parameters with the main task tower is also set up, so that the first sample feature group and the second sample feature group are processed by the main task tower and the contrastive learning tower respectively.

[0135] It should be noted that, since the embodiments of this application process the first sample feature group and the second sample feature group based on the main task tower and the contrastive learning tower respectively, the above steps 303-304 can be executed simultaneously to improve processing efficiency.

[0136] 305. Based on the first loss value and the second loss value, the server determines the first target loss value, and adjusts the model parameters of the point-level sorting model in this iteration based on the first target loss value.

[0137] In this embodiment, the server determines a first target loss value based on a first loss value and a second loss value, including the following steps: the server performs a weighted sum of the first loss value and the second loss value to obtain the first target loss value. The weights of the first loss value and the second loss value can be set and changed as needed, and are not specifically limited here. In this embodiment, since the first target loss value is obtained by weighted summing of the two loss values, the comprehensiveness and accuracy of adjusting model parameters can be improved based on the first target loss value.

[0138] In this embodiment, the server iteratively executes steps 303-305 based on multiple sets of first sample feature groups until an iteration stopping condition is reached. In this embodiment, the iteration stopping condition includes, but is not limited to, the following situations: the server determines that the iteration stopping condition has been reached when the number of iterations reaches a preset number; the server determines that the iteration stopping condition has been reached when the first target loss value reaches a convergent state; and the server determines that the iteration stopping condition has been reached when the first target loss value reaches a preset loss value.

[0139] In this embodiment, by adjusting the virtual resource characteristics based on the perturbation factor to add new samples, and by combining the original samples and the new samples to train the model, the sensitivity of the ranking model to changes in virtual resource characteristics can be enhanced, ensuring that the output of the ranking model can also change reasonably when the virtual resource characteristics change.

[0140] In this embodiment, since the virtual resource features of the first media resource are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted virtual resource features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the point-level ranking model is trained together with the original samples and the new samples, so that the coarse ranking parameters output by the point-level ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the coarse ranking parameters output by the point-level ranking model.

[0141] The above Figure 2 and Figure 3 The flowchart below shows the training process for a point-level ranking model. Figure 4 This section introduces the basic process of training a hierarchical ranking model, which is used to obtain the ranking relationship between every two media resources. Figure 4 This is a flowchart of a training method for a ranking model according to an embodiment of this application. See also... Figure 4 In this embodiment, the method is described using an example of execution by a server. The method includes the following steps:

[0142] 401. The server obtains multiple third sample feature groups. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource.

[0143] In this embodiment, multiple third sample feature groups are obtained based on historical fine-ranking results. The first media resource and the second media resource in each third sample feature group are any two media resources with a ranking relationship in the fine-ranking results. This achieves training the hierarchical ranking model with the fine-ranking results as the target, thereby improving the consistency between the coarse-ranking results and the fine-ranking results.

[0144] 402. For each third sample feature group, the server adjusts the virtual resource features of the first media resource based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0145] In this embodiment, the perturbation factor is a randomly generated non-negative number used to increase, decrease, or maintain the virtual resource characteristics. The first simulated media resource is used to simulate a new media resource. The first simulated media resource and the first media resource are identical in all characteristics except for the virtual resource characteristics.

[0146] 403. For each third sample feature group, the server adjusts the virtual resource features of the second media resource based on the perturbation factor to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource.

[0147] In this embodiment of the application, the second simulated media resource is used to simulate a new media resource. The second simulated media resource and the second media resource are identical in all characteristics except for the virtual resource characteristics.

[0148] 404. The server performs iterative training based on multiple sets of second sample pairs to obtain a pairwise ranking model. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. This pairwise ranking model is used to obtain the ranking relationship between every two media resources.

[0149] In this embodiment of the application, the hierarchical ranking model, for any two media resources, is used to obtain the coarse ranking parameters of the first media resource based on the user characteristics of the terminal, the display scenario characteristics of the media resource, the media resource characteristics of the first media resource, and the virtual resource characteristics of the first media resource. It is also used to obtain the coarse ranking parameters of the second media resource based on the user characteristics of the terminal, the display scenario characteristics of the media resource, the media resource characteristics of the second media resource, and the virtual resource characteristics of the second media resource. The coarse ranking parameter of any media resource represents its ranking competitiveness among multiple media resources. Then, based on the coarse ranking parameters of each of the two media resources, the ranking relationship between the two media resources can be obtained.

[0150] In this embodiment, since the virtual resource features of the first and second media resources are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the hierarchical ranking model is trained together based on the original samples and the new samples, so that the output of the hierarchical ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the output of the hierarchical ranking model.

[0151] The above Figure 4 The basic process for training a hierarchical ranking model is as follows: Figure 5 The training process of the hierarchical ranking model is further elaborated. Figure 5 This is a flowchart illustrating a training method for a ranking model according to an embodiment of this application. See also... Figure 5 In this embodiment, the method is described using an example of execution by a server. The method includes the following steps:

[0152] 501. The server obtains multiple third sample feature groups. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource.

[0153] In this embodiment, step 501 is implemented in the same way as step 401, and will not be described again here. In this embodiment, the third sample feature group can be represented as <second feature, third feature, fifth feature>.

[0154] 502. For each third sample feature group, the server adjusts the virtual resource features of the first media resource based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0155] In the embodiments of this application, the implementation of step 502 is the same as that of step 302, and will not be repeated here.

[0156] 503. For each third sample feature group, the server adjusts the virtual resource features of the second media resource based on the perturbation factor to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource.

[0157] In this embodiment, step 503 is implemented in the same way as step 502, and will not be described again here. The fourth sample feature group can be represented as <second feature, fifth feature, sixth feature>.

[0158] It should be noted that the execution order of steps 502 and 503 in this embodiment can be varied. The step numbers are for ease of description and do not limit the execution order. Step 502 can be executed before step 503, after step 503, or simultaneously with step 503.

[0159] In this embodiment, the server iteratively trains based on multiple sets of second sample pairs to obtain a hierarchical ranking model. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources. Accordingly, during the process of iteratively training based on multiple sets of second sample pairs to obtain the hierarchical ranking model, steps 504-507 are iteratively executed based on multiple sets of second sample pairs to train the hierarchical ranking model until the iteration stopping condition is met.

[0160] 504. In any iteration, the server inputs the third sample feature group into the hierarchical ranking model, outputs the first prediction parameter corresponding to the second and third features, outputs the second intermediate prediction parameter corresponding to the second and fifth features, obtains the third prediction parameter based on the first and second intermediate prediction parameters, and obtains the third loss value based on the third prediction parameter and the third true parameter. The third prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the second media resource. The estimated cost refers to the estimated cost of the media resource per thousand impressions.

[0161] In this embodiment, the third true parameter is obtained based on the historical fine-grained ranking results of the first and second media resources. Different sub-parameters are configured for the third true parameter depending on whether the first media resource is ranked before, after, or in the same position as the second media resource. In this embodiment, since the third true parameter is obtained based on the fine-grained ranking results, and then the third loss value obtained from the third true parameter is used to train the hierarchical ranking model, the training objective of the hierarchical ranking model is achieved using the fine-grained ranking results, thereby improving the consistency between the coarse-grained ranking results and the fine-grained ranking results. In this embodiment, the third true parameter is labeled on the third sample feature group. In this embodiment, the second intermediate prediction parameter represents the ranking competitiveness of the second media resource among multiple media resources.

[0162] 505. The server inputs the second sample feature group into the hierarchical ranking model, outputs the first prediction parameter corresponding to the second and third features, outputs the first intermediate prediction parameter corresponding to the second and fourth features, obtains the second prediction parameter based on the first prediction parameter and the first intermediate prediction parameter, and obtains the second loss value based on the second prediction parameter and the second true parameter. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource.

[0163] In the embodiments of this application, step 505 is the same as step 304, and will not be described again here.

[0164] 506. The server inputs the fourth sample feature group into the hierarchical ranking model, outputs the second intermediate prediction parameters corresponding to the second and fifth features, outputs the third intermediate prediction parameters corresponding to the second and sixth features, obtains the fourth prediction parameter based on the second and third intermediate prediction parameters, and obtains the fourth loss value based on the fourth prediction parameter and the fourth true parameter. The fourth prediction parameter represents the probability that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource.

[0165] In this embodiment, since the virtual resource characteristics are positively correlated with the estimated cost, and the fourth true parameter represents the magnitude of the estimated costs of the second media resource and the second simulated media resource, the fourth true parameter can be obtained based on the perturbation factor. Accordingly, configuring the fourth true parameter includes the following cases: when the virtual resource characteristics of the second media resource are lowered based on the perturbation factor, the server configures the fourth true parameter as a fourth sub-parameter, indicating that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource; when the virtual resource characteristics of the second media resource are not changed based on the perturbation factor, the server configures the fourth true parameter as a fifth sub-parameter, indicating that the estimated cost of the second media resource is the same as the estimated cost of the second simulated media resource; when the virtual resource characteristics of the second media resource are increased based on the perturbation factor, the server configures the fourth true parameter as a sixth sub-parameter, indicating that the estimated cost of the second media resource is less than the estimated cost of the second simulated media resource. In this embodiment, the fourth true parameter is labeled on the fourth sample feature group.

[0166] In this embodiment, the fourth, fifth, and sixth sub-parameters can be set and changed as needed, such as being 1, 0.5, and 0 respectively. In this embodiment, since the virtual resource characteristics are positively correlated with the estimated cost, the adjustment of the virtual resource characteristics based on the perturbation factor yields the actual adjustment of the estimated cost. This actual adjustment of the estimated cost is then used to determine the fourth true parameter, making it more consistent with the actual situation and thus improving the accuracy of the configured fourth true parameter. In this embodiment, the third intermediate prediction parameter represents the ranking competitiveness of the second simulated media resource among multiple media resources.

[0167] In this embodiment, the neural network layer in the hierarchical ranking model corresponds to the main task tower, which is used to learn how to obtain the coarse ranking parameters of media resources based on multiple features of media resources. In order to improve training efficiency, a contrastive learning tower that shares parameters with the main task tower is also set up so that while the third sample feature group is processed by the main task tower, the second and fourth sample feature groups are also processed by the contrastive learning tower to improve processing efficiency.

[0168] 507. The server obtains the second target loss value based on the third, second, and fourth loss values, and adjusts the model parameters of the hierarchical ranking model in this iteration based on the second target loss value.

[0169] In this embodiment, the server obtains a second target loss value based on a third loss value, a second loss value, and a fourth loss value. This is achieved by the server performing a weighted summation of the second and fourth loss values ​​with the third loss value to obtain the second target loss value. In this embodiment, since the second target loss value is obtained by weighted summation of the three loss values, the comprehensiveness and accuracy of model parameter adjustments can be improved based on this second target loss value.

[0170] The weights of the sum of the second and fourth loss values ​​and the third loss value can be set and changed as needed. For example, the weight of the third loss value can be 1, and the second target loss value can be obtained by the following formula (4).

[0171] ComboLoss = Loss Main +w*Loss DataAugmentation (4);

[0172] Where ComboLoss represents the second objective loss value, Loss Main This represents the third loss value, Loss. DataAugmentation represents the sum of the second and fourth loss values, and w represents the weight of the sum of the second and fourth loss values. w can be configured as a weight hyperparameter during the training process.

[0173] See Figure 6 , Figure 6 This is a flowchart illustrating a training method for a hierarchical ranking model provided in this application. The server inputs the feature vectors of each feature in the third sample feature group extracted based on the embedding layer into the main task tower, outputting a first prediction parameter for the first media resource and a second intermediate prediction parameter for the second media resource. Then, a third loss value is determined based on the first and second intermediate prediction parameters. The server inputs the feature vectors of each feature in the second sample feature group extracted based on the embedding layer into the contrastive learning tower, outputting a first prediction parameter for the first media resource and a first intermediate prediction parameter for the first simulated media resource. Then, a second loss value is determined based on the first prediction parameter and the first intermediate prediction parameter. The server inputs the feature vectors of each feature in the fourth sample feature group extracted based on the embedding layer into the contrastive learning tower, outputting a second intermediate prediction parameter for the second media resource and a third intermediate prediction parameter for the second simulated media resource. Then, a fourth loss value is determined based on the second and third intermediate prediction parameters. Finally, a second target loss value is obtained based on the third, second, and fourth loss values.

[0174] It should be noted that, since the embodiments of this application process the third sample feature group based on the main task tower and process the second and fourth sample feature groups based on the contrastive learning tower, step 504 can be executed simultaneously with steps 505-506.

[0175] In this embodiment, since the virtual resource features of the first and second media resources are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the hierarchical ranking model is trained together based on the original samples and the new samples, so that the output of the hierarchical ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the output of the hierarchical ranking model.

[0176] Figure 7 This is a flowchart of a media resource sorting method provided according to an embodiment of this application. See also... Figure 7 In this embodiment, the method is illustrated using server execution as an example. This method can be implemented based on the ranking model trained in any of the above embodiments. The method includes the following steps:

[0177] 701. The server responds to the terminal's media resource display request and retrieves multiple media resources.

[0178] In this embodiment of the application, the media resource display request is used to request the media resource to be displayed at the target exposure position of the target application or the target webpage. The target exposure position of the target application can be the position on the application startup screen or the position on any application screen during the application's operation. The position on the application screen can be the top, middle, or bottom position of the application screen, etc. The target exposure position of the target webpage can be any position on the target webpage, such as the top, middle, or bottom position of the target webpage, etc.

[0179] In this embodiment, the media resource display request carries the ID of the target exposure location. The server obtains the media resources to be displayed at the target exposure location, thus obtaining the multiple media resources. In this embodiment, the media resources can be at least one of text, images, and audio / video media resources.

[0180] 702. For each media resource among multiple media resources, the server obtains a first coarse ranking parameter based on the first feature of the media resource. The first feature includes the user characteristics of the terminal, the media resource characteristics, and the display scenario characteristics of the media resource. The user characteristics are used to describe the user of the terminal, the media resource characteristics are used to describe the media resource, and the display scenario characteristics are used to describe the display scenario of the media resource.

[0181] In the embodiments of this application, the first coarse ranking parameter can represent the role of the first feature in the ranking competitiveness of media resources.

[0182] 703. Based on the first feature of the media resource and the virtual resource feature, the server obtains the second coarse-ranking parameter. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is converted in the display scenario. The second coarse-ranking parameter is positively correlated with the virtual resource feature.

[0183] In the embodiments of this application, the second coarse ranking parameter can represent the role of the first feature and the virtual resource feature in the ranking competitiveness of media resources.

[0184] 704. Based on the second coarse ranking parameter, the server adjusts the first coarse ranking parameter to obtain the target coarse ranking parameter of the media resource. The target coarse ranking parameter is positively correlated with the second coarse ranking parameter. The target coarse ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scenario.

[0185] In this embodiment, the target coarse-ranking parameter of a media resource is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scenario. This correlation reflects the ranking competitiveness of the media resource among multiple media resources. That is, the larger the target coarse-ranking parameter, the greater the correlation between the media resource and the characteristics of the user object and the characteristics of the display scenario, and thus the greater its ranking competitiveness. The smaller the target coarse-ranking parameter, the smaller the correlation between the media resource and the characteristics of the user object and the characteristics of the display scenario, and thus the smaller its ranking competitiveness.

[0186] 705. The server performs coarse ranking of multiple media resources based on the target coarse ranking parameters of multiple media resources.

[0187] In this embodiment, the sorting position of media resources is positively correlated with the target coarse-sorting parameter; the larger the target coarse-sorting parameter, the higher the sorting position. The server performs coarse-sorting on multiple media resources based on their target coarse-sorting parameters, thus achieving the coarse-sorting process and obtaining the coarse-sorting result.

[0188] In this embodiment, a first coarse-ranking parameter is obtained based on a first feature of the media resource, and a second coarse-ranking parameter is obtained based on the first feature of the media resource and a virtual resource feature. Then, the first coarse-ranking parameter is adjusted based on the second coarse-ranking parameter to obtain a target coarse-ranking parameter for the media resource. Since the target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter, and the second coarse-ranking parameter is positively correlated with the virtual resource feature, the target coarse-ranking parameter is also positively correlated with the virtual resource feature. Since the parameters used in the fine-ranking process are also positively correlated with the virtual resource feature, the coarse-ranking result obtained based on the target coarse-ranking parameter has high consistency with the fine-ranking result, thereby improving the accuracy of the media resources returned to the terminal.

[0189] The above Figure 7 The basic process of media resource sorting methods is as follows, based on... Figure 8 The method for sorting media resources is further elaborated. Figure 8 This is a flowchart illustrating a media resource sorting method according to an embodiment of this application. This method can be implemented based on a sorting model trained in any of the above embodiments. The method includes the following steps:

[0190] 801. The server responds to the terminal's media resource display request and retrieves multiple media resources.

[0191] In this embodiment of the application, the implementation of step 801 is the same as that of step 701, and will not be repeated here.

[0192] 802. For each media resource among multiple media resources, the server inputs the first feature of the media resource into the ranking model, and obtains the first feature vector based on the embedding layer of the ranking model.

[0193] In this embodiment, the ranking model includes an embedding layer, a first network, and a second network. The embedding layer is used to extract the feature vector of any feature. Both the first and second networks are neural network layers used to obtain coarse ranking parameters based on the feature vector. See also... Figure 9 , Figure 9 This is a schematic diagram of a sorting model provided in an embodiment of this application. The sorting model includes an embedding layer 901, a first network 902, and a second network 903. The first network and the second network are two parallel neural networks.

[0194] In this embodiment, the embedding layer is used to extract the feature vectors of the terminal's user features, media resource features, and media resource display scene features respectively, and to combine the feature vectors of the multiple features into a first feature vector. In this embodiment, the ranking model also includes a feature vector input layer 904, which is used to input the first feature vector after combining the feature vectors of the multiple features into the first feature vector.

[0195] In this embodiment, the ranking model is a coarse-ranking model, which can be a point-level ranking model or a pair-level ranking model, used to obtain the coarse-ranking parameters of any media resource. The coarse-ranking model can be LTR (Learning ToRank), DSSM (Deep Structured Semantic Model), FFM (Field-aware Factorization Machines), etc.; in this embodiment, the LTR model is used as an example for illustration.

[0196] 803. The server inputs the first feature vector of the first feature into the first network of the sorting model, performs dot product processing and nonlinear transformation on the first feature vector, and obtains the first coarse ranking parameters.

[0197] In this embodiment of the application, the first network includes multiple fully connected layers, such as... Figure 9 As shown, after the first feature vector is input into the first network, it undergoes dot product processing and nonlinear transformation through multiple fully connected layers to obtain the first coarse-ranked parameters.

[0198] 804. The server inputs the virtual resource features into the sorting model, and obtains the virtual resource feature vector based on the embedding layer.

[0199] In some embodiments, a media resource corresponds to multiple candidate virtual resource values, and these multiple candidate virtual resource values ​​are virtual resource values ​​corresponding to multiple conversion targets of the media resource. Accordingly, the process of obtaining virtual resource features includes the following steps: the server obtains the current state information of the media resource; obtains the target virtual resource value corresponding to the current state information from the multiple candidate virtual resource values; and uses this target virtual resource value as a virtual resource feature.

[0200] In this embodiment, the multiple conversion goals of the media resource include clicks, downloads, registrations, and payments. Correspondingly, the virtual resource values ​​corresponding to these multiple conversion goals represent the price that the object to which the media resource belongs is required to pay for actions such as clicking, downloading, registering, and paying for the media resource. The media resource status information indicates the historical display status of the media resource at the exposure position corresponding to the media resource display request, including at least one of historical display time, historical display count, and historical conversion count.

[0201] In this embodiment, when adjusting virtual resources based on a perturbation factor is not required, the server directly uses the target virtual resource value as the virtual resource feature. However, when adjusting the virtual resource value based on a perturbation factor is required, the server uses the product of the target virtual resource value and the perturbation factor as the virtual resource feature. In this embodiment, since the product of the virtual resource value and the perturbation factor is necessary to represent the actual virtual resource being used when adjustment based on the perturbation factor is required, using the product of the target virtual resource value and the perturbation factor as the virtual resource feature ensures the accuracy of the determined virtual resource feature.

[0202] In this embodiment of the application, a mapping relationship can be established for each media resource. This mapping relationship is used to indicate the virtual resource value corresponding to each of the multiple status information of the media resource. In this way, determining the target virtual resource value based on the mapping relationship can improve the efficiency of obtaining virtual resource characteristics.

[0203] In related technologies, when a media resource corresponds to multiple candidate media resource values, all of these candidate values ​​are typically input into a ranking model. The ranking model then determines which candidate virtual resource value to use in which state. This requires the ranking model to learn the complex business logic of which candidate virtual resource value to use in which state beforehand, thus increasing the learning difficulty of the ranking model. However, in this embodiment, by determining which candidate virtual resource value to use in which state outside the model, multiple candidate virtual resource values ​​are processed into a single target virtual resource value, thereby reducing the learning difficulty of the ranking model.

[0204] 805. The server inputs the first feature vector into the second network to obtain adaptive coefficients. The product of the adaptive coefficients and the virtual resource feature vector is output as the second coarse-ranking parameter. The adaptive coefficients are used to represent the difference between the first coarse-ranking parameter and the second coarse-ranking parameter. The second coarse-ranking parameter is positively correlated with the virtual resource feature.

[0205] In this embodiment, by setting an adaptive coefficient, a large difference between the first coarse-ranking parameter and the second coarse-ranking parameter is avoided, and the product of the adaptive coefficient and the virtual resource feature is output as the second coarse-ranking parameter, ensuring a positive correlation between the second coarse-ranking parameter and the virtual resource feature.

[0206] In the embodiments of this application, see also Figure 9 The second network includes a sub-network 9031 and an intermediate layer 9032. The sub-network includes multiple fully connected layers. After the first feature vector is input into the second network, it undergoes dot product processing and nonlinear transformation through multiple fully connected layers to obtain adaptive coefficients. The adaptive coefficients are then multiplied by the virtual resource feature vector through the intermediate layer to obtain the second coarse-ranking parameters. In this embodiment, the server obtains the second coarse-ranking parameters based on the adaptive coefficients and the virtual resource feature vector using the following formula (5).

[0207] bid_logits=sigmoid(f(x))*bid(5);

[0208] Where bid_logits represents the second coarse-ranking parameter, sigmoid(f(x)) represents the adaptive coefficient, and bid represents the virtual resource feature vector.

[0209] In this embodiment, a first network and a second network are set in the ranking model. Since the first network and the second network are relatively isolated, their impact on the overall effect of the ranking model is more controllable. The second network learns the influence of virtual resource features on the second coarse ranking parameters separately, thereby ensuring that the second coarse ranking parameters are positively correlated with the virtual resource features.

[0210] It should be noted that the above is only an example of using the product of the adaptive coefficient and the virtual resource feature vector as the second coarse ranking parameter. In the embodiments of this application, any implementation method that satisfies the following formula (6) is also included.

[0211] bid_logits=g(bid;x) (6);

[0212] Where g(bid;x) represents any monotonically increasing function with virtual resource features as independent variables, given an adaptive coefficient x, to ensure that the second coarse-ranking parameter is positively correlated with the virtual resource features.

[0213] It should be noted that the execution order of steps 802 to 805 in the embodiments of this application can be varied. The step numbers are for ease of description and do not restrict the execution order of the steps. For example, steps 802 and 804 can be executed simultaneously to obtain two feature vectors, and then steps 803 and 805 can be executed simultaneously.

[0214] 806. The server adjusts the first coarse-ranking parameter based on the second coarse-ranking parameter to obtain the target coarse-ranking parameter of the media resource. The target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter.

[0215] In this embodiment of the application, the server adjusts the first coarse ranking parameter based on the second coarse ranking parameter to obtain the target coarse ranking parameter of the media resource, including the following steps: the server sums the first coarse ranking parameter and the second coarse ranking parameter to obtain a sum value; the server calls the target function to process the sum value to obtain the target coarse ranking parameter.

[0216] In this embodiment, the objective function maps the sum of two coarse-ranked parameters to a target interval, which is generally (0, 1). The objective function can be a Sigmoid function (an activation function). In this embodiment, the computer device obtains the target coarse-ranked parameters based on the first and second coarse-ranked parameters using the following formula (7).

[0217] output=sigmoid(main_logits+bid_logits) (7);

[0218] Where output represents the target coarse-ranking parameters, main_logits represents the first coarse-ranking parameters, and bid_logits represents the second coarse-ranking parameters.

[0219] See also Figure 9The ranking model also includes an output layer 905. A sigmoid function can be set in the output layer to map the coarse ranking parameters to the range (0, 1). Accordingly, the first network and the second network of the ranking model output the first coarse ranking parameters and the second coarse ranking parameters, respectively. The first coarse ranking parameters and the second coarse ranking parameters are summed and input into the output layer. After mapping based on the sigmoid function of the output layer, the target coarse ranking parameters are output through the output layer.

[0220] In this embodiment, the target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter, and since the second coarse-ranking parameter is positively correlated with the virtual resource features, the target coarse-ranking parameter is also positively correlated with the virtual resource features.

[0221] 807. The server performs coarse ranking of multiple media resources based on the target coarse ranking parameters of multiple media resources.

[0222] In this embodiment, the server performs a coarse sorting of multiple media resources to obtain a coarse sorting result, thus realizing the coarse sorting process for multiple media resources. The server then filters out the target number of media resources ranked first in the coarse sorting result to perform a fine sorting of the target number of media resources, obtaining a fine sorting result. Finally, the server returns the media resources ranked first in the fine sorting result to the terminal, for example, returning the media resource ranked first to the terminal.

[0223] In this embodiment, a first coarse-ranking parameter is obtained based on a first feature of the media resource, and a second coarse-ranking parameter is obtained based on the first feature of the media resource and a virtual resource feature. Then, the first coarse-ranking parameter is adjusted based on the second coarse-ranking parameter to obtain a target coarse-ranking parameter for the media resource. Since the target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter, and the second coarse-ranking parameter is positively correlated with the virtual resource feature, the target coarse-ranking parameter is also positively correlated with the virtual resource feature. Since the parameters used in the fine-ranking process are also positively correlated with the virtual resource feature, the coarse-ranking result obtained based on the target coarse-ranking parameter has high consistency with the fine-ranking result, thereby improving the accuracy of the media resources returned to the terminal.

[0224] The media resource ranking method provided in this application significantly improves the sensitivity of virtual resource adjustment compared to methods that use virtual resource features as the underlying features of the model and interact with other features to obtain coarse ranking parameters, as shown in Table 1. Furthermore, the training method for the ranking model provided in this application shows better consistency between coarse and fine ranking results compared to the virtual resource monotonic (Pairwise Loss) method in related technologies, as shown in Table 2. The virtual resource monotonic method directly multiplies the coarse ranking parameters output by the model with the virtual resource features to obtain the target coarse ranking parameters. This method makes the virtual resource features positively correlated with the coarse ranking parameters output by the ranking model. However, since virtual resource features directly affect the magnitude of the coarse ranking parameters, and the coarse ranking parameters are also used to update the model, if the virtual resource features are unevenly distributed or have a large distribution range, it will lead to unstable model update gradients, thereby affecting the consistency between coarse and fine ranking results.

[0225] Table 1

[0226]

[0227] The sensitivity of virtual resource adjustment is evaluated using the metric of "the proportion of insensitive virtual resource features by X times". It is defined as: fixing other features, comparing the size of the coarse ranking parameters output by the ranking model before and after adjusting the virtual resource features by X times, and calculating the proportion of samples that make a negative response to the adjustment of virtual resource features. The smaller this metric is, the better the model's sensitivity to virtual resource adjustment.

[0228] Table 2

[0229]

[0230] In this embodiment, GAUC and Recall@N_K are both consistency evaluation metrics. GAUC is used to evaluate the overall ranking capability of the coarse ranking results. It calculates the AUC (Area Under Curve) for each media resource display request by taking the first media resource in the fine ranking results corresponding to each media resource display request as a positive example and the non-first media resource as a negative example. Multiple media resource display requests are aggregated to obtain GAUC. Recall@N_K represents the recall ratio of the top K in the fine ranking results to the top N in the coarse ranking results. It is used to evaluate the recall capability of the top N in the coarse ranking results to the top K in the fine ranking results. N is less than K, and both N and K are non-negative integers. In this embodiment, GAUC and Recall@N_K are obtained based on the following formulas (8) and (9), respectively.

[0231]

[0232]

[0233] Here, #pv represents a media resource display request, and i represents the i-th media resource display request.

[0234] In the embodiments of this application, when the consistency index between the coarse ranking result and the fine ranking result obtained based on the coarse ranking model remains unchanged or improves, the output of the ranking model can also change reasonably with the changes in virtual resource characteristics, ensuring the monotonic leverage ability of virtual resource characteristics on the coarse ranking result, so that the method provided in the embodiments of this application can be applied to the coarse ranking process of media resources.

[0235] This application also provides a media resource sorting device, see [link to relevant documentation]. Figure 10 The device includes:

[0236] The media resource acquisition module 1001 is used to acquire multiple media resources in response to the terminal's media resource display request;

[0237] The first coarse ranking parameter determination module 1002 is used to obtain the first coarse ranking parameters for each media resource among multiple media resources based on the first feature of the media resource. The first feature includes the user characteristics of the terminal, the media resource characteristics, and the display scenario characteristics of the media resource. The user characteristics are used to describe the user of the terminal, the media resource characteristics are used to describe the media resource, and the display scenario characteristics are used to describe the display scenario of the media resource.

[0238] The second coarse ranking parameter determination module 1003 is used to obtain the second coarse ranking parameters based on the first feature of the media resource and the virtual resource feature. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is converted in the display scenario. The second coarse ranking parameters are positively correlated with the virtual resource feature.

[0239] The target coarse-ranking parameter determination module 1004 is used to adjust the first coarse-ranking parameter based on the second coarse-ranking parameter to obtain the target coarse-ranking parameter of the media resource. The target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter. The target coarse-ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scenario.

[0240] The media resource sorting module is used to perform coarse sorting of multiple media resources based on the target coarse sorting parameters.

[0241] In some embodiments, the coarse ranking parameters of the media resources are obtained based on a ranking model, which includes an embedding layer, a first network, and a second network. The first coarse ranking parameter determination module 1002 is used for:

[0242] The first feature is input into the ranking model, and the first feature vector is obtained based on the embedding layer;

[0243] The first feature vector of the first feature is input into the first network, and the first feature vector is subjected to dot product processing and nonlinear transformation to obtain the first coarse ranking parameters;

[0244] The second coarse-sorting parameter determination module 1003 is used for:

[0245] The virtual resource features are input into the ranking model, and the virtual resource feature vector is obtained based on the embedding layer.

[0246] The first feature vector is input into the second network to obtain the adaptive coefficients. The product of the adaptive coefficients and the virtual resource feature vector is output as the second coarse-ranking parameter. The adaptive coefficients are used to represent the difference between the first coarse-ranking parameter and the second coarse-ranking parameter.

[0247] In some embodiments, the target coarse-sorting parameter determination module 1004 is used for:

[0248] The sum of the first coarse-sorting parameters and the second coarse-sorting parameters is obtained.

[0249] The target function is called to process the sum value to obtain the target coarse-sort parameters.

[0250] In some embodiments, the media resource corresponds to multiple candidate virtual resource values, and the multiple candidate virtual resource values ​​are virtual resource values ​​corresponding to multiple conversion targets of the media resource; the apparatus further includes:

[0251] The feature determination module is used to obtain the current status information of media resources, obtain the target virtual resource value corresponding to the current status information from multiple candidate virtual resource values, and use the target virtual resource value as a virtual resource feature.

[0252] In this embodiment, a first coarse-ranking parameter is obtained based on a first feature of the media resource, and a second coarse-ranking parameter is obtained based on the first feature of the media resource and the virtual resource feature. Then, a target coarse-ranking parameter for the media resource is obtained based on the first and second coarse-ranking parameters. Since the target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter, and the second coarse-ranking parameter is positively correlated with the virtual resource feature, the target coarse-ranking parameter is also positively correlated with the virtual resource feature. Since the parameters used in the fine-ranking process are also positively correlated with the virtual resource feature, the coarse-ranking result obtained based on the target coarse-ranking parameter has high consistency with the fine-ranking result, thereby improving the accuracy of the media resources returned to the terminal.

[0253] This application also provides a training apparatus for a ranking model, see [link to relevant documentation]. Figure 11 The device includes:

[0254] The sample feature group acquisition module 1101 is used to acquire multiple first sample feature groups. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resources and the virtual resource characteristics of the first media resources.

[0255] The feature adjustment module 1102 is used to adjust the virtual resource features of the first media resource based on the perturbation factor for each first sample feature group to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource.

[0256] The point-level ranking model training module 1103 is used to iteratively train based on multiple sets of first sample pairs to obtain the point-level ranking model. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

[0257] In some embodiments, the point-level ranking model training module 1103 is used for:

[0258] Based on multiple sets of first sample pairs, the following steps are performed iteratively to train the point-level ranking model until the iteration stopping condition is met:

[0259] In any iteration, the first sample feature group is input into the point-level ranking model, the first prediction parameter is output, and the first loss value is obtained based on the first prediction parameter and the first true parameter. The first prediction parameter represents the ranking competitiveness of the first media resource among multiple media resources.

[0260] The second sample feature group is input into the point-level ranking model, and the first prediction parameter corresponding to the second and third features is output. The first intermediate prediction parameter corresponding to the second and fourth features is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The first intermediate prediction parameter represents the ranking competitiveness of the first simulated media resource among multiple media resources. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. The estimated cost refers to the estimated cost per thousand impressions of the media resource.

[0261] Based on the first loss value and the second loss value, the first target loss value is determined, and the model parameters of the point-level sorting model are adjusted in this iteration based on the first target loss value.

[0262] In some embodiments, the point-level ranking model includes an embedding layer and a neural network layer. The point-level ranking model training module 1103 is used for:

[0263] The second sample feature group is input into the point-level ranking model. Based on the embedding layer, the second feature vector of the second feature, the third feature vector of the third feature, and the fourth feature vector of the fourth feature are obtained.

[0264] The second and third feature vectors are input into the neural network layer to obtain the first prediction parameters. The second and fourth feature vectors are input into the neural network layer to obtain the first intermediate prediction parameters.

[0265] In some embodiments, the point-level ranking model training module 1103 is used for:

[0266] The first target loss value is obtained by weighted summing of the first loss value and the second loss value.

[0267] In some embodiments, the apparatus further includes:

[0268] The parameter configuration module is used to configure the second real parameter as the first sub-parameter when the virtual resource characteristics of the first media resource are reduced based on the perturbation factor. The first sub-parameter indicates that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource.

[0269] The parameter configuration module is also used to configure the second real parameter as a second sub-parameter when the virtual resource characteristics of the first media resource are not changed based on the disturbance factor. The second sub-parameter indicates that the estimated cost of the first media resource is the same as the estimated cost of the first simulated media resource.

[0270] The parameter configuration module is also used to configure the second real parameter as a third sub-parameter when the virtual resource characteristics of the first media resource are increased based on the perturbation factor. The third sub-parameter indicates that the estimated cost of the first media resource is less than the estimated cost of the first simulated media resource.

[0271] In this embodiment, since the virtual resource features of the first and second media resources are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the hierarchical ranking model is trained together based on the original samples and the new samples, so that the output of the hierarchical ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the output of the hierarchical ranking model.

[0272] This application also provides a training apparatus for a ranking model, see [link to relevant documentation]. Figure 12The device includes:

[0273] The sample feature group acquisition module 1201 is used to acquire multiple third sample feature groups. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource.

[0274] The feature adjustment module 1202 is used to adjust the virtual resource features of the first media resource based on a perturbation factor for each third sample feature group to obtain a second sample feature group. The second sample feature group includes a second feature, a third feature, and a fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource. The module is also used to adjust the virtual resource features of the second media resource based on a perturbation factor for each third sample feature group to obtain a fourth sample feature group. The fourth sample feature group includes a second feature, a fifth feature, and a sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource.

[0275] The hierarchical ranking model training module 1203 is used to iteratively train based on multiple sets of second sample pairs to obtain the hierarchical ranking model. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources.

[0276] In some embodiments, the hierarchical ranking model training module 1203 is used for:

[0277] Based on multiple sets of second sample pairs, the following steps are performed iteratively to train the hierarchical ranking model until the iteration stopping condition is met:

[0278] In any iteration, the third sample feature group is input into the hierarchical ranking model, the first prediction parameter corresponding to the second and third features is output, the second intermediate prediction parameter corresponding to the second and fifth features is output, the third prediction parameter is obtained based on the first prediction parameter and the second intermediate prediction parameter, and the third loss value is obtained based on the third prediction parameter and the third true parameter. The third prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the second media resource. The estimated cost refers to the estimated cost of the media resource per thousand impressions.

[0279] The second sample feature group is input into the hierarchical ranking model, and the first prediction parameter corresponding to the second and third features is output. The first intermediate prediction parameter corresponding to the second and fourth features is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource.

[0280] The fourth sample feature group is input into the hierarchical ranking model, and the second intermediate prediction parameters corresponding to the second and fifth features are output. The third intermediate prediction parameters corresponding to the second and sixth features are output. Based on the second and third intermediate prediction parameters, the fourth prediction parameter is obtained. Based on the fourth prediction parameter and the fourth true parameter, the fourth loss value is obtained. The fourth prediction parameter represents the probability that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource.

[0281] Based on the third, second, and fourth loss values, the second target loss value is obtained, and the model parameters of the hierarchical ranking model are adjusted in this iteration based on the second target loss value.

[0282] In some embodiments, the hierarchical ranking model training module 1203 is used to: weight the sum of the second loss value and the fourth loss value with the third loss value to obtain the second target loss value.

[0283] In some embodiments, the apparatus further includes:

[0284] The parameter configuration module is used to configure the fourth real parameter as the fourth sub-parameter when the virtual resource characteristics of the second media resource are reduced based on the perturbation factor. The fourth sub-parameter indicates that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource.

[0285] The parameter configuration module is also used to configure the fourth real parameter as the fifth sub-parameter when the virtual resource characteristics of the second media resource are not changed based on the perturbation factor. The fifth sub-parameter indicates that the estimated cost of the second media resource is the same as the estimated cost of the second simulated media resource.

[0286] The parameter configuration module is also used to configure the fourth real parameter as the sixth sub-parameter when the virtual resource characteristics of the second media resource are increased based on the perturbation factor. The sixth sub-parameter indicates that the estimated cost of the second media resource is less than the estimated cost of the second simulated media resource.

[0287] In this embodiment, since the virtual resource features of the first and second media resources are adjusted based on the perturbation factor, new samples can be obtained based on the adjusted features, thus enriching the number of samples. Furthermore, adjusting the virtual resource features based on the perturbation factor enables controllable adjustment of the virtual resource features, allowing the new samples to represent the actual adjustment of the virtual resource features. Then, the hierarchical ranking model is trained together based on the original samples and the new samples, so that the output of the hierarchical ranking model can change reasonably with the changes in virtual resource features, thereby ensuring the accuracy of the output of the hierarchical ranking model.

[0288] In the embodiments of this application, the computer device can be a terminal or a server. When the computer device is a terminal, the terminal acts as the execution subject to implement the technical solution provided in the embodiments of this application; when the computer device is a server, the server acts as the execution subject to implement the technical solution provided in the embodiments of this application; or, the technical solution provided in this application can be implemented through the interaction between the terminal and the server. The embodiments of this application do not limit this.

[0289] Figure 13 A structural block diagram of a terminal 1300 provided in an exemplary embodiment of this application is shown. The terminal 1300 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1300 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0290] Typically, terminal 1300 includes a processor 1301 and a memory 1302.

[0291] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1301 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0292] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1302 is used to store at least one program code, which is executed by the processor 1301 to implement the media resource sorting method or the sorting model training method provided in the method embodiments of this application.

[0293] In some embodiments, the terminal 1300 may also optionally include a peripheral device interface 1303 and at least one peripheral device. The processor 1301, memory 1302, and peripheral device interface 1303 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307, and a power supply 1308.

[0294] Peripheral device interface 1303 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1301 and memory 1302. In some embodiments, processor 1301, memory 1302 and peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1301, memory 1302 and peripheral device interface 1303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0295] The radio frequency (RF) circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1304 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1304 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1304 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0296] Display screen 1305 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1305 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1301 for processing. In this case, display screen 1305 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1305, disposed on the front panel of terminal 1300; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1300 or in a folded design; in still other embodiments, display screen 1305 may be a flexible display screen, disposed on a curved or folded surface of terminal 1300. Furthermore, display screen 1305 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1305 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0297] The camera assembly 1306 is used to acquire images or videos. Optionally, the camera assembly 1306 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1306 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0298] The audio circuit 1307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1301 for processing, or input to the radio frequency circuit 1304 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 1300. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1307 may also include a headphone jack.

[0299] Power supply 1308 is used to power the various components in terminal 1300. Power supply 1308 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1308 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0300] In some embodiments, the terminal 1300 further includes one or more sensors 1309. The one or more sensors 1309 include, but are not limited to: an acceleration sensor 1310, a gyroscope sensor 1311, a pressure sensor 1312, an optical sensor 1313, and a proximity sensor 1314.

[0301] Accelerometer 1310 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1300. For example, accelerometer 1310 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1301 can control display screen 1305 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1310. Accelerometer 1310 can also be used for games or for acquiring user motion data.

[0302] The gyroscope sensor 1311 can detect the orientation and rotation angle of the terminal 1300. The gyroscope sensor 1311 can work in conjunction with the accelerometer sensor 1310 to acquire the user's 3D movements on the terminal 1300. Based on the data acquired by the gyroscope sensor 1311, the processor 1301 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0303] The pressure sensor 1312 can be disposed on the side bezel of the terminal 1300 and / or on the lower layer of the display screen 1305. When the pressure sensor 1312 is disposed on the side bezel of the terminal 1300, it can detect the user's grip signal on the terminal 1300, and the processor 1301 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1312. When the pressure sensor 1312 is disposed on the lower layer of the display screen 1305, the processor 1301 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1305. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0304] Optical sensor 1313 is used to collect ambient light intensity. In one embodiment, processor 1301 can control the display brightness of display screen 1305 based on the ambient light intensity collected by optical sensor 1313. Specifically, when the ambient light intensity is high, the display brightness of display screen 1305 is increased; when the ambient light intensity is low, the display brightness of display screen 1305 is decreased. In another embodiment, processor 1301 can also dynamically adjust the shooting parameters of camera assembly 1306 based on the ambient light intensity collected by optical sensor 1313.

[0305] The proximity sensor 1314, also known as a distance sensor, is typically located on the front panel of the terminal 1300. The proximity sensor 1314 is used to detect the distance between the user and the front of the terminal 1300. In one embodiment, when the proximity sensor 1314 detects that the distance between the user and the front of the terminal 1300 is gradually decreasing, the processor 1301 controls the display screen 1305 to switch from a screen-on state to a screen-off state; when the proximity sensor 1314 detects that the distance between the user and the front of the terminal 1300 is gradually increasing, the processor 1301 controls the display screen 1305 to switch from a screen-off state to a screen-on state.

[0306] Those skilled in the art will understand that Figure 13 The structure shown does not constitute a limitation on terminal 1300 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0307] Figure 14This is a schematic diagram of a server structure according to an embodiment of this application. The server 1400 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1401 and one or more memories 1402. The memories 1402 are used to store executable program code, and the processors 1401 are configured to execute the executable program code to implement the media resource sorting method or sorting model training method provided in the various method embodiments above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated here.

[0308] This application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the media resource sorting method or the sorting model training method of any of the above implementations.

[0309] This application also provides a computer program product, which includes computer program code stored in a computer-readable storage medium. The processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to execute the media resource sorting method or the sorting model training method of any of the above implementations.

[0310] In some embodiments, the computer program product involved in the present application can be deployed and executed on a computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network can form a blockchain system.

[0311] The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for sorting media resources, characterized in that, The method includes: In response to the terminal's request to display media resources, multiple media resources are retrieved; For each media resource among multiple media resources, a first coarse ranking parameter is obtained based on the first feature of the media resource. The first feature includes the user object feature of the terminal, the media resource feature, and the display scenario feature of the media resource. The user object feature is used to describe the user of the terminal, the media resource feature is used to describe the media resource, and the display scenario feature is used to describe the display scenario of the media resource. Based on the first feature of the media resource and the virtual resource feature, a second coarse ranking parameter is obtained. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is transformed in the display scenario. The second coarse ranking parameter is positively correlated with the virtual resource feature. Based on the second coarse ranking parameter, the first coarse ranking parameter is adjusted to obtain the target coarse ranking parameter of the media resource. The target coarse ranking parameter is positively correlated with the second coarse ranking parameter. The target coarse ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scene. Based on the target coarse ranking parameters of the multiple media resources, the multiple media resources are coarsely ranked.

2. The method according to claim 1, characterized in that, The coarse ranking parameters of the media resources are obtained based on a ranking model, which includes an embedding layer, a first network, and a second network. The first coarse ranking parameters are obtained based on the first feature of the media resources, including: The first feature is input into the ranking model, and a first feature vector is obtained based on the embedding layer; The first feature vector of the first feature is input into the first network, and the first feature vector is subjected to dot product processing and nonlinear transformation to obtain the first coarse-sorting parameters. The second coarse-ranking parameters, derived based on the first feature of the media resource and the virtual resource feature, include: The virtual resource features are input into the ranking model, and a virtual resource feature vector is obtained based on the embedding layer; The first feature vector is input into the second network to obtain adaptive coefficients. The product of the adaptive coefficients and the virtual resource feature vector is output as the second coarse-ranking parameter. The adaptive coefficients are used to represent the difference between the first coarse-ranking parameter and the second coarse-ranking parameter.

3. The method according to claim 1, characterized in that, The step of adjusting the first coarse ranking parameters based on the second coarse ranking parameters to obtain the target coarse ranking parameters of the media resource includes: The sum of the first coarse-sorting parameters and the second coarse-sorting parameters is obtained. The target function is called to process the sum value to obtain the target coarse-sort parameters.

4. The method according to claim 1, characterized in that, The media resource corresponds to multiple candidate virtual resource values, and the multiple candidate virtual resource values ​​are virtual resource values ​​corresponding to multiple conversion targets of the media resource. The method further includes: Obtain the current status information of the media resource, obtain the target virtual resource value corresponding to the current status information from the plurality of candidate virtual resource values, and use the target virtual resource value as the virtual resource feature.

5. A training method for a ranking model, characterized in that, The method includes: Multiple first sample feature groups are obtained. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. For each first sample feature group, the virtual resource features of the first media resource are adjusted based on the perturbation factor to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource. A point-level ranking model is obtained by iterative training based on multiple sets of first sample pairs. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

6. The method according to claim 5, characterized in that, The point-level ranking model obtained by iterative training based on multiple sets of first sample pairs includes: Based on the multiple sets of first sample pairs, the following steps are iteratively performed to train the point-level ranking model until the iteration stopping condition is met: In any iteration, the first sample feature group is input into the point-level ranking model, the first prediction parameter is output, and the first loss value is obtained based on the first prediction parameter and the first true parameter. The first prediction parameter represents the ranking competitiveness of the first media resource among multiple media resources. The second sample feature group is input into the point-level ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The first intermediate prediction parameter corresponding to the second feature and the fourth feature is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The first intermediate prediction parameter represents the ranking competitiveness of the first simulated media resource among multiple media resources. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. The estimated cost refers to the estimated cost per thousand impressions of the media resource. Based on the first loss value and the second loss value, a first target loss value is determined, and the model parameters of the point-level sorting model in this iteration are adjusted based on the first target loss value.

7. The method according to claim 6, characterized in that, The point-level ranking model includes an embedding layer and a neural network layer. The step of inputting the second sample feature group into the point-level ranking model and outputting first prediction parameters corresponding to the second and third features, and outputting first intermediate prediction parameters corresponding to the second and fourth features, includes: The second sample feature group is input into the point-level ranking model, and based on the embedding layer, the second feature vector of the second feature, the third feature vector of the third feature, and the fourth feature vector of the fourth feature are obtained. The second feature vector and the third feature vector are input into the neural network layer to obtain the first prediction parameter. The second feature vector and the fourth feature vector are input into the neural network layer to obtain the first intermediate prediction parameter.

8. The method according to claim 6, characterized in that, Determining the first target loss value based on the first loss value and the second loss value includes: The first target loss value is obtained by weighted summation of the first loss value and the second loss value.

9. The method according to claim 6, characterized in that, The method further includes: When the virtual resource characteristics of the first media resource are reduced based on the disturbance factor, the second real parameter is configured as the first sub-parameter, and the first sub-parameter indicates that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. If the virtual resource characteristics of the first media resource are not changed based on the disturbance factor, the second real parameter is configured as a second sub-parameter, and the second sub-parameter indicates that the estimated cost of the first media resource is the same as the estimated cost of the first simulated media resource. When the virtual resource characteristics of the first media resource are increased based on the disturbance factor, the second real parameter is configured as a third sub-parameter, wherein the third sub-parameter indicates that the estimated cost of the first media resource is less than the estimated cost of the first simulated media resource.

10. A training method for a ranking model, characterized in that, The method includes: Multiple third sample feature groups are obtained. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resources. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource. For each third sample feature group, based on the perturbation factor, the virtual resource features of the first media resource are adjusted to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource. For each third sample feature group, the virtual resource features of the second media resource are adjusted based on the perturbation factor to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource. A hierarchical ranking model is obtained by iterative training based on multiple sets of second sample pairs. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources.

11. The method according to claim 10, characterized in that, The iterative training based on multiple sets of second sample pairs to obtain the hierarchical ranking model includes: Based on the multiple sets of second sample pairs, the following steps are iteratively performed to train the pairwise ranking model until the iteration stopping condition is met: In any iteration, the third sample feature group is input into the hierarchical ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The second intermediate prediction parameter corresponding to the second feature and the fifth feature is output. Based on the first prediction parameter and the second intermediate prediction parameter, the third prediction parameter is obtained. Based on the third prediction parameter and the third true parameter, the third loss value is obtained. The third prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the second media resource. The estimated cost refers to the estimated cost per thousand impressions of the media resource. The second sample feature group is input into the hierarchical ranking model, and the first prediction parameter corresponding to the second feature and the third feature is output. The first intermediate prediction parameter corresponding to the second feature and the fourth feature is output. Based on the first prediction parameter and the first intermediate prediction parameter, the second prediction parameter is obtained. Based on the second prediction parameter and the second true parameter, the second loss value is obtained. The second prediction parameter represents the probability that the estimated cost of the first media resource is greater than the estimated cost of the first simulated media resource. The fourth sample feature group is input into the hierarchical ranking model, and the second intermediate prediction parameter corresponding to the second feature and the fifth feature is output. The third intermediate prediction parameter corresponding to the second feature and the sixth feature is output. Based on the second intermediate prediction parameter and the third intermediate prediction parameter, the fourth prediction parameter is obtained. Based on the fourth prediction parameter and the fourth true parameter, the fourth loss value is obtained. The fourth prediction parameter represents the probability that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource. Based on the third loss value, the second loss value, and the fourth loss value, a second target loss value is obtained, and the model parameters of the hierarchical ranking model in this iteration are adjusted based on the second target loss value.

12. The method according to claim 11, characterized in that, The process of obtaining the second target loss value based on the third loss value, the second loss value, and the fourth loss value includes: The second target loss value is obtained by weighted summing the second loss value and the fourth loss value with the third loss value.

13. The method according to claim 11, characterized in that, The method further includes: When the virtual resource characteristics of the second media resource are reduced based on the disturbance factor, the fourth real parameter is configured as a fourth sub-parameter, which indicates that the estimated cost of the second media resource is greater than the estimated cost of the second simulated media resource. If the perturbation factor does not change the virtual resource characteristics of the second media resource, the fourth real parameter is configured as the fifth sub-parameter, which indicates that the estimated cost of the second media resource is the same as the estimated cost of the second simulated media resource. When the virtual resource characteristics of the second media resource are increased based on the disturbance factor, the fourth real parameter is configured as the sixth sub-parameter, which indicates that the estimated cost of the second media resource is less than the estimated cost of the second simulated media resource.

14. A media resource sorting device, characterized in that, The device includes: The media resource acquisition module is used to acquire multiple media resources in response to the terminal's media resource display request; The first coarse ranking parameter determination module is used to obtain a first coarse ranking parameter for each media resource among multiple media resources based on a first feature of the media resource. The first feature includes the user object feature of the terminal, the media resource feature, and the display scenario feature of the media resource. The user object feature is used to describe the user of the terminal, the media resource feature is used to describe the media resource, and the display scenario feature is used to describe the display scenario of the media resource. The second coarse ranking parameter determination module is used to obtain a second coarse ranking parameter based on the first feature of the media resource and the virtual resource feature. The virtual resource feature is used to describe the value of the virtual resource required after the media resource is transformed in the display scenario. The second coarse ranking parameter is positively correlated with the virtual resource feature. The target coarse-ranking parameter determination module is used to adjust the first coarse-ranking parameter based on the second coarse-ranking parameter to obtain the target coarse-ranking parameter of the media resource. The target coarse-ranking parameter is positively correlated with the second coarse-ranking parameter. The target coarse-ranking parameter is used to describe the correlation between the media resource and the characteristics of the user object and the characteristics of the display scene. The media resource sorting module is used to perform coarse sorting of the multiple media resources based on the target coarse sorting parameters of the multiple media resources.

15. A training device for a ranking model, characterized in that, The device includes: The sample feature group acquisition module is used to acquire multiple first sample feature groups. Each first sample feature group includes a second feature and a third feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The feature adjustment module is used to adjust the virtual resource features of the first media resource based on a perturbation factor for each first sample feature group to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource. The point-level ranking model training module is used to iteratively train based on multiple sets of first sample pairs to obtain a point-level ranking model. Each set of first sample pairs includes a first sample feature group and a second sample feature group. The point-level ranking model is used to obtain the ranking competitiveness of any media resource among multiple media resources.

16. A training device for a ranking model, characterized in that, The device includes: The sample feature group acquisition module is used to acquire multiple third sample feature groups. Each third sample feature group includes a second feature, a third feature, and a fifth feature. The second feature includes the user characteristics of the sample terminal and the sample display scene characteristics of the media resource. The third feature includes the media resource characteristics of the first media resource and the virtual resource characteristics of the first media resource. The fifth feature includes the media resource characteristics of the second media resource and the virtual resource characteristics of the second media resource. The feature adjustment module is used to adjust the virtual resource features of the first media resource based on a perturbation factor for each third sample feature group to obtain a second sample feature group. The second sample feature group includes the second feature, the third feature, and the fourth feature. The fourth feature includes the media resource features of the first media resource and the adjusted virtual resource features of the first media resource. The fourth feature is used to represent the first simulated media resource. The feature adjustment module is also used to adjust the virtual resource features of the second media resource based on the perturbation factor for each third sample feature group to obtain a fourth sample feature group. The fourth sample feature group includes the second feature, the fifth feature, and the sixth feature. The sixth feature includes the media resource features of the second media resource and the adjusted virtual resource features of the second media resource. The sixth feature is used to represent the second simulated media resource. The hierarchical ranking model training module is used to iteratively train based on multiple sets of second sample pairs to obtain the hierarchical ranking model. Each set of second sample pairs includes a third sample feature group, a second sample feature group, and a fourth sample feature group. The hierarchical ranking model is used to obtain the ranking relationship between every two media resources.

17. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded and executed by the processor as a method for sorting media resources according to any one of claims 1 to 4, a method for training a sorting model according to any one of claims 5 to 9, or a method for training a sorting model according to any one of claims 10 to 13.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store at least one computer program, which is used to execute the media resource sorting method according to any one of claims 1 to 4, the sorting model training method according to any one of claims 5 to 9, or the sorting model training method according to any one of claims 10 to 13.

19. A computer program product, characterized in that, The computer program product includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the media resource sorting method according to any one of claims 1 to 4, the sorting model training method according to any one of claims 5 to 9, or the sorting model training method according to any one of claims 10 to 13.

Citation Information

Patent Citations

  • Information processing method, device, computer readable medium and electronic equipment

    CN113570395A

  • Multimedia sequence recommendation method and device, operation prediction model training method and device, equipment and storage medium

    CN114741540A