Data processing method and related equipment

By integrating collaborative knowledge and semantic knowledge in the recommendation model, and using multiple sets of training data and pre-trained language models for iterative training, the shortcomings in the traditional recommendation model in terms of accuracy are solved, and more accurate and efficient recommendation effects are achieved.

CN119646502APending Publication Date: 2025-03-18HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311210842.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional recommendation models have shortcomings in the accuracy of recommendation results, mainly because they can only utilize synergistic information between users and historical items and lack semantic understanding.

Method used

By combining multiple sets of first training data and pre-trained language models, the recommended model is trained multiple iteratively to obtain the trained recommended model. The method includes obtaining semantic features of the training data and updating the recommended model to fuse collaborative knowledge and semantic knowledge.

Benefits of technology

Improve the accuracy of the recommended model, make the recommendation results more accurate, while maintaining a low latency, and will not make the recommended model architecture too complex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646502A_ABST
    Figure CN119646502A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method, and the method comprises the steps: training a recommendation model through a pre-training language model and first training data, so as to enable the trained recommendation model to learn the cooperation information carried by the first training data, and also to enable the first training data to learn the cooperation information carried by the first training data; according to the method and the device, the semantic knowledge carried by the pre-training language model can be learned, so that the trained recommendation model can fuse the collaborative knowledge and the semantic knowledge to realize the recommendation task, the recommendation accuracy is improved, and meanwhile, the recommendation model can be ensured to have relatively good time delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method and related equipment. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0003] In scenarios such as recommendation systems, search engines, or advertising push, recommendation models are often used to identify the data (such as items, information, and advertisements) that users are most interested in from massive amounts of data.

[0004] Among them, the traditional recommendation model uses information such as user behavior data and item attributes to predict the user's interest in new items by calculating similarities and establishing a user-item relationship model. The architecture of this model is usually simpler, so the latency when making online recommendations is low. However, the traditional recommendation model can usually only make recommendations based on the collaborative information between users and historical items. There is less reference information available, which often makes the recommendation results inaccurate. In other words, the accuracy of traditional recommendation models is usually low. Summary of the invention

[0005] The present application provides a data processing method that can improve the accuracy of the recommendation model. The present application also provides corresponding devices, equipment, computer-readable storage media, and computer program products.

[0006] The first aspect of the present application provides a data processing method, which includes: training a recommendation model according to multiple groups of first training data and pre-trained language models to obtain a trained recommendation model, wherein the training process includes multiple iterations, and any first training data includes attribute information of a user and attribute information of an object related to the user; in the nth iteration of the multiple iterations, the method includes: obtaining the first training data of the nth iteration, where n is a positive integer; obtaining semantic features of the first training data of the nth iteration through the pre-trained language model of the nth iteration; updating the recommendation model of the nth iteration based on the semantic features of the nth iteration and the first training data of the nth iteration to obtain a recommendation model after the nth iteration.

[0007] In the first aspect, the recommendation model can be trained by a pre-trained language model and the first training data, so that the trained recommendation model can not only learn the collaborative information carried by the first training data itself, but also learn the semantic knowledge carried by the pre-trained language model, so that the trained recommendation model can integrate the collaborative knowledge and semantic knowledge to achieve the recommendation task, thereby improving the accuracy of the recommendation. At the same time, it will not make the architecture of the recommendation model overly complicated, and therefore, a better latency can be guaranteed.

[0008] In a possible implementation of the first aspect, based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process, including: masking the first training data of the nth iteration process to obtain the masked first training data of the nth iteration process; inputting the masked first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a first feature corresponding to the masked first training data of the nth iteration process; according to the first feature and the semantic features of the first training data of the nth iteration process, through the mask prediction network corresponding to the recommendation model of the nth iteration process, obtaining a prediction result of the mask in the masked first training data of the nth iteration process; according to the prediction result corresponding to the nth iteration process, updating the recommendation model of the nth iteration process to obtain the recommendation model after the nth iteration process.

[0009] In this possible implementation, the recommendation model and the corresponding prediction network can restore the masked part of the first training data in the nth iteration process with the help of the semantic representation of the pre-trained language model and the representation of the first training data by the recommendation model (that is, the first feature), so that the recommendation model can perceive the deep information of the first training data including collaborative information and the corresponding semantic features at the feature level, thereby providing a better feature information foundation for the execution of subsequent recommendation tasks.

[0010] In a possible implementation manner of the first aspect, in the nth iteration process of multiple iteration processes, the method also includes: inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process; updating the recommendation model of the nth iteration process according to the prediction result of the mask corresponding to the nth iteration process to obtain the recommendation model after the nth iteration process, including: updating the recommendation model of the nth iteration process according to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process to obtain the recommendation model after the nth iteration process.

[0011] In this possible implementation method, the second feature can be aligned with the semantic feature of the first training data of the nth iteration process based on comparative learning, model distillation, etc., to obtain the alignment result of the second feature and the semantic feature of the first training data of the nth iteration process, and then according to the alignment result and the accuracy of the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0012] In a possible implementation of the first aspect, according to the alignment result of the second feature with the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process, including: using a loss function, according to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, a loss value is calculated, the loss function includes a first loss term and a second loss term, the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the nth iteration process are aligned, and the second loss term is used to evaluate whether the prediction result of the mask corresponding to the nth iteration process is accurate; according to the loss value, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0013] In this possible implementation, the semantic representation of the pre-trained language model can be aligned with the relevant representation of the recommendation model at the sample level through comparative learning and other methods, so that the knowledge of the language model and the knowledge of the recommendation model can be fully integrated in the implicit space to achieve feature alignment at the sample level, so that information from different modalities can be more fully integrated.

[0014] In this way, not only can collaborative information and semantic information be jointly modeled at the fine-grained feature level, but also through sample-level feature alignment, information from different modalities such as text and tables can be more fully integrated, thereby enhancing the capabilities of the trained recommendation model and improving the corresponding prediction accuracy. At the same time, the recommendation model can still maintain a relatively lightweight framework, and while enhancing its capabilities, it can ensure high efficiency in the subsequent reasoning stage.

[0015] In a possible implementation of the first aspect, the first training data of the nth iteration process is data of a first modality, and the first modality is different from the text modality; obtaining semantic features of the first training data of the nth iteration process through a pre-trained language model includes: performing modality conversion on the first training data of the nth iteration process to obtain text data corresponding to the first training data of the nth iteration process; inputting the text data of the nth iteration process into the pre-trained language model of the nth iteration process to obtain semantic features of the first training data of the nth iteration process.

[0016] In this possible implementation, the first training data of the nth iteration process is modally converted to obtain text data corresponding to the first training data of the nth iteration process, so that feature extraction can be performed on the text data through a pre-trained language model to obtain corresponding semantic features.

[0017] In a possible implementation manner of the first aspect, a recommendation model is trained according to multiple groups of first training data and a pre-trained language model to obtain a trained recommendation model, including: training a pre-trained language model and a recommendation model according to multiple groups of first training data to obtain a trained recommendation model and a trained pre-trained language model; in the nth iteration of multiple iterations, the method further includes: inputting the first training data of the nth iteration into the recommendation model of the nth iteration to obtain a second feature corresponding to the first training data of the nth iteration; based on the second feature and the first training data of the nth iteration, training the pre-trained language model of the nth iteration to obtain a pre-trained language model after the nth iteration.

[0018] In this possible implementation, during the training process, not only the recommendation model can be trained, but also the pre-trained language model can be trained. For example, based on comparison learning, model distillation, etc., the second feature can be aligned with the semantic feature of the first training data of the nth iteration process to obtain the alignment result of the second feature with the semantic feature of the first training data of the nth iteration process, and then according to the alignment result and the accuracy of the prediction result of the mask corresponding to the nth iteration process, the pre-trained language model of the nth iteration process is updated to obtain the pre-trained language model after the nth iteration process, so that the knowledge of the language model and the knowledge of the recommendation model can be fully integrated in the implicit space to achieve feature alignment at the sample level, so that information of different modalities can be more fully integrated. In this way, not only can collaborative information and semantic information be jointly modeled at the fine-grained feature level, but also through sample-level feature alignment, information of different modalities such as text and table can be more fully integrated, thereby enhancing the ability of the trained pre-trained language model and improving the corresponding prediction accuracy.

[0019] In a possible implementation of the first aspect, the method also includes: obtaining second training data corresponding to the reasoning task; fine-tuning the target model according to the second training data to obtain a fine-tuned target model, the target model including a trained recommendation model and / or a trained pre-trained language model, and the fine-tuned target model is used to perform the reasoning task.

[0020] In this possible implementation, if the inference latency is considered, only the recommendation model can be fine-tuned; if the model effect is considered, the recommendation model and the pre-trained language model can be fine-tuned at the same time to more fully optimize the trained recommendation model and the pre-trained language model and enhance the model's capabilities.

[0021] The second aspect of the present application provides a data processing device, which has the function of implementing the method of the first aspect or any possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as a training module.

[0022] The third aspect of the present application provides an electronic device, which includes at least one processor, a memory, and computer execution instructions stored in the memory and executable on the processor. When the computer execution instructions are executed by the processor, the processor executes a method as described in the first aspect or any possible implementation of the first aspect.

[0023] The fourth aspect of the present application provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes a method as described in the first aspect or any possible implementation of the first aspect.

[0024] The fifth aspect of the present application provides a computer program product storing one or more computer execution instructions, wherein the computer program product includes computer execution instructions. When the computer execution instructions are executed by a processor, the processor executes a method as described in the first aspect or any possible implementation of the first aspect.

[0025] In a sixth aspect of the present application, a chip system is provided, which includes a processor for supporting an electronic device to implement the functions involved in the first aspect or any possible implementation of the first aspect. In a possible design, the chip system may also include a memory, which is used to store program instructions and data necessary for the electronic device. The chip system may be composed of a chip, or may include a chip and other discrete devices.

[0026] Among them, the technical effects brought about by the second to sixth aspects or any possible implementation methods thereof can refer to the technical effects brought about by the first aspect or the relevant possible implementation methods of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is an exemplary schematic diagram of a data processing method provided in an embodiment of the present application;

[0028] Figure 2 is an exemplary schematic diagram of training a recommendation model and a pre-trained language model provided in an embodiment of the present application;

[0029] Figure 3 is an exemplary schematic diagram of fine-tuning a trained model provided in an embodiment of the present application;

[0030] Figure 4 is a schematic diagram of an exemplary scenario provided in an embodiment of the present application;

[0031] Figure 5 is a schematic diagram of an embodiment of a data processing device provided in an embodiment of the present application;

[0032] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0034] Those skilled in the art may appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0035] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of singular or plural items. The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, and this is merely a description of the way in which objects with the same attributes are described in the embodiments of the present application. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a list of elements is not necessarily limited to those elements but may include other elements not expressly listed or inherent to such process, method, product, or apparatus.

[0036] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.

[0037] (1) Neural Network

[0038] A neural network may be composed of neural units, and a neural unit may refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input, and the output of the operation unit may be:

[0039]

[0040] Where s=1, 2, ...n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolution layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the characteristics of the local receptive field. The local receptive field can be an area composed of several neural units.

[0041] (2) Loss Function

[0042] In the process of training a neural network, because we hope that the output of the neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the predicted value of the network is high, adjust the weight vector to make it predict a lower value, and keep adjusting until the neural network can predict the target value we really want or a value very close to the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.

[0043] (3) Back propagation algorithm

[0044] The neural network can use the error back propagation (BP) algorithm to correct the size of the parameters in the initial super-resolution model during the training process, so that the reconstruction error loss of the super-resolution model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the error loss information is back-propagated to update the parameters in the initial super-resolution model, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal parameters of the super-resolution model, such as the weight matrix.

[0045] Currently, large-scale information retrieval systems (such as recommendation systems, search engines, or computational advertising) aim to provide users with the most interesting data (such as items, information, advertisements) by retrieving from massive amounts of data (such as items, information, advertisements).

[0046] In practical applications, information retrieval systems usually use recommendation models to determine content of interest to users.

[0047] The traditional recommendation model based on collaborative information uses information such as user behavior data and item attributes to predict the user's interest in unknown items by calculating similarities and establishing a user-item relationship model. The advantages of this traditional recommendation model are its simple architecture and low online inference latency.

[0048] However, traditional recommendation models can usually only make recommendations based on the collaborative information between users and historical items. There is less available reference information, which often makes the recommendation results inaccurate. In other words, the accuracy of traditional recommendation models is usually low.

[0049] At present, if the recommendation task is implemented based on a pre-trained language model, it is usually done by extracting the text information of users and items and inputting the text information into the pre-trained language model for modeling. The advantage of this method is that the pre-trained language model usually has strong semantic understanding and text reasoning capabilities. At the same time, the pre-trained language model has a huge knowledge base and can mine the semantic information in the recommendation data. However, the disadvantage is that the large pre-trained language model has a huge number of parameters, which will lead to excessive online latency, and it is difficult to model the collaborative information of users and items. In most sorting scenarios, the effect is not as good as the recommendation model based on collaborative information.

[0050] Based on this, a data processing method is provided in an embodiment of the present application, which can realize the joint modeling of collaborative information and semantic information through a recommendation model, thereby making full use of multi-dimensional information to realize information recommendation while ensuring low latency.

[0051] The data processing method of the embodiment of the present application can be applied to an electronic device. The specific type of the electronic device is not limited here. Exemplarily, the electronic device can be a terminal device, a cloud server, a single server or a server cluster, or a virtual machine (VM) or a container, etc.

[0052] The type of terminal device is not limited here. Exemplarily, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a terminal in industrial control, a terminal in self-driving (such as a car computer, a vehicle computing platform, a domain controller, a sensor, etc.), a terminal in remote medical, a terminal in smart grid, a terminal in transportation safety, a terminal in smart city, a terminal in smart home, a terminal in Internet of things (IoT), a wearable device, a robot, etc., or a combination of one or more thereof.

[0053] The recommendation scenarios involved in the embodiments of the present application may include various situations, which are not limited here. In different application scenarios, the types of recommended objects may include various situations.

[0054] For example, the recommendation scenario may be product recommendations in e-commerce apps, search engine result recommendations, application software (APP) recommendations in application markets, music recommendations, video recommendations, advertisement recommendations, etc. In different scenarios, the types of recommended objects may be links, apps, music, videos, advertisement push, or one or more items in online shopping platforms.

[0055] In the recommendation scenario, the recommendation model can be used to determine the recommendation probability or score of each object to be recommended relative to the user. Then, the relevant recommendation system (such as application market, search engine, advertising platform, audio and video application or other related application) can obtain the recommendation result based on the recommendation probability or score of each object to be recommended relative to the user. For example, each object to be recommended can be sorted according to the recommendation probability or score and presented to the user through the corresponding application or terminal device.

[0056] In an embodiment of the present application, the recommendation model can be trained by an electronic device so that the trained recommendation model can realize the joint modeling of collaborative information and semantic information, thereby making full use of multi-dimensional information to realize information recommendation while ensuring low latency.

[0057] Specifically, the data processing method may include the following steps:

[0058] The recommendation model is trained according to the multiple groups of first training data and the pre-trained language model to obtain a trained recommendation model.

[0059] In the embodiment of the present application, there may be multiple ways to obtain the first training data, which are not limited here.

[0060] Exemplarily, the first training data may be acquired from an open source database or may be manually collected.

[0061] The first training data may include attribute information of the user and attribute information of objects related to the user.

[0062] The user's attribute information is used to describe the user's attributes. For example, the user's attribute information includes one or more of the user's name, number, gender, age, occupation, hobbies, etc.

[0063] The user-related objects may be determined based on the user's historical data, for example, based on the user's historical behavior logs, etc. For example, taking the application market as an example, the user-related objects may include application programs involved in the user's historical operations in the application market.

[0064] In different recommendation scenarios, user-related objects may be different. For example, in the application market, user-related objects are applications to be recommended, while in e-commerce apps, user-related objects may be items to be recommended, etc. In addition, the attribute information of objects may also be different in different recommendation scenarios. Exemplarily, the attribute information of the relevant objects in the application market may include: the name (identification), type, size, etc. of the app; while the attribute information of the relevant objects in the e-commerce app may include: the name of the item, the category to which it belongs, the price range, etc.

[0065] In addition, the first training data may also include label information of the object.

[0066] The label information of each object can be determined based on the user's operation on the corresponding object (for example, based on the user's behavior log). For example, if the user has performed an operation on the relevant object (such as downloading, clicking, or purchasing), the label of the relevant object can be 1, indicating that the object is a positive example; if the user has not performed an operation on the relevant object, or only browsed it, the label of the relevant object can be 0, indicating that the object is a negative example.

[0067] The data format of the first training data is not limited here either.

[0068] Exemplarily, the first training data may be in a table form, a text form, a knowledge graph form, etc.

[0069] In the embodiment of the present application, it can be considered that the first training data carries the collaborative information between the user and the corresponding object (eg, the object to be recommended).

[0070] Embodiments of the present application relate to a pre-trained language model. The pre-trained language model can be considered as a natural language sequence encoder, which encodes each word in the natural language sequence into a vector representation, thereby performing a prediction task. The pre-trained language model can be a pre-trained language model. In the pre-training stage, the language model is trained on a language model task on a large-scale unsupervised text and / or supervised text, thereby learning word representations. After the pre-training stage, the obtained pre-trained language model has a large amount of semantic knowledge and can capture the deep semantic features of the text.

[0071] In addition, the pre-trained language model can also be fine-tuned to meet the needs of downstream prediction tasks. In the fine-tuning stage, the model is initialized with the parameters learned in the pre-training stage, and trained in fewer steps on downstream tasks such as text classification and sequence labeling, so that the semantic information obtained in pre-training can be successfully transferred to downstream tasks.

[0072] In an embodiment of the present application, the recommendation model can be trained using a pre-trained language model and the first training data, so that the trained recommendation model can not only learn the collaborative information carried by the first training data itself, but also learn the semantic knowledge carried by the pre-trained language model, so that the trained recommendation model can integrate the collaborative knowledge and semantic knowledge to achieve the recommendation task, thereby improving the accuracy of the recommendation. At the same time, it will not make the architecture of the recommendation model overly complicated, and therefore, a better latency can be guaranteed.

[0073] The training process includes multiple iterations, and the training process is specifically introduced below by taking the specific process of the nth iteration of the multiple iterations as an example, wherein n is a positive integer, that is, the nth iteration can be any iteration of the multiple iterations.

[0074] Specifically, Figure 1 As shown, during the nth iteration, the method includes steps 101-103.

[0075] Step 101, obtaining the first training data of the nth iteration process, where n is a positive integer.

[0076] The first training data may be stored locally on the electronic device executing the embodiment of the present application, or may be transmitted to the electronic device by other devices, or may be acquired by the electronic device through a web page or other applications.

[0077] Step 102: Obtain semantic features of first training data of the nth iteration process through the pre-trained language model of the nth iteration process.

[0078] In the embodiment of the present application, since the language model is trained on a large-scale unsupervised text and / or supervised text for language model tasks during the pre-training phase, word representations are learned. After the pre-training phase is completed, the obtained pre-trained language model has a large amount of semantic knowledge and can capture the deep semantic features of the text.

[0079] Therefore, in the nth iteration process, the semantic features of the first training data can be obtained by preprocessing the language model.

[0080] During the training process, the pre-trained language model may remain unchanged or may be fine-tuned as the training process progresses, which is not limited in the embodiments of the present application.

[0081] In some examples, the data form of the first training data cannot meet the requirements of the pre-trained language model. Therefore, it is necessary to perform modality conversion on the first training data to obtain data in text modality, and then process it through the pre-trained language model.

[0082] Specifically, in some embodiments, the first training data of the nth iteration process is data of a first modality, and the first modality is different from the text modality;

[0083] The semantic features of the first training data of the nth iteration process are obtained through the pre-trained language model, including:

[0084] Performing modal conversion on the first training data of the nth iteration process to obtain text data corresponding to the first training data of the nth iteration process;

[0085] The text data of the nth iteration process is input into the pre-trained language model of the nth iteration process to obtain the semantic features of the first training data of the nth iteration process.

[0086] Exemplarily, the first mode may be a table mode, that is, the first training data of the nth iteration process is table data.

[0087] In this way, the first training data of the nth iteration process can be modally converted according to the preset data conversion rule to obtain the text data corresponding to the first training data of the nth iteration process.

[0088] There may be many specific ways of the modal conversion, which are not limited in the embodiments of the present application.

[0089] A data conversion method is introduced below by way of example.

[0090] In an example, the first training data of the nth iteration process is tabular data. Specifically, the first training data in tabular form is shown in Table 1 below.

[0091] Table 1: First training data in tabular form

[0092] User ID gender Profession Movie Logo Movie Title Movie Category 217 female college students 12 XX Plot

[0093] For a first training data as shown in Table 1, the first training data may include user data describing attributes such as age, gender, and occupation of the user, and object data describing object attributes such as the name and category of movies that the user has watched in the past.

[0094] Use "." as the separator between each attribute and "is" as the connector between the attribute name and the attribute value. For the first training data shown in Table 1, it can be converted into text data through modal conversion: "The user ID is 217. The gender is female. The occupation is a college student. The movie ID is 12. The movie name is XX. The movie category is drama."

[0095] In this way, the first training data of the nth iteration process is modally converted to obtain text data corresponding to the first training data of the nth iteration process, so that feature extraction can be performed on the text data through a pre-trained language model to obtain corresponding semantic features.

[0096] Step 103: based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0097] In an embodiment of the present application, the recommendation model of the nth iteration process can be updated based on the semantic features of the nth iteration process and the first training data of the nth iteration process to obtain the recommendation model after the nth iteration process, so that the recommendation model after the nth iteration process can learn the collaborative information in the first training data and the semantic information related to the first training data.

[0098] If the recommendation model after the nth iteration process meets the preset convergence condition (for example, converges to a specified state or the number of iterations reaches a preset number of times, etc.), the recommendation model after the nth iteration process can be used as the recommended model after training. Otherwise, the recommendation model after the nth iteration process can be used as the recommended model for the n+1th iteration process and continue training.

[0099] In addition, in some embodiments, during the training process, not only the recommendation model can be trained, but also the pre-trained language model can be trained.

[0100] Specifically, in some embodiments, training a recommendation model according to multiple sets of first training data and pre-trained language models to obtain a trained recommendation model includes:

[0101] The pre-trained language model and the recommendation model are trained according to the multiple groups of first training data to obtain a trained recommendation model and a trained pre-trained language model.

[0102] Below, the training process of the pre-trained language model and the recommendation model is introduced exemplarily. It should be noted that in different application scenarios, only the recommendation model can be trained, or only the pre-trained language model can be trained, or both the pre-trained language model and the recommendation model can be trained. That is to say, the steps of the relevant embodiments of the training process of the pre-trained language model and the recommendation model in different application scenarios can be executed only partially or in full, and the embodiments of the present application do not limit this.

[0103] Specifically, in one embodiment, based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process, including:

[0104] Performing mask processing on the first training data of the n-th iteration process to obtain the masked first training data of the n-th iteration process;

[0105] Inputting the masked first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a first feature corresponding to the masked first training data of the nth iteration process;

[0106] According to the first feature and the semantic feature of the first training data of the nth iteration process, a prediction result of the mask in the masked first training data of the nth iteration process is obtained through a mask prediction network corresponding to the recommendation model of the nth iteration process;

[0107] According to the prediction result corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0108] In an embodiment of the present application, the first training data may be masked to train a recommendation model to predict the mask therein, thereby learning the corresponding representation information.

[0109] For example, for the first training data in the form of a table shown in Table 1, after masking the gender and the movie name, the masked first training data in the form of a table as shown in Table 2 can be obtained.

[0110] Table 2: The first training data in masked tabular form

[0111] User ID gender Profession Movie Logo Movie Title Movie Category 217 [mask] college students 12 [mask] Plot

[0112] Then, the masked first training data of the nth iteration process may be input into the recommendation model of the nth iteration process to obtain the first feature corresponding to the masked first training data of the nth iteration process.

[0113] Next, based on the first feature and the semantic feature of the first training data of the nth iteration process, a prediction result of the mask in the masked first training data of the nth iteration process can be obtained through the prediction network corresponding to the recommendation model of the nth iteration process.

[0114] In this way, the recommendation model and the corresponding prediction network can restore the masked part of the first training data in the nth iteration process with the help of the semantic representation of the pre-trained language model and the representation of the first training data by the recommendation model (that is, the first feature), so that the recommendation model can perceive the deep information of the first training data including collaborative information and the corresponding semantic features at the feature level, thereby providing a better feature information foundation for the execution of subsequent recommendation tasks.

[0115] like Figure 2 , which is an exemplary schematic diagram for training a recommendation model and a pre-trained language model.

[0116] Among them, it can be seen that after the first training data in tabular form is modally converted to obtain the corresponding text data, the text data "user ID is 217. Gender is female. Occupation is college student, movie ID is 12. Movie name is XX. Movie category is plot" can be input into the pre-trained language model to obtain the corresponding semantic features.

[0117] Furthermore, after the first training data is masked, it can be input into the recommendation model to obtain the corresponding first feature.

[0118] Next, the first feature and the semantic feature can be input into the mask prediction network corresponding to the recommendation model to obtain a prediction result for the corresponding mask, so that the recommendation model and the corresponding mask prediction network can be trained according to the difference between the prediction result of the mask and the true mask, so that the recommendation model can perceive the first training data including collaborative information and the deep information of the corresponding semantic feature at the feature level.

[0119] The specific structure of the mask prediction network corresponding to the recommendation model is not limited here.

[0120] exist Figure 2In the example shown, the semantic feature and the first feature can be input into a cross-attention module, which is implemented based on a cross-attention mechanism, wherein the semantic feature can be input as a key and a value, and the first feature can be input as a query. Then, the output of the cross-attention module can be input into a prediction layer to obtain a prediction result of the corresponding mask. Exemplarily, the prediction layer can include a fully connected layer, etc.

[0121] In addition, in some embodiments, the semantic representation of the preprocessed language model and the representation of the recommendation model can be aligned so that the knowledge of the language model and the knowledge of the collaborative model are fully integrated in the implicit space, thereby further improving the performance of the model.

[0122] Specifically, in some embodiments, in an nth iteration of the multiple iterations, the method further includes:

[0123] Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process;

[0124] According to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process, including:

[0125] According to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0126] In an embodiment of the present application, the second feature can be aligned with the semantic feature of the first training data of the nth iteration process based on comparative learning, model distillation, etc., to obtain the alignment result of the second feature with the semantic feature of the first training data of the nth iteration process, and then according to the alignment result and the accuracy of the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0127] Specifically, in some embodiments, updating the recommendation model of the nth iteration process according to the alignment result of the second feature and the semantic feature of the first training data of the nth iteration process and the prediction result of the mask corresponding to the nth iteration process to obtain the recommendation model after the nth iteration process includes:

[0128] A loss value is calculated according to the second feature and the semantic feature of the first training data of the n-th iteration process, and according to the prediction result of the mask corresponding to the n-th iteration process, through a loss function, wherein the loss function includes a first loss term and a second loss term, the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the n-th iteration process are aligned, and the second loss term is used to evaluate whether the prediction result of the mask corresponding to the n-th iteration process is accurate;

[0129] According to the loss value, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0130] like Figure 2 In the example shown, the first training data in Table 1 can be input into the recommendation model to obtain the second feature obtained by the recommendation model processing the first training data in Table 1. Then, the semantic representation of the pre-trained language model can be aligned with the relevant representation of the recommendation model at the sample level by comparison learning and other methods, so that the knowledge of the language model and the knowledge of the recommendation model can be fully integrated in the implicit space to achieve feature alignment at the sample level, so that information of different modalities can be more fully integrated.

[0131] The specific setting method of the loss function is not limited here. For example, in one example, the first loss term may include the following:

[0132]

[0133]

[0134]

[0135] Where B represents the size of the first training data, log represents the logarithmic function, exp represents the exponential function, and sim() represents the similarity calculation function. represents the semantic features of the text data corresponding to the first training data, represents the second feature of the first training data, A representation of all text data, represents the loss of incorporating the knowledge of the pre-trained language model into the collaborative model, represents the loss of incorporating the knowledge of the recommendation model into the pre-trained language model. ICL Represents the sum of the losses of the pre-trained language model and the recommendation model.

[0136] The second loss term can evaluate the difference between the predicted result of the mask corresponding to the nth iteration process and the corresponding correct mask. For example, the second loss term can calculate the cross entropy loss between the predicted result of the mask corresponding to the nth iteration process and the corresponding correct mask, etc.

[0137] In this way, not only can collaborative information and semantic information be jointly modeled at the fine-grained feature level, but also through sample-level feature alignment, information from different modalities such as text and tables can be more fully integrated, thereby enhancing the capabilities of the trained recommendation model and improving the corresponding prediction accuracy. At the same time, the recommendation model can still maintain a relatively lightweight framework, and while enhancing its capabilities, it can ensure high efficiency in the subsequent reasoning stage.

[0138] In addition, in some embodiments, during the training process, not only the recommendation model can be trained, but also the pre-trained language model can be trained.

[0139] Specifically, in the nth iteration process of the multiple iteration processes, the method further includes:

[0140] Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process;

[0141] Based on the second feature and the first training data of the nth iteration process, the pre-trained language model of the nth iteration process is trained to obtain the pre-trained language model after the nth iteration process.

[0142] For example, the text data corresponding to the first training data of the nth iteration process may be masked to obtain the masked text data of the nth iteration process. Then, the masked text data of the nth iteration process is input into the pre-trained language model of the nth iteration process to obtain the third feature corresponding to the masked text data of the nth iteration process. Furthermore, the first training data of the nth iteration process is input into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process.

[0143] Next, according to the third feature and the semantic feature of the nth iteration process, the mask prediction result of the mask in the masked text data of the nth iteration process can be obtained through the mask prediction network corresponding to the pre-trained language model of the nth iteration process. Then, according to the mask prediction result of the mask in the masked text data of the nth iteration process, the pre-trained language model of the nth iteration process can be updated to obtain the pre-trained language model after the nth iteration process.

[0144] Specifically, the pre-trained language model of the nth iteration process can be updated according to the second feature, the semantic feature of the nth iteration process, and the prediction result of the mask corresponding to the masked text data of the nth iteration process.

[0145] For example, a second loss value may be calculated according to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask in the masked text data of the nth iteration process, by a second loss function, wherein the second loss function includes a first loss term and a third loss term, wherein the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the nth iteration process are aligned, and the third loss term is used to evaluate whether the prediction result of the mask in the masked text data of the nth iteration process is accurate;

[0146] According to the second loss value, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0147] like Figure 2 In the example shown, the first training data shown in Table 1 can be converted into text data through modal conversion: "User ID is 217. Gender is female. Occupation is college student. Movie ID is 12. Movie name is XX. Movie category is drama."

[0148] After the text data is masked, the masked text data can be obtained: "The user ID is 217. The gender is [mask]. The occupation is a college student. The movie ID is 12. The movie name is [mask]. The movie category is drama."

[0149] The masked text data is input into the pre-trained language model to obtain the corresponding third feature. Then, the third feature and the semantic feature can be input into the mask prediction network corresponding to the pre-trained language model to obtain the prediction result of the mask corresponding to the masked text data, so that the pre-trained language model and the mask prediction network corresponding to the pre-trained language model can be updated according to the difference between the prediction result of the mask in the masked text data of the nth iteration process and the corresponding true mask, so that the pre-trained language model can perceive the first training data including the collaborative information and the deep information of the corresponding semantic feature at the feature level.

[0150] In addition, the second feature can be aligned with the semantic feature of the first training data of the nth iteration process based on comparison learning, model distillation, etc., to obtain the alignment result of the second feature with the semantic feature of the first training data of the nth iteration process, and then the pre-trained language model of the nth iteration process is updated according to the alignment result and the accuracy of the prediction result of the mask corresponding to the nth iteration process to obtain the pre-trained language model after the nth iteration process, so that the knowledge of the pre-trained language model and the knowledge of the recommendation model can be fully integrated in the implicit space to achieve feature alignment at the sample level, so that information of different modalities can be more fully integrated. In this way, not only can collaborative information and semantic information be jointly modeled at the fine-grained feature level, but also information of different modalities such as text and table can be more fully integrated through feature alignment at the sample level, thereby enhancing the ability of the pre-trained language model after training and improving the corresponding prediction accuracy.

[0151] The specific structure of the mask prediction network corresponding to the recommendation model is not limited here.

[0152] exist Figure 2 In the example shown, the semantic feature and the third feature can be fused by concatenation or the like. Then, the fused data can be input into a prediction layer to obtain a prediction result of the mask in the corresponding masked text data. Exemplarily, the prediction layer can include a fully connected layer or the like.

[0153] In this way, the trained recommendation model and the trained pre-trained language model can be obtained through training to be used in subsequent recommendation tasks.

[0154] In addition, in some embodiments, fine-tuning can be performed according to the situation of the downstream task so that the trained model can better match the situation of the downstream task and obtain more accurate recommendation results.

[0155] Specifically, in some embodiments, the method further includes:

[0156] Obtaining second training data corresponding to the reasoning task;

[0157] According to the second training data, the target model is fine-tuned to obtain a fine-tuned target model, where the target model includes a trained recommendation model and / or a trained pre-trained language model, and the fine-tuned target model is used to perform reasoning tasks.

[0158] The specific content of the downstream reasoning task is not limited here. Exemplarily, the downstream reasoning task can be in various business scenarios such as e-commerce recommendation, music recommendation, game recommendation, advertising, application market, etc. The second training data can be collected based on the downstream reasoning task.

[0159] In the present application embodiment, Figure 3 As shown, there are three ways to perform fine-tuning, namely: (a) fine-tuning only the trained recommendation model, in which case the target model may include the trained recommendation model and the prediction network corresponding to the trained recommendation model; (b) fine-tuning only the trained pre-trained language model, in which case the target model may include the trained pre-trained language model and the prediction network corresponding to the trained pre-trained language model; (c) fine-tuning the pre-trained language model and the recommendation model together, in which case the target model may include the trained recommendation model and the prediction network corresponding to the trained recommendation model, and the trained pre-trained language model and the prediction network corresponding to the trained pre-trained language model.

[0160] For example, if the inference latency is considered, you can only fine-tune the recommendation model; if the model effect is considered, you can fine-tune the recommendation model and the pre-trained language model at the same time to more fully optimize the trained recommendation model and pre-trained language model and enhance the model's capabilities.

[0161] like Figure 4 In the scenario shown, taking item recommendation as an example, an exemplary implementation of the embodiment of the present application may include the following steps:

[0162] 1) First, first training data in a table form may be obtained based on historical user behavior logs and item information in an item database, and the first training data in the table mode may be converted into data in a text mode;

[0163] 2) Using the first training data in the table mode and the corresponding text data, combined with the pre-trained language model, the recommendation model is trained to obtain a trained recommendation model;

[0164] 3) Fine-tune the trained recommendation model on downstream recommendation tasks, and then deploy the fine-tuned recommendation model online;

[0165] 4) After the fine-tuned recommendation model is deployed to the online reasoning module, when a user request comes in, the recommendation model is used to score the user request and item information together, sort them according to the scoring results, and display the final result to the user in the form of an item list.

[0166] In addition, Figure 4 In the scenario shown, a set of candidate products that the user is interested in can also be obtained through a recall module, etc., so as to obtain a corresponding item list by combining the candidate product set and the scoring result of the recommendation model.

[0167] Based on the method of any of the above embodiments, the inventor conducted experiments on three datasets: Movielens-1M, BookCrossing, and GoodReads. The experimental results are shown in Table 3:

[0168]

[0169] Among them, the existing models used include: AFM, PNN, Wide&Deep, DeepFM, xDeepFM, AFN, AutoInt, DCNv2, CTRL, CTR-BERT, P5, PTab, and the model used in any of the above embodiments of the present application includes ALT obtained by training the recommendation model. ctr (Ours), ALT obtained by training the pre-trained language model lang (Ours) and ALT obtained by training both the recommended model and the pre-trained model both (Ours).

[0170] The evaluation indicators of the above experiments include Area Under Curve (AUC), logistic loss (Logloss), and relative improvement (Rel.Impr).

[0171] Among them, AUC refers to the area under the receiver operating characteristic curve (ROC) and the coordinate axis. Logloss refers to the loss value of the loss function, and Rel.Impr refers to the ALT obtained by training both the recommended model and the pre-trained model. both (Ours) Performance improvement over existing models.

[0172] It can be seen that the performance of the model using any of the above embodiments of the present application is better than the above-mentioned existing recommendation models, and in terms of training and reasoning efficiency, the training and reasoning efficiency of the recommendation model using any of the above embodiments of the present application is close to that of the existing recommendation models, and compared with the pre-trained language model, the reasoning delay is significantly reduced.

[0173] That is to say, the trained recommendation model in the embodiment of the present application can jointly model collaborative information and semantic information, which not only realizes fine-grained feature-level information fusion, but also considers sample-level knowledge fusion, so that the recommendation model can make full use of the semantic knowledge of the pre-trained language model, thereby improving the prediction effect; and, integrating the knowledge of the language model into the recommendation model, while improving the effect of the recommendation model, ensures the low latency characteristics of the model, is more in line with the deployment requirements in actual application scenarios, and achieves better prediction effects.

[0174] The data processing method provided in the embodiments of the present application is described above from multiple aspects. The data processing device provided in the embodiments of the present application is described below in conjunction with the accompanying drawings.

[0175] like Figure 5 As shown, an embodiment of the present application provides a data processing device 50, and the data processing device 50 includes:

[0176] A training module 501 is used to train a recommendation model according to multiple sets of first training data and pre-trained language models to obtain a trained recommendation model, wherein the training process includes multiple iterations, and any first training data includes attribute information of a user and attribute information of an object related to the user;

[0177] In the nth iteration of the multiple iterations, the training module 501 includes an acquisition module 502 and a processing module 503:

[0178] The acquisition module 502 is used to acquire the first training data of the nth iteration process, where n is a positive integer;

[0179] The processing module 503 is used for:

[0180] Obtaining semantic features of first training data of the nth iteration process through the pre-trained language model of the nth iteration process;

[0181] Based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0182] Optionally, the processing module 503 is used to:

[0183] Performing mask processing on the first training data of the n-th iteration process to obtain the masked first training data of the n-th iteration process;

[0184] Inputting the masked first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a first feature corresponding to the masked first training data of the nth iteration process;

[0185] According to the first feature and the semantic feature of the first training data of the nth iteration process, a prediction result of the mask in the masked first training data of the nth iteration process is obtained through a mask prediction network corresponding to the recommendation model of the nth iteration process;

[0186] According to the prediction result corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0187] Optionally, the processing module 503 is used to:

[0188] Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process;

[0189] According to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0190] Optionally, the processing module 503 is used to:

[0191] A loss value is calculated according to the second feature and the semantic feature of the first training data of the n-th iteration process, and according to the prediction result of the mask corresponding to the n-th iteration process, through a loss function, wherein the loss function includes a first loss term and a second loss term, the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the n-th iteration process are aligned, and the second loss term is used to evaluate whether the prediction result of the mask corresponding to the n-th iteration process is accurate;

[0192] According to the loss value, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

[0193] Optionally, the first training data of the nth iteration process is data of a first modality, and the first modality is different from the text modality;

[0194] The processing module 503 is used for:

[0195] Performing modal conversion on the first training data of the nth iteration process to obtain text data corresponding to the first training data of the nth iteration process;

[0196] The text data of the nth iteration process is input into the pre-trained language model of the nth iteration process to obtain the semantic features of the first training data of the nth iteration process.

[0197] Optionally, the processing module 503 is used to:

[0198] Training the pre-trained language model and the recommendation model according to the multiple sets of first training data to obtain a trained recommendation model and a trained pre-trained language model;

[0199] In the nth iteration process of the multiple iteration processes, the processing module 503 is further used to:

[0200] Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain the second feature corresponding to the first training data of the nth iteration process;

[0201] Based on the second feature and the first training data of the nth iteration process, the pre-trained language model of the nth iteration process is trained to obtain the pre-trained language model after the nth iteration process.

[0202] Optionally, the acquisition module 502 is further used to: acquire second training data corresponding to the reasoning task;

[0203] The processing module 503 is also used to: fine-tune the target model according to the second training data to obtain a fine-tuned target model, where the target model includes a trained recommendation model and / or a trained pre-trained language model, and the fine-tuned target model is used to perform reasoning tasks.

[0204] Figure 6 , which is a possible logical structure diagram of an electronic device 60 provided in an embodiment of the present application. The electronic device 60 is used to implement the functions of the electronic device involved in any of the above embodiments. The electronic device 60 includes: a memory 601, a processor 602, a communication interface 603 and a bus 604. Among them, the memory 601, the processor 602, and the communication interface 603 are connected to each other through the bus 604.

[0205] The memory 601 may be a read only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 601 may store a program. When the program stored in the memory 601 is executed by the processor 602, the processor 602 and the communication interface 603 are used to execute one or more steps in the above data processing method embodiment.

[0206] The processor 602 can be a central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components or any combination thereof, for executing relevant programs to implement the functions required to be executed by the training module in the data processing device in the above embodiment, or to execute one or more steps in the method embodiment of the present application. The steps of the method disclosed in the embodiment of the present application can be executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 601, and the processor 602 reads the information in the memory 601, and executes one or more steps in the above data processing method embodiment in combination with its hardware.

[0207] The communication interface 603 uses a transceiver device such as but not limited to a transceiver to implement communication between the electronic device 60 and other devices or a communication network.

[0208] The bus 604 can realize a path for transmitting information between various components of the electronic device 60 (for example, the memory 601, the processor 602, and the communication interface 603). The bus 604 can be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0209] In another embodiment of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores computer-executable instructions. When the processor of the device executes the computer-executable instructions, the device executes the above Figure 6 The steps performed by the processor in .

[0210] In another embodiment of the present application, a computer program product is further provided, the computer program product comprising computer execution instructions, the computer execution instructions being stored in a computer readable storage medium; when a processor of a device executes the computer execution instructions, the device executes the above Figure 6 The steps performed by the processor in .

[0211] In another embodiment of the present application, a chip system is further provided, the chip system comprising a processor, the processor being used to implement the above Figure 6 In one possible design, the chip system may also include a memory, which is used to store the necessary program instructions and data for the device to write data. The chip system may be composed of a chip or may include a chip and other discrete devices.

[0212] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

[0214] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0215] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0216] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc. Various media that can store program codes.

Claims

1. A data processing method, characterized in that: The method comprises: Training the recommendation model according to the multiple sets of first training data and the pre-trained language model to obtain a trained recommendation model, wherein the training process includes multiple iterations, and any of the first training data includes attribute information of the user and attribute information of objects related to the user; In an nth iteration of the multiple iterations, the method comprises: Obtaining the first training data of the nth iteration process, where n is a positive integer; Obtaining semantic features of first training data of the nth iteration process through the pre-trained language model of the nth iteration process; Based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

2. The method according to claim 1, characterized in that The updating of the recommendation model of the nth iteration process based on the semantic features of the nth iteration process and the first training data of the nth iteration process to obtain the recommendation model after the nth iteration process includes: Performing mask processing on the first training data of the nth iteration process to obtain the masked first training data of the nth iteration process; Inputting the masked first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a first feature corresponding to the masked first training data of the nth iteration process; Obtaining a prediction result of a mask in the masked first training data of the nth iteration process through a mask prediction network corresponding to the recommendation model of the nth iteration process according to the first feature and the semantic feature of the first training data of the nth iteration process; According to the prediction result corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

3. The method according to claim 2, characterized in that In an nth iteration of the multiple iterations, the method further comprises: Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a second feature corresponding to the first training data of the nth iteration process; The updating of the recommendation model of the nth iteration process according to the prediction result of the mask corresponding to the nth iteration process to obtain the recommendation model after the nth iteration process includes: According to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

4. The method according to claim 3, characterized in that The updating of the recommendation model of the nth iteration process according to the alignment result of the second feature and the semantic feature of the first training data of the nth iteration process and the prediction result of the mask corresponding to the nth iteration process to obtain the recommendation model after the nth iteration process includes: Calculating a loss value according to the second feature and the semantic feature of the first training data of the n-th iteration process, and according to the prediction result of the mask corresponding to the n-th iteration process, through a loss function, wherein the loss function includes a first loss term and a second loss term, the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the n-th iteration process are aligned, and the second loss term is used to evaluate whether the prediction result of the mask corresponding to the n-th iteration process is accurate; The recommendation model of the nth iteration process is updated according to the loss value to obtain a recommendation model after the nth iteration process.

5. The method according to any one of claims 1 to 4, characterized in that: The first training data of the nth iteration process is data of a first modality, and the first modality is different from a text modality; The obtaining of the semantic features of the first training data of the nth iteration process by the pre-trained language model includes: Performing modal conversion on the first training data of the nth iteration process to obtain text data corresponding to the first training data of the nth iteration process; The text data of the nth iteration process is input into the pre-trained language model of the nth iteration process to obtain the semantic features of the first training data of the nth iteration process.

6. The method according to any one of claims 1 to 5, characterized in that: The step of training the recommendation model according to the plurality of sets of first training data and the pre-trained language model to obtain the trained recommendation model includes: According to the plurality of groups of first training data, the pre-trained language model and the recommendation model are trained to obtain a trained recommendation model and a trained pre-trained language model; In an nth iteration of the multiple iterations, the method further comprises: Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a second feature corresponding to the first training data of the nth iteration process; Based on the second feature and the first training data of the nth iteration process, the pre-trained language model of the nth iteration process is trained to obtain the pre-trained language model after the nth iteration process.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtaining second training data corresponding to the reasoning task; According to the second training data, the target model is fine-tuned to obtain a fine-tuned target model, wherein the target model includes a trained recommendation model and / or a trained pre-trained language model, and the fine-tuned target model is used to perform the reasoning task.

8. A data processing device, characterized in that: include: A training module, used for training the recommendation model according to multiple sets of first training data and pre-trained language models to obtain a trained recommendation model, wherein the training process includes multiple iterations, and any of the first training data includes attribute information of the user and attribute information of objects related to the user; In the nth iteration process of the multiple iteration processes, the training module includes an acquisition module and a processing module: The acquisition module is used to acquire the first training data of the nth iteration process, where n is a positive integer; The processing module is used for: Obtaining semantic features of first training data of the nth iteration process through the pre-trained language model of the nth iteration process; Based on the semantic features of the nth iteration process and the first training data of the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

9. The device according to claim 8, characterized in that The processing module is used for: Performing mask processing on the first training data of the nth iteration process to obtain the masked first training data of the nth iteration process; Inputting the masked first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a first feature corresponding to the masked first training data of the nth iteration process; Obtaining a prediction result of a mask in the masked first training data of the nth iteration process through a mask prediction network corresponding to the recommendation model of the nth iteration process according to the first feature and the semantic feature of the first training data of the nth iteration process; According to the prediction result corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

10. The device according to claim 9, characterized in that The processing module is used for: Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a second feature corresponding to the first training data of the nth iteration process; According to the second feature and the semantic feature of the first training data of the nth iteration process, and according to the prediction result of the mask corresponding to the nth iteration process, the recommendation model of the nth iteration process is updated to obtain the recommendation model after the nth iteration process.

11. The device according to claim 10, characterized in that The processing module is used for: Calculating a loss value according to the second feature and the semantic feature of the first training data of the n-th iteration process, and according to the prediction result of the mask corresponding to the n-th iteration process, through a loss function, wherein the loss function includes a first loss term and a second loss term, the first loss term is used to evaluate whether the second feature and the semantic feature of the first training data of the n-th iteration process are aligned, and the second loss term is used to evaluate whether the prediction result of the mask corresponding to the n-th iteration process is accurate; The recommendation model of the nth iteration process is updated according to the loss value to obtain a recommendation model after the nth iteration process.

12. The device according to any one of claims 8 to 11, characterized in that: The first training data of the nth iteration process is data of a first modality, and the first modality is different from a text modality; The processing module is used for: Performing modal conversion on the first training data of the nth iteration process to obtain text data corresponding to the first training data of the nth iteration process; The text data of the nth iteration process is input into the pre-trained language model of the nth iteration process to obtain the semantic features of the first training data of the nth iteration process.

13. The device according to any one of claims 8 to 12, characterized in that: The processing module is used for: According to the plurality of groups of first training data, the pre-trained language model and the recommendation model are trained to obtain a trained recommendation model and a trained pre-trained language model; In an nth iteration of the multiple iterations, the processing module is further configured to: Inputting the first training data of the nth iteration process into the recommendation model of the nth iteration process to obtain a second feature corresponding to the first training data of the nth iteration process; Based on the second feature and the first training data of the nth iteration process, the pre-trained language model of the nth iteration process is trained to obtain the pre-trained language model after the nth iteration process.

14. The device according to any one of claims 8 to 13, characterized in that: The acquisition module is also used to acquire second training data corresponding to the reasoning task; The processing module is also used to fine-tune the target model according to the second training data to obtain a fine-tuned target model, wherein the target model includes a trained recommendation model and / or a trained pre-trained language model, and the fine-tuned target model is used to perform the reasoning task.

15. An electronic device, characterized in that: The electronic device includes at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor, and the at least one processor executes the instructions to implement the steps of the method described in any one of claims 1-7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.