Recommendation model training method, media information recommendation method, device and equipment

By calculating and adjusting the comparison results of the second network model, the problem of low accuracy of the recommendation model is solved, the accuracy of recommendation of media information is improved, and the prediction ability of the recommendation model is enhanced.

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

Patent Information

Application Number
CN202210054275.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2024-10-01
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

The accuracy of existing recommendation models is not high, resulting in low accuracy of recommendation of media information.

Method used

By obtaining a comparison of the prediction results of two different network models, the second network model is adjusted to improve the accuracy of the recommendation model. Specific steps include obtaining the prediction results of the training text based on the first network model and the second network model, calculating the difference between the two prediction results, and using these differences to adjust the second network model to obtain a more accurate recommendation model.

Benefits of technology

It improves the prediction ability of the recommendation model and the recommendation accuracy of media information. By learning the difference in prediction results of different training texts, the learning ability of the model is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399030B_ABST
    Figure CN114399030B_ABST
Patent Text Reader

Abstract

The present application discloses a training method for a recommendation model, a method, an apparatus and a device for recommending media information, and belongs to the field of artificial intelligence technology. The method includes: obtaining a first prediction result recommended for each training text based on a first network model, and obtaining a second prediction result recommended for each training text based on a second network model; obtaining a first comparison result of the first prediction result and a second comparison result of the second prediction result of two training texts in any training text pair, the first comparison result is used to characterize the difference in the first prediction result, and the second comparison result is used to characterize the difference in the second prediction result; based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model. The recommendation model of the present application can learn the differences between the first prediction results and the second prediction results of different training texts, thereby improving the accuracy of the recommendation model and further improving the accuracy of media information recommendation.
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 technology, and in particular to a recommendation model training method, media information recommendation method, device and equipment. Background Art

[0002] With the development of artificial intelligence technology, the functions of applications are increasing, and the recommendation function is an important function in applications. The recommendation function is a function that determines the media information to be recommended from multiple media information and recommends the media information to be recommended, wherein the recommendation model can be used to determine the media information to be recommended from multiple media information.

[0003] In the related art, the first prediction result of each training text can be predicted based on the first network model, and the second prediction result of each training text can be predicted based on the second network model, wherein the model parameters of the first network model and the second network model are different, and the first prediction result and the second prediction result are both used to characterize the possibility of the training text being recommended. Next, for any training text, based on the first prediction result and the second prediction result of any training text, the loss value of any training text is determined. Afterwards, the second network model is adjusted based on the loss value corresponding to each training text to obtain a recommendation model.

[0004] Since the loss value of the training text is obtained based on the first prediction result and the second prediction result of the training text, the accuracy of the recommendation model obtained based on the loss value is not high, which affects the recommendation accuracy of the media information. Summary of the invention

[0005] The embodiments of the present application provide a recommendation model training method, a media information recommendation method, an apparatus and a device, which can be used to solve the problem in the related art that the accuracy of media information recommendation is not high due to the low accuracy of the recommendation model. The technical solution includes the following contents.

[0006] On the one hand, an embodiment of the present application provides a method for training a recommendation model, the method comprising:

[0007] Obtaining a first prediction result recommended for each training text based on a first network model, and obtaining a second prediction result recommended for each training text based on a second network model, wherein the first network model and the second network model have different model parameters;

[0008] For any training text pair, obtaining a first comparison result of first prediction results and a second comparison result of second prediction results of two training texts in the any training text pair, wherein the first comparison result is used to characterize the difference of the first prediction result, and the second comparison result is used to characterize the difference of the second prediction result, and the any training text pair includes any two training texts in the respective training texts;

[0009] Based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model.

[0010] On the other hand, an embodiment of the present application provides a method for recommending media information, the method comprising:

[0011] Acquire multiple media information, wherein the media information includes a target text;

[0012] Obtaining a recommendation result of a target text in each media information based on a recommendation model, wherein the recommendation model is obtained based on any of the training methods of the recommendation model described above;

[0013] Based on the recommendation results of the target texts in the respective media information, to-be-recommended media information satisfying the recommendation condition is determined from the plurality of media information, and the to-be-recommended media information is recommended.

[0014] On the other hand, an embodiment of the present application provides a training device for a recommendation model, the device comprising:

[0015] an acquisition module, configured to acquire a first prediction result recommended for each training text based on a first network model, and acquire a second prediction result recommended for each training text based on a second network model, wherein the first network model and the second network model have different model parameters;

[0016] The acquisition module is further used to acquire, for any training text pair, a first comparison result of first prediction results and a second comparison result of second prediction results of two training texts in the any training text pair, wherein the first comparison result is used to characterize the difference of the first prediction result, and the second comparison result is used to characterize the difference of the second prediction result, and the any training text pair includes any two training texts in the respective training texts;

[0017] The adjustment module is used to adjust the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model.

[0018] In a possible implementation, the acquisition module is used to obtain the annotation results of the two training texts in any one of the training text pairs, where the annotation results are obtained through annotation and are used to characterize whether the training text is recommended; based on the annotation results of the two training texts in any one of the training text pairs and the first prediction results of the two training texts in any one of the training text pairs, determine the first comparison result of any one of the training text pairs.

[0019] In a possible implementation, the acquisition module is used to determine the first comparison result of any training text pair based on the target data in response to the annotation results of the two training texts in any training text pair being different; and to determine the first comparison result of any training text pair based on the first prediction results of the two training texts in any training text pair in response to the annotation results of the two training texts in any training text pair being the same.

[0020] In one possible implementation, the acquisition module is used to determine the first comparison result of any training text pair based on first data in response to the difference between the annotation results of two training texts in any training text pair being a first reference value; and to determine the first comparison result of any training text pair based on second data in response to the difference between the annotation results of two training texts in any training text pair being a second reference value, the first reference value being greater than the second reference value, and the first data being greater than the second data.

[0021] In a possible implementation, the acquisition module is used to determine the first comparison result of any training text pair based on third data in response to the difference between the first prediction results of two training texts in any training text pair being less than a third reference value; to determine the first comparison result of any training text pair based on fourth data in response to the difference between the first prediction results of two training texts in any training text pair being not less than the third reference value and not greater than a fourth reference value, the third reference value being less than the fourth reference value, and the third data being less than the fourth data; and to determine the first comparison result of any training text pair based on fifth data in response to the difference between the first prediction results of two training texts in any training text pair being greater than a fourth reference value, the fourth data being less than the fifth data.

[0022] In a possible implementation, the acquisition module is used to determine a target difference value of the second prediction results of two training texts in any one training text pair; and determine the second comparison result of any one training text pair based on the target difference value.

[0023] In a possible implementation, the acquisition module is used to determine the first attribute feature of each attribute in any training text based on the first network model, and the first attribute feature of any attribute is used to describe the any attribute; perform feature fusion processing on the first attribute feature of each attribute in the any training text to obtain the first text feature of the any training text; and determine the first prediction result of the any training text based on the first attribute feature of each attribute in the any training text and the first text feature of the any training text.

[0024] In a possible implementation, the acquisition module is used for at least one of the following:

[0025] Based on the multi-layer perceptron, feature fusion processing is performed on the first attribute features of each attribute in any of the training texts to obtain the first text features of any of the training texts; feature cross processing is performed on the first attribute features of each attribute in any of the training texts to obtain the first text features of any of the training texts.

[0026] In a possible implementation, the acquisition module is used to determine the second attribute features of each attribute in any training text based on the second network model, and the second attribute features of any attribute are used to describe the any attribute; perform feature fusion processing on the second attribute features of each attribute in the any training text to obtain the second text features of the any training text; and determine the second prediction result of the any training text based on the second attribute features of each attribute in the any training text and the second text features of the any training text.

[0027] In a possible implementation, the adjustment module is used to obtain the annotation results of each training text; based on the first comparison results and the second comparison results of each training text pair, the annotation results and the second prediction results of each training text, the second network model is adjusted to obtain the recommendation model.

[0028] In a possible implementation, the adjustment module is used to determine the first attribute feature of each attribute in any training text based on the first network model, and to determine the second attribute feature of each attribute in any training text based on the second network model; based on the first comparison results and the second comparison results of each training text pair, and the first attribute feature and the second attribute feature of each attribute in each training text, the second network model is adjusted to obtain the recommendation model.

[0029] In a possible implementation, the adjustment module is used to obtain the first text feature and the second text feature of each training text; based on the first comparison result and the second comparison result of each training text pair, the first text feature and the second text feature of each training text, the second network model is adjusted to obtain the recommendation model.

[0030] In a possible implementation, the acquisition module is further used to acquire the annotation results of each training text;

[0031] The adjustment module is further used to adjust the first network model based on the annotation results of each training text and the first prediction result to obtain an adjusted first network model.

[0032] On the other hand, an embodiment of the present application provides a media information recommendation device, the device comprising:

[0033] An acquisition module, used for acquiring a plurality of media information, wherein the media information includes a target text;

[0034] The acquisition module is further used to acquire a recommendation result of the target text in each media information based on the recommendation model, wherein the recommendation model is obtained based on any of the training methods of the recommendation model described above;

[0035] The recommendation module is used to determine the to-be-recommended media information that meets the recommendation condition from the multiple media information based on the recommendation results of the target text in the various media information, and recommend the to-be-recommended media information.

[0036] In a possible implementation, the acquisition module is used to determine, for a target text in any media information, attribute features of each attribute in the target text based on the recommendation model, wherein the attribute features of any attribute are used to describe the any attribute; perform feature fusion processing on the attribute features of each attribute in the target text to obtain text features of the target text; and determine a recommendation result for the target text based on the attribute features of each attribute in the target text and the text features of the target text.

[0037] On the other hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to enable the electronic device to implement any of the above-mentioned recommendation model training methods or any of the above-mentioned media information recommendation methods.

[0038] On the other hand, a computer-readable storage medium is also provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor so that a computer implements any of the above-mentioned recommendation model training methods or any of the above-mentioned media information recommendation methods.

[0039] On the other hand, a computer program or a computer program product is also provided, wherein at least one computer instruction is stored in the computer program or the computer program product, and the at least one computer instruction is loaded and executed by a processor so that the computer implements any of the above-mentioned recommendation model training methods or any of the above-mentioned media information recommendation methods.

[0040] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0041] In the technical solution provided by the embodiment of the present application, the first comparison result of any training text pair is used to characterize the difference between the first prediction results of the two training texts in any training text pair, and the second comparison result of any training text pair is used to characterize the difference between the second prediction results of the two training texts in any training text pair. The recommendation model is obtained based on the first comparison results and the second comparison results of each training text pair, so that the recommendation model can learn the differences between the first prediction results and the second prediction results of different training texts, thereby improving the prediction ability of the recommendation model, thereby improving the accuracy of the recommendation model, and further improving the recommendation accuracy of media information. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0043] Figure 1 It is a schematic diagram of an implementation environment of a training method for a recommendation model or a media information recommendation method provided in an embodiment of the present application;

[0044] Figure 2 is a flow chart of a training method for a recommendation model provided in an embodiment of the present application;

[0045] Figure 3 is a flow chart of a media information recommendation method provided by an embodiment of the present application;

[0046] Figure 4 is a schematic diagram of asynchronous distillation provided in an embodiment of the present application;

[0047] Figure 5 is a schematic diagram of an asynchronous distillation training process provided in an embodiment of the present application;

[0048] Figure 6 is a schematic diagram of a display page provided in an embodiment of the present application;

[0049] Figure 7 It is a structural schematic diagram of a training device for a recommendation model provided in an embodiment of the present application;

[0050] Figure 8 It is a structural diagram of a media information recommendation device provided in an embodiment of the present application;

[0051] Fig. 9 It is a structural diagram of a terminal device provided in an embodiment of the present application;

[0052] Fig.10 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. First, the terms involved in the embodiments of the present application are explained and illustrated.

[0054] Distillation learning: A training method for deep learning models. It involves two models, a strong model (also called the teacher model) and a weak model (also called the student model). The teacher model transfers its learned knowledge to the student model through supervised loss, and this process is called distillation. The focus of distillation learning is to design the loss function for distillation.

[0055] Asynchronous distillation: Establish a separate process (called the teacher process) to train the teacher model, use another process for distillation training, and load the latest teacher model from the teacher process.

[0056] Embedding: The input discrete information is converted into a trainable vector through a table lookup. The dimension of the vector is called the "Embedding Size".

[0057] Pairwise Loss: A type of loss in the ranking algorithm of the recommendation system. The input samples in a batch are compared pairwise and converted into labels of 0 or 1 for the model to learn.

[0058] Figure 1 is a schematic diagram of an implementation environment of a training method for a recommendation model or a media information recommendation method provided in an embodiment of the present application, such as Figure 1The implementation environment shown includes an electronic device 11, and the training method of the recommendation model or the media information recommendation method in the embodiment of the present application can be executed by the electronic device 11. Exemplarily, the electronic device 11 can include at least one of a terminal device or a server.

[0059] The terminal device may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, and a laptop computer. The server may be a single server, or a server cluster consisting of multiple servers, or any one of a cloud computing platform and a virtualization center, which is not limited in the embodiments of the present application. The server may be connected to the terminal device through a wired network or a wireless network. The server may have functions such as data processing, data storage, and data transmission and reception, which are not limited in the embodiments of the present application.

[0060] The training method of the recommendation model and the media information recommendation method provided in the embodiments of the present application are both based on artificial intelligence technology. Artificial Intelligence (AI) is a 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 the machines have the functions of perception, reasoning and decision-making.

[0061] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0062] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, Internet of Vehicles, automatic driving, smart transportation, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0063] Based on the above implementation environment, the present application embodiment provides a training method for a recommendation model. Figure 2Taking the flowchart of a training method for a recommendation model provided in the embodiment of the present application as an example, the method can be performed by Figure 1 The electronic device 11 in the embodiment is executed. Figure 2 As shown, the method includes steps 201 to 203.

[0064] Step 201, obtaining a first prediction result recommended for each training text based on a first network model, and obtaining a second prediction result recommended for each training text based on a second network model, wherein the model parameters of the first network model and the second network model are different.

[0065] The model structures of the first network model and the second network model are the same, but the model parameters of the two are different. The embodiment of the present application does not limit the model structure of the first network model or the second network model. Exemplarily, the model structures of the first network model and the second network model both include a coding layer, a feature cross layer, a multi-layer perceptron (Multi-LayerPerception, MLP) layer, a splicing layer and a fully connected layer. Among them, the coding layer of the first network model is a deep neural network and factorization machine (Deep Neural Networks And Factorization Machines, Deep FM) model with a dimension of 128, and the coding layer of the second network model is a Deep FM model with a dimension of 16. The dimensions of the hidden units in the MLP layer of the first network model are 512, 256, 128, and 64, respectively, while the dimensions of the hidden units in the MLP layer of the second network model are 128, 64, 32, and 16, respectively.

[0066] The embodiment of the present application can obtain multiple training texts, any of which can be text in media information, and the media information includes at least one of audio, picture, and text. On the one hand, multiple training texts are input into the first network model, and the first network model predicts the first prediction result of each training text. On the other hand, multiple training texts are input into the second network model, and the second network model predicts the second prediction result of each training text. The first prediction result and the second prediction result of any training text can be a vector used to characterize the possibility of recommendation of any training text, or a probability used to characterize the possibility of recommendation of any training text. Among them, the vectors and probabilities in the embodiments of the present application can be collectively referred to as Logit, the vector is an unnormalized value, and the probability is a normalized value. For classification problems, the dimension of the vector and the number of probabilities both represent the number of classification categories. For example, for a binary classification problem, the dimension of the vector is 2 and the number of probabilities is two.

[0067] In an embodiment of the present application, a method for obtaining a first prediction result recommended for each training text based on the first network model is similar to a method for obtaining a second prediction result recommended for each training text based on the second network model. The following focuses on the method for obtaining the second prediction result recommended for each training text from the perspective of the second network model.

[0068] In a possible implementation, obtaining a second prediction result recommended for each training text based on the second network model includes: determining a second attribute feature of each attribute in any training text based on the second network model, wherein the second attribute feature of any attribute is used to describe any attribute; performing feature fusion processing on the second attribute features of each attribute in any training text to obtain a second text feature of any training text; and determining a second prediction result of any training text based on the second attribute features of each attribute in any training text and the second text feature of any training text.

[0069] For any training text, the training text includes at least one attribute, which can be called a feature field. The attribute can be a keyword extracted from the training text, or a sentence or a paragraph in the training text. The present application embodiment does not limit the attributes of the training text. For example, the attributes of the training text include but are not limited to the title of the media information, the body of the media information, the author of the media information, the label of the media information, and the source of the training text. Among them, the label of the media information is the category label of food, advertising, animals, film and television, etc. to which the media information belongs, and the source of the training text is the information that the training text comes from the text part, audio part, picture part, etc. of the media information.

[0070] For any training text, the encoding layer of the second network model can be used to determine the second attribute features of each attribute in any training text. Optionally, the encoding layer of the second network model includes two encoding tables. One encoding table is a low-dimensional encoding table, which can be called a wide embedding table (Wide Embedding Table), and the symbol W is used here. 0S Another encoding table is a high-dimensional encoding table, which can be called a quad embedding table, and is represented by W. S express.

[0071] Assume that any training text includes m attributes, where m is a positive integer. Then the low-dimensional encoding table in the encoding layer of the second network model can project each attribute in any training text into the second low-dimensional attribute feature of each attribute. When the dimension of the second low-dimensional attribute feature is 1, the second low-dimensional attribute feature of each attribute can be recorded as E 0S ∈R m , where E 0Sis the second low-dimensional attribute feature of each attribute, and R is a real number. The high-dimensional encoding table in the encoding layer of the second network model can project each attribute in any training text into the second high-dimensional attribute feature of each attribute. When the dimension of the second high-dimensional attribute feature is d s When the dimension is , the second highest dimensional attribute characteristics of each attribute can be recorded as Among them, E S It is the second high-dimensional attribute feature of each attribute. It should be noted that the second attribute feature of each attribute includes the second low-dimensional attribute feature of each attribute and the second high-dimensional attribute feature of each attribute.

[0072] Next, the second network model performs feature fusion processing on the second attribute features of each attribute in any training text to obtain the second text features of any training text.

[0073] Optionally, feature fusion processing is performed on the second attribute features of each attribute in any training text to obtain the second text features of any training text, including at least one of the following: feature fusion processing is performed on the second attribute features of each attribute in any training text based on a multi-layer perceptron to obtain the second text features of any training text; feature cross-processing is performed on the second attribute features of each attribute in any training text to obtain the second text features of any training text.

[0074] The multi-layer perceptron layer of the second network model is a multi-layer perceptron network structure, and the multi-layer perceptron is a network structure composed of multiple layers of fully connected layers. Based on the multi-layer perceptron, the second attribute features of each attribute in any training text are subjected to feature fusion processing to obtain the second text features of any training text.

[0075] Optionally, the second high-dimensional attribute features of each attribute in any training text are subjected to feature fusion processing based on a multilayer perceptron to obtain the second text features of any training text. Assume that the multilayer perceptron has a total of l (denoted as 0 to l-1) layers, and the network parameters of the i-th layer are and Then the multilayer perceptron can be expressed as the following formula (1).

[0076]

[0077] in, is the feature of each attribute in any training text output by the i-th layer of the multilayer perceptron, is the feature of each attribute in any training text input to the i-th layer of the multilayer perceptron. The input to the 0th layer of the multilayer perceptron is the second highest dimensional attribute feature of each attribute in any training text, that is, E Sis the second highest dimensional attribute feature of each attribute in any training text. The output of the l-1th layer of the multilayer perceptron is the second text feature of any training text, that is, D S is the second text feature of any training text, D S The dimension is k S .

[0078] The feature interaction layer of the second network model can perform feature interaction processing on the second attribute features of each attribute in any training text to obtain the second text features of any training text. Feature interaction processing is to perform Hadamard product processing on the second attribute features of every two attributes in any training text. The Hadamard product processing is the multiplication of corresponding elements in the vector one by one (i.e., Element-Wise processing).

[0079] Optionally, the feature cross-layer of the second network model performs feature cross-processing on the second high-dimensional attribute features of each attribute in any training text to obtain the second text features of any training text, as shown in the following formula (2).

[0080]

[0081] Among them, I s is the second text feature of any training text, is the second highest dimensional attribute feature of the i-th attribute in any training text, is the second highest dimensional attribute feature of the jth attribute in any training text, m is the number of attributes in any training text, Characterizes the Hadamard product operation processing. Among them, R is a real number, d s For dimension.

[0082] After obtaining the second attribute features of each attribute in any training text and the second text features of any training text, the concatenation layer of the second network model concatenates the second attribute features of each attribute in any training text and the second text features of any training text to obtain the second concatenated features of any training text.

[0083] Optionally, the second low-dimensional attribute feature of each attribute in any training text is concatenated with the second text feature of any training text to obtain the second concatenated feature of any training text. 0S , the second text feature of any training text is I s and / or DS , the second concatenation feature of any training text is Where R is a real number and m is E 0S The dimension, d s For I s The dimension, k S D S Dimensions. Optional, Z S =Concat(I S ,D S ,E OS ), Concat represents concatenation.

[0084] Afterwards, the fully connected layer of the second network model determines the second prediction result of any training text based on the second concatenated features of any training text. Assume that the parameters of the fully connected layer of the second network model are and Then the output of the fully connected layer of the second network model can be expressed as Among them, Z S is the second concatenated feature of any training text. S ∈R 1 , R is a real number.

[0085] It should be noted that the output of the fully connected layer of the second network model can be used as the second prediction result of any training text. The output of the fully connected layer of the second network model can also be activated to obtain the second prediction result of any training text. Exemplarily, the output of the fully connected layer of the second network model can be activated using a sigmoid function. In this case, the second prediction result of any training text is σ S =Sigmoid(O S ).

[0086] The following introduces the content of obtaining the first prediction result recommended for each training text based on the first network model.

[0087] In a possible implementation, obtaining a first prediction result recommended for each training text based on the first network model includes: determining a first attribute feature of each attribute in any training text based on the first network model, wherein the first attribute feature of any attribute is used to describe any attribute; performing feature fusion processing on the first attribute features of each attribute in any training text to obtain a first text feature of any training text; and determining a first prediction result of any training text based on the first attribute features of each attribute in any training text and the first text feature of any training text.

[0088] For any training text, the encoding layer of the first network model can be used to determine the first attribute feature of each attribute in any training text. Optionally, the first attribute feature of each attribute includes the first low-dimensional attribute feature of each attribute and the first high-dimensional attribute feature of each attribute.

[0089] In a possible implementation, feature fusion processing is performed on the first attribute features of each attribute in any training text to obtain the first text features of any training text, including at least one of the following: feature fusion processing is performed on the first attribute features of each attribute in any training text based on a multilayer perceptron to obtain the first text features of any training text; feature cross-processing is performed on the first attribute features of each attribute in any training text to obtain the first text features of any training text.

[0090] The first attribute features of each attribute in any training text can be subjected to feature fusion processing based on the multi-layer perceptron layer of the first network model to obtain the first text feature of any training text. Optionally, the first high-dimensional attribute features of each attribute in any training text can be subjected to feature fusion processing based on the multi-layer perceptron layer of the first network model to obtain the first text feature of any training text.

[0091] The feature cross layer of the first network model can also be used to perform feature cross processing on the first attribute features of each attribute in any training text to obtain the first text feature of any training text. Optionally, the feature cross layer of the first network model performs feature cross processing on the first high-dimensional attribute features of each attribute in any training text to obtain the first text feature of any training text.

[0092] Next, the concatenation layer of the first network model concatenates the first attribute feature of each attribute in any training text with the first text feature of any training text to obtain the first concatenation feature of any training text. Optionally, the concatenation layer of the first network model concatenates the first low-dimensional attribute feature of each attribute in any training text with the first text feature of any training text to obtain the first concatenation feature of any training text. Afterwards, the fully connected layer of the first network model determines the first prediction result of any training text based on the first concatenation feature of any training text.

[0093] In the embodiment of the present application, the model structures of the first network model and the second network model are the same. Therefore, the first network model determines the first prediction result of any training text in the same manner as the second network model determines the second prediction result of any training text. The above description of determining the second prediction result of any training text is provided and will not be repeated here.

[0094] Step 202, for any training text pair, obtain a first comparison result of the first prediction result and a second comparison result of the second prediction result of the two training texts in any training text pair, the first comparison result is used to characterize the difference of the first prediction result, and the second comparison result is used to characterize the difference of the second prediction result, and any training text pair includes any two training texts in each training text.

[0095] Every two training texts in the plurality of training texts can constitute a training text pair. For any training text pair, based on the respective first prediction results of the two training texts in the any training text pair, the difference in the first prediction results between the two training texts in the any training text pair is determined, that is, the first comparison result of any training text pair is determined. Two methods for determining the first comparison result of any training text pair are introduced below, which are respectively recorded as implementation method A1 and implementation method A2.

[0096] Implementation method A1, obtaining a first comparison result of the first prediction results of two training texts in any training text pair, including: in response to the difference between the first prediction results of the two training texts in any training text pair being less than a third reference value, determining the first comparison result of any training text pair based on third data; in response to the difference between the first prediction results of the two training texts in any training text pair being not less than the third reference value and not greater than a fourth reference value, determining the first comparison result of any training text pair based on fourth data, the third reference value being less than the fourth reference value, and the third data being less than the fourth data; in response to the difference between the first prediction results of the two training texts in any training text pair being greater than a fourth reference value, determining the first comparison result of any training text pair based on fifth data, and the fourth data being less than the fifth data.

[0097] In the embodiment of the present application, the difference between the first prediction results of the two training texts in any training text pair may be calculated first, and the first comparison result of any training text pair may be determined based on the difference.

[0098] When the difference between the first prediction results of the two training texts in any training text pair is less than the third reference value, the first comparison result of any training text pair is determined based on the third data. For example, the third data is used as the first comparison result of any training text pair, or the third data is normalized to obtain the first comparison result of any training text pair. The normalization process is to normalize the data to between [0,1].

[0099] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the first prediction result of training text i is denoted as The first prediction result of training text j is recorded as when When V ij =-1. The third reference value is -ε (ε is an arbitrary positive number), and the third data is -1. ij It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. ij =(V ij +1) / 2 to perform normalization processing, and obtain the first comparison result S of any training text pair ij .

[0100] When the difference between the first prediction results of two training texts in any training text pair is not less than the third reference value and not greater than the fourth reference value, the first comparison result of any training text pair is determined based on the fourth data. For example, the fourth data is used as the first comparison result of any training text pair, or the fourth data is normalized to obtain the first comparison result of any training text pair. The third reference value is less than the fourth reference value, and the third data is less than the fourth data.

[0101] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the first prediction result of training text i is denoted as The first prediction result of training text j is recorded as when When V ij =0. The third reference value is -ε (ε is an arbitrary positive number), the fourth reference value is ε, and the fourth data is 0. V ij It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. ij =(V ij +1) / 2 to perform normalization processing, and obtain the first comparison result S of any training text pair ij .

[0102] When the difference between the first prediction results of the two training texts in any training text pair is greater than the fourth reference value, the first comparison result of any training text pair is determined based on the fifth data, for example, the fifth data is used as the first comparison result of any training text pair, or the fifth data is normalized to obtain the first comparison result of any training text pair. The fourth data is smaller than the fifth data.

[0103] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the first prediction result of training text i is denoted as The first prediction result of training text j is recorded as when When V ij=1. The fourth reference value is ε (ε is an arbitrary positive number), and the fifth data is 1. V ij It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. ij =(V ij +1) / 2 to perform normalization processing, and obtain the first comparison result S of any training text pair ij .

[0104] It should be noted that the third reference value and the fourth reference value are used to measure whether the difference in the first prediction results between the two training texts is large enough. When the difference in the first prediction results between the two training texts is less than the third reference value or greater than the fourth reference value, it means that the difference in the first prediction results between the two training texts is large enough, and the two training texts can be regarded as distinguishable text pairs (i.e., positive samples). When the difference in the first prediction results between the two training texts is not less than the third reference value and not greater than the fourth reference value, it means that the difference in the first prediction results between the two training texts is not large enough, and the two training texts can be regarded as indistinguishable text pairs (i.e., negative samples). It can be seen that the first comparison result of any training text pair carries the information that the training text pair is a positive sample or a negative sample, and the first comparison result of any training text pair is determined based on the third data or the fourth data or the fifth data, so that the first comparison result of any training text pair carries the sorting relationship between the two training texts. Since any training text pair can be a positive sample or a negative sample, the first comparison result of any training text pair carries the sorting relationship between the positive samples or the negative samples.

[0105] Since the first prediction result of the training text may be accurate or inaccurate, the embodiment of the present application can also determine the first comparison result of any training text pair according to the annotation result of the training text, so as to modify the first comparison result in implementation method A1 by using the annotation result of the training text, thereby reducing the transmission of erroneous knowledge and improving the accuracy of the model. As shown in the following implementation method A2.

[0106] Implementation method A2, obtaining a first comparison result of the first prediction results of two training texts in any training text pair, including: obtaining the annotation results of the two training texts in any training text pair, the annotation results are obtained through annotation, and are used to characterize whether the training text is recommended; based on the annotation results of the two training texts in any training text pair and the first prediction results of the two training texts in any training text pair, determining the first comparison result of any training text pair.

[0107] In the embodiment of the present application, the annotation results of each training text can be obtained, and the annotation result of any training text is used to indicate whether the training text is recommended.

[0108] In a possible implementation, each training text is recommended to a sample user. For any training text, if the sample user clicks on the training text, the annotation result of the training text is recommended, and if the sample user does not click on the training text, the annotation result of the training text is not recommended.

[0109] In another possible implementation, for any training text, the click rate of the training text is determined based on the number of clicks and the number of displays of the training text. If the click rate of the training text is greater than the click rate threshold, the annotation result of the training text is recommended; if the click rate of the training text is not greater than the click rate threshold, the annotation result of the training text is not recommended.

[0110] Two different symbols may be used to indicate that the annotation result of the training text is recommended or not recommended. For example, the digital symbol 1 is used to indicate that the annotation result of the training text is recommended, and the digital symbol 0 is used to indicate that the annotation result of the training text is not recommended.

[0111] In this way, the annotation results of each training text can be obtained, and the first comparison result of any training text pair can be determined based on the annotation results of the two training texts in any training text pair and the first prediction results of the two training texts in any training text pair.

[0112] In a possible implementation, based on the annotation results of two training texts in any training text pair and the first prediction results of the two training texts in any training text pair, a first comparison result of any training text pair is determined, including: in response to the annotation results of the two training texts in any training text pair being different, the first comparison result of any training text pair is determined based on the target data; in response to the annotation results of the two training texts in any training text pair being the same, the first comparison result of any training text pair is determined based on the first prediction results of the two training texts in any training text pair.

[0113] In the embodiment of the present application, it is possible to first determine whether the annotation results of two training texts in any training text pair are the same, and determine the first comparison result of any training text pair based on the determination result.

[0114] When the annotation results of two training texts in any training text pair are different, a first comparison result of any training text pair is determined based on the target data.

[0115] Optionally, determining the first comparison result of any training text pair based on the target data includes: in response to the difference between the annotation results of two training texts in any training text pair being a first reference value, determining the first comparison result of any training text pair based on the first data; in response to the difference between the annotation results of two training texts in any training text pair being a second reference value, determining the first comparison result of any training text pair based on the second data, the first reference value being greater than the second reference value, and the first data being greater than the second data.

[0116] In the embodiment of the present application, the difference between the annotation results of two training texts in any training text pair may be calculated first, and the first comparison result of any training text pair may be determined based on the difference.

[0117] When the difference between the annotation results of two training texts in any training text pair is a first reference value, the first comparison result of any training text pair is determined based on the first data. For example, the first data is determined as the first comparison result of any training text pair, or the first data is normalized to obtain the first comparison result of any training text pair.

[0118] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the annotation result of training text i is denoted as Y. (i) , the annotation result of training text j is recorded as Y (j) When Y (i) -Y (j) =1, then Among them, the first reference value is 1 and the first data is 1. It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. Perform normalization processing to obtain the first comparison result S of any training text pair ij .

[0119] When the difference between the annotation results of the two training texts in any training text pair is a second reference value, the first comparison result of any training text pair is determined based on the second data, for example, the second data is determined as the first comparison result of any training text pair, or the second data is normalized to obtain the first comparison result of any training text pair. The first reference value is greater than the second reference value, and the first data is greater than the second data.

[0120] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the annotation result of training text i is denoted as Y. (i) , the annotation result of training text j is recorded as Y (j) When Y (i) -Y(j) = -1, then Among them, the second reference value is -1, and the second data is -1. It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. Perform normalization processing to obtain the first comparison result S of any training text pair ij .

[0121] When the annotation results of two training texts in any training text pair are the same, a first comparison result of any training text pair is determined based on the first prediction results of the two training texts in any training text pair.

[0122] Optionally, when the annotation results of two training texts in any training text pair are the same, the first comparison result of any training text pair is determined according to implementation mode A1. Please refer to the description of implementation mode A1 for details, which will not be repeated here.

[0123] In the embodiment of the present application, the two training texts in any training text pair can be respectively denoted as i and j, and the annotation result of training text i is denoted as Y. (i) , the annotation result of training text j is recorded as Y (j) , when Y (i) -Y (j) = 0, then Among them, V ij It is a parameter determined according to implementation mode A1. It can be the difference between the first prediction results of training text i and training text j, that is, the first comparison result of any training text pair. Perform normalization processing to obtain the first comparison result S of any training text pair ij .

[0124] It is understandable that, since the first comparison result of any training text pair is determined based on any one of the first to fifth data, the first comparison result of any training text pair can be used as annotation information. The second network model is trained using the annotation information to improve the performance and accuracy of the second network model.

[0125] In an embodiment of the present application, the second comparison result of any training text pair can also be determined based on the second prediction results of the two training texts in any training text pair, and the second comparison result is used to characterize the difference between the second prediction results of the two training texts in any training text pair.

[0126] In a possible implementation, obtaining a second comparison result of second prediction results of two training texts in any training text pair includes: determining a target difference value of the second prediction results of two training texts in any training text pair; and determining the second comparison result of any training text pair based on the target difference value.

[0127] In the embodiment of the present application, the difference between the second prediction results of the two training texts in any training text pair can be calculated first, and the difference is used as the target difference. Since the second prediction result is usually a small data, such as data of the order of 0.1, the target difference is also a small data.

[0128] In order to improve the robustness of training, enhance the learning ability of the model, especially enhance the model's ij =1 training text pair learning ability (S ij =1 requires that the difference between the first prediction results of the two training texts in the training text pair is greater than the fourth reference value, and the first prediction result is usually a smaller data). Therefore, the embodiment of the present application adopts an amplification factor to amplify the target difference data, wherein the amplification factor is a data between [0,1].

[0129] Optionally, the second comparison result of any training text pair is determined according to the ratio of the target difference value to the magnification factor, as shown in the following formula (3).

[0130]

[0131] Among them, P ij is the difference between the second prediction results of training text i and training text j, that is, the second comparison result of any training text pair. The second prediction result of training text i is recorded as The second prediction result of training text j is recorded as T∈[0,1] is a magnification factor.

[0132] It should be noted that the training text pair can be called paired (Pairwise), the first comparison result of the training text pair can be used as the annotation information of the training text pair, and the second comparison result of the training text pair can be used as the prediction information of the training text pair.

[0133] Step 203: Based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model.

[0134] In the embodiment of the present application, based on the first comparison result of each training text pair and the second comparison result of each training text pair, the comparison result loss value is calculated as shown in the following formula (4). The comparison result loss value is used to characterize the loss information between the first comparison result and the second comparison result.

[0135] L σ =-∑ i<j {S ij log(P ij )+(1-S ij )log(1-P ij )},i,j∈B Formula (4)

[0136] Among them, L σ To compare the loss values ​​of the results, i and j represent the two training texts in any training text pair, S ij is the first comparison result of any training text pair, P ij is the second comparison result of any training text pair, and B represents multiple training texts.

[0137] After calculating the comparison result loss value, the second network model is adjusted based on the comparison result loss value to obtain the adjusted second network model. If the adjusted second network model meets the training end condition (such as reaching the number of training times), the adjusted second network model is the recommended model. If the adjusted second network model does not meet the training end condition, the adjusted second network model is used as the second network model for the next training, and the second network model is continuously adjusted in the manner of steps 201 to 203 until the recommended model is obtained.

[0138] In a possible implementation, based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model, including: obtaining the annotation result of each training text; based on the first comparison result and the second comparison result of each training text pair, the annotation result and the second prediction result of each training text, the second network model is adjusted to obtain a recommendation model.

[0139] The annotation results of each training text can be obtained. The method for obtaining the annotation result of any training text has been described above and will not be repeated here.

[0140] In the embodiment of the present application, based on the annotation results of each training text and the second prediction results of each training text, the loss value between the annotation results and the second prediction results is determined, as shown in the following formula (5).

[0141]

[0142] in, is the loss value between the annotation result and the second prediction result, Y is the annotation result of each training text, σ S is the second prediction result of each training text.

[0143] In the embodiment of the present application, a comparison result loss value is calculated based on the first comparison result and the second comparison result of each training text pair. The calculation method of the comparison result loss value has been described above and will not be repeated here.

[0144] Afterwards, based on the loss value of the comparison result and the loss value between the labeled result and the second prediction result, the second network model is adjusted to obtain an adjusted second network model, and a recommendation model is obtained based on the adjusted second network model.

[0145] In a possible implementation, based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model, including: determining the first attribute feature of each attribute in any training text based on the first network model, and determining the second attribute feature of each attribute in any training text based on the second network model; based on the first comparison result and the second comparison result of each training text pair, and the first attribute feature and the second attribute feature of each attribute in each training text, the second network model is adjusted to obtain a recommendation model.

[0146] The above has described how to determine the first attribute feature of each attribute in any training text based on the first network model and how to determine the second attribute feature of each attribute in any training text based on the second network model, which will not be repeated here.

[0147] Based on the first comparison result of each training text pair and the second comparison result of each training text pair, a comparison result loss value is calculated. The calculation method of the comparison result loss value has been described above and will not be repeated here.

[0148] Based on the first attribute feature of each attribute in each training text and the second attribute feature of each attribute in each training text, the attribute feature loss value is calculated according to the mean square error loss (also called L2 loss). Optionally, based on the first high-dimensional attribute feature of each attribute in each training text and the second high-dimensional attribute feature of each attribute in each training text, the attribute feature loss value is calculated as shown in the following formula (6). Wherein, the attribute feature loss value is used to characterize the loss between the first attribute feature and the second attribute feature.

[0149]

[0150] Among them, L E Represents the attribute feature loss value, E s Represents the second highest dimensional attribute feature of each attribute in each training text, E T Represents the first high-dimensional attribute features of each attribute in each training text, It is used to convert E s With E T Parameters for aligning dimensions.

[0151] Afterwards, based on the comparison result loss value and the attribute feature loss value, the second network model is adjusted to obtain an adjusted second network model, and a recommendation model is obtained based on the adjusted second network model.

[0152] In a possible implementation, based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model, including: obtaining the first text feature and the second text feature of each training text; based on the first comparison result and the second comparison result of each training text pair, the first text feature and the second text feature of each training text, the second network model is adjusted to obtain a recommendation model.

[0153] The above has described how to obtain the first text feature of each training text and the second text feature of each training text, which will not be repeated here.

[0154] The comparison result loss value may be calculated based on the first comparison result of each training text pair and the second comparison result of each training text pair. The calculation method of the comparison result loss value has been described above and will not be repeated here.

[0155] Based on the first text feature of each training text and the second text feature of each training text, a text feature loss value is determined according to the mean square error loss, wherein the text feature loss value is used to characterize the loss between the first text feature and the second text feature.

[0156] When the first text feature is obtained by performing feature fusion processing on the first attribute features of each attribute in any training text based on the multilayer perceptron, and the second text feature is obtained by performing feature fusion processing on the second attribute features of each attribute in any training text based on the multilayer perceptron, the text feature loss value is recorded as the text feature loss value corresponding to the multilayer perceptron, and the text feature loss value corresponding to the multilayer perceptron can be determined according to the mean square error loss method shown in the following formula (7).

[0157]

[0158] Among them, L D is the text feature loss value corresponding to the multi-layer perceptron, D T is the first text feature of each training text corresponding to the multilayer perceptron, D S is the second text feature of each training text corresponding to the multilayer perceptron, It is used to S With D T Parameters for aligning dimensions.

[0159] When the first text feature is obtained by performing feature cross processing on the first attribute features of each attribute in any training text, and the second text feature is obtained by performing feature cross processing on the second attribute features of each attribute in any training text, the text feature loss value is recorded as the text feature loss value corresponding to the feature cross, and the text feature loss value corresponding to the feature cross can be determined according to the mean square error loss method shown in the following formula (8).

[0160]

[0161] Among them, L I is the text feature loss value corresponding to the feature cross, I S is the second text feature of each training text corresponding to the feature cross, I T is the first text feature of each training text corresponding to the feature cross, is used to S with I T Parameters for aligning dimensions.

[0162] Afterwards, based on the comparison result loss value and the text feature loss value (at least one of the text feature loss value corresponding to the multilayer perceptron and the text feature loss value corresponding to the feature intersection), the second network model is adjusted to obtain the adjusted second network model, and the recommendation model is obtained based on the adjusted second network model.

[0163] It should be noted that the loss value of the second network model can be determined by using at least one of the loss value between the annotation result and the second prediction result, the attribute feature loss value, the text feature loss value corresponding to the multi-layer perceptron, the text feature loss value corresponding to the feature intersection, and the comparison result loss value. Based on the loss value of the second network model, the second network model is adjusted to obtain an adjusted second network model, and a recommended model is obtained based on the adjusted second network model.

[0164] Optionally, the loss value of the second network model is determined according to formula (9) shown below.

[0165]

[0166] Among them, L S is the loss value of the second network model, L E is the attribute feature loss value, L I is the text feature loss value corresponding to the feature cross, L D is the text feature loss value corresponding to the multi-layer perceptron, L σ To compare the loss value of the results, is the loss value between the labeled result and the second prediction result. Among them, the attribute feature loss value, the text feature loss value corresponding to the multi-layer perceptron, and the text feature loss value corresponding to the feature cross are all feature loss values. The feature loss value is used to measure the similarity between the middle hidden layer of the first network model and the middle hidden layer of the second network model, and λ F Is the weight coefficient corresponding to the feature loss value. σ is the weighted coefficient corresponding to the loss value of the comparison result, λ g The weighting coefficient corresponding to the loss value between the annotation result and the second prediction result. F , σ and λ g The numerical value of, for example, λ F =λ σ =3.0,λ g =1.0.

[0167] In a possible implementation, after predicting the first prediction result of each training text based on the first network model, it also includes: obtaining the annotation result of each training text; adjusting the first network model based on the annotation result of each training text and the first prediction result to obtain an adjusted first network model.

[0168] In the embodiment of the present application, based on the annotation results of each training text and the first prediction results of each training text, the loss value between the annotation results and the first prediction results is determined, as shown in the following formula (10).

[0169]

[0170] in, is the loss value between the annotation result and the first prediction result, Y is the annotation result of each training text, σ T is the first prediction result of each training text.

[0171] Afterwards, based on the loss value between the annotation result and the first prediction result, the first network model is adjusted to obtain the adjusted first network model. If the adjusted first network model meets the training end condition (such as reaching the number of training times), the adjusted first network model can also be used as a recommendation model. If the adjusted first network model does not meet the training end condition, the adjusted first network model is used as the first network model for the next training, and the first network model is continuously adjusted in accordance with steps 201 to 203 until the training end condition is met.

[0172] It should be noted that, in the embodiment of the present application, the training method of the first network model and the second network model is an asynchronous distillation training method, the first network model can be used as a teacher model, and the second network model can be used as a student model. The asynchronous distillation training method can avoid mutual interference between the teacher model and the student model, and transfer the knowledge learned asynchronously by the teacher model to the student model during distillation training, thereby improving the accuracy and performance of the student model.

[0173] The first comparison result of any training text pair in the above method is used to characterize the difference between the first prediction results of the two training texts in any training text pair, and the second comparison result of any training text pair is used to characterize the difference between the second prediction results of the two training texts in any training text pair. The recommendation model is obtained based on the first comparison results and the second comparison results of each training text pair, so that the recommendation model can learn the differences between the first prediction results and the second prediction results of different training texts, thereby improving the prediction ability of the recommendation model, thereby improving the accuracy of the recommendation model, and further improving the recommendation accuracy of media information.

[0174] Based on the above implementation environment, the present application embodiment provides a media information recommendation method. Figure 3 As an example, the flowchart of a media information recommendation method provided in the embodiment of the present application is shown in FIG. Figure 1 The electronic device 11 in the embodiment is executed. Figure 3 As shown, the method includes steps 301 to 303.

[0175] Step 301: Acquire multiple media information, where the media information includes a target text.

[0176] The embodiment of the present application can acquire multiple media information, any of which includes at least one of audio, picture, and text, and the target text can be extracted from any of the media information.

[0177] Step 302: obtaining a recommendation result of a target text in each media information based on the recommendation model.

[0178] The recommendation model is obtained based on the training method of the recommendation model provided in the above embodiment.

[0179] In the embodiment of the present application, multiple target texts are input into the recommendation model, and the recommendation model predicts the recommendation results of each target text. The recommendation result of any target text can be a vector used to characterize the possibility of any target text being recommended, or it can be a probability used to characterize the possibility of any target text being recommended.

[0180] In a possible implementation, a recommendation result of a target text in each media information is obtained based on a recommendation model, including: for a target text in any media information, determining attribute features of each attribute in the target text based on a recommendation model, wherein the attribute features of any attribute are used to describe any attribute; performing feature fusion processing on the attribute features of each attribute in the target text to obtain text features of the target text; and determining a recommendation result for the target text based on the attribute features of each attribute in the target text and the text features of the target text.

[0181] For any target text in any media information, the target text includes at least one attribute, which can be a keyword extracted from the target text, or a sentence or a paragraph in the target text. The present application embodiment does not limit the attributes of the target text. For example, the attributes of the target text include but are not limited to the title of the media information, the body of the media information, the author of the media information, the label of the media information, and the source of the target text.

[0182] For any target text, the encoding layer of the recommendation model can be used to determine the attribute features of each attribute in any target text. The attribute features of each attribute in any target text are determined in the same manner as the second attribute features of each attribute in any training text, which will not be repeated here.

[0183] Next, the recommendation model performs feature fusion processing on the attribute features of each attribute in any target text to obtain the text features of any target text. The method for determining the text features of any target text is the same as the method for determining the second text features of any training text, which will not be repeated here.

[0184] After obtaining the attribute features of each attribute in any target text and the text features of any target text, the recommendation model concatenates the attribute features of each attribute in any target text and the text features of any target text to obtain the concatenated features of any target text. The concatenated features of any target text are determined in the same manner as the second concatenated features of any training text, which will not be described in detail.

[0185] Afterwards, the recommendation model determines the recommendation result of any target text based on the concatenated features of any target text. The method for determining the recommendation result of any target text is the same as the method for determining the second prediction result of any training text, which will not be described in detail here.

[0186] Step 303: based on the recommendation results of the target texts in the various media information, determine the media information to be recommended that meets the recommendation conditions from the multiple media information, and recommend the media information to be recommended.

[0187] In the embodiment of the present application, for the recommendation result of the target text in any media information, if the recommendation result is greater than the recommendation threshold, it is determined that any media information is the media information to be recommended that meets the recommendation condition, and if the recommendation result is not greater than the recommendation threshold, it is determined that any media information is not the media information to be recommended that meets the recommendation condition. In this way, the media information to be recommended that meets the recommendation condition is determined from multiple media information, and the media information to be recommended is sent to the client, so that the client recommends the media information to be recommended, that is, the client displays the recommended media information.

[0188] It should be noted that, in addition to obtaining a recommended model (i.e., the recommended model in step 302) after adjusting the second network model, another recommended model can also be obtained after adjusting the first network model. For the sake of distinction, the recommended model obtained after adjusting the first network model is referred to as the first recommended model, and the recommended model obtained after adjusting the second network model is referred to as the second recommended model (i.e., the recommended model in step 302).

[0189] Optionally, there are multiple media information to be recommended. After determining the media information to be recommended that meets the recommendation condition, the recommendation results of the target text in each media information to be recommended are predicted based on the first recommendation model. Based on the recommendation results of the target text in each media information to be recommended, the target media information that meets the screening condition is determined from the multiple media information to be recommended. If the recommendation result of the target text in any media information to be recommended is greater than the screening threshold, it is determined that any media information to be recommended is the target media information that meets the screening condition. If the recommendation result of the target text in any media information to be recommended is not greater than the screening threshold, it is determined that any media information to be recommended is not the target media information that meets the screening condition.

[0190] It can be understood that the model structures of the first recommendation model and the second recommendation model are the same. Therefore, the method of predicting the recommendation results of the target text in each media information to be recommended based on the first recommendation model is similar to the method of step 302. Please refer to the description of step 302 and will not be repeated here.

[0191] In an embodiment of the present application, the second recommendation model is used to first determine the media information to be recommended from multiple media information, and then the first recommendation model is used to determine the target media information from the multiple media information to be recommended. Based on the principle of coarse screening first and then fine screening, the accuracy of the media information to be recommended can be improved.

[0192] The recommendation model of the above method is obtained based on the first comparison result and the second comparison result of each training text pair, and the first comparison result of any training text pair is used to characterize the difference between the first prediction results of the two training texts in any training text pair, and the second comparison result of any training text pair is used to characterize the difference between the second prediction results of the two training texts in any training text pair. This enables the recommendation model to learn the differences between the first prediction results and the second prediction results of different training texts, improves the prediction ability of the recommendation model, thereby improving the accuracy of the recommendation model, and further improves the recommendation accuracy of media information.

[0193] The above describes the training method of the recommendation model and the media information recommendation method in the embodiment of the present application from the perspective of method steps, and will be described in detail in conjunction with a scenario below. In the scenario of the embodiment of the present application (such as the subscription account picture and text recommendation scenario), the teacher model corresponds to the first network model mentioned above, and the student model corresponds to the second network model mentioned above. The encoding layer of the teacher model is a Deep FM model with a dimension of 128, while the encoding layer of the student model is a Deep FM model with a dimension of 16. The dimensions of the hidden units in the MLP layer of the teacher model are 512, 256, 128, and 64, respectively, while the dimensions of the hidden units in the MLP layer of the student model are 128, 64, 32, and 16, respectively. The teacher model serves for fine sorting and the student model serves for coarse sorting, that is, the "first use the second recommendation model to determine the media information to be recommended from multiple media information, and then use the first recommendation model to determine the target media information from multiple media information to be recommended" mentioned above.

[0194] See also Figure 4 , Figure 4 Schematic diagram of an asynchronous distillation provided in an embodiment of the present application. Asynchronous distillation includes two asynchronous pipelines, namely a teacher pipeline and a student pipeline. The teacher pipeline is the conventional training of the teacher model, and the student pipeline is the distillation training of the student model. Figure 4 It can be seen that the data flows of the teacher pipeline and the student pipeline are independent of each other, and the data flow of the teacher pipeline is ahead of the data flow of the student pipeline in the time dimension.

[0195] For the teacher pipeline, the training text is extracted from the database, the teacher model is extracted from the teacher model library (the model library is also called Checkpoint), the teacher model is trained using the training text to update the teacher model, and the updated teacher model is stored in the teacher model library.

[0196] For the student pipeline, the training text is extracted from the database, the teacher model is extracted from the teacher model library, and the student model is extracted from the student model library. The student model is trained using the training text and the teacher model to update the student model, and the updated student model is stored in the student model library.

[0197] The asynchronous distillation mechanism will cause the update of the student model to be delayed compared to the update of the teacher model (for example, a delay of tens of minutes). In the scenario of the embodiment of the present application, the impact of such a delay is negligible. Compared with the synchronous distillation mechanism, the student model trained by the asynchronous distillation mechanism has a stronger fitting ability, can serve the rough ranking more effectively, and improve the recommendation effect.

[0198] See also Figure 5 , Figure 5 Schematic diagram of an asynchronous distillation training process provided by an embodiment of the present application. Figure 5 It can be seen that the model structures of the teacher model and the student model are exactly the same, and the only difference between the two is the model parameters. This "model isomorphism" design is conducive to the student model to fit the effect of the teacher model and improve the accuracy of the student model. In addition, the teacher model and the student model are independent of each other, and their encoding layer, feature cross layer, multi-layer perceptron layer, splicing layer, and fully connected layer are all independent of each other.

[0199] In an embodiment of the present application, the training text includes multiple attributes, namely attribute 1, attribute 2, attribute 3, ..., attribute m (m is a positive integer). On the one hand, the training text can be input into the teacher model for training the teacher model, and on the other hand, the training text can also be input into the student model for training the student model in combination with the teacher model. Among them, since the model structures of the teacher model and the student model are the same, the way the teacher model processes the training text is the same as the way the student model processes the training text. The following describes the way the student model processes the training text from the perspective of the student model.

[0200] After the training text is input into the student model, the encoding layer of the student model includes a square encoding table and a wide encoding table. The square encoding table is used to encode attribute 1, attribute 2, attribute 3, ..., attribute m in the training text into high-dimensional attribute features (corresponding to the second high-dimensional attribute features mentioned above), and the wide encoding table is used to encode attribute 1, attribute 2, attribute 3, ..., attribute m in the training text into low-dimensional attribute features (corresponding to the second low-dimensional attribute features mentioned above). Among them, the high-dimensional attribute features are passed through a multi-layer perceptron to obtain a text feature, and the high-dimensional attribute features are passed through feature crossover to obtain another text feature. Next, these two text features (corresponding to the second text feature mentioned above) are spliced ​​with the low-dimensional attribute features to obtain spliced ​​features (corresponding to the second spliced ​​features mentioned above), and the spliced ​​features are input into the fully connected layer, and the fully connected layer outputs the prediction result (corresponding to the second prediction result mentioned above), which is the prediction result of the training text and is used to characterize the possibility of the training text being recommended. In this way, the student model can output the prediction result of the training text. Based on the same principle, the teacher model can also output the prediction results of the training text (corresponding to the first prediction result in the above text), which will not be repeated here.

[0201] For the teacher model, obtain the annotation results of the training text, and the annotation results of the training text are used to characterize whether the training text is recommended. Based on the annotation results of the training text and the prediction results of the training text output by the teacher model, determine a loss value (corresponding to the loss value between the annotation results and the first prediction result in the above text). The loss value is the loss value of the teacher model, which is used to adjust the teacher model.

[0202] For the student model, based on the prediction results of the training text output by the teacher model and the prediction results of the training text output by the student model, a loss value 1 is determined (corresponding to the loss value of the comparison result mentioned above). The annotation results of the training text are obtained, and based on the annotation results of the training text and the prediction results of the training text output by the student model, a loss value 2 is determined (corresponding to the loss value between the annotation result and the second prediction result mentioned above). Based on the text features obtained after feature crossover of the high-dimensional attribute features in the teacher model and the text features obtained after feature crossover of the high-dimensional attribute features in the student model, a loss value 3 is determined (corresponding to the text feature loss value corresponding to the feature crossover mentioned above). Based on the text features obtained after the high-dimensional attribute features in the teacher model are passed through a multi-layer perceptron and the text features obtained after the high-dimensional attribute features in the student model are passed through a multi-layer perceptron, a loss value 4 is determined (corresponding to the text feature loss value corresponding to the multi-layer perceptron mentioned above). Based on the high-dimensional attribute features in the teacher model and the high-dimensional attribute features in the student model, a loss value 5 is determined (corresponding to the attribute feature loss value mentioned above). The loss value of the student model is determined based on the loss values ​​1 to 5, and the loss value of the student model is used to adjust the student model.

[0203] In the embodiment of the present application, the teacher model and the student model can be adjusted multiple times until the training end condition is met. At this time, the teacher model and the student model can both be used as recommendation models. The student model can be used to determine the recommendation result of the target text in the media information, and based on the recommendation result of the target text in each media information, the media information to be recommended that meets the recommendation condition is determined from multiple media information. The media information to be recommended is sent to the client so that the client recommends the media information to be recommended, that is, the media information is recommended by the client.

[0204] Please refer to Figure 6 , Figure 6 It is a schematic diagram of a display page provided in an embodiment of the present application. The display page is a display page in a subscription account picture and text recommendation scenario. In the subscription account picture and text recommendation scenario, the display page can display recommended media information, and the recommended media information includes but is not limited to at least one of pictures, texts, and videos. The recommended media information can be advertising information. The display page includes an indicator of the power level of the electronic device (as shown by label 601), an indicator that the electronic device has been connected to a wireless signal (as shown by label 602), an indicator that the electronic device has been connected to a base station signal (as shown by label 603), and time information "11:45". The display page is a display page of "Subscription Account Message". The left side of the page includes a return control (as shown by label 604). Clicking the return control can return to the previous display page of the "Subscription Account Message" display page. The display page includes four recommended media information.

[0205] The first media information is video media information, which includes but is not limited to the title "[Modeling Algorithm] Monte Carlo Simulation Algorithm", the author "Author 1", a play control (as shown in label 605) and a delete control (as shown in label 606). The second media information is multimedia information containing pictures and text, which includes but is not limited to the title "Interviewer: Question A", the author "Author 2", a picture (as shown in label 607) and a delete control. The third media information is also multimedia information containing pictures and text, which includes but is not limited to the title "Work: Question B", the author "Author 3", a picture (as shown in label 608) and a delete control. The fourth media information is video media information, which includes but is not limited to the title "[Tool] Interface Management Tool", the author "Author 4", a play control and a delete control.

[0206] In the embodiment of the present application, offline experiments and online experiments were conducted on coarse ranking in the subscription account picture and text recommendation scenario.

[0207] For offline experiments, more than 200 million pieces of data in 10 hours of a certain day are obtained as training texts, and more than 20 million pieces of data in the next hour of the 10 hours of the same day are obtained as test texts.

[0208] In the embodiment of the present application, three models are obtained by training with training texts. The first model is a model obtained by conventional training with training texts, denoted as DFM_16_NORM, and the encoding layer of this model is a 16-dimensional Deep FM model. The second model is a model obtained by asynchronously distilling the student model using the training method of the recommendation model provided in the embodiment of the present application, denoted as DFM_16_ASYNC_DISTILL, and the encoding layer of this model is also a 16-dimensional Deep FM model. The third model is a model obtained by synchronously distilling the student model, denoted as DFM_16_SYNC_DISTILL, and the encoding layer of this model is also a 16-dimensional Deep FM model.

[0209] It should be noted that when performing asynchronous distillation, a teacher model with a 128-dimensional Deep FM model encoding layer is required to perform distillation training on the student model, and the loss value obtained based on the annotation results of the training text and the prediction results of the training text output by the teacher model is only used to adjust the teacher model. When performing synchronous distillation, a teacher model with a 128-dimensional Deep FM model encoding layer is required to perform distillation training on the student model, and the loss value obtained based on the annotation results of the training text and the prediction results of the training text output by the teacher model is used to adjust the teacher model in addition to adjusting the student model, that is, the teacher model and the student model are trained at the same time.

[0210] In the embodiment of the present application, multiple experiments were conducted using DFM_16_NORM, DFM_16_ASYNC_DISTILL and DFM_16_SYNC_DISTILL, and the area under the receiver operating characteristic (ROC) curve (AUC) was determined based on the experimental results, and the results shown in Table 1 below were obtained.

[0211] Table 1

[0212] Model Name AUC DFM_16_NORM 0.717969 DFM_16_SYNC_DISTILL 0.721443 DFM_16_ASYNC_DISTILL 0.727317

[0213] As can be seen from Table 1, DFM_16_ASYNC_DISTILL obtained by asynchronous distillation training has the best effect. Compared with DFM_16_NORM obtained by conventional training, DFM_16_ASYNC_DISTILL has an increase of 1.3% in AUC. In addition, the AUC value of DFM_16_ASYNC_DISTILL is higher than that of DFM_16_SYNC_DISTILL obtained by synchronous distillation training, but the AUC value of DFM_16_SYNC_DISTILL is higher than that of DFM_16_NORM. It can be seen that both synchronous distillation training and asynchronous distillation training have an improving effect on model fitting ability. Since the teacher model is a "stronger mentor" during asynchronous distillation training, the fitting ability of the model obtained by asynchronous distillation training is higher than that of the model obtained by synchronous distillation training.

[0214] For online experiments, the indicator used is click-through rate (CTR). By comparing DFM_16_SYNC_DISTILL and DFM_16_NORM, in a continuous observation of 7 days, DFM_16_SYNC_DISTILL compared with DFM_16_NORM, the increase in CTR reached 2%, thus verifying that the recommendation model obtained by the training method of the recommendation model provided in the embodiment of the present application has a more accurate recommendation ability.

[0215] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a training device for a recommendation model provided in an embodiment of the present application. Figure 7 As shown, the device comprises:

[0216] An acquisition module 701 is used to acquire a first prediction result recommended for each training text based on a first network model, and acquire a second prediction result recommended for each training text based on a second network model, wherein the first network model and the second network model have different model parameters;

[0217] The acquisition module 701 is further used to acquire, for any training text pair, a first comparison result of the first prediction results and a second comparison result of the second prediction results of two training texts in any training text pair, wherein the first comparison result is used to characterize the difference of the first prediction result, and the second comparison result is used to characterize the difference of the second prediction result, and any training text pair includes any two training texts in each training text;

[0218] The adjustment module 702 is used to adjust the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model.

[0219] In one possible implementation, the acquisition module 701 is used to obtain the annotation results of the two training texts in any training text pair, where the annotation results are obtained through annotation and are used to characterize whether the training text is recommended; based on the annotation results of the two training texts in any training text pair and the first prediction results of the two training texts in any training text pair, determine the first comparison result of any training text pair.

[0220] In one possible implementation, the acquisition module 701 is used to determine the first comparison result of any training text pair based on the target data in response to the annotation results of two training texts in any training text pair being different; and to determine the first comparison result of any training text pair based on the first prediction results of the two training texts in any training text pair in response to the annotation results of the two training texts in any training text pair being the same.

[0221] In one possible implementation, the acquisition module 701 is used to determine the first comparison result of any training text pair based on the first data in response to the difference between the annotation results of two training texts in any training text pair being a first reference value; and to determine the first comparison result of any training text pair based on the second data in response to the difference between the annotation results of two training texts in any training text pair being a second reference value, the first reference value being greater than the second reference value, and the first data being greater than the second data.

[0222] In one possible implementation, the acquisition module 701 is used to determine the first comparison result of any training text pair based on the third data in response to the difference between the first prediction results of two training texts in any training text pair being less than the third reference value; to determine the first comparison result of any training text pair based on the fourth data in response to the difference between the first prediction results of two training texts in any training text pair being not less than the third reference value and not greater than the fourth reference value, the third reference value being less than the fourth reference value, and the third data being less than the fourth data; and to determine the first comparison result of any training text pair based on the fifth data in response to the difference between the first prediction results of two training texts in any training text pair being greater than the fourth reference value, the fourth data being less than the fifth data.

[0223] In a possible implementation, the acquisition module 701 is used to determine a target difference value of second prediction results of two training texts in any training text pair; and determine a second comparison result of any training text pair based on the target difference value.

[0224] In a possible implementation, the acquisition module 701 is used to determine the first attribute feature of each attribute in any training text based on the first network model, and the first attribute feature of any attribute is used to describe any attribute; perform feature fusion processing on the first attribute feature of each attribute in any training text to obtain the first text feature of any training text; based on the first attribute feature of each attribute in any training text and the first text feature of any training text, determine the first prediction result of any training text.

[0225] In a possible implementation, the acquisition module 701 is configured to perform at least one of the following:

[0226] Based on the multi-layer perceptron, the first attribute features of each attribute in any training text are subjected to feature fusion processing to obtain the first text feature of any training text; the first attribute features of each attribute in any training text are subjected to feature cross processing to obtain the first text feature of any training text.

[0227] In a possible implementation, the acquisition module 701 is used to determine the second attribute features of each attribute in any training text based on the second network model, and the second attribute features of any attribute are used to describe any attribute; perform feature fusion processing on the second attribute features of each attribute in any training text to obtain the second text features of any training text; based on the second attribute features of each attribute in any training text and the second text features of any training text, determine the second prediction result of any training text.

[0228] In a possible implementation, the adjustment module 702 is used to obtain the annotation results of each training text; based on the first comparison result and the second comparison result of each training text pair, the annotation result and the second prediction result of each training text, the second network model is adjusted to obtain a recommendation model.

[0229] In one possible implementation, the adjustment module 702 is used to determine the first attribute feature of each attribute in any training text based on the first network model, and determine the second attribute feature of each attribute in any training text based on the second network model; based on the first comparison result and the second comparison result of each training text pair, and the first attribute feature and the second attribute feature of each attribute in each training text, the second network model is adjusted to obtain a recommendation model.

[0230] In one possible implementation, the adjustment module 702 is used to obtain the first text feature and the second text feature of each training text; based on the first comparison result and the second comparison result of each training text pair, the first text feature and the second text feature of each training text, the second network model is adjusted to obtain a recommendation model.

[0231] In a possible implementation, the acquisition module 701 is further used to obtain the annotation results of each training text;

[0232] The adjustment module 702 is further used to adjust the first network model based on the annotation results of each training text and the first prediction result to obtain an adjusted first network model.

[0233] The first comparison result of any training text pair in the above device is used to characterize the difference between the first prediction results of the two training texts in any training text pair, and the second comparison result of any training text pair is used to characterize the difference between the second prediction results of the two training texts in any training text pair. The recommendation model is obtained based on the first comparison results and the second comparison results of each training text pair, so that the recommendation model can learn the differences between the first prediction results and the second prediction results of different training texts, thereby improving the prediction ability of the recommendation model, thereby improving the accuracy of the recommendation model, and further improving the recommendation accuracy of the media information.

[0234] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of the structure of a media information recommendation device provided in an embodiment of the present application. Figure 8 As shown, the device comprises:

[0235] An acquisition module 801 is used to acquire multiple media information, wherein the media information includes a target text;

[0236] The acquisition module 801 is further used to acquire a recommendation result of a target text in each media information based on a recommendation model, wherein the recommendation model is obtained based on any of the above-mentioned training methods of the recommendation model;

[0237] The recommendation module 802 is used to determine the to-be-recommended media information that meets the recommendation condition from the multiple media information based on the recommendation results of the target text in each media information, and recommend the to-be-recommended media information.

[0238] In a possible implementation, the acquisition module 801 is used to determine the attribute features of each attribute in the target text in any media information based on the recommendation model, and the attribute features of any attribute are used to describe any attribute; perform feature fusion processing on the attribute features of each attribute in the target text to obtain the text features of the target text; and determine the recommendation result of the target text based on the attribute features of each attribute in the target text and the text features of the target text.

[0239] The recommendation model of the above device is obtained based on the first comparison result and the second comparison result of each training text pair, and the first comparison result of any training text pair is used to characterize the difference between the first prediction results of the two training texts in any training text pair, and the second comparison result of any training text pair is used to characterize the difference between the second prediction results of the two training texts in any training text pair. This enables the recommendation model to learn the differences between the first prediction results and the second prediction results of different training texts, improves the prediction ability of the recommendation model, thereby improving the accuracy of the recommendation model, and further improves the recommendation accuracy of media information.

[0240] It should be understood that the above Figure 7 , Figure 8 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0241] Fig. 9 The structure block diagram of a terminal device 900 provided by an exemplary embodiment of the present application is shown. The terminal device 900 may be a portable mobile terminal, such as a smart phone, a tablet computer, a notebook computer or a desktop computer. The terminal device 900 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0242] Typically, the terminal device 900 includes: a processor 901 and a memory 902 .

[0243] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0244] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the training method of the recommendation model or the media information recommendation method provided in the method embodiment of the present application.

[0245] In some embodiments, the terminal device 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902 and the peripheral device interface 903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907 and a power supply 908.

[0246] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

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

[0248] The display screen 905 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to collect touch signals on the surface or above the surface of the display screen 905. The touch signal can be input to the processor 901 as a control signal for processing. At this time, the display screen 905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 905 can be one, set on the front panel of the terminal device 900; in other embodiments, the display screen 905 can be at least two, respectively set on different surfaces of the terminal device 900 or in a folding design; in other embodiments, the display screen 905 can be a flexible display screen, set on the curved surface or folding surface of the terminal device 900. Even, the display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0249] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0250] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal device 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0251] The power supply 908 is used to power various components in the terminal device 900. The power supply 908 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0252] In some embodiments, the terminal device 900 further includes one or more sensors 909 . The one or more sensors 909 include but are not limited to: an acceleration sensor 911 , a gyroscope sensor 912 , a pressure sensor 913 , an optical sensor 914 , and a proximity sensor 915 .

[0253] The acceleration sensor 911 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal device 900. For example, the acceleration sensor 911 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 can also be used for collecting game or user motion data.

[0254] The gyroscope sensor 912 can detect the body direction and rotation angle of the terminal device 900. The gyroscope sensor 912 can cooperate with the acceleration sensor 911 to collect the user's 3D actions on the terminal device 900. The processor 901 can implement the following functions based on the data collected by the gyroscope sensor 912: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0255] The pressure sensor 913 can be set on the side frame of the terminal device 900 and / or the lower layer of the display screen 905. When the pressure sensor 913 is set on the side frame of the terminal device 900, it can detect the user's holding signal of the terminal device 900, and the processor 901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is set on the lower layer of the display screen 905, the processor 901 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0256] The optical sensor 914 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 according to the ambient light intensity collected by the optical sensor 914. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 914.

[0257] The proximity sensor 915, also called a distance sensor, is usually arranged on the front panel of the terminal device 900. The proximity sensor 915 is used to collect the distance between the user and the front of the terminal device 900. In one embodiment, when the proximity sensor 915 detects that the distance between the user and the front of the terminal device 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 915 detects that the distance between the user and the front of the terminal device 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from the screen-off state to the screen-on state.

[0258] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal device 900, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0259] Fig.10This is a schematic diagram of the structure of the server provided in the embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors 1001 and one or more memories 1002, wherein the one or more memories 1002 store at least one program code, and the at least one program code is loaded and executed by the one or more processors 1001 to implement the training method of the recommendation model or the media information recommendation method provided in the above-mentioned various method embodiments. Exemplarily, the processor 1001 is a CPU. Of course, the server 1000 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 1000 may also include other components for implementing device functions, which will not be described in detail here.

[0260] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned recommendation model training methods or media information recommendation methods.

[0261] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0262] In an exemplary embodiment, a computer program or a computer program product is also provided, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement any of the above-mentioned recommendation model training methods or media information recommendation methods.

[0263] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0264] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0265] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A training method for a recommendation model, characterized in that: The method comprises: Obtaining a first prediction result recommended for each training text based on a first network model, and obtaining a second prediction result recommended for each training text based on a second network model, wherein the first network model and the second network model have different model parameters; For any training text pair including any two training texts in the training texts, obtaining the annotation results of the two training texts in the training text pair, wherein the annotation results are obtained by annotation and are used to indicate whether the training text is recommended; In response to the annotation results of the two training texts in any one of the training text pairs being different, determining a first comparison result of the any one of the training text pairs based on the target data, wherein the first comparison result is used to characterize the difference of the first prediction result; Obtaining a second comparison result of the second prediction results of two training texts in any one of the training text pairs, wherein the second comparison result is used to characterize the difference of the second prediction results; Based on the first comparison result and the second comparison result of each training text pair, the second network model is adjusted to obtain a recommendation model.

2. The method according to claim 1, characterized in that The method further comprises: In response to the annotation results of the two training texts in any one of the training text pairs being the same, a first comparison result of the any one of the training text pairs is determined based on the first prediction results of the two training texts in the any one of the training text pairs.

3. The method according to claim 1, characterized in that The determining the first comparison result of any one of the training text pairs based on the target data includes: In response to the difference between the annotation results of the two training texts in any one of the training text pairs being a first reference value, determining a first comparison result of the any one of the training text pairs based on the first data; In response to the difference between the annotation results of the two training texts in any one of the training text pairs being a second reference value, a first comparison result of the any one of the training text pairs is determined based on second data, the first reference value is greater than the second reference value, and the first data is greater than the second data.

4. The method according to claim 2, characterized in that: The determining the first comparison result of any one of the training text pairs based on the first prediction results of the two training texts in the any one of the training text pairs comprises: In response to the difference between the first prediction results of the two training texts in any one of the training text pairs being less than a third reference value, determining a first comparison result of the any one of the training text pairs based on the third data; In response to the difference between the first prediction results of the two training texts in any one of the training text pairs being not less than a third reference value and not greater than a fourth reference value, determining a first comparison result of the any one of the training text pairs based on fourth data, the third reference value being less than the fourth reference value, and the third data being less than the fourth data; In response to the difference between the first prediction results of the two training texts in any one of the training text pairs being greater than a fourth reference value, a first comparison result of the any one of the training text pairs is determined based on fifth data, the fourth data being smaller than the fifth data.

5. The method according to claim 1, characterized in that Obtaining a second comparison result of the second prediction results of the two training texts in any one training text pair includes: Determine a target difference value of second prediction results of two training texts in any one training text pair; A second comparison result of any one of the training text pairs is determined based on the target difference.

6. The method according to any one of claims 1 to 5, characterized in that: The step of obtaining a first prediction result recommended for each training text based on the first network model includes: Determine a first attribute feature of each attribute in any training text based on the first network model; Performing feature fusion processing on the first attribute features of each attribute in any one of the training texts to obtain the first text features of any one of the training texts; Based on the first attribute features of each attribute in any one of the training texts and the first text feature of any one of the training texts, a first prediction result of any one of the training texts is determined.

7. The method according to claim 6, characterized in that The step of performing feature fusion processing on the first attribute features of each attribute in any one of the training texts to obtain the first text feature of any one of the training texts includes at least one of the following: Performing feature fusion processing on the first attribute features of each attribute in any one of the training texts based on a multi-layer perceptron to obtain the first text features of any one of the training texts; A feature cross-processing is performed on the first attribute feature of each attribute in any one of the training texts to obtain the first text feature of any one of the training texts.

8. The method according to any one of claims 1 to 5, characterized in that: The obtaining, based on the second network model, a second prediction result of the recommendation of each training text includes: Determine a second attribute feature of each attribute in any training text based on the second network model, wherein the second attribute feature of any attribute is used to describe the any attribute; Performing feature fusion processing on the second attribute features of each attribute in any one of the training texts to obtain the second text features of any one of the training texts; Based on the second attribute features of each attribute in any one of the training texts and the second text features of any one of the training texts, a second prediction result of any one of the training texts is determined.

9. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model includes: Obtaining the annotation results of each training text; Based on the first comparison result and the second comparison result of each training text pair, and the annotation result and the second prediction result of each training text, the second network model is adjusted to obtain the recommendation model.

10. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model includes: Determine a first attribute feature of each attribute in any training text based on the first network model, and determine a second attribute feature of each attribute in any training text based on the second network model; Based on the first comparison results and the second comparison results of the respective training text pairs and the first attribute features and the second attribute features of the respective attributes in the respective training texts, the second network model is adjusted to obtain the recommendation model.

11. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model includes: Acquire the first text feature and the second text feature of each training text; Based on the first comparison results and the second comparison results of the respective training text pairs and the first text features and the second text features of the respective training texts, the second network model is adjusted to obtain the recommendation model.

12. The method according to any one of claims 1 to 5, characterized in that: After obtaining the first prediction result recommended for each training text based on the first network model, the method further includes: Obtaining the annotation results of each training text; Based on the annotation results of the respective training texts and the first prediction result, the first network model is adjusted to obtain an adjusted first network model.

13. A media information recommendation method, characterized in that: The method comprises: Acquire multiple media information, wherein the media information includes a target text; Obtaining a recommendation result of a target text in each media information based on a recommendation model, wherein the recommendation model is obtained based on the training method of the recommendation model according to any one of claims 1 to 12; Based on the recommendation results of the target texts in the respective media information, to-be-recommended media information satisfying the recommendation condition is determined from the plurality of media information, and the to-be-recommended media information is recommended.

14. The method according to claim 13, characterized in that The step of obtaining the recommendation result of the target text in each media information based on the recommendation model includes: For a target text in any media information, determining attribute features of each attribute in the target text based on the recommendation model, wherein the attribute features of any attribute are used to describe the any attribute; Performing feature fusion processing on the attribute features of each attribute in the target text to obtain text features of the target text; Based on the attribute features of each attribute in the target text and the text features of the target text, a recommendation result of the target text is determined.

15. A training device for a recommendation model, characterized in that: The device comprises: an acquisition module, configured to acquire a first prediction result recommended for each training text based on a first network model, and acquire a second prediction result recommended for each training text based on a second network model, wherein the first network model and the second network model have different model parameters; The acquisition module is further used to acquire, for any training text pair including any two training texts in the respective training texts, the annotation results of the two training texts in the any training text pair, the annotation results being obtained by annotation and used to characterize whether the training text is recommended; in response to the annotation results of the two training texts in the any training text pair being different, determine a first comparison result of the any training text pair based on the target data, the first comparison result being used to characterize the difference in the first prediction result; and acquire a second comparison result of the second prediction results of the two training texts in the any training text pair, the second comparison result being used to characterize the difference in the second prediction result; The adjustment module is used to adjust the second network model based on the first comparison result and the second comparison result of each training text pair to obtain a recommendation model.

16. The device according to claim 15, characterized in that The acquisition module is further configured to determine a first comparison result of any training text pair based on the first prediction results of the two training texts in any training text pair in response to the annotation results of the two training texts in any training text pair being the same.

17. The device according to claim 15, characterized in that The acquisition module is used to determine the first comparison result of any training text pair based on first data in response to the difference between the annotation results of two training texts in any training text pair being a first reference value; and to determine the first comparison result of any training text pair based on second data in response to the difference between the annotation results of two training texts in any training text pair being a second reference value, wherein the first reference value is greater than the second reference value, and the first data is greater than the second data.

18. The device according to claim 16, characterized in that The acquisition module is used to determine the first comparison result of any training text pair based on third data in response to the difference between the first prediction results of the two training texts in any training text pair being less than the third reference value; to determine the first comparison result of any training text pair based on fourth data in response to the difference between the first prediction results of the two training texts in any training text pair being not less than the third reference value and not greater than a fourth reference value, wherein the third reference value is less than the fourth reference value and the third data is less than the fourth data; and to determine the first comparison result of any training text pair based on fifth data in response to the difference between the first prediction results of the two training texts in any training text pair being greater than the fourth reference value, wherein the fourth data is less than the fifth data.

19. The device according to claim 15, characterized in that The acquisition module is used to determine a target difference value of the second prediction results of two training texts in any one training text pair; and determine the second comparison result of any one training text pair based on the target difference value.

20. The device according to any one of claims 15 to 19, characterized in that The acquisition module is used to determine the first attribute feature of each attribute in any training text based on the first network model, and the first attribute feature of any attribute is used to describe the any attribute; perform feature fusion processing on the first attribute feature of each attribute in the any training text to obtain the first text feature of the any training text; Based on the first attribute features of each attribute in any one of the training texts and the first text feature of any one of the training texts, a first prediction result of any one of the training texts is determined.

21. The device according to claim 20, characterized in that The acquisition module is used for at least one of the following: Performing feature fusion processing on the first attribute features of each attribute in any one of the training texts based on a multi-layer perceptron to obtain the first text features of any one of the training texts; A feature cross-processing is performed on the first attribute feature of each attribute in any one of the training texts to obtain the first text feature of any one of the training texts.

22. The device according to any one of claims 15 to 19, characterized in that The acquisition module is used to determine the second attribute feature of each attribute in any training text based on the second network model, and the second attribute feature of any attribute is used to describe the any attribute; perform feature fusion processing on the second attribute feature of each attribute in the any training text to obtain the second text feature of the any training text; Based on the second attribute features of each attribute in any one of the training texts and the second text features of any one of the training texts, a second prediction result of any one of the training texts is determined.

23. The device according to any one of claims 15 to 19, characterized in that The adjustment module is used to obtain the annotation results of each training text; based on the first comparison results and the second comparison results of each training text pair, the annotation results and the second prediction results of each training text, the second network model is adjusted to obtain the recommendation model.

24. The device according to any one of claims 15 to 19, characterized in that The adjustment module is used to determine a first attribute feature of each attribute in any training text based on the first network model, and to determine a second attribute feature of each attribute in any training text based on the second network model; Based on the first comparison results and the second comparison results of the respective training text pairs and the first attribute features and the second attribute features of the respective attributes in the respective training texts, the second network model is adjusted to obtain the recommendation model.

25. The device according to any one of claims 15 to 19, characterized in that The adjustment module is used to obtain the first text feature and the second text feature of each training text; based on the first comparison result and the second comparison result of each training text pair, the first text feature and the second text feature of each training text, the second network model is adjusted to obtain the recommendation model.

26. The device according to any one of claims 15 to 19, characterized in that The acquisition module is further used to obtain the annotation results of each training text; The adjustment module is further used to adjust the first network model based on the annotation results of each training text and the first prediction result to obtain an adjusted first network model.

27. A media information recommendation device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of media information, wherein the media information includes a target text; The acquisition module is further used to acquire a recommendation result of a target text in each media information based on a recommendation model, wherein the recommendation model is obtained based on the training method of the recommendation model according to any one of claims 1 to 12; The recommendation module is used to determine the to-be-recommended media information that meets the recommendation condition from the multiple media information based on the recommendation results of the target text in the various media information, and recommend the to-be-recommended media information.

28. The device according to claim 27, characterized in that The acquisition module is used to determine the attribute features of each attribute in the target text in any media information based on the recommendation model, and the attribute features of any attribute are used to describe the any attribute; perform feature fusion processing on the attribute features of each attribute in the target text to obtain the text features of the target text; and determine the recommendation result of the target text based on the attribute features of each attribute in the target text and the text features of the target text.

29. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor so that the electronic device implements the training method of the recommendation model described in any one of claims 1 to 12 or the media information recommendation method described in any one of claims 13 to 14.

30. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor so that the computer implements the training method of the recommendation model as described in any one of claims 1 to 12 or the media information recommendation method as described in any one of claims 13 to 14.

31. A computer program product, characterized in that The computer program product stores at least one computer instruction, and the at least one computer instruction is loaded and executed by a processor so that the computer implements the training method of the recommendation model as described in any one of claims 1 to 12 or the media information recommendation method as described in any one of claims 13 to 14.