Content sorting method and device, equipment, medium and program product

By generating input information in a unified format and using a sorting model, the problem of sorting multi-form content to be recommended is solved, effective sorting in scenarios such as instant messaging software is achieved, and user experience is improved.

CN118626708APending Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310266525.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively sort multi-form content to be recommended, such as pictures, articles, short videos and other different forms of content in instant messaging software. How to generate unified input information for sorting.

Method used

By obtaining the characteristic information of the target object and the content to be recommended, input information in the same format is generated, and the ranking model is used, including the input layer, embedding layer, expert network selection layer and output layer, to perform dimensionality reduction and weight calculation to generate ranking results.

Benefits of technology

It realizes the sorting of multi-form content to be recommended, improves the adaptability and sorting accuracy of recommendation scenarios, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626708A
    Figure CN118626708A
Patent Text Reader

Abstract

The invention provides a content sorting method and device, equipment, a medium and a program product. The method comprises the steps that feature information of a target object and feature information of N pieces of to-be-recommended content corresponding to the target object are acquired; wherein the N to-be-recommended contents have M forms, and both N and M are integers greater than 1; generating N pieces of input information with the same format based on the feature information of the target object and the respective feature information of the N pieces of to-be-recommended content; and inputting the N pieces of input information into a sorting model to obtain a sorting result of the N pieces of to-be-recommended content. Therefore, the method can adapt to a recommendation scene in which the to-be-recommended content has various forms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to a content sorting method, apparatus, device, medium, and program product. Background Art

[0002] In recommendation scenarios, it is often necessary to sort several contents to be recommended in order to recommend them to the object. Usually, the contents to be recommended in recommendation scenarios are all in the same form. For example, on e-commerce platforms, the contents to be recommended can be in the form of pictures. However, for some recommendation scenarios, the contents to be recommended have the characteristics of diverse forms. For example, on the subscription platform in instant messaging software, the contents to be recommended can be in the form of pictures, articles, short videos, etc. Based on this, for the multi-form contents to be recommended, how to sort the recommended contents is a technical problem to be solved in this application. Summary of the invention

[0003] The present application provides a content ranking method, apparatus, device, medium and program product, which can adapt to recommendation scenarios where the content to be recommended has diverse forms.

[0004] In a first aspect, an embodiment of the present application provides a content sorting method, comprising: obtaining feature information of a target object and feature information of each of N contents to be recommended corresponding to the target object; wherein the N contents to be recommended have M forms, and N and M are both integers greater than 1; based on the feature information of the target object and the feature information of each of the N contents to be recommended, generating N input information of the same format; inputting the N input information into a sorting model to obtain a sorting result of the N contents to be recommended.

[0005] In a second aspect, the embodiment of the present application provides a content ranking device, comprising: an acquisition module, a generation module and an input module. The acquisition module is used to acquire the characteristic information of the target object and the characteristic information of each of the N to-be-recommended contents corresponding to the target object; wherein the N to-be-recommended contents have M forms, and N and M are both integers greater than 1; the generation module is used to generate N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N to-be-recommended contents; the input module is used to input the N input information into the ranking model to obtain the ranking results of the N to-be-recommended contents.

[0006] In some possible implementations, the acquisition module is also used to obtain the content source identifier of each of the N contents to be recommended before the generation module generates N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended; accordingly, the generation module is specifically used to generate N input information of the same format based on the characteristic information of the target object, the characteristic information of each of the N contents to be recommended and the content source identifier of each of the N contents to be recommended.

[0007] In some implementable embodiments, the generation module is specifically used to: for any one of N contents to be recommended, combine the characteristic information of the target object, the characteristic information of the content to be recommended and the content source identifier of the content to be recommended in accordance with a unified format of the N input information to obtain the input information of the content to be recommended; wherein, when the content to be recommended does not include any information of the unified format of the N input information, any information of the input information of the content to be recommended is set to 0.

[0008] In some implementations, the sorting model includes, from bottom to top:

[0009] Input layer, used to input N input information;

[0010] The embedding layer is used to reduce the dimension of N input information and obtain N embedding vectors;

[0011] L expert network selection layers are arranged in sequence from bottom to top. For any of the L expert network selection layers, the expert network selection layer includes: P expert networks, a gating network and an aggregation network; the P expert networks are used to determine P expert results based on the input information of the expert network selection layer; the gating network is used to determine the weights of the P expert results based on the input information of the expert network selection layer, and the aggregation network is used to aggregate the P expert results based on the weights of the P expert results to obtain an aggregation result; wherein L is a positive integer and P is an integer greater than 1;

[0012] The output layer is used to obtain the ranking results of N to-be-recommended contents based on the aggregated results output by the top expert network selection layer among the L expert network selection layers.

[0013] In some implementations, the gating network includes:

[0014] A first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a first vector;

[0015] The second fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a second vector;

[0016] The processing sub-network is used to obtain a third vector based on the first vector and the second vector; and to perform sparse processing on the third vector to obtain the weights of the P expert networks.

[0017] In some implementations, the processing subnetwork is specifically used to: calculate the product of the second vector and zero to obtain a zero vector; and calculate the sum of the zero vector and the first vector to obtain a third vector.

[0018] In some possible implementations, the processing subnetwork is specifically used to: keep the first K elements in the third vector unchanged in descending order of the elements in the third vector, and set the remaining elements in the third vector except the first K elements to negative infinite values ​​to obtain a fourth vector, where K is a positive integer; set the non-negative infinite values ​​in the fourth vector to values ​​between 0 and 1 through an activation function, and set the negative infinite values ​​in the fourth vector to 0 to obtain the weights of each of the P expert networks.

[0019] In some implementations, the device further includes: a training module, the acquisition module is further used to acquire training samples; the training module is used to train the sorting model based on the training samples; wherein, when the training module trains the sorting model, each sub-network in the gated network is respectively used to:

[0020] The first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a fifth vector;

[0021] The second fully connected sub-network is used to perform full connection processing on the input information of the expert network selection layer to obtain the sixth vector;

[0022] The processing sub-network is used to obtain the seventh vector based on the fifth vector and the sixth vector; and perform sparse processing on the seventh vector to obtain the weights of the P expert networks.

[0023] In some implementations, the processing subnetwork is specifically used to: generate a random value based on a random standard normal distribution; calculate the product of the sixth vector and the random value to obtain an eighth vector; calculate the sum of the eighth vector and the fifth vector to obtain a seventh vector.

[0024] In some possible implementations, the device also includes: a determination module, used to determine the number of content sources of N content to be recommended and the number of tasks of the sorting model; based on the number of content sources of N content to be recommended and the number of tasks of the sorting model, determine the number of expert networks in each expert network selection layer in the sorting model.

[0025] In some possible implementations, the device also includes: a determination module specifically used to: calculate the product of the number of content sources of N content to be recommended, the number of tasks of the sorting model and a preset value, and obtain the number of expert networks in each expert network selection layer in the sorting model.

[0026] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect or its various implementations.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect or its various implementations.

[0028] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute a method as in the first aspect or its various implementations.

[0029] In a sixth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method in the first aspect or its various implementations.

[0030] Through the technical solution provided by the embodiment of the present application, for multiple contents to be recommended in various forms, the electronic device can generate input information of the same format for these contents to be recommended, so that these input information can be input into the sorting model to obtain the sorting results of N contents to be recommended. Thus, it can adapt to the recommendation scenario where the contents to be recommended have various forms. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0033] Figure 2 A flowchart of a content sorting method provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of a sorting model provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of an expert network layer provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of an output layer provided in an embodiment of the present application;

[0037] Figure 6A schematic diagram of another output layer provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of another sorting model provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of an expert network selection layer provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of a gating network provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of a content sorting device 1000 provided in an embodiment of the present application;

[0042] Fig.11 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0045] As mentioned above, for some recommendation scenarios, the content to be recommended has various forms. For example, on the subscription platform of instant messaging software, the content to be recommended can be in the form of pictures, articles, short videos, etc. Based on this, how to sort the recommended content in various forms is a technical problem to be solved in this application.

[0046] In order to solve the above technical problems, the present application proposes to generate input information in a unified format for different forms of content to be recommended, input the input information in a unified format into a ranking model, and obtain ranking results of the content to be recommended.

[0047] This application relates to AI technology, which is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0048] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0049] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers 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 make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0050] For example, Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application includes a terminal device 110 and a server 120, and the terminal device 110 and the server 120 can be directly or indirectly connected via wired communication or wireless communication.

[0051] In some possible implementations, the terminal device 110 may be installed with an application (APP), and the terminal device may collect object operations of the APP, such as the operation of entering a subscription account page. In response to the object operation, the server 120 is triggered to execute the content sorting method provided in the embodiment of the present application to obtain sorting results of multiple contents to be recommended in various forms, and the sorting results are sent to the terminal device. The terminal device 110 may render and display the contents to be recommended according to the sorting results of the multiple contents to be recommended in various forms.

[0052] In some possible implementations, the multiple forms of content to be recommended include but are not limited to: pictures, articles, and short videos.

[0053] In some possible implementations, the above-mentioned APP may be an instant messaging APP, a shopping APP, etc., but is not limited thereto.

[0054] In some implementations, the terminal device 110 may be a mobile phone, a computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, etc., but is not limited thereto. The terminal device 110 is often configured with a display device, which may be a display, a display screen, a touch screen, etc., and the touch screen may also be a touch screen, a touch panel, etc.

[0055] In some implementable embodiments, the server 120 may be one or more servers. When there are multiple servers, there are at least two servers for providing different services, and / or there are at least two servers for providing the same service, such as providing the same service in a load balancing manner, which is not limited in the embodiments of the present application. Among them, the above-mentioned server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical 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 communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Server 102 can also become a node of the blockchain.

[0056] It should be noted that the application scenarios of the embodiments of the present application include but are not limited to Figure 1 The application scenario shown.

[0057] The technical solution of this application will be described in detail below:

[0058] Figure 2 A flowchart of a content sorting method provided in an embodiment of the present application, the method can be executed by an electronic device, and the electronic device can be Figure 1The server in the blockchain can be an independent physical server, a server cluster or distributed system composed of multiple physical 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 communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also become a node of the blockchain. Figure 2 As shown, the method may include:

[0059] S210: Acquire characteristic information of a target object and characteristic information of each of N to-be-recommended contents corresponding to the target object; wherein the N to-be-recommended contents have M forms, and both N and M are integers greater than 1;

[0060] It should be understood that the target object refers to the object to which the electronic device is to recommend the N contents to be recommended.

[0061] In some possible implementations, the characteristic information of the target object includes, but is not limited to: the target object's identification, age, gender, and categories of interest to the target object.

[0062] For example, the characteristic information of object 1 includes: the identifier of object 1 is 001, the age is 35, the gender is female, and the object is interested in short travel videos and English subscription account articles.

[0063] In some possible implementations, the electronic device may obtain registration information of the target object on the APP, and obtain feature information of the target object based on the registration information of the target object.

[0064] For example, the electronic device may pull registration information of the target object based on the identifier of the target object, where the registration information includes: feature information of the target object.

[0065] In some implementations, the electronic device may obtain the registration information and historical access data of the target object on the APP, and obtain the characteristic information of the target object based on the registration information and historical access data of the target object.

[0066] For example, the electronic device can pull the registration information of the target object based on the identifier of the target object, and the registration information includes: the identifier, age, and gender of the target object. At the same time, the electronic device can determine the click-through rate, viewing time, number of interactions, etc. of the target object for the historically visited content based on the historical access data of the target object. Further, the electronic device can determine the historically visited content with the highest click-through rate of the target object or the click-through rate ranks in the top K1, and the categories to which these contents belong are the categories of interest to the target object, or the electronic device can determine the categories to which the historically visited content with the longest viewing time of the target object or the viewing time ranks in the top K2, and the categories to which these contents belong are the categories of interest to the target object, or the electronic device can determine the categories to which the historically visited content with the most interactions of the target object or the number of interactions ranks in the top K3, and the categories to which these contents belong are the categories of interest to the target object.

[0067] It should be understood that the click-through rate (CTR) of a certain content to be recommended refers to the number of clicks on the content to be recommended divided by the number of views of the content to be recommended.

[0068] It should be understood that in the embodiments of the present application, interaction includes but is not limited to: likes, shares, favorites, and comments.

[0069] In some implementations, each of the N to-be-recommended contents may be in the form of a picture, an article, or a short video. For example, the to-be-recommended content may be a subscription account article, a subscription account picture, a short video, and the like.

[0070] In some possible implementations, for each of the N content to be recommended, the characteristic information of the content to be recommended includes but is not limited to: the click-through rate of the content to be recommended within a preset time period, the viewing time of the content to be recommended within the preset time period, the number of likes of the content to be recommended within the preset time period, the number of shares of the content to be recommended within the preset time period, the number of collections of the content to be recommended within the preset time period, the number of likes of the content to be recommended within the preset time period, the number of comments on the content to be recommended within the preset time period, the number of fans of the public account to which the content to be recommended belongs as of the current time, and the number of fans of the video account to which the content to be recommended belongs as of the current time.

[0071] In some implementations, the end time of the preset time period may be the current time.

[0072] For example, the characteristic information of subscription account article A includes: the click-through rate of subscription account article A within one week as of the current time is 50%, the viewing time of subscription account article A within one week as of the current time is 1,300 minutes, the number of shares of subscription account article A within one week as of the current time is 10,000 times, and the number of fans of the public account to which the article belongs as of the current time is 78,000.

[0073] In some possible implementations, the electronic device may collect statistics on access to the content to be recommended to obtain feature information of the content to be recommended.

[0074] S220: Generate N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended;

[0075] It should be understood that, since the N contents to be recommended have M forms, the characteristic information of the contents to be recommended in different forms is not completely the same.

[0076] For example, when the content to be recommended is a subscription account article or subscription account picture, its characteristic information includes: the click-through rate of the subscription account article or subscription account picture within a preset time length, the viewing time within a preset time period, the number of shares within a preset time period, the number of favorites within a preset time period, the number of comments within a preset time period, and the number of fans of the public account to which the subscription account article or subscription account picture belongs as of the current time. When the content to be recommended is a short video, its characteristic information includes: the click-through rate of the short video within a preset time length, the viewing time within a preset time period, the number of likes within a preset time period, the number of shares within a preset time period, the number of likes within a preset time period, the number of favorites within a preset time period, the number of comments within a preset time period, and the number of fans of the video account to which the short video belongs as of the current time.

[0077] It can be seen that the difference between the characteristic information of subscription account articles / pictures and short videos is as follows, but not limited to this: (1) The characteristic information of subscription account articles / pictures includes: the number of fans of the public account to which the subscription account article / picture belongs as of the current time. The characteristic information of short videos includes: the number of fans of the video account to which the short video belongs as of the current time. (2) The characteristic information of short videos is different from the characteristic information of subscription account articles / pictures in terms of the number of likes within a preset time period and the number of likes within a preset time period.

[0078] For the ranking model, the format of its input information should be unified. Based on this, the embodiment of the present application proposes to generate the unified format of input information of the above N contents to be recommended:

[0079] In a first implementation manner, the electronic device may generate N pieces of input information in the same format based only on the feature information of the target object and the feature information of each of the N pieces of content to be recommended.

[0080] In some implementations, for any one of the N pieces of content to be recommended, the electronic device combines the characteristic information of the target object and the characteristic information of the content to be recommended according to the unified format of the N pieces of input information to obtain the input information of the content to be recommended. When the content to be recommended does not include any information of the unified format of the N pieces of input information, any information of the input information of the content to be recommended is set to 0.

[0081] Of course, the electronic device can also perform calculations such as summing or multiplying the characteristic information of the target object and the characteristic information of the content to be recommended to obtain the input information of the content to be recommended. In short, the embodiment of the present application does not limit the way in which the electronic device generates N input information of the same format based only on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended.

[0082] In some possible implementations, the unified format of the N input information is: characteristic information of the target object, the click-through rate of the content to be recommended within a preset duration, the viewing time within a preset time period, the number of likes within a preset time period, the number of shares within a preset time period, the number of likes within a preset time period, the number of collections within a preset time period, the number of comments within a preset time period, the number of fans of the official account to which the content to be recommended belongs as of the current time, and the number of fans of the video account to which the content to be recommended belongs as of the current time.

[0083] In some possible implementations, the electronic device may combine the characteristic information of the target object and the characteristic information of the content to be recommended as follows, but not limited to: the characteristic information of the target object first, then the characteristic information of the content to be recommended, or the characteristic information of the content to be recommended first, then the characteristic information of the target object.

[0084] For example, the input information corresponding to subscription account article A is: the identifier of object 1 is 001, the age is 35, the gender is female, the object is interested in travel short videos and English subscription account articles, the click rate of subscription account article A within one week as of the current time is 50%, the viewing time within one week as of the current time is 1,300 minutes, the number of likes within one week as of the current time is 0, the number of shares within one week as of the current time is 10,000, the number of likes within one week as of the current time is 0, the number of collections within one week as of the current time is 5,000, the number of comments within one week as of the current time is 202, the number of fans of the public account to which subscription account article A belongs as of the current time is 78,000, and the number of fans of the video account to which subscription account article A belongs as of the current time is 0.

[0085] For example, the input information corresponding to short video B is: the identifier of object 1 is 001, the age is 35, the gender is female, the object is interested in travel short videos and English subscription account articles, the click rate of short video B within one week as of the current time is 78%, the viewing time within one week as of the current time is 2000 minutes, the number of likes within one week as of the current time is 11,000 times, the number of shares within one week as of the current time is 10,000 times, the number of likes within one week as of the current time is 12,000 times, the number of collections within one week as of the current time is 5005 times, the number of comments within one week as of the current time is 202 times, the number of fans of the official account to which short video B belongs as of the current time is 0, and the number of fans of the video account to which short video B belongs as of the current time is 800,000.

[0086] In a second implementation method, the electronic device may also obtain the content source identification of each of the N contents to be recommended; and generate N input information of the same format based on the feature information of the target object, the feature information of each of the N contents to be recommended, and the content source identification of each of the N contents to be recommended.

[0087] It should be understood that the content source identifier of the content to be recommended is used to identify the source of the content to be recommended.

[0088] In some possible implementations, sources of content to be recommended include, but are not limited to: subscribed articles, subscribed short videos, subscribed pictures, recommended articles, recommended short videos, and recommended pictures.

[0089] It should be understood that subscribed articles, subscribed short videos, and subscribed pictures refer to articles, short videos, and pictures subscribed by the target object. Recommended articles, recommended short videos, and recommended pictures refer to articles, short videos, and pictures that the target object has not subscribed to but are recommended to the target object by the APP.

[0090] In some possible implementations, for any one of N contents to be recommended, the electronic device can combine the characteristic information of the target object, the characteristic information of the content to be recommended, and the content source identifier of the content to be recommended in a unified format of the N input information to obtain the input information of the content to be recommended; wherein, when the content to be recommended does not include any information of the unified format of the N input information, any information of the input information of the content to be recommended is set to 0.

[0091] Of course, the electronic device can also sum or multiply the characteristic information of the target object and the content source identifier of the content to be recommended, and then combine the summation result or the multiplication result with the characteristic information of the content to be recommended to obtain the input information of the content to be recommended. In short, the embodiment of the present application does not limit the way in which the electronic device generates N input information of the same format based on the characteristic information of the target object, the characteristic information of each of the N contents to be recommended, and the content source identifier of each of the N contents to be recommended. In this case, the electronic device can combine the summation result or the multiplication result with the characteristic information of the content to be recommended as follows, but is not limited to this: first summation result or multiplication result, then characteristic information of the content to be recommended, or first characteristic information of the content to be recommended, then summation result or multiplication result.

[0092] It should be understood that the unified format of the N input information can be referred to above, and the embodiments of the present application will not elaborate on this.

[0093] In some possible implementations, the electronic device may combine the characteristic information of the target object, the characteristic information of the content to be recommended, and the content source identification of the content to be recommended as follows, but not limited to: first the characteristic information of the target object, then the characteristic information of the content to be recommended, and finally the content source identification of the content to be recommended; or, first the characteristic information of the target object, then the content source identification of the content to be recommended, and finally the characteristic information of the content to be recommended.

[0094] For example, the input information corresponding to subscription account article A is: the identifier of object 1 is 001, age is 35, gender is female, the object is interested in travel short videos and English subscription account articles, the click rate of subscription account article A within one week as of the current time is 50%, the viewing time within one week as of the current time is 1,300 minutes, the number of likes within one week as of the current time is 0, the number of shares within one week as of the current time is 10,000, the number of likes within one week as of the current time is 0, the number of collections within one week as of the current time is 5,000, the number of comments within one week as of the current time is 202, the number of fans of the public account to which subscription account article A belongs as of the current time is 78,000, the number of fans of the video account to which subscription account article A belongs as of the current time is 0, and the content source identifier of subscription account article A is subscription article identifier 0001.

[0095] For example, the input information corresponding to short video B is: the identifier of object 1 is 001, the age is 35, the gender is female, the object is interested in travel short videos and English subscription account articles, the click rate of short video B within one week as of the current time is 78%, the viewing time within one week as of the current time is 2000 minutes, the number of likes within one week as of the current time is 11,000 times, the number of shares within one week as of the current time is 10,000 times, the number of likes within one week as of the current time is 12,000 times, the number of collections within one week as of the current time is 5005 times, the number of comments within one week as of the current time is 202 times, the number of fans of the official account to which short video B belongs as of the current time is 0, the number of fans of the video account to which short video B belongs as of the current time is 800,000, and the content source identifier of short video B is the recommended short video identifier 0011.

[0096] S230: Inputting N input information into a ranking model to obtain ranking results of N contents to be recommended.

[0097] In some possible implementations, the problem of sorting N contents to be recommended can be understood as a multi-task problem. These tasks may include but are not limited to: the task of sorting the click rates of N contents to be recommended, the task of sorting the viewing time of N contents to be recommended, and the task of sorting the number of interactions of N contents to be recommended.

[0098] Based on this, in some implementable methods, the output of the sorting model, that is, the sorting results of the N contents to be recommended may include but are not limited to: the click-through rate of the N contents to be recommended, the probability that the viewing time of the N contents to be recommended is greater than the preset viewing time, and the probability that the number of interactions of the N contents to be recommended is greater than the preset number.

[0099] In other possible implementations, the output of the sorting model, that is, the sorting result of the N contents to be recommended, can be a fusion result of the following three probabilities: the click-through rate of the N contents to be recommended, the probability that the viewing time of the N contents to be recommended is greater than the preset viewing time, and the probability that the number of interactions of the N contents to be recommended is greater than the preset number.

[0100] The sorting model may use a fusion formula to fuse the above three probabilities. For example, the fusion formula may be a weighted sum formula, but is not limited thereto.

[0101] In some possible implementations, if the sorting module uses a weighted sum formula to fuse the above three probabilities, then the weighted weights corresponding to the above three probabilities may be fixed values.

[0102] For example, the weights corresponding to the click rate of N to-be-recommended content, the probability that the viewing time of N to-be-recommended content is greater than the preset viewing time, and the probability that the number of interactions of N to-be-recommended content is greater than the preset number can all be 1 / 3.

[0103] In some possible implementations, if the sorting module uses a weighted sum formula to fuse the above three probabilities, the electronic device can dynamically determine the weights corresponding to the above three probabilities based on the relationship between N and a preset threshold.

[0104] For example, if N is greater than a preset threshold, the weight corresponding to the click rate of the N to-be-recommended content is set to the largest of the three probabilities, and the weights of the other two probabilities are set equal. If N is less than or equal to the preset threshold, the weight corresponding to the probability that the number of interactions of the N to-be-recommended content is greater than the preset number is set to the largest of the three probabilities, and the weights of the other two probabilities are set equal.

[0105] The embodiment of the present application provides a content ranking method, in which the electronic device can generate input information of the same format for a plurality of to-be-recommended contents in various forms, so that the input information can be input into a ranking model to obtain ranking results of N to-be-recommended contents. This method can be adapted to recommendation scenarios where the to-be-recommended contents have various forms.

[0106] Furthermore, in an embodiment of the present application, the input information of the sorting model may include a content source identifier of the content to be recommended, so that the sorting model can recognize the differences between the various contents to be recommended, so that the electronic device can sort the various contents to be recommended based on the differences between the various contents to be recommended, thereby improving the sorting accuracy to improve the object experience. For example, subscribed content can be ranked higher than recommended content, and video account content can be ranked higher than articles and pictures.

[0107] The following describes the sorting model in detail through several examples. It should be understood that the sorting model provided in the embodiments of the present application is not limited to the sorting models provided in the following examples:

[0108] Example 1: Figure 3 A schematic diagram of a sorting model provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the ranking model includes, from bottom to top: an input layer, an embedding layer, L expert network layers arranged from bottom to top, and an output layer, where L is a positive integer.

[0109] The input layer is used to input the above N input information.

[0110] It should be understood that each of the N input information can be understood as an input vector. If the electronic device combines the characteristic information of the target object and the characteristic information of the content to be recommended to generate the input information of the content to be recommended, that is, the input vector, then the elements in the input vector are the characteristic information of the target object and the characteristic information of the content to be recommended. If the electronic device combines the characteristic information of the target object, the characteristic information of the content to be recommended, and the content source identifier of the content to be recommended to generate the input information of the content to be recommended, that is, the input vector, then the elements in the input vector are the characteristic information of the target object, the characteristic information of the content to be recommended, and the content source identifier of the content to be recommended.

[0111] The embedding layer is used to reduce the dimension of N input information to obtain N embedded vectors.

[0112] It should be understood that since the deep learning network uses one-hot encoding, the advantages of one-hot encoding are convenient and fast calculation and strong expression ability, but the disadvantage is that the encoding is too sparse, resulting in the encoding occupying a large amount of device resources. Based on this, an embedding layer is proposed. The role of the embedding layer is to reduce the dimension of N input information and obtain N embedded vectors of the same length.

[0113] It should be understood that if the above L is greater than 1, that is, the sorting model includes multiple expert network layers, then the output information of the i-th expert network layer among these expert network layers can be used as the input information of the i+1-th expert network layer, i=1, 2...L-1, where the input information of the 1st expert network layer is the above N embedding vectors.

[0114] In order to clearly illustrate the structure of the expert network layer, Figure 4 Detailed explanation of the expert network layer:

[0115] For example, Figure 4 A schematic diagram of an expert network layer provided in an embodiment of the present application, such as Figure 4 As shown, the expert network layer includes: P expert networks and an aggregation network, where P is an integer greater than 1.

[0116] The electronic device may determine the number P of expert networks included in the expert network layer by any of the following implementable methods, but is not limited thereto:

[0117] In a first implementation method, the number P of expert networks included in the expert network layer is a fixed value, for example, P=20.

[0118] In a second implementation method, the electronic device can determine the number of N content sources of content to be recommended and the number of tasks of the sorting model; based on the number of N content sources of content to be recommended and the number of tasks of the sorting model, determine the number P of expert networks in each expert network layer in the sorting model.

[0119] In some implementations, the electronic device may calculate the product of the number of content sources of N to-be-recommended content, the number of tasks of the sorting model, and a preset value to obtain the number of expert networks in each expert network layer in the sorting model.

[0120] In some implementations, the preset value may be 5, but is not limited thereto.

[0121] For example, suppose that the content sources of N contents to be recommended include: subscribed articles, subscribed short videos, subscribed pictures, recommended articles, recommended short videos, and recommended pictures. Suppose that the tasks of the sorting model include: the click-through rate sorting task of N contents to be recommended, the viewing time sorting task of N contents to be recommended, and the interaction times sorting task of N contents to be recommended. Suppose that the preset value is 5. It can be seen that the number of content sources of N contents to be recommended is 6, the number of tasks of the sorting model is 3, and the number of expert networks P in each expert network layer calculated by the electronic device is finally 6*3*5=90.

[0122] In another achievable manner, the electronic device may calculate the product of the number of content sources of N to-be-recommended content and the number of tasks of the ranking model to obtain the number of expert networks in each expert network layer in the ranking model.

[0123] For example, suppose that the content sources of N to-be-recommended content include: subscribed articles, subscribed short videos, subscribed pictures, recommended articles, recommended short videos, and recommended pictures. Suppose that the tasks of the sorting model include: the click-through rate sorting task of N to-be-recommended content, the viewing time sorting task of N to-be-recommended content, and the interaction count sorting task of N to-be-recommended content. It can be seen that the number of content sources of N to-be-recommended content is 6, the number of tasks of the sorting model is 3, and the number of expert networks P in each expert network layer calculated by the electronic device is finally 6*3=18.

[0124] It should be understood that the P expert networks are used to determine the P expert results based on the input information of the expert network selection layer. Each expert network can be understood as a neural network.

[0125] In some implementations, each expert network may be composed of a fully connected network and a nonlinear transformation layer, but is not limited thereto.

[0126] It should be understood that each node of a fully connected network is connected to all nodes of the previous layer, so it is called a fully connected network, where a fully connected network is also called a linear transformation network or a linear network.

[0127] It should be understood that the nonlinear transformation layer can be implemented by a nonlinear activation function.

[0128] In some implementations, the nonlinear activation function may be a sigmoid function, a tanh function, a relu function, or the like.

[0129] It should be understood that the aggregation network is used to aggregate the P expert results based on the preset weights corresponding to the P expert results to obtain an aggregated result.

[0130] In some implementations, the preset weights corresponding to the P expert results may be 1 / P, but are not limited thereto.

[0131] It should be understood that if the preset weight corresponding to the P expert results is 1 / P, it means that the importance of the P expert results is the same.

[0132] As described above, the ranking problem of N to-be-recommended contents can be understood as a multi-task problem, and these tasks may include but are not limited to: the click-through rate ranking task of N to-be-recommended contents, the viewing time ranking task of N to-be-recommended contents, and the interaction count ranking task of N to-be-recommended contents. Due to the large differences in the distribution of different tasks, in order to avoid mutual interference between the estimated probabilities of the model, in the embodiment of the present application, the output layer may include multiple probability output modules equal to the number of tasks.

[0133] For example, Figure 5 A schematic diagram of an output layer provided in an embodiment of the present application, such as Figure 5 As shown, the output layer may include: a click rate output module, a viewing time probability output module, and an interaction times probability output module.

[0134] The click rate output module is used to obtain the click rates of N to-be-recommended content based on the aggregation results output by the top expert network layer among the L expert network layers, and output the click rates of the N to-be-recommended content.

[0135] The viewing time probability output module is used to obtain the probability that the viewing time of N to-be-recommended contents is greater than the preset viewing time based on the aggregation result output by the top expert network layer among the L expert network layers, and output the probability that the viewing time of N to-be-recommended contents is greater than the preset viewing time.

[0136] The interaction times probability output module is used to obtain the probability that the interaction times of N to-be-recommended contents are greater than the preset times based on the aggregation results output by the top expert network layer among the L expert network layers, and output the probability that the interaction times of N to-be-recommended contents are greater than the preset times.

[0137] In some implementations, the click rate output module, the viewing time probability output module, and the interaction times probability output module can all be three-layer fully connected networks.

[0138] In some implementations, the preset viewing time may be 1500 minutes, 2000 minutes, etc., but is not limited thereto.

[0139] In some implementations, the preset number of times may be 1000 times, 2000 times, etc., but is not limited thereto.

[0140] As described above, in the embodiment of the present application, interaction includes but is not limited to: like, share, like, collect, comment. Based on this, the above-mentioned interaction probability output module can be the sum of likes, shares, collections, and comments, or the above-mentioned interaction probability output module is a plurality of modules, which are respectively used to output the probability that the number of likes of N to-be-recommended contents is greater than the preset number, the probability that the number of shares is greater than the preset number, the probability that the number of collections is greater than the preset number, and the probability that the number of comments is greater than the preset number.

[0141] For example, Figure 6 A schematic diagram of another output layer provided in an embodiment of the present application, such as Figure 6 As shown, the output layer may include: a click rate output module, a viewing time probability output module, an interaction times probability output module and a probability fusion module.

[0142] It should be understood that the functions of the click rate output module, the viewing time probability output module, and the interaction number probability output module can be referred to. Figure 5 The corresponding example content will not be repeated here.

[0143] It should be understood that the probability fusion module is used to fuse the three probabilities respectively output by the click rate output module, the viewing time probability output module, and the interaction times probability output module using a fusion formula.

[0144] The sorting model may use a fusion formula to fuse the above three probabilities. For example, the fusion formula may be a weighted sum formula, but is not limited thereto. For the method of probability fusion, reference may be made to the explanation of S230 above, which will not be described in detail.

[0145] It should be understood that in Example 1, the weights corresponding to each expert network in the expert network layer are fixed weights. In order to improve the execution accuracy of the sorting model, the embodiment of the present application also proposes to generate the weights corresponding to each expert network through a gating network. In other words, the weights corresponding to each expert network are dynamically changing. This is exemplified by Example 2 below:

[0146] Example 2: Figure 7 A schematic diagram of another sorting model provided in an embodiment of the present application, such as Figure 7 As shown, the sorting model includes, from bottom to top, an input layer, an embedding layer, L expert network selection layers arranged from bottom to top, and an output layer, where L is a positive integer.

[0147] The input layer is used to input the above N input information.

[0148] The embedding layer is used to reduce the dimension of N input information to obtain N embedded vectors.

[0149] It should be understood that the explanation of the input layer, embedding layer and output layer can refer to the content of Example 1, which will not be repeated here.

[0150] It should be understood that if the above L is greater than 1, that is, the sorting model includes multiple expert network selection layers, then the output information of the i-th expert network selection layer among these expert network selection layers can be used as the input information of the i+1-th expert network selection layer, i=1, 2...L-1, where the input information of the 1st expert network selection layer is the above N embedding vectors.

[0151] In order to clearly illustrate the structure of the expert network selection layer, Figure 8 The expert network selection layer is elaborated in detail:

[0152] For example, Figure 8 A schematic diagram of an expert network selection layer provided in an embodiment of the present application, such as Figure 8 As shown, the expert network selection layer includes: P expert networks, a gating network and an aggregation network, where P is an integer greater than 1.

[0153] It should be understood that the method for determining the number P of expert networks in the expert network selection layer can refer to the method for determining the number P of expert networks in the expert network layer in Example 1, and the explanation of the expert network can refer to the content of Example 1, and no further details will be given.

[0154] It should be understood that the gating network is used to determine the weight of each of the P expert results based on the input information of the expert network selection layer.

[0155] In order to clearly illustrate the structure of the gating network, Fig. 9 Detailed description of the gating network:

[0156] For example, Fig. 9 A schematic diagram of a gating network provided in an embodiment of the present application is shown as follows: Fig. 9 As shown, the gating network includes: a first fully connected sub-network, a second fully connected sub-network and a processing sub-network.

[0157] It should be understood that the first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a first vector; and the second fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a second vector.

[0158] For example, for the expert network selection layer located at the bottom of the L expert network selection layers, its input information is the N input information obtained by the embedding layer, where each input information can be regarded as a vector, which is processed by the first fully connected sub-network and the second fully connected sub-network to obtain the first vector and the second vector respectively.

[0159] It should be understood that the network parameters of the first fully connected sub-network and the second fully connected sub-network may be the same or different, and this embodiment of the present application does not limit this.

[0160] The processing sub-network may obtain the weights of the P expert networks in the following achievable manner, but is not limited thereto:

[0161] A first implementation method is to use a processing subnetwork to obtain a third vector based on the first vector and the second vector; and to perform normalization processing on the third vector to obtain the weights of the P expert networks.

[0162] In some implementations, the processing subnetwork may calculate the product of the second vector and zero to obtain a zero vector, and calculate the sum of the first vector and the zero vector to obtain a third vector.

[0163] Assuming that one of the N input information is x, the parameter matrix formed by the parameters of the first fully connected sub-network is W, and the parameter matrix formed by the parameters of the second fully connected sub-network is M, then the third vector can be calculated by the following formula (1):

[0164] H(x)=W*x+0*M*x (1)

[0165] A second implementation method is to use the processing sub-network to obtain a third vector based on the first vector and the second vector; and to perform sparse processing on the third vector to obtain the weights of the P expert networks.

[0166] It should be understood that the calculation method of the third vector can be referred to above and will not be described in detail.

[0167] It should be understood that the so-called sparse processing of the third vector refers to converting some elements in the third vector into 0 through a certain algorithm, so that even if the number of expert networks is huge, through sparse processing, the top K expert networks with the highest importance can be used to process the input information, thereby reducing the computational complexity and power consumption of the electronic device.

[0168] The processing subnetwork may perform sparse processing on the third vector in the following achievable manner, but is not limited thereto:

[0169] In some possible implementations, the processing subnetwork may keep the first K elements of the third vector unchanged in descending order of the elements in the third vector, and set the remaining elements of the third vector except the first K elements to negative infinite values ​​to obtain a fourth vector, where K is a positive integer; and set the non-negative infinite values ​​in the fourth vector to values ​​between 0 and 1 through an activation function, and set the negative infinite values ​​in the fourth vector to 0 to obtain the weights of each of the P expert networks.

[0170] In some implementations, K is less than the preset value when calculating the number of expert networks P. For example, assuming the preset value is 5, K can be 3. In this way, for the same target object, different to-be-recommended contents belonging to the same content source and the same task objective can also select differentiated expert networks based on the characteristics of the to-be-recommended contents themselves.

[0171] In some implementations, the activation function may be a softmax activation function, but is not limited thereto. The softmax function has the function of converting a negative infinite value to 0 and converting a non-negative infinite value to a numerical value between 0 and 1.

[0172] Assuming that one of the N input information is x, the parameter matrix formed by the parameters of the first fully connected sub-network is W, and the parameter matrix formed by the parameters of the second fully connected sub-network is M, then the third vector is recorded as H(x), and the electronic device can be calculated by the following formula (2):

[0173] G(x)=SoftMax(Top(H(x),K)) (2)

[0174] Among them, Top(H(x), K) is used to keep the first K elements in the third vector unchanged and set the remaining elements in the third vector except the first K elements to negative infinite values, and SoftMax() represents the softmax activation function.

[0175] In some implementations, the processing subnetwork may normalize the first K elements in the third vector in descending order of the elements in the third vector, and set the remaining elements in the third vector except the first K elements to 0.

[0176] For example, assuming that the third vector is (2, 4, 6, 8, 7, 1, 10, 5), the top three elements in descending order are 6, 8, and 10. In this case, the elements except these three elements can be set to 0, and the three elements can be normalized, and the result is (0, 0, 1 / 4, 1 / 3, 0, 0, 5 / 12, 0).

[0177] In some implementations, the aggregation network is used to aggregate the P expert results based on respective weights of the P expert results to obtain an aggregated result.

[0178] Assume that the weight vector of the P expert results corresponding to the input information x is G(x) = [G(x)_1, ..., G(x)_P], and assume that the i-th expert result is represented by E(x)_i, then the aggregation result y corresponding to the input information x can be calculated by the following formula (3):

[0179]

[0180] Among them, i=1, 2...P.

[0181] In some possible implementations, during the training phase of the sorting model, the subnetworks in the gating network are used respectively: the first fully-connected subnetwork is used to perform fully-connected processing on the input information of the expert network selection layer to obtain a fifth vector; the second fully-connected subnetwork is used to perform fully-connected processing on the input information of the expert network selection layer to obtain a sixth vector; the processing subnetwork is used to obtain a seventh vector based on the fifth vector and the sixth vector; and the seventh vector is sparsely processed to obtain the weights of each of the P expert networks.

[0182] It should be understood that the calculation method of the fifth vector can refer to the calculation method of the first vector above, the calculation method of the sixth vector can refer to the calculation method of the second vector above, the calculation method of the seventh vector can refer to the calculation method of the third vector above, and the sparse processing method of the seventh vector can refer to the sparse processing method of the third vector above, and the embodiments of the present application will not go into details about this.

[0183] In order to avoid a situation where a certain expert network is prominent and selected in a competition and then continues to be selected, while other expert networks continue to be not selected, the embodiment of the present application proposes that random noise can be added to the input information when calculating the seventh vector:

[0184] In some implementations, the processing subnetwork is specifically used to: generate a random value based on a random standard normal distribution; calculate the product of the sixth vector and the random value to obtain an eighth vector; calculate the sum of the eighth vector and the fifth vector to obtain a seventh vector.

[0185] Assume that after a training sample is processed by the input layer and the embedding layer, the input information obtained is x, the parameter matrix composed of the parameters of the first fully connected sub-network in the lowest expert selection network layer among the L expert selection network layers is W, and the parameter matrix composed of the parameters of the second fully connected sub-network is M, then the seventh vector can be calculated by the following formula (4):

[0186] H(x)=W*x+RandomNormal()*M*x (4)

[0187] Among them, W*x represents the fifth vector, M*x represents the sixth vector, RandomNormal() represents the random value generated by the random standard normal distribution, and RandomNormal()*M*x represents the eighth vector.

[0188] It should be understood that, by comparing formula (4) and formula (1), random noise can be introduced into the input information during the model training phase, so that each expert network has a certain probability of being selected, and avoids the situation where a certain expert network is prominent and selected in a certain competition and then continuously selected, while other expert networks are continuously not selected, so that the fully trained ranking model can dynamically select expert networks for the content to be recommended with different content sources and / or different feature information, so as to adapt to the content to be recommended, thereby improving the ranking accuracy of the ranking model. In the model execution phase, removing the noise term can avoid random noise outputting different ranking results for the same content to be recommended.

[0189] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0190] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0191] The method provided in the embodiment of the present application is described above, and the device provided in the embodiment of the present application is described below.

[0192] Fig.10 A schematic diagram of a content sorting device 1000 provided in an embodiment of the present application is shown as follows: Fig.10 As shown, the device 1000 includes: an acquisition module 1010, a generation module 1020 and an input module 1030, wherein the acquisition module 1010 is used to acquire the characteristic information of the target object and the characteristic information of each of N contents to be recommended corresponding to the target object; wherein the N contents to be recommended have M forms, and N and M are both integers greater than 1; the generation module 1020 is used to generate N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended; the input module 1030 is used to input the N input information into the sorting model to obtain the sorting results of the N contents to be recommended.

[0193] In some possible implementations, the acquisition module 1010 is also used to obtain the content source identifier of each of the N contents to be recommended before the generation module 1020 generates N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended; accordingly, the generation module 1020 is specifically used to generate N input information of the same format based on the characteristic information of the target object, the characteristic information of each of the N contents to be recommended and the content source identifier of each of the N contents to be recommended.

[0194] In some implementable embodiments, the generation module 1020 is specifically used to: for any one of the N contents to be recommended, combine the characteristic information of the target object, the characteristic information of the content to be recommended, and the content source identifier of the content to be recommended in accordance with the unified format of the N input information to obtain the input information of the content to be recommended; wherein, when the content to be recommended does not include any information of the unified format of the N input information, any information of the input information of the content to be recommended is set to 0.

[0195] In some implementations, the sorting model includes, from bottom to top:

[0196] Input layer, used to input N input information;

[0197] The embedding layer is used to reduce the dimension of N input information and obtain N embedding vectors;

[0198] L expert network selection layers are arranged in sequence from bottom to top. For any of the L expert network selection layers, the expert network selection layer includes: P expert networks, a gating network and an aggregation network; the P expert networks are used to determine P expert results based on the input information of the expert network selection layer; the gating network is used to determine the weights of the P expert results based on the input information of the expert network selection layer, and the aggregation network is used to aggregate the P expert results based on the weights of the P expert results to obtain an aggregation result; wherein L is a positive integer and P is an integer greater than 1;

[0199] The output layer is used to obtain the ranking results of N to-be-recommended contents based on the aggregated results output by the top expert network selection layer among the L expert network selection layers.

[0200] In some implementations, the gating network includes:

[0201] A first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a first vector;

[0202] The second fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a second vector;

[0203] The processing sub-network is used to obtain a third vector based on the first vector and the second vector; and to perform sparse processing on the third vector to obtain the weights of the P expert networks.

[0204] In some implementations, the processing subnetwork is specifically used to: calculate the product of the second vector and zero to obtain a zero vector; and calculate the sum of the zero vector and the first vector to obtain a third vector.

[0205] In some possible implementations, the processing subnetwork is specifically used to: keep the first K elements in the third vector unchanged in descending order of the elements in the third vector, and set the remaining elements in the third vector except the first K elements to negative infinite values ​​to obtain a fourth vector, where K is a positive integer; set the non-negative infinite values ​​in the fourth vector to values ​​between 0 and 1 through an activation function, and set the negative infinite values ​​in the fourth vector to 0 to obtain the weights of each of the P expert networks.

[0206] In some implementations, the apparatus 1000 further includes: a training module 1040, wherein the acquisition module 1010 is further used to acquire training samples; the training module 1040 is used to train a sorting model based on the training samples; wherein, when the training module 1040 trains the sorting model, each sub-network in the gated network is used to:

[0207] The first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a fifth vector;

[0208] The second fully connected sub-network is used to perform full connection processing on the input information of the expert network selection layer to obtain the sixth vector;

[0209] The processing sub-network is used to obtain the seventh vector based on the fifth vector and the sixth vector; and perform sparse processing on the seventh vector to obtain the weights of the P expert networks.

[0210] In some implementations, the processing subnetwork is specifically used to: generate a random value based on a random standard normal distribution; calculate the product of the sixth vector and the random value to obtain an eighth vector; calculate the sum of the eighth vector and the fifth vector to obtain a seventh vector.

[0211] In some possible implementations, the device 1000 also includes: a determination module 1050, which is used to determine the number of content sources of N content to be recommended and the number of tasks of the sorting model; based on the number of content sources of N content to be recommended and the number of tasks of the sorting model, determine the number of expert networks in each expert network selection layer in the sorting model.

[0212] In some implementations, the device 1000 further includes: a determination module 1050 specifically configured to calculate the product of the number of content sources of N content to be recommended, the number of tasks of the sorting model, and a preset value, to obtain the number of expert networks in each expert network selection layer in the sorting model.

[0213] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.10 The device 1000 shown can perform Figure 2 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 1000 are respectively to implement Figure 2 For the sake of brevity, the corresponding processes in each method are not repeated here.

[0214] The above describes the device 1000 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0215] Fig.11 It is a schematic block diagram of an electronic device provided in an embodiment of the present application.

[0216] like Fig.11 As shown, the electronic device may include:

[0217] The memory 1110 and the processor 1120, the memory 1110 is used to store the computer program and transmit the program code to the processor 1120. In other words, the processor 1120 can call and run the computer program from the memory 1110 to implement the method in the embodiment of the present application.

[0218] For example, the processor 1120 may be configured to execute the above method embodiments according to instructions in the computer program.

[0219] In some embodiments of the present application, the processor 1120 may include but is not limited to:

[0220] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0221] In some embodiments of the present application, the memory 1110 includes but is not limited to:

[0222] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0223] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 1110 and executed by the processor 1120 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0224] like Fig.11 As shown, the electronic device may also include:

[0225] The transceiver 1130 may be connected to the processor 1120 or the memory 1110 .

[0226] The processor 1120 may control the transceiver 1130 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1130 may include a transmitter and a receiver. The transceiver 1130 may further include an antenna, and the number of antennas may be one or more.

[0227] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0228] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0229] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0230] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0231] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0232] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0233] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A content ranking method, It is characterized in that include: Acquire characteristic information of a target object and characteristic information of each of N contents to be recommended corresponding to the target object; wherein the N contents to be recommended have M forms, and both N and M are integers greater than 1; Generate N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended; The N input information is input into a ranking model to obtain ranking results of the N contents to be recommended.

2. The method according to claim 1, It is characterized in that Before generating N input information with the same format based on the characteristic information of the target object and the characteristic information of each of the N to-be-recommended contents, the method further includes: Obtaining content source identifiers of the N contents to be recommended; The generating N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended includes: Based on the characteristic information of the target object, the characteristic information of each of the N contents to be recommended and the content source identifier of each of the N contents to be recommended, N input information with the same format are generated.

3. The method according to claim 2, It is characterized in that The generating N input information of the same format based on the characteristic information of the target object, the characteristic information of each of the N to-be-recommended contents, and the content source identifier of each of the N to-be-recommended contents includes: For any one of the N contents to be recommended, combining the characteristic information of the target object, the characteristic information of the contents to be recommended and the content source identifier of the contents to be recommended according to a unified format of the N input information to obtain the input information of the contents to be recommended; When the content to be recommended does not include any information in the unified format of the N input information, the information of any one of the input information of the content to be recommended is set to 0.

4. The method according to any one of claims 1 to 3, It is characterized in that The sorting model includes, from bottom to top: An input layer, used for inputting the N input information; An embedding layer, used to perform dimensionality reduction processing on the N input information to obtain N embedding vectors; L expert network selection layers are arranged in sequence from bottom to top. For any one of the L expert network selection layers, the expert network selection layer includes: P expert networks, a gating network and an aggregation network; the P expert networks are used to determine P expert results based on input information of the expert network selection layer; the gating network is used to determine the weights of the P expert results based on the input information of the expert network selection layer, and the aggregation network is used to aggregate the P expert results based on the weights of the P expert results to obtain an aggregation result; wherein L is a positive integer and P is an integer greater than 1; The output layer is used to obtain the ranking results of the N to-be-recommended contents based on the aggregation results output by the top expert network selection layer among the L expert network selection layers.

5. The method according to claim 4, It is characterized in that The gating network comprises: A first fully connected sub-network, used for performing fully connected processing on the input information of the expert network selection layer to obtain a first vector; A second fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a second vector; The processing subnetwork is used to obtain a third vector based on the first vector and the second vector; and to perform sparse processing on the third vector to obtain the weights of each of the P expert networks.

6. The method according to claim 5, It is characterized in that The processing subnetwork is specifically used for: Calculate the product of the second vector and zero to obtain a zero vector; The sum of the zero vector and the first vector is calculated to obtain the third vector.

7. The method according to claim 5, It is characterized in that The processing subnetwork is specifically used for: Keep the first K elements of the third vector unchanged in descending order, and set the remaining elements of the third vector except the first K elements to negative infinite values, so as to obtain a fourth vector, where K is a positive integer; The non-negative infinite values ​​in the fourth vector are set to values ​​between 0 and 1 through an activation function, and the negative infinite values ​​in the fourth vector are set to 0, so as to obtain the weights of the P expert networks.

8. The method according to claim 5, It is characterized in that Also includes: Get training samples; Training the sorting model based on the training samples; Wherein, when training the sorting model, each sub-network in the gating network is used to: The first fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a fifth vector; The second fully connected sub-network is used to perform fully connected processing on the input information of the expert network selection layer to obtain a sixth vector; The processing subnetwork is used to obtain a seventh vector based on the fifth vector and the sixth vector; and to perform sparse processing on the seventh vector to obtain the weights of each of the P expert networks.

9. The method according to claim 8, It is characterized in that The processing subnetwork is specifically used for: Generate random values ​​based on a random standard normal distribution; Calculate the product of the sixth vector and the random value to obtain an eighth vector; The sum of the eighth vector and the fifth vector is calculated to obtain the seventh vector.

10. The method according to claim 4, It is characterized in that Also includes: Determine the number of content sources of the N content to be recommended and the number of tasks of the ranking model; The number of expert networks in each expert network selection layer in the ranking model is determined based on the number of content sources of the N to-be-recommended contents and the number of tasks of the ranking model.

11. The method according to claim 10, It is characterized in that The determining the number of expert networks in each expert network selection layer in the ranking model based on the number of content sources of the N to-be-recommended contents and the number of tasks of the ranking model comprises: The product of the number of content sources of the N to-be-recommended contents, the number of tasks of the ranking model and a preset value is calculated to obtain the number of expert networks in each expert network selection layer in the ranking model.

12. A content sorting device, It is characterized in that include: An acquisition module, used to acquire characteristic information of a target object and characteristic information of each of N contents to be recommended corresponding to the target object; wherein the N contents to be recommended have M forms, and both N and M are integers greater than 1; A generating module, configured to generate N input information of the same format based on the characteristic information of the target object and the characteristic information of each of the N contents to be recommended; The input module is used to input the N input information into the sorting model to obtain the sorting results of the N contents to be recommended.

13. An electronic device, It is characterized in that include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, It is characterized in that Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.