A training method of a prediction model, a data processing method, and related devices

By combining fixed networks, perceptual networks, and shared networks for training, data features are extracted and parameter-tuned, solving the problem of low prediction model accuracy caused by mixed training of data from different domains, and achieving more efficient feature extraction and prediction accuracy.

CN123158489APending Publication Date: 2026-11-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510668767.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In existing technologies, directly mixing sample data from different fields to train prediction models results in the inability to accurately learn the specific features of each field and the general features of multiple fields, leading to low prediction accuracy of the prediction models.

Method used

A fixed network is used to extract basic data features, a perceptual network is used to extract differential data features from data sources, and a shared network is used to extract common and general data features from multiple data sources. Through multiple rounds of iterative training and parameter tuning, prediction results for data processing tasks are generated.

Benefits of technology

It improves the prediction model's ability to extract specific and general features from different data sources, enhances prediction accuracy, reduces the number of training parameters, and improves training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158489A_ABST
    Figure CN123158489A_ABST
Patent Text Reader

Abstract

The application provides a training method of a prediction model, a data processing method and related equipment, and is used for solving the problem of low prediction accuracy of the trained prediction model. The method comprises the following steps: extracting fusion data features from selected sample data; wherein the fusion data features fuse basic data features extracted by a fixed network, difference data features representing data source characteristics extracted by a perception network associated with a data source of the sample data, and common data features representing commonality of multiple data sources extracted by a shared network; generating a prediction result of a data processing task related to the data source based on the fusion data features; and adjusting the shared network and the perception network based on the result difference between the prediction result and a sample result associated with the sample data. Different features are extracted by different networks, the feature extraction capability of the prediction model is trained from multiple aspects, and the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for training a prediction model, a data processing method, and related equipment. Background Technology

[0002] With the continuous development of technology, more and more server-side devices can process data based on predictive models. Therefore, different data processing tasks can be accomplished by processing data from different fields in different ways.

[0003] For example, predictive models can be used to predict sentiment for product reviews from shopping apps, adding smiley faces to positive product reviews and sad faces to negative product reviews.

[0004] For example, for self-media copywriting from self-media software, a predictive model can be used to predict the content category of the copywriting, and then push self-media copywriting with matching content categories to accounts associated with different category tags.

[0005] In related technologies, in order to enable the trained target prediction model to perform a variety of data processing tasks, the prediction model is trained by directly acquiring sample data from multiple fields and performing multiple rounds of iterative training.

[0006] However, there may be significant differences or similarities between sample data from different fields. Therefore, directly mixing sample data from multiple fields will not only prevent the prediction model from accurately learning the ability to extract features specific to each field, but also prevent the prediction model from accurately learning the ability to extract features common to multiple fields. This results in low prediction accuracy of the trained target prediction model and poor data processing capabilities based on the target prediction model. Summary of the Invention

[0007] This application provides a method for training a prediction model, a data processing method, and related equipment to address the problem of low prediction accuracy in the trained prediction model.

[0008] Firstly, a method for training a prediction model is provided, including:

[0009] Obtain multiple sample datasets; where different sample datasets come from different data sources; each sample dataset is associated with the sample results of the data processing task involved in the corresponding data source;

[0010] Based on the multiple sample datasets, the pre-trained prediction model is trained iteratively in multiple rounds; the prediction model includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources; wherein, in each round of training, the following operations are performed:

[0011] Extract fused data features from the selected sample data; wherein the fused data features are fused with: basic data features extracted using the fixed network, differential data features representing the characteristics of the data source extracted using the perceptual network associated with the data source of the sample data, and general data features representing the commonalities of the multiple data sources extracted using the shared network.

[0012] Based on the features of the fused data, prediction results for the data processing tasks related to the data source are generated;

[0013] Based on the difference between the prediction results and the sample results associated with the sample data, the parameters of the shared network and the perception network are adjusted.

[0014] Secondly, a data processing method is provided, including:

[0015] Obtain the text to be processed; wherein the text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks;

[0016] Using a trained target prediction model, the fused text features of the text to be processed are extracted according to the data processing task associated with the data source where the text to be processed is located, and a text processing result is generated based on the fused text features; wherein, the target prediction model is trained according to the method described in the first aspect.

[0017] Thirdly, a training device for a prediction model is provided, comprising:

[0018] Acquisition module: used to acquire multiple sample datasets; where different sample datasets come from different data sources; each sample dataset is associated with the sample results of the data processing task involved in the corresponding data source;

[0019] Processing module: used to perform multiple rounds of iterative training on the pre-trained prediction model based on the multiple sample datasets; the prediction model includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources; wherein, in each round of training, the following operations are performed:

[0020] The processing module is specifically used to: extract fused data features from the selected sample data; wherein the fused data features are fused with: basic data features extracted using the fixed network, differential data features representing the characteristics of the data source extracted using the perceptual network associated with the data source where the sample data is located, and general data features representing the commonalities of the multiple data sources extracted using the shared network.

[0021] The processing module is specifically used to: generate prediction results for the data processing tasks involved in the data source based on the fused data features;

[0022] The processing module is specifically used to: adjust the parameters of the shared network and the perception network based on the result difference between the prediction result and the sample result associated with the sample data.

[0023] Optionally, the processing module is specifically used for:

[0024] The fixed extraction subnetwork in the fixed network is used to perform initial feature extraction on the sample data to obtain initial data features;

[0025] The initial data features are subjected to multiple rounds of iterative feature transformation to obtain fused data features; wherein, the intermediate fused features output in each round of feature transformation are used as input for the next round of feature transformation, until the final round of feature transformation, at which point the output intermediate fused features are used as the fused data features; the intermediate fused features are fused with: intermediate basic features extracted by the fixed transformation sub-network in the fixed network during one round of feature transformation, intermediate difference features extracted by the perceptual network, and intermediate general features extracted by the shared network.

[0026] Optionally, the processing module is specifically used to perform feature transformation in each round, including:

[0027] Obtain the intermediate fusion features from the previous feature extraction output and use them as the previous fusion features;

[0028] The fixed transformation sub-network, the shared network, and the perceptual network associated with the data source of the sample data are used respectively to perform feature transformation on the previous fused feature to obtain the intermediate basic features output by the fixed transformation sub-network, the intermediate difference features output by the perceptual network, and the intermediate general features output by the shared network.

[0029] Based on the correlation between each feature element in the previous fusion feature and the sample result, the weights corresponding to the intermediate basic feature, the intermediate difference feature, and the intermediate general feature are predicted; wherein, the weights are used to describe the degree of contribution of the corresponding feature to the prediction of the sample result;

[0030] Based on the obtained weights, the intermediate basic features, intermediate difference features, and intermediate general features are fused to obtain the intermediate fused features output in this round of feature extraction.

[0031] Optionally, the prediction model further includes a gating network to be trained, and the processing module is specifically used for:

[0032] Using the gated network, the previous fusion feature is dimensionality reduced based on the correlation between each feature element in the previous fusion feature and the sample result to obtain a weight vector; wherein, each vector element in the weight vector represents the weight of the intermediate basic feature, the intermediate difference feature and the intermediate general feature respectively.

[0033] The parameter tuning of the shared network and the sensing network includes:

[0034] The parameters of the gating network, the sharing network, and the sensing network are adjusted.

[0035] Optionally, the processing module is specifically used for:

[0036] The training loss is determined based on the difference between the predicted result and the sample result associated with the sample data.

[0037] When the training loss is determined based on the results and the training objective has not been achieved, the parameters of the shared network and the perception network are tuned in the direction of reducing the difference in the results.

[0038] Optionally, the processing module is specifically used for:

[0039] Based on the general data characteristics, the data source of the sample data is predicted among the multiple data sources to obtain the predicted data source;

[0040] Based on the differences between the predicted data source and the data source where the sample data is located, and the differences between the predicted result and the sample result associated with the sample data, the parameters of the shared network and the perception network are tuned.

[0041] Optionally, the fused data features are obtained through multiple rounds of iterative feature transformation, and during each round of feature transformation, when the shared network extracts intermediate general features, the processing module is specifically used for:

[0042] Obtain the intermediate general features extracted during each round of feature transformation;

[0043] For each intermediate general feature, perform the following: Based on the intermediate general feature, predict the predicted data source to which the sample data belongs among the multiple data sources;

[0044] Based on the differences between each predicted data source and the data source containing the sample data, as well as the differences between the predicted results and the sample results associated with the sample data, the parameters of the shared network and the perception network are tuned.

[0045] Optionally, the processing module is specifically used for:

[0046] The training loss is determined based on the difference between the predicted result and the sample result associated with the sample data.

[0047] Based on the differences between each predicted data source and the data source containing the sample data, the data source training loss is determined.

[0048] Based on the difference between the training loss of the results and the training loss of the data source, when it is determined that the training objective has not been achieved, the parameters of the shared network and the perception network are tuned.

[0049] Optionally, the adjustment direction when tuning the parameters of the shared network and the sensing network includes at least one of the following:

[0050] Expand the adjustment direction of at least one of the data source differences;

[0051] Adjustments to reduce the discrepancies in the results.

[0052] Fourthly, a data processing method is provided, including:

[0053] Acquisition module: used to acquire the text to be processed; wherein the text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks;

[0054] Processing module: used to use a trained target prediction model to extract the fused text features of the text to be processed according to the data processing task associated with the data source where the text to be processed is located, and generate a text processing result based on the fused text features; wherein, the target prediction model is trained according to the method described in the first aspect.

[0055] Fifthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method as described in the first or second aspect.

[0056] Sixthly, a computer device is provided, comprising:

[0057] Memory, used to store computer programs;

[0058] A processor is configured to invoke a computer program stored in the memory and execute the method described in the first or second aspect according to the obtained computer program.

[0059] A seventh aspect provides a computer-readable storage medium storing a computer program for causing a computer to perform the method as described in the first or second aspect.

[0060] In this embodiment of the application, the prediction network is configured with a fixed network, a shared network, and a perception network associated with multiple data sources. In addition to using the fixed network to extract the basic data features of the sample data, it also extracts the difference data features representing the characteristics of the data sources of different sample data through different perception networks, and extracts the common data features representing the commonalities of multiple data sources through the shared network.

[0061] By using differential data features to reflect the data source-specific characteristics of the sample data, the model avoids weakening the content of these specific features in the basic data features, thus improving the feature extraction capability of the prediction model to extract the specific features of each data source. Conversely, by using general data features to reflect the common characteristics across multiple data sources, the model avoids overemphasizing these common features in the basic data features. This also enables knowledge transfer and sharing between different data sources, improving the prediction model's ability to extract the specific features of each data source while ensuring its ability to extract the common features of multiple data sources.

[0062] Furthermore, the model parameters involved in the fixed network are not involved in the parameter tuning during the training process, so that the training process will not affect the basic feature extraction capability of the prediction model. This avoids the situation where the learned knowledge is forgotten during training, and on the basis of the basic feature extraction capability, it can further learn other special feature extraction capabilities, which helps to improve the prediction accuracy of the trained prediction model.

[0063] Furthermore, by locking the basic feature extraction capability of the prediction model, most of the model parameters involved in the prediction model will not participate in the training process, which greatly reduces the number of model parameters that need to be trained in the prediction model and helps to improve the training efficiency of the prediction model. Attached Figure Description

[0064] Figure 1A A schematic diagram illustrating a training method for a prediction model provided in an embodiment of this application;

[0065] Figure 1B This is a schematic diagram illustrating the principle of a training method for a prediction model based on related technologies.

[0066] Figure 1C This is one application scenario of the training method for the prediction model provided in the embodiments of this application;

[0067] Figure 2 A flowchart illustrating a training method for a prediction model provided in an embodiment of this application;

[0068] Figure 3A A schematic diagram illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0069] Figure 3B A schematic diagram of the principle of the training method for the prediction model provided in the embodiments of this application. Figure 2 ;

[0070] Figure 4A A schematic diagram three illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0071] Figure 4B A schematic diagram four illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0072] Figure 4C A schematic diagram five illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0073] Figure 5A A schematic diagram six illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0074] Figure 5B A schematic diagram seven illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0075] Figure 5C A schematic diagram eight illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0076] Figure 6A A schematic diagram of the principle of the training method for the prediction model provided in the embodiments of this application. Figure 9 ;

[0077] Figure 6B A schematic diagram ten illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0078] Figure 7A A schematic flowchart of a data processing method provided in an embodiment of this application;

[0079] Figure 7B 11. A schematic diagram illustrating the principle of a training method for a prediction model provided in an embodiment of this application;

[0080] Figure 8A A schematic diagram of a training device for a prediction model provided in an embodiment of this application;

[0081] Figure 8B A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;

[0082] Figure 9 A schematic diagram of the structure of a training device or data processing device for a prediction model provided in the embodiments of this application. Figure 2 . Detailed Implementation

[0083] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0084] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0085] (1) Mixture of Experts (MoE):

[0086] MoE is a machine learning network architecture that decomposes complex tasks into multiple specialized sub-models (called "experts") for processing, and then dynamically selects or combines the outputs of the experts through a gating mechanism, thereby improving the overall performance and efficiency of the model.

[0087] (2) Low-Rank Adaptation (LoRA):

[0088] LoRA is an efficient parameter optimization technique for fine-tuning large language models (LLMs). It aims to achieve performance close to full fine-tuning by minimizing the number of trainable parameters and computational cost. The core idea of ​​LoRA is to approximate the update of model weights through low-rank decomposition, thereby freezing most of the original parameters while training only a small number of newly added low-rank matrices to adapt to new tasks.

[0089] (3) Generative Adversarial Network (GAN):

[0090] GAN is an unsupervised generative model based on deep learning. Its core idea originates from two-player zero-sum games in game theory. By training two adversarial neural networks (generator and discriminator), it learns from noise distributions and generates realistic samples (such as images, text, and speech).

[0091] (4) Data source:

[0092] A data source is the original origin or carrier of collected, stored, and provided data. Different data sources can be classified according to different dimensions. For example, they can be classified according to the way the data is generated, such as meteorological data (temperature, humidity, wind speed, etc.) which can be generated by meteorological stations or satellite measurements, and biological data (gene sequences, ecological monitoring data, etc.) which can be generated by DNA sequencing or sensor networks. Another example is that they can be classified according to the type of business, such as shopping operation data (records of clicks, purchases, or browsing time) and social media operation records (records of posting, liking, or commenting on text, images, and videos). Yet another example is that they can be classified according to the type of machine that generates the data, such as data collected in real time by IoT devices, navigation trajectory data, and intermediate result data of artificial intelligence networks (such as features extracted by recommendation models).

[0093] It should be noted that, in the embodiments of this application, the operations involving obtaining sample datasets or text to be processed, when the above embodiments of this application are applied to specific products or technologies, require user permission or consent, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0094] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0095] The following is a brief introduction to the application areas of the training method and data processing method of the prediction model provided in the embodiments of this application.

[0096] With the continuous development of technology, more and more server-side devices can process data based on predictive models. Therefore, different data processing tasks can be accomplished by processing data from different fields in different ways.

[0097] Please refer to Figure 1A For example, for product reviews from shopping apps, a predictive model can be used to predict sentiment. A smiley face icon can be added to product reviews that express approval, and a sad face icon can be added to product reviews that express disapproval.

[0098] Please refer to Figure 1A For example, for self-media copywriting from self-media software, a predictive model can be used to predict the content category of the copywriting, and then push self-media copywriting with matching content categories to accounts associated with different category tags.

[0099] In related technologies, if a dedicated prediction model is trained for each domain, it not only requires a large amount of computing power to train the prediction model, but also requires the deployment of multiple trained target prediction models on the device to complete different data processing tasks.

[0100] Therefore, in order to train a target prediction model and enable the trained target prediction model to perform various data processing tasks, the prediction model is trained by directly acquiring sample data from multiple fields and performing multiple rounds of iterative training.

[0101] Please refer to Figure 1B A large amount of sample data was obtained from multiple software programs to establish a sample dataset. Using the sample dataset, the prediction model was trained in multiple rounds of iterations to obtain the trained target prediction model.

[0102] However, there may be significant differences or similarities between sample data from different fields. For example, both product reviews and social media copywriting may express emotional bias by introducing the advantages and disadvantages of items, but product reviews may be based on real shopping experiences, while social media copywriting may be based on advertising recommendations. As another example, both product reviews and event reviews may express emotional bias, but product reviews may be comments on the performance of the product itself, while event reviews may include comments on the analytical process of the event, such as logical reasoning.

[0103] Therefore, directly mixing sample data from multiple fields not only fails to enable the prediction model to accurately learn the ability to extract features specific to each field, but also fails to enable the prediction model to accurately learn the ability to extract features common to multiple fields. This results in low prediction accuracy of the trained target prediction model and poor data processing capabilities based on the target prediction model.

[0104] To address the issue of low prediction accuracy in trained prediction models, this application proposes a training method for prediction models. This method involves acquiring multiple sample datasets from different data sources. Each sample dataset is associated with the sample results of the data processing task related to its corresponding data source. Based on these multiple sample datasets, the pre-trained prediction model undergoes multiple rounds of iterative training. The prediction model comprises: a fixed network, a shared network, and perceptual networks associated with each of the multiple data sources.

[0105] Each round of training uses the prediction model to perform the following operations:

[0106] The selected sample data is used to extract fused data features. These fused features include: basic data features extracted using a fixed network; differential data features representing the characteristics of the data sources extracted using a perceptual network associated with the data sources; and general data features representing the commonalities of multiple data sources extracted using a shared network. Based on these fused data features, prediction results for the data processing tasks related to the data sources are generated. The shared network and the perceptual network are then tuned based on the differences between the prediction results and the results of the samples associated with the sample data.

[0107] In this embodiment of the application, the prediction network is configured with a fixed network, a shared network, and a perception network associated with multiple data sources. In addition to using the fixed network to extract the basic data features of the sample data, it also extracts the difference data features representing the characteristics of the data sources of different sample data through different perception networks, and extracts the common data features representing the commonalities of multiple data sources through the shared network.

[0108] By using differential data features to reflect the data source-specific characteristics of the sample data, the model avoids weakening the content of these specific features in the basic data features, thereby improving the feature extraction capability of the prediction model to extract the specific features of each data source. By using general data features to reflect the common features across multiple data sources, the model avoids overemphasizing the content of these common features in the basic data features, thereby improving the feature extraction capability of the prediction model to extract the specific features of each data source while ensuring the feature extraction capability of the prediction model to extract the common features of multiple data sources.

[0109] Furthermore, by fixing the model parameters involved in the network and not participating in the parameter tuning during the training process, the training process will not affect the basic feature extraction capability of the prediction model. Based on this basic feature extraction capability, it can further learn other special feature extraction capabilities, which helps to improve the prediction accuracy of the trained prediction model.

[0110] Furthermore, by locking the basic feature extraction capability of the prediction model, most of the model parameters involved in the prediction model will not participate in the training process, which greatly reduces the number of model parameters that need to be trained in the prediction model and helps to improve the training efficiency of the prediction model.

[0111] Based on this, this application proposes a data processing method. In this method, upon obtaining the text to be processed, a trained target prediction model is used to extract fused text features of the text according to the data processing task associated with the data source where the text is located. Based on these fused text features, a text processing result is generated. The text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks. The target prediction model is trained according to the training method of the prediction model provided in the embodiments of this application.

[0112] In this embodiment, the trained target prediction model has the ability to extract basic data features of the text to be processed, the ability to extract differential data features corresponding to the characteristics of multiple data sources, and the ability to extract common data features of multiple data sources. Thus, it can identify the data source to which the text to be processed belongs and the data processing task involved in the data source. It can then extract the fused text features of the text to be processed according to the data processing task associated with the data source to which the text to be processed belongs. Based on the fused text features, it can generate accurate text processing results. In multi-domain scenarios, it can effectively improve the accuracy of data processing based on the target prediction model.

[0113] When inputting text to be processed into the target prediction model, it is not necessary to first determine the data source to which the text belongs. The data processing tasks associated with the data source can be automatically performed on the text, reducing data processing complexity and improving data processing efficiency.

[0114] The following describes the application scenarios of the training method and data processing method of the prediction model provided in this application.

[0115] Please refer to Figure 1C This is a schematic diagram illustrating an application scenario of the training method and data processing method for the prediction model provided in this application. The application scenario includes a server 101 and a client 102, which can communicate with each other. The communication method can be wired, such as through a network cable or serial cable; or wireless, such as through Bluetooth or Wi-Fi. No specific limitation is imposed.

[0116] Client 102 generally refers to devices that can perform downstream tasks based on prediction models, such as terminal devices, third-party applications accessible by terminal devices, or web pages accessible by terminal devices. Server 101 generally refers to devices that can use or train prediction models, such as terminal devices or servers.

[0117] Terminal devices include, but are not limited to, mobile phones, computers, smart medical devices, smart home appliances, vehicle terminals, or aircraft. Servers include, but are not limited to, cloud servers, local servers, or associated third-party servers. Both client 101 and server 102 can use cloud computing to reduce the use of local computing resources; similarly, they can also use cloud storage to reduce the use of local storage resources.

[0118] As one embodiment, the server 101 and the client 102 can be the same device, or they can be different devices, or they can be different devices with some modules shared, etc., and there are no specific restrictions.

[0119] Client 102 responds to a data processing operation triggered by a data source, retrieving multiple texts to be processed from the data source. Client 102 generates a data processing request carrying these multiple texts. Client 102 sends the data processing request to server 101. Server 101 receives the request and uses a trained prediction model to predict the text processing results for each of the multiple texts. Based on the individual text processing results, server 101 generates a data processing result. Server 101 returns the data processing result to client 102, which receives and presents the result to complete the data processing task associated with the data source.

[0120] The following is based on Figure 1C The training method for the prediction model provided in the embodiments of this application will be described in detail below. Please refer to... Figure 2 This is a flowchart illustrating a training method for a prediction model provided in an embodiment of this application.

[0121] S201, Obtain multiple sample datasets.

[0122] Different sample datasets come from different data sources, which can be referred to in the previous introduction and will not be repeated here. Each data source can be associated with a data processing task, and the associated data processing tasks for different data sources can be the same or different. For example, for a data source containing comment text, the associated data processing task could be to identify the sentiment tendency of the comment text, such as positive sentiment, negative sentiment, undetermined sentiment, or indeterminate sentiment. Another example is a data source containing social media copy, where the associated data processing task could be to identify the content category of the social media copy, such as humor, product recommendations, fashion, beauty, sports, or gaming. Yet another example is a data source containing social media copy, where the associated data processing task could be to identify whether the social media copy contains set semantics, such as semantics related to trending events or semantics that do not match the content of the publicly disclosed event.

[0123] Each data source can be associated with one data processing task or multiple data processing tasks, without any specific limitation. In this embodiment, we will take the example of each data source being associated with one data processing task for the introduction.

[0124] Because the sample data from different data sources differ, these data may present characteristics relevant to the data processing task in different ways. Therefore, even if the data processing tasks associated with different data sources share the same objective, the data processing tasks themselves will differ. For example, while both product reviews and social media copywriting are content classification tasks, the classification objective for product reviews might be to identify which of the product's multiple features the review describes, while the classification objective for social media copywriting might be to identify the entire audience of the copy.

[0125] Each sample data in each sample dataset is associated with a sample result of the data processing task involved in the corresponding data source. For example, for a data source involved in a data processing task of identifying the sentiment of comment text, the sample result associated with the sample data could be a sentiment of positive or negative, etc.

[0126] Please refer to Figure 3A The server obtains sample dataset A from the medical field, which contains multiple gene sequences, each associated with a sample result indicating whether it is abnormal; sample dataset B from shopping software running in the computer field, which contains multiple product reviews, each associated with a sample result indicating a positive or negative bias; sample dataset C from self-media software running in the computer field, which contains multiple self-media articles, each associated with a sample result indicating the content category; and sample dataset D from the machine learning field, which contains multiple navigation trajectories, each associated with an indicator indicating whether the time error between the estimated travel time and the actual travel time is within the error range.

[0127] S202 involves iteratively training a pre-trained prediction model using multiple sample datasets.

[0128] Obtain a pre-trained prediction model, which includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources.

[0129] A pre-trained prediction model can be a prediction model that has been trained and tuned based on at least one training dataset, with at least fixed model parameters involved in the network. The pre-trained prediction model already possesses basic feature extraction and prediction capabilities through the fixed network. The pre-trained prediction model can be trained by other devices, trained by a server at historical times, or downloaded from network resources, etc., with no specific restrictions.

[0130] Training datasets can be, for example, publicly available datasets used for training models from online resources, or historical data whose generation time is more than a set time interval from the current time; there are no specific restrictions. Different training datasets can come from different data sources or from the same data source.

[0131] Please refer to Figure 3B The pre-trained prediction model can be obtained by adding a shared network to be trained and a perceptual network associated with multiple data sources to an already trained initial model. The already trained initial model contains a fixed network and can be trained based on at least one training dataset, etc., without any specific restrictions.

[0132] The initial or predictive model can be implemented based on model structures such as large language models or hybrid expert models, without any specific restrictions. The shared network and perceptual network can be implemented based on low-rank adaptive (LoRA) techniques to reduce the number of model parameters that need to be trained and adjusted, without any specific restrictions.

[0133] The following is a detailed description of one round of training, please refer to S2021 to S2023. Other rounds of training are similar and will not be repeated here. Each round of training can select one sample data from multiple data sources, multiple sample data from each data source, or at least one sample data from one data source, etc. There are no specific restrictions. In this embodiment, the processing of one sample data in each round of training is described as an example.

[0134] S2021, extract fused data features from the selected sample data.

[0135] A predictive model is used to extract fused data features from the selected sample data. The fused data features include: basic data features extracted using a fixed network, differential data features representing the characteristics of the data source extracted using a perceptual network associated with the data source of the sample data, and general data features representing the commonalities of multiple data sources extracted using a shared network.

[0136] Since the fixed network has already been trained, it possesses at least basic feature extraction capabilities, enabling it to extract features from the sample data that, to a certain extent, contribute to the prediction of the sample results—that is, basic data features. The fixed network does not participate in parameter tuning during the training process; therefore, the training process will not affect its basic feature extraction capabilities. This ensures that the learned knowledge is not forgotten, guaranteeing a minimum level of prediction accuracy for the model.

[0137] Since multiple data sources are each associated with a perceptual network, through multiple rounds of iterative training, each perceptual network focuses on the feature extraction process of the sample data of its associated data source. Thus, it has the ability to identify the data source characteristics of the corresponding data source. Therefore, it can extract features representing the data source characteristics of its data source from the sample data, i.e., differential data features.

[0138] Since shared networks do not distinguish between data sources, through multiple rounds of iterative training, they can apply knowledge learned from one data source to the feature extraction process for another data source, achieving knowledge transfer and sharing. This eliminates the need for repeated learning of the same knowledge and improves the training efficiency of the prediction model.

[0139] Please refer to Figure 4A This is a schematic diagram illustrating the principle of extracting fused data features from sample data. Multiple data sources include data source 1, data source 2, ..., and data source N. The perceptual networks associated with each of the multiple data sources are perceptual network 1, perceptual network 2, ..., and perceptual network N, respectively.

[0140] The sample data is input into the prediction model and routed to the perception network 2 associated with the data source. Features are extracted from the sample data simultaneously using a fixed network, perception network 2, and a shared network to obtain basic data features, differential data features, and general data features. These features are then fused to obtain the fused data features.

[0141] As one embodiment, the fixed network may include a fixed extraction subnetwork and a fixed transformation subnetwork. The fixed extraction subnetwork is used to represent the sample data in the form of features, such as one-hot encoding, embedding extraction, etc., and there is no specific limitation. The fixed transformation subnetwork is used to perform feature transformation to obtain features that help predict the sample results, such as feedforward networks, attention mechanisms, etc., and there is no specific limitation.

[0142] Therefore, when extracting basic, differential, and general data features from sample data using a fixed network, a data source-associated perceptual network, and a shared network, the initial feature extraction sub-network within the fixed network can be used to extract initial features from the sample data. These initial features are then used to transform the sample data into a feature form for subsequent processing. Thus, based on the fixed transformation sub-network, the data source-associated perceptual network, and the shared network, at least one round of feature transformation can be performed on the initial data features to obtain fused data features. In this embodiment, multi-round iterative feature transformation is used as an example. Through multiple rounds of feature transformation, the abstraction level of the intermediate fused features output by each round of feature transformation can be gradually increased, thereby obtaining more accurate semantic information and helping to improve the prediction accuracy of the prediction model.

[0143] The intermediate fused features output from each round of feature transformation serve as the input for the next round of feature transformation, until the final round of feature transformation, at which point the output intermediate fused features are used as the fused data features. Therefore, the intermediate fused features are: intermediate basic features extracted using the fixed transformation sub-network in a fixed network during a round of feature transformation; intermediate difference features extracted using the perceptual network; and intermediate general features extracted using the shared network.

[0144] The intermediate fused features output in each round of feature transformation are re-split into three features in the next round of feature transformation by the fixed transformation sub-network, the perceptual network associated with the data source, and the shared network: intermediate basic features, intermediate differential features, and intermediate general features. This ensures that the knowledge already learned by the prediction model is not forgotten during each round of feature transformation, and that the model learns the characteristics and commonalities of data sources at different semantic depths, effectively improving the predictive ability of the prediction model. Simultaneously, each round of feature transformation fuses these three features, maintaining consistency with the form of the fused data features used to predict sample results. This allows for consideration of the feature loss caused by fusion during feature transformation, effectively improving the training efficiency and predictive ability of the prediction model.

[0145] Please refer to Figure 4B This is a schematic diagram illustrating the principle of extracting fused data features from sample data. For example, the fixed extraction sub-network contains multiple normalization layers, multiple attention layers, etc., and the fixed transformation sub-network contains L feedforward networks. The perceptual networks associated with the multiple data sources are respectively L perceptual network 1, L perceptual network 2, ... and L perceptual network N. The shared network contains L shared network layers.

[0146] The sample data is input into the prediction model. A fixed extraction sub-network extracts initial data features from the sample data. These initial features are then routed to L perceptual networks 2 associated with the data source. L rounds of iterative feature transformation are performed on the initial data features. In each round, one feedforward network extracts intermediate basic features, one perceptual network 2 extracts intermediate difference features, and one shared network layer extracts intermediate general features. The intermediate basic features, intermediate difference features, and intermediate general features are then fused to obtain the intermediate fused features. These intermediate fused features are used as input to the next round of feature transformation until the final round, at which point the fused data features are output.

[0147] The following description uses a single round of feature transformation as an example. Other rounds of feature transformation are similar and will not be repeated here.

[0148] The intermediate fusion features from the previous feature extraction are obtained as the previous fusion features. The previous fusion features are transformed using a fixed transformation sub-network, a shared network, and a perceptual network associated with the data source of the sample data, respectively. This yields the intermediate basic features output by the fixed transformation sub-network, the intermediate difference features output by the perceptual network, and the intermediate general features output by the shared network.

[0149] When the perception network and the sharing network are implemented using LoRA technology, please refer to formulas (1) and (2) to obtain the intermediate difference features z. t and intermediate general features z s One method.

[0150] z t =F LoRA (z i θ t (1)

[0151] z s =F LoRA (z i θ s (2)

[0152] Among them, F LoRA (·) indicates the data processing used by LoRA technology, θ t θ represents the model parameters involved in the perceptron network. s z represents the model parameters involved in the shared network. i This indicates the previous fusion feature.

[0153] After obtaining the intermediate basic features, intermediate difference features and intermediate general features, the intermediate basic features, intermediate difference features and intermediate general features can be fused to obtain the intermediate fused features output by this round of feature extraction. Please refer to formula (3) for a fusion method.

[0154] z i+1 =β s (z0+z s )+β t (z0+z t (3)

[0155] Where, β t Indicates the intermediate difference feature z t The weights, β s Representing the intermediate general feature z s The weights are denoted by z0, where z0 represents the intermediate basic feature.

[0156] Therefore, based on the obtained weights, intermediate basic features, intermediate difference features, and intermediate general features can be fused to obtain the intermediate fused features output in this round of feature extraction.

[0157] The weights of the intermediate difference features and intermediate general features can be preset or calculated based on the previous fused features; they can be fixed or change during the training process, with no specific restrictions.

[0158] The following section will introduce two methods for determining the weights of intermediate difference features and intermediate general features, and other methods will not be listed here.

[0159] Method 1:

[0160] Based on the correlation between each feature element in the previous fusion feature and the sample result, the weights of the intermediate basic feature, intermediate differential feature, and intermediate general feature are predicted. The weights are used to describe the degree of contribution of the corresponding feature to the predicted sample result.

[0161] Since the intermediate basic features, intermediate difference features, and intermediate general features are all extracted from the previous fusion feature, each feature element in the previous fusion feature has a correlation with the intermediate basic features, the intermediate difference features, and the intermediate general features. Therefore, by using the training loss, we can determine the correlation between each feature element in the previous fusion feature and the sample result, thereby evaluating the contribution of each feature element in the previous fusion feature to the predicted sample result. This allows us to obtain the contribution of each intermediate basic feature, intermediate difference feature, and intermediate general feature to the predicted sample result, i.e., predict the weights of each intermediate basic feature, intermediate difference feature, and intermediate general feature.

[0162] By assessing the contribution of intermediate basic features, intermediate differential features, and intermediate general features to the predicted sample results, the fusion ratios of these features can be adjusted during the fusion process. Features that contribute more to the predicted sample results have higher weights, while features that contribute less have lower weights. Thus, different data sources have different fusion weights, allowing the prediction process for different data sources to consider intermediate basic features, intermediate differential features, and intermediate general features to varying degrees. This enables differentiated knowledge learning while sharing knowledge, thereby improving the prediction accuracy of the prediction model.

[0163] As one embodiment, the prediction model also includes a gating network to be trained. Using the gating network, the previous fused features are dimensionality-reduced based on the correlation between each feature element and the sample results, resulting in a weight vector. Each element in the weight vector represents the weight of the intermediate basic feature, intermediate differential feature, and intermediate general feature. The model parameters of the gating network can be adjusted during training; the gating network is tuned simultaneously with the shared network and the perceptual network.

[0164] Please refer to formula (4) for a method to obtain the weight vector.

[0165] β t ,β s =G(z) i (4)

[0166] Where, β t ,β s Let G(·) represent the weight vector, and let z represent the mathematical operation used by the gating network. i This indicates the previous fusion feature.

[0167] Please refer to Figure 4C In one round of feature transformation, in addition to the input of the fixed transformation sub-network, the perceptual network 2 associated with the data source, and the shared network, the previous fused feature is also input to the gating network. In addition to obtaining the intermediate basic features, intermediate difference features, and intermediate general features, the weight vector output by the gating network is also obtained. Based on each vector element in the weight vector, the intermediate basic features, intermediate difference features, and intermediate general features are weighted and summed to obtain the intermediate fused features output by this round of feature transformation.

[0168] By using gating networks, the weights of each feature can be adjusted during training, thereby learning the contribution of each feature to the predicted sample results during training, improving the intelligence and accuracy of the prediction model.

[0169] Method 2:

[0170] Based on the feature similarity between intermediate differential features and intermediate general features, the weights of each feature are determined. The greater the feature similarity, the closer the weights of the intermediate differential features and intermediate general features are to being equal; conversely, the smaller the feature similarity, the greater the weight of the intermediate differential features compared to the weight of the intermediate general features. After obtaining the weights of the intermediate differential features and intermediate general features, a weighted sum is performed on them. The average of the weighted sum and the intermediate basic features is then used as the intermediate fusion feature.

[0171] This ensures that the proportion of intermediate basic features is 50%, and the higher the degree of personalization of the data source, the greater the proportion of intermediate differential features. The lower the degree of personalization of the data source, the more similar the intermediate differential features and intermediate general features tend to be.

[0172] S2022 generates prediction results for data processing tasks related to the data source based on the characteristics of the fused data.

[0173] After obtaining the features of the fused data, prediction results for the data processing tasks related to the data source can be generated based on these features. The prediction results can be generated based on the predictive capabilities of the prediction model. The model parameters related to the predictive capabilities can be pre-trained and not involved in the training process provided in this application embodiment; alternatively, they can participate in the training process provided in this application embodiment, without any specific limitations.

[0174] The prediction model can include a trained prediction network, which can be based on a multilayer perceptron or similar implementation; there are no specific restrictions. The fused data features are input into the prediction network to obtain the prediction results.

[0175] S2023, based on the difference between the predicted results and the sample results associated with the sample data, the parameters of the shared network and the perception network are adjusted.

[0176] After obtaining the prediction results, the parameters of the shared network and the perception network can be tuned based on the difference between the prediction results and the sample results associated with the sample data.

[0177] For example, if the target iteration number has not been reached, the adjustment direction and amount of the model parameters of the shared network and the perception network are determined based on the difference between the prediction result and the sample result associated with the sample data. The parameters of the shared network and the perception network are tuned until the target iteration number is reached, and the trained target prediction model is obtained.

[0178] For example, the training loss is determined based on the difference between the predicted result and the sample results associated with the sample data. When the training objective is not achieved based on the training loss, the parameters of the shared network and the perceptual network are tuned in the direction of reducing the difference in results until the training objective is determined based on the obtained training loss, thus obtaining the trained target prediction model.

[0179] By analyzing the differences between the predicted results and the sample results associated with the sample data, we can reflect various aspects of information, including the accuracy of extracting intermediate differential features, the accuracy of extracting intermediate general features, and the accuracy of weights. Therefore, the training loss determined based on these differences can, to some extent, reflect the training level of the prediction model and achieve efficient training. If the training objective is not achieved, it indicates that the prediction model is not yet stable and cannot obtain accurate prediction results; therefore, another round of training is needed. If the training objective is achieved, it indicates that the prediction model is stable, and thus the trained target prediction model can be obtained.

[0180] When tuning parameters, you can adjust them in the direction of reducing the difference in results, so that the prediction model can gradually stabilize and obtain the same or similar prediction results as the sample results, thus obtaining the trained target prediction model.

[0181] Please refer to Figure 5A The prediction model includes multiple fixed extraction sub-networks, each containing multiple normalization layers, attention layers, etc. It also includes multiple feature transformation networks, each containing a fixed transformation sub-network, receptive networks corresponding to multiple data sources, and a shared network. The prediction model further includes a prediction network.

[0182] After extracting fused data features from the sample data using a fixed extraction sub-network and a feature transformation network, a prediction network is used to generate prediction results based on these fused data features. Based on the differences between the prediction results and the sample results associated with the sample data, the parameters of the sharing network and the perception network are tuned in the direction of reducing these differences.

[0183] As one example, in addition to tuning the parameters of the shared network and the perception network based on the differences in results, the parameters of the shared network and the perception network can also be tuned together with the common data features extracted by the shared network, so as to ensure that the shared network has the feature extraction capability of extracting only the features that represent the common characteristics of multiple data sources.

[0184] Therefore, based on general data characteristics, the predicted data source can be obtained from multiple data sources by predicting the data source where the sample data is located. Based on the differences between the predicted data source and the data source where the sample data is located, as well as the differences between the predicted results and the sample results associated with the sample data, the parameters of the shared network and the perception network can be tuned.

[0185] Since general data features are common to multiple data sources, it is impossible to obtain accurate prediction data sources based on general data features. Therefore, the parameters of the shared network and the perception network can be tuned by combining the differences in data sources and the differences in results.

[0186] Please refer to Figure 5B The feature transformation network in the prediction model includes a fixed transformation sub-network, multiple perceptual networks corresponding to each data source, and a shared network; the prediction model also includes an outcome prediction network and a source prediction network.

[0187] After extracting fused data features from the sample data using a feature transformation network, a result prediction network is used to generate prediction results based on these fused data features. A source prediction network is then employed, using common data features extracted from the sample data by a shared network to predict the data source of the sample data, thus obtaining the predicted data source.

[0188] Based on the differences between the predicted results and the sample results associated with the sample data, as well as the differences between the predicted data source and the data source where the sample data is located, the parameters of the shared network and the perception network are tuned.

[0189] As one example, if the fused data features are obtained through multiple rounds of iterative feature transformation, and in each round of feature transformation, a shared network is used to extract intermediate general features (see the previous description for details), then the intermediate general features extracted in each round of feature transformation can be obtained, and the following can be performed for each intermediate general feature: based on the intermediate general features, predict the predicted data source to which the sample data belongs in multiple data sources.

[0190] When tuning the parameters of the shared network and the sensing network, the parameters can be tuned based on the differences between the data sources of each prediction data source and the data sources of the sample data, as well as the differences between the prediction results and the sample results associated with the sample data.

[0191] For example, the shared network and the perception network are tuned based on the weighted sum of the obtained prediction data sources, the differences between the data sources and the data sources where the sample data is located, and the differences between the prediction results and the sample results associated with the sample data.

[0192] For example, the shared network and the perception network can be tuned based on the weighted sum of the differences between each predicted data source and the data source where the sample data is located, or the largest or smallest data source difference, as well as the difference between the predicted results and the sample results associated with the sample data.

[0193] For example, based on the differences between each prediction data source and the data source where the sample data is located, the data source training loss is determined. Based on the weighted sum of the data source training losses corresponding to each prediction data source, and the difference between the prediction results and the sample results associated with the sample data, the parameters of the shared network and the perception network are tuned.

[0194] The intermediate general features obtained in each round are used for parameter tuning to ensure that the shared network only focuses on information common to multiple data sources at any stage, rather than information specific to a single data source, thereby improving the feature extraction accuracy of the shared network.

[0195] Please refer to Figure 5C After selecting sample data, the feature extraction networks of the prediction model for L iterations (only two feature extraction networks are shown in the figure, namely feature extraction network 2 and feature extraction network k; other feature extraction networks are not shown) are used to extract features from the sample data. Each feature extraction network contains a fixed network, a perceptual network 2 associated with the data source of the sample data, and a shared network. In each feature extraction network, the fixed network extracts intermediate basic features from the previous fused features, the perceptual network 2 extracts intermediate difference features from the previous fused features, and the shared network extracts intermediate general features from the previous fused features. The intermediate basic features, intermediate difference features, and intermediate general features are then fused to obtain intermediate fused features, which are used as the input to the previous fused features of the next feature extraction network.

[0196] A source prediction network is employed, generating a prediction data source based on intermediate common features extracted by shared networks in each feature extraction network. The data source difference between the prediction data source and the data source containing the sample data is determined using the cross-entropy loss function, thus obtaining the data source training loss.

[0197] A result prediction network is employed, which generates prediction results based on the fused data features output by the last feature extraction network. The loss function used by Generative Adversarial Networks (GANs) is employed to determine the difference between the predicted results and the results of the samples associated with the sample data, thus obtaining the result training loss.

[0198] The training losses from various data sources and the training losses from the results are merged to obtain the comprehensive training loss of the prediction model. If the comprehensive training loss does not meet the training objective, the next round of training begins until the comprehensive training loss meets the training objective. Based on the model parameters of each current perceptual network and the shared network, the trained target prediction model is obtained.

[0199] As one embodiment, the result training loss is determined based on the difference between the predicted result and the sample result associated with the sample data. For example, the cross-entropy loss function can be used to determine the result training loss. The data source training loss is determined based on the difference between each predicted data source and the data source containing the sample data. For example, the loss function used in generative adversarial networks can be used to determine the data source training loss. Therefore, based on the loss difference between the result training loss and the data source training loss, when the training objective is not achieved, the parameters of the shared network and the perceptual network are tuned until the obtained loss difference reaches the training objective, at which point the trained target prediction model is output.

[0200] Please refer to formulas (5) and (6) to determine the training loss L from the data source. GAN One method.

[0201]

[0202] Among them, F c (·) represents the loss function in generative adversarial networks. Indicates predicted data, l t This indicates the data source of the sample data.

[0203]

[0204] Where F(·) represents a multilayer perceptron using the normalized softmax function as the activation function, z s This represents an intermediate general feature. This represents the model parameters of the multilayer perceptron.

[0205] Please refer to formula (7) for one method of determining loss difference.

[0206] L = L SEF -α×L GAN (7)

[0207] Among them, L GAN L represents the training loss of the data source. SEF The result represents the training loss, and α represents the weight of the data source training loss.

[0208] By using negative losses (such as -α×L) GAN This allows the shared network to focus on learning the commonalities of multiple data sources during multi-round iterative training, without involving the characteristics of any particular data source. This effectively enables knowledge transfer between multiple data sources and improves training efficiency.

[0209] As one example, there are several ways to adjust the parameters of the shared network and the sensing network. Two of them will be introduced below as examples. Other adjustment directions will not be listed here.

[0210] Direction 1:

[0211] Expand the adjustment direction of at least one of the data source differences.

[0212] In order to ensure that the shared network extracts only common data features that represent the commonalities of multiple data sources, the common data features obtained when only one round of feature extraction is involved, or the intermediate common features obtained in each round of feature transformation when multiple rounds of feature transformation are involved, should not be able to accurately predict the data source of the sample data. Therefore, the model parameters of the shared network can be adjusted by expanding the adjustment direction of at least one data source difference among the differences obtained from each data source.

[0213] For example, when selecting differences from various data sources, sort them from largest to smallest and select at least one difference from the top of the list; or, when selecting differences from various data sources, sort them from smallest to largest and select at least one difference from the top of the list; or, when selecting differences from various data sources, sort them from largest to smallest and select at least one difference from the top of the list, as well as at least one difference from the bottom of the list; or, among the differences from various data sources, select at least one difference from the list that has a larger value difference than the differences from other data sources, etc., without any specific restrictions.

[0214] Direction two:

[0215] Adjustments to narrow the differences in results.

[0216] In order for the perceptual network to extract differential data features that characterize the data source, the fused data features that combine differential data features and general data features should be able to accurately predict the sample results. Therefore, the model parameters of the shared network and the perceptual network can be adjusted separately to reduce the difference in results.

[0217] When adjusting the model parameters of the shared network based on differences in data sources, one approach is to reduce the direction of adjustment for the differences in results and adjust only the model parameters of the perceptual network; another approach is to reduce the direction of adjustment for the differences in results and adjust the model parameters of both the shared network and the perceptual network simultaneously. This avoids the shared network extracting noisy features that are irrelevant to the prediction and improves the prediction accuracy of the trained prediction model.

[0218] Please refer to Figure 6AThis is a schematic diagram illustrating the principle of a prediction model. The prediction model contains at least L Transformer modules and a result prediction module. Each Transformer module contains multiple normalization layers, attention layers, and feature transformation layers. Each feature transformation layer contains a feedforward network (such as an LLM FFN), three receptive networks corresponding to the three data sources (denoted as LoRA1, LoRA2, and LoRA3), and a shared network (denoted as LoRA0). The feedforward networks constitute the fixed network, each LoRA1 constitutes the receptive network associated with data source 1, each LoRA2 constitutes the receptive network associated with data source 2, each LoRA3 constitutes the receptive network associated with data source 3, and each LoRA0 constitutes the shared network. Each feature transformation layer also contains a gating network and a data source discriminator.

[0219] Each training round can select one sample from each of the three data sources as a batch for training, or it can select at least one sample from one data source as a batch for training, etc. There are no specific restrictions.

[0220] Each training round targets a single sample dataset. Initial data features can be extracted using the normalization and attention layers from the first Transformer module. For example, in the first feature transformation round, a feedforward network, a receptive network associated with the data source (e.g., LoRA1), and a shared network LoRA0 are simultaneously used to transform the initial data features (denoted as z). i Perform feature transformation to obtain the intermediate basic features z0 output by the feedforward network and the intermediate difference features z0 output by the LoRA1 perceptual network. t And the intermediate general features z of the shared network LoRA0 output. s .

[0221] A data source discriminator is used, based on the intermediate general feature z. s Predict the data source of the sample data and obtain the predicted data source. Based on the differences between the predicted data source and the data source of the sample data, the training loss L of the data source is obtained. GAN .

[0222] Using a gated network to predict z based on initial data features t and z s The degree of contribution of each factor to the predicted sample results associated with the sample data is used to obtain z. t and z s The corresponding weights are denoted as β. t and β s .

[0223] Based on z t and z sThe corresponding weights are used to fuse the intermediate basic feature z0 and the intermediate difference feature z0 according to formula (3). t and intermediate general features z s Obtain intermediate fusion features z i+1 This information serves as the input for the next round of feature transformation, and is then used by the next Transformer module for the next round of feature transformation. This continues until the intermediate fused features output by the last Transformer module are obtained. These fused data features are then used as the fused data features, and the resulting prediction model generates prediction results based on these fused data features.

[0224] Please refer to Figure 6B For example, if a sample data is selected from the copywriting database associated with a self-media software, such as "I'm back from my trip in May XX, sharing some must-have practical items...", the data processing task associated with the self-media software is to determine the content category of the sample data, such as humor, science popularization, travel, daily life, etc.

[0225] Then, the sample data is input into the prediction model. The perceptual networks corresponding to the three data sources in the prediction model are: the perceptual network associated with shopping software (LoRA1), the perceptual network associated with social media software (LoRA2), and the perceptual network associated with instant messaging software (LoRA3).

[0226] Basic data features are extracted from sample data using a fixed network, such as features containing keywords describing "May XX travel" and "practical good stuff".

[0227] For example, the LoRA2 perceptual network for social media software association learns that social media copywriting in social media software typically places key information related to the content category in the first sentence or title. Therefore, the LoRA2 perceptual network for social media software association can primarily extract differential data features from the first sentence and title. Thus, the differential data features extracted from the sample data using the LoRA2 perceptual network for social media software association could include features describing the semantics of "May XX trip has ended."

[0228] For example, shared networks learn that the commonality among shopping apps, social media apps, and instant messaging apps is that each text represents a subjective opinion on a topic, object, or event. This is achieved by using common data features extracted from sample data by shared networks, such as features that express the topic, object, or event of the sample data.

[0229] The obtained basic data features, differential data features, and general data features are weighted and summed to obtain fused data features. Based on these fused data features, the result prediction module generates a prediction result indicating that the text content category of the sample data is tourism-related.

[0230] The result training loss is obtained based on the difference between the predicted result and the sample result associated with the sample data. The training loss of each data source and the result training loss are fused according to formula (7) to obtain the comprehensive training loss. The model parameters of each shared network LoRA0, each perception network LoRA1, each gating network and each data source discriminator are adjusted based on the comprehensive training loss, and the next round of training is entered until the training objective is achieved to obtain the trained target prediction model.

[0231] By training a dedicated LoRA expert network for each data source to preserve data source-specific knowledge, and introducing a shared LoRA expert network for knowledge transfer across data sources, data source discriminators in the generative adversarial network (GAN) can suppress task-irrelevant noise in the shared network, ensuring that only task-aligned knowledge is transferred between different data processing tasks. This effectively mitigates the catastrophic forgetting problem of learned knowledge and enables efficient knowledge sharing and transfer, improving the predictive model's adaptability to new data processing tasks. Furthermore, by reducing the number of model parameters requiring training and adjustment, computational resources and storage costs are significantly reduced, improving the training efficiency and scalability of the predictive model, making it more suitable for large-scale industrial deployments.

[0232] Based on the same inventive concept, after outputting the trained prediction model using the above training method, the prediction model can be used to perform data processing tasks. Please refer to [reference needed]. Figure 7A This is a flowchart illustrating a data processing method provided in an embodiment of this application.

[0233] S701, Obtain the text to be processed.

[0234] The text to be processed comes from one of multiple data sources. Different data sources are associated with different data processing tasks, as detailed in the previous section.

[0235] S702 uses a trained target prediction model to extract the fused text features of the text to be processed according to the data processing task associated with the data source of the text to be processed, and generates the text processing result based on the fused text features.

[0236] The target prediction model was trained using the prediction model training method described above.

[0237] Please refer to Figure 7B For example, the text to be processed obtained from a shopping app might be something like, "The brim of the sun hat is too soft; it's not suitable for wearing while cycling." The associated data processing task for the shopping app would be to determine whether the sentiment of the text to be processed is positive or negative.

[0238] The text to be processed is input into the target prediction model, which contains L Transformer modules and one result prediction module. Each Transformer module contains multiple normalization layers, attention layers, and feature transformation layers. Each feature transformation layer contains a feedforward network (such as LLM FFN), three corresponding receptive networks for the three data sources (denoted as LoRA1, LoRA2, and LoRA3), and a shared network (denoted as LoRA0). The feedforward networks constitute the fixed network, each LoRA1 constitutes the receptive network associated with data source 1 (i.e., shopping software), each LoRA2 constitutes the receptive network associated with data source 2 (social media software), each LoRA3 constitutes the receptive network associated with data source 3 (instant messaging software), and each LoRA0 constitutes the shared network. Each feature transformation layer also contains a gating network.

[0239] The initial data features are extracted from the processed text using the normalization layer and attention layer in the first Transformer module. Then, the feature transformation layer is used to transform the initial data features into intermediate basic features using a feedforward network, the initial data features into intermediate differential features using a perceptual network LoRA1, and the initial data features into intermediate general features output by the Transformer module using a shared network LoRA0.

[0240] A gating network is used to reduce the dimensionality of the initial data features, obtaining a weight vector. Based on this weight vector, intermediate basic features, intermediate difference features, and intermediate general features are fused to obtain intermediate fused features. This intermediate fused feature is then input into the next Transformer module. In the next Transformer module, a normalization layer and an attention layer are used to extract the previous fused feature from the received intermediate fused feature. This is then passed through a feature transformation layer to obtain the intermediate fused feature output by the next Transformer module. This process continues until the last Transformer module outputs its intermediate fused feature. This intermediate fused feature is then used as the fused text feature. A result prediction module is then used to generate the text processing result based on the fused text feature. For example, the text processing result might express a negative tendency.

[0241] Based on the same inventive concept, embodiments of this application provide a training apparatus for a prediction model, capable of realizing the functions corresponding to the aforementioned prediction model training method. Please refer to... Figure 8A The device includes an acquisition module 81 and a processing module 82, wherein:

[0242] Acquisition module 801: used to acquire multiple sample datasets; where different sample datasets come from different data sources; each sample dataset is associated with the sample results of the data processing task involved in the corresponding data source;

[0243] Processing module 802: Used to perform multiple rounds of iterative training on a pre-trained prediction model based on multiple sample datasets; the prediction model includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources; wherein, in each round of training, the following operations are performed:

[0244] The processing module 802 is specifically used to: extract fused data features from the selected sample data; wherein, the fused data features are fused with: basic data features extracted using a fixed network, differential data features representing the characteristics of the data source extracted using a perceptual network associated with the data source of the sample data, and general data features representing the commonalities of multiple data sources extracted using a shared network.

[0245] The processing module 802 is specifically used to: generate prediction results for the data processing tasks involved in the data source based on the features of the fused data;

[0246] The processing module 802 is specifically used to: adjust the parameters of the shared network and the perception network based on the difference between the prediction results and the sample results associated with the sample data.

[0247] In one possible embodiment, the processing module 802 is specifically used for:

[0248] A fixed extraction subnetwork within a fixed network is used to extract initial features from the sample data, thereby obtaining initial data features.

[0249] Multiple rounds of iterative feature transformation are performed on the initial data features to obtain fused data features. The intermediate fused features output in each round of feature transformation are used as input for the next round of feature transformation until the final round of feature transformation, at which point the output intermediate fused features are used as the fused data features. The intermediate fused features are fused as follows: intermediate basic features extracted by the fixed transformation sub-network in the fixed network during a round of feature transformation, intermediate difference features extracted by the perceptual network, and intermediate general features extracted by the shared network.

[0250] In one possible embodiment, the processing module 802 is specifically configured to include, in each round of feature transformation:

[0251] Obtain the intermediate fusion features from the previous feature extraction output and use them as the previous fusion features;

[0252] The previous fused feature was transformed by using a fixed transformation sub-network, a shared network, and a perceptual network associated with the data source of the sample data, respectively, to obtain the intermediate basic features output by the fixed transformation sub-network, the intermediate difference features output by the perceptual network, and the intermediate general features output by the shared network.

[0253] Based on the correlation between each feature element in the previous fusion feature and the sample result, predict the weights of the intermediate basic feature, intermediate differential feature, and intermediate general feature; where the weight is used to describe the degree of contribution of the corresponding feature to the predicted sample result.

[0254] Based on the obtained weights, the intermediate basic features, intermediate difference features, and intermediate general features are fused to obtain the intermediate fused features output in this round of feature extraction.

[0255] In one possible embodiment, the prediction model further includes a gating network to be trained, and the processing module 802 is specifically used for:

[0256] A gated network is used to reduce the dimensionality of the previous fusion feature based on the correlation between each feature element in the previous fusion feature and the sample result, so as to obtain a weight vector. The vector elements in the weight vector represent the weights of the intermediate basic feature, intermediate differential feature and intermediate general feature respectively.

[0257] Then, the parameters of the shared network and the sensing network are tuned, including:

[0258] Parameters were adjusted for the gating network, the sharing network, and the sensing network.

[0259] In one possible embodiment, the processing module 802 is specifically used for:

[0260] The training loss is determined based on the difference between the predicted results and the sample results associated with the sample data.

[0261] When the training loss based on the results indicates that the training objective has not been achieved, the parameters of the shared network and the perception network are adjusted in the direction of reducing the difference in results.

[0262] In one possible embodiment, the processing module 802 is specifically used for:

[0263] Based on general data characteristics, predict the data source of the sample data from multiple data sources to obtain the predicted data source.

[0264] Based on the differences between the data sources of the prediction data source and the data sources of the sample data, as well as the differences between the prediction results and the sample results associated with the sample data, the parameters of the shared network and the perception network are tuned.

[0265] In one possible embodiment, the fused data features are obtained through multiple rounds of iterative feature transformation, and during each round of feature transformation, when a shared network is used to extract intermediate general features, the processing module 802 is specifically used for:

[0266] Obtain the intermediate general features extracted during each round of feature transformation;

[0267] For each intermediate common feature, perform the following: Based on the intermediate common features, predict the predicted data source to which the sample data belongs among multiple data sources;

[0268] Based on the differences between the data sources of each prediction data source and the data sources of the sample data, as well as the differences between the prediction results and the sample results associated with the sample data, the parameters of the shared network and the perception network are tuned.

[0269] In one possible embodiment, the processing module 802 is specifically used for:

[0270] The training loss is determined based on the difference between the predicted results and the sample results associated with the sample data.

[0271] Based on the differences between each predicted data source and the data source where the sample data is located, the data source training loss is determined.

[0272] Based on the difference between the training loss from the results and the training loss from the data source, when the training objective is not achieved, the parameters of the shared network and the perceptual network are tuned.

[0273] In one possible embodiment, the adjustment direction when tuning the shared network and the sensing network includes at least one of the following:

[0274] Expand the adjustment direction of at least one of the data source differences;

[0275] Adjustments to narrow the differences in results.

[0276] Based on the same inventive concept, embodiments of this application provide a data processing apparatus capable of realizing the functions corresponding to the aforementioned data processing method. Please refer to... Figure 8B The device includes an acquisition module 801 and a processing module 802, wherein:

[0277] Acquisition module 801: used to acquire the text to be processed; wherein the text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks;

[0278] Processing module 802: Used to extract the fused text features of the text to be processed according to the data processing task associated with the data source of the text to be processed, using a trained target prediction model, and generate text processing results based on the fused text features; wherein, the target prediction model is trained according to the prediction model training method described above.

[0279] Please refer to Figure 9 This is a computer device 900 provided in the embodiments of this application. The computer device 900 can, for example, be... Figure 1CThe client 102 or server 101 in the system. The current and historical versions of the data storage program and the application software corresponding to the data storage program can be installed on a computer device 900, which includes a processor 980 and a memory 920. In some embodiments, the computer device 900 may include a display unit 940, which includes a display panel 941 for displaying a user-interactive interface, etc.

[0280] In one possible embodiment, the display panel 941 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).

[0281] The processor 980 is used to read a computer program and then execute the methods defined by the computer program. For example, the processor 980 reads a data storage program or file, thereby running the data storage program on the computer device 900 and displaying the corresponding interface on the display unit 940. The processor 980 may include one or more general-purpose processors, and may also include one or more DSPs (Digital Signal Processors) for performing related operations to implement the technical solutions provided in the embodiments of this application.

[0282] The memory 920 generally includes main memory and secondary storage. Main memory can be random access memory (RAM), read-only memory (ROM), and cache, etc. Secondary storage can be a hard disk, optical disk, USB flash drive, floppy disk, or magnetic tape drive, etc. The memory 920 is used to store computer programs and other data. The computer programs include applications corresponding to each client, and other data may include data generated after the operating system or applications are run, including system data (e.g., operating system configuration parameters) and user data. In this embodiment, the computer program is stored in the memory 920, and the processor 980 executes the computer program in the memory 920 to implement any of the methods described in the preceding figures.

[0283] The aforementioned display unit 940 is used to receive input digital information, character information, or contact touch operations / non-contact gestures, and to generate signal inputs related to user settings and function control of the computer device 900. Specifically, in this embodiment, the display unit 940 may include a display panel 941. The display panel 941, for example, is a touch screen, which can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or on the display panel 941), and drive corresponding connection devices according to a pre-set program.

[0284] In one possible embodiment, the display panel 941 may include two parts: a touch detection device and a touch controller. The touch detection device detects the player's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 980. It can also receive and execute commands from the processor 980.

[0285] The display panel 941 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 940, in some embodiments, the computer device 900 may also include an input unit 930. The input unit 930 may include an image input device 931 and other input devices 932, wherein the other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0286] In addition to the above, the computer device 900 may also include a power supply 990 for powering other modules, an audio circuit 960, a near-field communication module 970, and an RF circuit 910. The computer device 900 may also include one or more sensors 950, such as an accelerometer, a light sensor, and a pressure sensor. The audio circuit 960 specifically includes a speaker 961 and a microphone 962, for example, the computer device 900 can use the microphone 962 to collect the user's voice and perform corresponding operations.

[0287] As one embodiment, the number of processors 980 can be one or more, and the processors 980 and the memory 920 can be coupled together or relatively independent.

[0288] As one example, Figure 9 The processor 980 in the middle can be used to implement, for example Figure 8A The functions of the acquisition module 81 and the processing module 82 can also be used to implement, for example... Figure 8B The functions of the acquisition module 801 and the processing module 802 in the process.

[0289] As one example, Figure 9 The processor 980 in the text can be used to implement the functions of the server or terminal devices discussed above.

[0290] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by a computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the computer program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0291] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of software products, for example, through computer program products. These computer program products are stored in a storage medium and include computer programs used to cause a computer device to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0292] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for training a prediction model, characterized in that, include: Obtain multiple sample datasets; where different sample datasets come from different data sources; each sample dataset is associated with the sample results of the data processing task involved in the corresponding data source; Based on the multiple sample datasets, the pre-trained prediction model is trained iteratively in multiple rounds; the prediction model includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources; wherein, in each round of training, the following operations are performed: Extract fused data features from the selected sample data; wherein the fused data features are fused with: basic data features extracted using the fixed network, differential data features representing the characteristics of the data source extracted using the perceptual network associated with the data source of the sample data, and general data features representing the commonalities of the multiple data sources extracted using the shared network. Based on the features of the fused data, prediction results for the data processing tasks involved in the data source are generated; Based on the difference between the prediction results and the sample results associated with the sample data, the parameters of the shared network and the perception network are adjusted.

2. The method according to claim 1, characterized in that, The extraction of fused data features from the selected sample data includes: The fixed extraction subnetwork in the fixed network is used to perform initial feature extraction on the sample data to obtain initial data features; The initial data features are subjected to multiple rounds of iterative feature transformation to obtain fused data features; wherein, the intermediate fused features output in each round of feature transformation are used as input for the next round of feature transformation, until the final round of feature transformation, at which point the output intermediate fused features are used as the fused data features; the intermediate fused features are fused with: intermediate basic features extracted by the fixed transformation sub-network in the fixed network during one round of feature transformation, intermediate difference features extracted by the perceptual network, and intermediate general features extracted by the shared network.

3. The method according to claim 2, characterized in that, Each round of feature transformation includes: Obtain the intermediate fusion features from the previous feature extraction output and use them as the previous fusion features; The fixed transformation sub-network, the shared network, and the perceptual network associated with the data source of the sample data are used respectively to perform feature transformation on the previous fused feature to obtain the intermediate basic features output by the fixed transformation sub-network, the intermediate difference features output by the perceptual network, and the intermediate general features output by the shared network. Based on the correlation between each feature element in the previous fusion feature and the sample result, the weights corresponding to the intermediate basic feature, the intermediate difference feature, and the intermediate general feature are predicted; wherein, the weights are used to describe the degree of contribution of the corresponding feature to the prediction of the sample result; Based on the obtained weights, the intermediate basic features, intermediate difference features, and intermediate general features are fused to obtain the intermediate fused features output in this round of feature extraction.

4. The method according to claim 3, characterized in that, The prediction model further includes a gating network to be trained. The prediction of the weights corresponding to the intermediate basic features, the intermediate differential features, and the intermediate general features based on the correlation between each feature element in the previous fusion feature and the sample result includes: Using the gated network, the previous fusion feature is dimensionality reduced based on the correlation between each feature element in the previous fusion feature and the sample result to obtain a weight vector; wherein, each vector element in the weight vector represents the weight of the intermediate basic feature, the intermediate difference feature and the intermediate general feature respectively. The parameter tuning of the shared network and the sensing network includes: The parameters of the gating network, the sharing network, and the sensing network are adjusted.

5. The method according to any one of claims 1 to 4, characterized in that, The parameter tuning of the shared network and the perception network based on the difference between the prediction result and the sample result associated with the sample data includes: The training loss is determined based on the difference between the predicted result and the sample result associated with the sample data. When the training loss is determined based on the results and the training objective has not been achieved, the parameters of the shared network and the perception network are tuned in the direction of reducing the difference in the results.

6. The method according to any one of claims 1 to 4, characterized in that, The parameter tuning of the shared network and the perception network based on the difference between the prediction result and the sample result associated with the sample data includes: Based on the general data characteristics, the data source of the sample data is predicted among the multiple data sources to obtain the predicted data source; Based on the differences between the predicted data source and the data source where the sample data is located, and the differences between the predicted result and the sample result associated with the sample data, the parameters of the shared network and the perception network are tuned.

7. The method according to claim 6, characterized in that, The fused data features are obtained through multiple rounds of iterative feature transformation. During each round of feature transformation, when intermediate general features are extracted using the shared network, the step of predicting the data source of the sample data from among the multiple data sources based on these general data features, and obtaining the predicted data source, includes: Obtain the intermediate general features extracted during each round of feature transformation; For each intermediate general feature, perform the following: Based on the intermediate general feature, predict the predicted data source to which the sample data belongs among the multiple data sources; The step of tuning the parameters of the shared network and the perception network based on the data source difference between the prediction data source and the data source where the sample data is located, and the result difference between the prediction result and the sample result associated with the sample data, includes: Based on the differences between each predicted data source and the data source containing the sample data, as well as the differences between the predicted results and the sample results associated with the sample data, the parameters of the shared network and the perception network are tuned.

8. The method according to claim 7, characterized in that, The parameter tuning of the shared network and the perception network based on the differences between each predicted data source and the data source containing the sample data, and the differences between the predicted results and the sample results associated with the sample data, includes: The training loss is determined based on the difference between the predicted result and the sample result associated with the sample data. Based on the differences between each predicted data source and the data source where the sample data is located, the data source training loss is determined. Based on the difference between the training loss of the results and the training loss of the data source, when it is determined that the training objective has not been achieved, the parameters of the shared network and the perception network are tuned.

9. The method according to claim 7, characterized in that, The adjustment direction when tuning the parameters of the shared network and the sensing network includes at least one of the following: Expand the adjustment direction of at least one of the data source differences; Adjustments to reduce the discrepancies in the results.

10. A data processing method, characterized in that, include: Obtain the text to be processed; wherein the text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks; Using a trained target prediction model, the fused text features of the text to be processed are extracted according to the data processing task associated with the data source where the text to be processed is located, and a text processing result is generated based on the fused text features; wherein, the target prediction model is trained according to the method described in any one of claims 1 to 9.

11. A training device for a prediction model, characterized in that, include: Acquisition module: used to acquire multiple sample datasets; where different sample datasets come from different data sources; each sample dataset is associated with the sample results of the data processing task involved in the corresponding data source; Processing module: used to perform multiple rounds of iterative training on the pre-trained prediction model based on the multiple sample datasets; the prediction model includes: a fixed network, a shared network, and perceptual networks associated with multiple data sources; wherein, in each round of training, the following operations are performed: The processing module is specifically used to: extract fused data features from the selected sample data; wherein the fused data features are fused with: basic data features extracted using the fixed network, differential data features representing the characteristics of the data source extracted using the perceptual network associated with the data source where the sample data is located, and general data features representing the commonalities of the multiple data sources extracted using the shared network. The processing module is specifically used to: generate prediction results for the data processing tasks involved in the data source based on the fused data features; The processing module is specifically used to: adjust the parameters of the shared network and the perception network based on the result difference between the prediction result and the sample result associated with the sample data.

12. A data processing apparatus, characterized in that, include: Acquisition module: used to acquire the text to be processed; wherein the text to be processed comes from one of multiple data sources, and different data sources are associated with different data processing tasks; Processing module: used to use a trained target prediction model to extract the fused text features of the text to be processed according to the data processing task associated with the data source where the text to be processed is located, and to generate a text processing result based on the fused text features; wherein, the target prediction model is trained according to the method described in any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 10.

14. A computer device, characterized in that, include: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the method as described in any one of claims 1 to 10 according to the obtained computer program.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that causes a computer to perform the method as described in any one of claims 1 to 10.