Data processing method and device, computer, storage medium and program product
By introducing data augmentation and feature distance of target business samples into model training, the domain offset problem between different models is solved, effective cross-domain knowledge transfer is achieved, and the accuracy and efficiency of the model are improved.
Patent Information
- Application Number
- CN202410587204.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2025-11-11
AI Technical Summary
Domain bias between different models leads to insufficient knowledge transfer, affecting the accuracy and efficiency of model processing.
By acquiring source and target business samples, data augmentation is performed to construct business enhancement features. The parameters are then adjusted by predicting feature distances using the initial model, establishing a transferable relationship between the source and target domains, and achieving cross-domain learning.
It enhances the transferability of learned knowledge from the source domain to the target domain, and improves the accuracy and efficiency of model processing.
Smart Images

Figure CN120930106A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer, storage medium and program product. Background Technology
[0002] As models evolve and their applications expand, knowledge transfer is often performed between different models to facilitate training, transferring knowledge from the teacher model to the student model. Currently, power temperature scaling (PTS) and attention coefficient supervision (ATTN) are commonly used for this purpose. PTS uses feature vectors as detection signals. After PTS scaling, the bag feature vectors of the teacher model are used to supervise the training of the student model. The closer the distance between the bag feature vectors of the two models, the more knowledge the teacher model has transferred to the student model. Attention coefficient supervision uses attention coefficients as detection signals. Since most methods for full-frame pathological image slices are attention-based, and the attention coefficient represents the weight coefficient assigned to the corresponding region by the model, using the attention coefficient output by the teacher model as the detection signal allows the attention coefficient output by the student model to be as close as possible to the teacher model's attention coefficient, thus transferring knowledge from the teacher model to the student model. However, there is a domain bias between different models. Domain bias is a distribution change caused by the differences in the business objects handled by different models (such as the differences in tumor size and color in full-size pathological image slices). A model trained on a dataset is often biased towards that dataset. Due to the domain bias and the inconsistency of tasks between the domains involved by different models, there will be significant differences between the package feature vectors corresponding to the teacher model and the student model, resulting in less knowledge that can be transferred between the above different models, leading to lower accuracy and efficiency of model processing. Summary of the Invention
[0003] This application provides a data processing method, apparatus, computer, storage medium, and program product that can improve the accuracy and efficiency of data processing.
[0004] One embodiment of this application provides a data processing method, the method comprising:
[0005] Obtain source business samples and target business samples, and use the target business samples to perform data augmentation on the source business samples to obtain business augmentation features;
[0006] The business enhancement features are input into the first initial model for prediction to obtain the first prediction result of the source business sample. The initial feature distance between the source business sample and the target business sample is obtained through the first initial model. The parameters of the first initial model are adjusted according to the first prediction result and the initial feature distance to obtain the first business model.
[0007] The second prediction result of the target business sample is predicted by the first business model, and the third prediction result of the target business sample is predicted by the second initial model. The parameters of the second initial model are adjusted according to the second and third prediction results to obtain the second business model. The first business model and the second business model have the same model structure. The first business model is used to perform the first task processing on the business data, and the second business model is used to perform the second task processing on the business data.
[0008] One embodiment of this application provides a data processing apparatus, the apparatus comprising:
[0009] The sample processing module is used to acquire source business samples and target business samples, and to perform data augmentation on the source business samples using the target business samples to obtain business enhancement features.
[0010] The first training module is used to input business enhancement features into the first initial model for prediction, obtain the first prediction result of the source business sample, obtain the initial feature distance between the source business sample and the target business sample through the first initial model, and adjust the parameters of the first initial model according to the first prediction result and the initial feature distance to obtain the first business model.
[0011] The second training module is used to predict the second prediction result of the target business sample through the first business model, predict the third prediction result of the target business sample through the second initial model, and adjust the parameters of the second initial model according to the second and third prediction results to obtain the second business model. The first business model and the second business model have the same model structure. The first business model is used to perform the first task processing on the business data, and the second business model is used to perform the second task processing on the business data.
[0012] Specifically, when using target business samples to augment source business samples and obtain business augmentation features, this sample processing module is used for:
[0013] The source business sample is split into N first sample blocks, and the source block features corresponding to the N first sample blocks are obtained respectively; N is a positive integer.
[0014] The target business sample is divided into M second sample blocks, and the target block features corresponding to the M second sample blocks are obtained respectively; M is a positive integer.
[0015] Clustering is performed on the features of M target blocks to obtain cluster center features;
[0016] Data augmentation is performed on the features of N source blocks using cluster center features to obtain business-enhanced features.
[0017] Specifically, when using cluster center features to augment the features of N source blocks to obtain business-enhanced features, this sample processing module is used for:
[0018] Obtain A data augmentation methods, and use each of the A methods to insert the cluster center features into N source block features, resulting in A initial augmented features. Integrate these A initial augmented features to obtain the business augmented features; A is a positive integer; or...
[0019] Obtain the business distribution information of N source block features, determine the target data augmentation method based on the business distribution information and N, and insert the cluster center feature into the N source block features using the target data augmentation method to obtain the business augmentation feature.
[0020] Specifically, when using cluster center features to augment the features of N source blocks to obtain business-enhanced features, this sample processing module is used for:
[0021] Based on the feature distance between the cluster center feature and the i-th source block feature, the cluster center feature with the smallest feature distance is determined as the neighboring target block feature of the i-th source block feature; i is a positive integer less than or equal to N;
[0022] The data augmentation of the i-th source block feature is performed using the neighboring target block features of the i-th source block feature, until the data augmentation of N source block features is completed, thus obtaining the business augmentation feature.
[0023] Specifically, when using the neighboring target block features of the i-th source block feature to perform data augmentation on the i-th source block feature, this sample processing module is used for:
[0024] Obtain the sample influence probability, and determine the enhancement state of the i-th source block feature based on the sample influence probability;
[0025] If the enhancement state is the first enhancement state, then the neighboring target block features of the i-th source block feature are used to perform data augmentation on the i-th source block feature;
[0026] If the enhancement state is the second enhancement state, then the enhancement state of the (i+1)th source block feature is determined based on the sample influence probability.
[0027] Specifically, when using cluster center features to augment the features of N source blocks to obtain business-enhanced features, this sample processing module is used for:
[0028] Obtain the neighboring target block features corresponding to each of the N source block features, and add the N neighboring target block features to the N source block features to obtain the business enhancement features; or...
[0029] Obtain the neighboring target block features corresponding to each of the N source block features, and determine the N neighboring target block features as service enhancement features; or...
[0030] Obtain feature balance parameters, and based on these parameters, perform a weighted summation of the features of each source block and its corresponding neighboring target blocks to obtain the business enhancement features; or...
[0031] Obtain the neighboring target block features corresponding to N source block features, construct the feature distribution model of the neighboring target block features corresponding to N source block features, determine the feature offset value corresponding to N source block features based on the N feature distribution model, and add the feature offset value corresponding to each source block feature to obtain the business enhancement feature.
[0032] Specifically, when obtaining the initial feature distance between the source business sample and the target business sample through the first initial model, the first training module is used for:
[0033] Obtain the source sample features of the source business sample, and obtain the target sample features of the target business sample;
[0034] The source sample features are input into the first initial model for prediction to obtain the source intermediate features, and the target sample features are input into the first initial model for prediction to obtain the target intermediate features.
[0035] A distance constraint model is constructed based on the intermediate features of the source and the intermediate features of the target. The distance constraint model is then analyzed to determine the service transmission flow between the source service sample and the target service sample.
[0036] Based on the service transmission flow, determine the initial feature distance between the source service sample and the target service sample.
[0037] Specifically, when constructing a distance constraint model based on source intermediate features and target intermediate features, analyzing the distance constraint model, and determining the service transmission flow between source service samples and target service samples, this first training module is used for:
[0038] Obtain the feature element distance between the source intermediate feature and the target intermediate feature, and determine the distance parameter term by the inner product of the transmission flow parameter and the feature element distance;
[0039] Obtain the feature dimensions of the source intermediate features and the target intermediate features, and construct the first distance parameter and the second distance parameter based on the feature dimensions;
[0040] Based on the transport stream parameters, the first distance parameter, and the second distance parameter, a regularization term is constructed;
[0041] Combine the distance parameter term with the regularization term to form a distance-constrained model;
[0042] The distance constraint model is analyzed to determine the parameter data of the transmission flow when the result of the distance constraint model is minimized. The parameter data is then used to define the service transmission flow between the source service sample and the target service sample.
[0043] Specifically, when adjusting the parameters of the first initial model based on the first prediction result and the initial feature distance to obtain the first business model, the first training module is used for:
[0044] Based on the first prediction result, a first loss function is constructed, the model transfer coefficient is obtained, and distance offset data is constructed based on the model transfer coefficient and the initial feature distance.
[0045] The first loss function is combined with the distance offset data to obtain the source loss function for the first initial model;
[0046] The parameters of the first initial model are adjusted based on the source loss function until the parameters converge, thus obtaining the first business model.
[0047] Specifically, when adjusting the parameters of the second initial model based on the second and third prediction results to obtain the second business model, the second training module is used for:
[0048] A second loss function is constructed based on the third prediction result;
[0049] Obtain the distance data between the second and third prediction results, perform attention processing on the distance data, and obtain the model bias data.
[0050] The second loss function is combined with the model bias data to obtain the target loss function for the second initial model;
[0051] The parameters of the second initial model are adjusted based on the objective loss function until the parameters converge, thus obtaining the second business model.
[0052] Specifically, when acquiring source and target business samples, this sample processing module is used for:
[0053] Obtain a first business sample and a second business sample; determine the business sample with the largest number of occurrences between the first and second business samples as the source business sample; and determine the business sample with the smallest number of occurrences between the first and second business samples as the target business sample; or...
[0054] Obtain the first data processing task indicated by the first business sample and the second data processing task indicated by the second business sample. Determine the business sample corresponding to the data processing task with the larger task scope between the first and second data processing tasks as the source business sample, and determine the business sample corresponding to the data processing task with the smaller task scope between the first and second data processing tasks as the target business sample.
[0055] The device also includes:
[0056] The request and response module is used to respond to the model acquisition request for the second data processing task and to determine the business sample corresponding to the second data processing task as the target business sample.
[0057] The request parsing module is used to obtain the second initial model indicated by the model acquisition request, obtain the model structure of the second initial model, and the task type of the second data processing task;
[0058] The source determination module is used to determine the model with the model structure corresponding to the task type as the first initial model.
[0059] One embodiment of this application provides a computer device, including a processor, a memory, and an input / output interface;
[0060] The processor is connected to a memory and an input / output interface, respectively. The input / output interface is used to receive and output data, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device containing the processor executes the data processing method in one aspect of the embodiments of this application.
[0061] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the data processing method of one aspect of this application.
[0062] One aspect of this application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional embodiments of this application. In other words, when the computer instructions are executed by the processor, they implement the methods provided in various optional embodiments of this application.
[0063] Implementing the embodiments of this application will have the following beneficial effects:
[0064] In this embodiment, source business samples and target business samples can be obtained. The source business samples are augmented using the target business samples to obtain business augmentation features. The business augmentation features are input into a first initial model for prediction to obtain a first prediction result for the source business samples. An initial feature distance between the source business samples and the target business samples is obtained through the first initial model. The parameters of the first initial model are adjusted based on the first prediction result and the initial feature distance to obtain a first business model. A second prediction result for the target business samples is predicted using the first business model. A third prediction result for the target business samples is predicted using the second initial model. The parameters of the second initial model are adjusted based on the second and third prediction results to obtain a second business model. The first business model and the second business model have the same model structure. The first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data. By directly incorporating target business samples into the source business samples, data augmentation is applied to the source business samples to improve the training of the first initial model. This enables the teacher model (i.e., the first initial model) to learn common knowledge across two domains in a teacher (i.e., source business sample)-student (i.e., target business sample) paradigm, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, the rich data augmentation inherently helps the first initial model learn more generalized features. In addition, the feature distance between the two types of business samples is introduced during the training of the first initial model to assist in its training, establishing a transferable relationship between the source and target domains. This allows the teacher model to focus on the features of the target business samples, enabling the first initial model to learn more common knowledge across the two domains. This common knowledge is then fed back into the training process of the second initial model, achieving training of models in both domains and improving the accuracy and efficiency of model processing. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a network interaction architecture diagram for data processing provided in an embodiment of this application;
[0067] Figure 2 This is a schematic diagram of a data processing scenario provided in an embodiment of this application;
[0068] Figure 3 This is a schematic diagram of a model application scenario provided in an embodiment of this application;
[0069] Figure 4 This is a flowchart of a data processing method provided in an embodiment of this application;
[0070] Figure 5 This is a schematic diagram of a model training scenario provided in an embodiment of this application;
[0071] Figure 6 This is a schematic diagram of a data augmentation scenario provided in an embodiment of this application;
[0072] Figure 7 This is a schematic diagram of a feature distance parsing scenario provided in an embodiment of this application;
[0073] Figure 8 This is a schematic diagram of a data processing device provided in an embodiment of this application;
[0074] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0075] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0076] Where this application requires the collection of object data (such as user data), a prompt interface or pop-up window will be displayed before and during the collection process. This prompt interface or pop-up window is used to inform the user that certain data is being collected. The data acquisition steps will only begin after the user confirms the prompt interface or pop-up window; otherwise, the process will end. Furthermore, the acquired user data will be used in reasonable and legal scenarios or for legitimate purposes. Optionally, in scenarios where user data needs to be used but user authorization has not been obtained, authorization can be requested from the user, and the user data will be used only after authorization is granted. In other words, the data involved in this application will comply with relevant laws and regulations when acquired or used.
[0077] This application can improve data processing efficiency through artificial intelligence (AI) technology. AI is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. For example, the training and use of the first and second business models in this application enable these models to provide data processing functions for task processing of business data.
[0078] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0079] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning. For example, in this application, by simulating or implementing human learning behavior on an initial model (such as a first initial model and a second initial model), a business model for processing business data is obtained.
[0080] In the embodiments of this application, please refer to Figure 1 , Figure 1 This is a network interaction architecture diagram for data processing provided in an embodiment of this application, such as... Figure 1As shown, computer device 101 can obtain source business samples and target business samples from business devices or local memory, and train a first business model and a second business model using the source business samples and target business samples. Specifically, computer device 101 can obtain source business samples and target business samples and train the first business model and the second business model. Alternatively, computer device 101 can obtain source business samples and target business samples from any one or more business devices, such as business devices 102a, 102b, and 102c, and train the first business model and the second business model using the source business samples and target business samples. Optionally, computer device 101 can send the first business model and the second business model to each business device. Optionally, computer device 101 can obtain a data processing request sent by any business device, obtain the business data carried in the data processing request, perform task processing on the business data based on the business model indicated by the data processing request, obtain a business processing result, and send the business processing result to the business device corresponding to the data processing request.
[0081] For details, please see Figure 2 , Figure 2 This is a schematic diagram of a data processing scenario provided in an embodiment of this application. For example... Figure 2As shown, computer devices can achieve cross-domain knowledge transfer between two domains, which can be denoted as the source domain and the target domain, respectively. The source domain refers to the domain corresponding to the teacher model, and the target domain refers to the domain corresponding to the student model. The teacher model is the model trained on the source dataset, and the student model is the model trained on the target dataset. The source dataset can be considered as a dataset used for pre-training on general tasks, while the target dataset is used for training and evaluating model performance. Specifically, the computer device can acquire source business sample 2011 and target business sample 2012. The computer device can use the target business sample 2012 to perform data augmentation on the source business sample 2011, obtaining business augmentation features. This introduces features from the target domain into the source domain, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, rich data augmentation allows the teacher model to learn more generalized features. Furthermore, the computer device can input business enhancement features into the first initial model 2021 for prediction, obtaining the first prediction result of the source business sample 2011. The initial feature distance between the source business sample 2011 and the target business sample 2012 is obtained through the first initial model. Based on the first prediction result and the initial feature distance, the parameters of the first initial model 2021 are adjusted to obtain the first business model 2022. This completes the training of the teacher model. In this training process, a target-aware knowledge transfer (TAKT) framework is provided, enabling the teacher model to learn common knowledge across two domains in a teacher-student paradigm. By introducing unlabeled data (i.e., target business samples) from the target domain during the teacher model's training, data augmentation is performed on the source domain data (i.e., source business samples). This data augmentation improves the transferability of learned knowledge from the source domain to the target domain, and the rich data augmentation inherently facilitates the teacher model learning more generalized features. Furthermore, during the training process of the teacher model, a target-aware feature alignment (TAFA) module is introduced. This module is applied to the features between the source and target domains to learn the feature distance between them. This allows for the establishment of a transferable relationship between the source and target domains, providing a holistic view of the feature distribution in both domains. This forces the teacher model to pay attention to the target business samples, enabling it to learn more common knowledge with the student model across the two domains. This allows for more accurate knowledge transfer to the student model, thereby improving the accuracy and efficiency of multi-model processing.
[0082] Furthermore, the computer equipment can predict the second prediction result of the target business sample 2012 using the first business model 2022, and predict the third prediction result of the target business sample 2012 using the second initial model 2031. Based on the second and third prediction results, the parameters of the second initial model 2031 are adjusted to obtain the second business model 2032. Knowledge transfer is performed to the student model using the common knowledge learned by the teacher model to assist in the training of the student model and improve its accuracy and efficiency.
[0083] The first business model 2022 and the second business model 2032 share the same model structure. Both models can possess any data processing function, and they have identical data processing capabilities. For example, the first business model 2022 and the second business model 2032 can be image classification models, image recognition models, image segmentation models, or media restoration models, etc. While they share the same data processing capabilities, they have different task processing requirements. The data processing function refers to the operation that the corresponding business model can perform on the business data, and the task processing requirement represents the output label required by the corresponding business model. For example, if the first business model 2022 is an image classification model, the task processing requirement of the first business model 2022 is to identify the category to which the business data belongs in the result label "Normal Image Category and Abnormal Image Category," and the task processing requirement of the second business model 2032 could be to identify the category to which the business data belongs in the result label "Anime Category, Landscape Category, People Category, and Others," where the business data can be image data. For example, the first business model 2022 and the second business model 2032 are image classification models. The task processing requirement of the first business model 2022 is to identify the category to which the business data belongs in the result label "Tumor Category (Tumour) and Normal Category (Normal)". The task processing requirement of the second business model 2032 may be to identify the category to which the business data belongs in the result label "Lung Adenocarcinoma Category (LUAD) and Lung Squamous Cell Carcinoma Category (LUSC)", or to identify the category of renal cell carcinoma (RCC), such as the category to which it belongs in the result label "Clear Cell RCC Category (KIRC), Scaly RCC Category (KIRP) and Chlorophyll-Free RCC Category (KICH)", etc. The business data may be pathological slide image data, etc. For example, the first business model 2022 and the second business model 2032 are image segmentation models. The task processing requirement of the first business model 2022 is to segment the business data into background and foreground regions. The task processing requirement of the second business model 2032 can be to segment the business data into regions of the various objects that make up the business data (e.g., if the business data contains cats, dogs, houses, and a background, it can be segmented into regions corresponding to cats, dogs, houses, and the background, etc.). The above are some possible application scenarios of business models, which can also be used in other application scenarios without limitation. That is to say, as long as they can be used as two models for teacher-student interaction, the solution in this application can be used to train and use the models.
[0084] For example, see Figure 3 , Figure 3 This is a schematic diagram of a model application scenario provided in an embodiment of this application, such as... Figure 3 As shown, assuming there are a first dataset, a second dataset, and a third dataset, the first dataset may include a first business sample 301, which includes an abnormal region 3011 and a normal region 3012, and carries a first sample label, such as the first sample label "Tumour". This first dataset may be a medical imaging dataset (such as Camelyon16). The second dataset may include a second business sample 302, which includes an abnormal region 3021 and a normal region 3022, and carries a second sample label, such as the second sample label "LUSC". This second dataset may be a non-small cell gene expression dataset (such as TCGA-NSCLC). The third dataset may include a third business sample 303, which includes an abnormal region 3031 and a normal region 3032, and carries a third sample label, such as the third sample label "KIRP". This third dataset may be a kidney gene expression dataset (such as TCGA-NSCLC), etc. Taking these three datasets as examples, the first dataset can be determined as the source dataset, and the first business sample 301 is the source business sample. The second dataset can be determined as the target dataset, and the second business sample 302 is the target business sample. The second business sample 302 can be used to augment the first business sample 301 to obtain business augmentation features. The first initial model is trained using the business augmentation features to obtain the first business model. The first business model can be used to detect whether the business data is normal image data or abnormal image data. The second initial model is trained using the first business model and the second business sample 302 to obtain the second business model. The second business model can be used to detect whether the business data contains LUSC or LUAD. Alternatively, the first dataset can be designated as the source dataset, in which case the first business sample 301 is the source business sample. The third dataset can be designated as the target dataset, in which case the third business sample 303 is the target business sample. The third business sample 303 can be used to augment the first business sample 301 to obtain business augmentation features. The first initial model can be trained using the business augmentation features to obtain the first business model. The first business model can be used to detect whether the business data is normal image data or abnormal image data. The second initial model can be trained using the first business model and the third business sample 303 to obtain the second business model. The second business model can be used to detect whether the business data contains KIRC, KIRP, or KICH, etc.
[0085] It is understood that the business equipment mentioned in the embodiments of this application can be a computer device, and the computer device in the embodiments of this application includes, but is not limited to, terminal devices or servers. In other words, the computer device can be a server or a terminal device, or a system composed of a server and a terminal device. The terminal device mentioned above can be an electronic device, including but not limited to mobile phones, tablets, desktop computers, laptops, handheld computers, in-vehicle devices, augmented reality / virtual reality (AR / VR) devices, head-mounted displays, smart TVs, wearable devices, smart speakers, digital cameras, webcams, and other mobile internet devices (MIDs) with network access capabilities, or terminal devices in scenarios such as trains, ships, and flights. Figure 1 As shown, the terminal device can be a laptop computer (as shown in business device 102b), a mobile phone (as shown in business device 102c), or an in-vehicle device (as shown in business device 102a), etc. Figure 1 Only a portion of the equipment is listed here. Optionally, the business equipment 102a refers to the equipment located in the vehicle 103. Business equipment 102a can be used to train or run model 1021. The servers mentioned above can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, vehicle-to-everything (V2X) communication, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0086] Optionally, the data involved in the embodiments of this application may be stored in a computer device, or may be stored based on cloud storage technology or a blockchain network, without limitation.
[0087] Further, please see Figure 4 , Figure 4 This is a flowchart of a data processing method provided in an embodiment of this application. Figure 4 As shown, the data processing procedure includes the following steps:
[0088] Step S401: Obtain source business samples and target business samples, and use the target business samples to perform data augmentation on the source business samples to obtain business augmentation features.
[0089] In this embodiment, the computer device can acquire a source dataset and a target dataset. The source dataset includes source business samples, and the target dataset includes target business samples. Further, the computer device can split the source business samples into N first sample blocks and obtain the source block features corresponding to each of the N first sample blocks; N is a positive integer. The target business samples are then split into M second sample blocks, and the target block features corresponding to each of the M second sample blocks are obtained; M is a positive integer. Clustering processing is performed on the M target block features to obtain cluster center features. Specifically, clustering processing can be performed on the M target block features to obtain k target cluster sets, and the center features corresponding to each of the k target cluster sets are determined as cluster center features, where k is a positive integer less than or equal to M. For example, k target block features can be randomly selected from M target block features as initial cluster centers. During the j-th feature clustering process, the cluster feature distance between each target block feature and the k updated cluster centers is obtained. Each target block feature is added to the initial cluster center with the smallest cluster feature distance, resulting in k updated cluster sets. When j is one, these k updated cluster centers are the k initial cluster centers. If the k updated cluster sets converge, they are determined as k target cluster sets. If the k updated cluster sets do not converge, the updated cluster centers corresponding to the k updated cluster sets are obtained, and the k updated cluster centers are determined as initial cluster centers. The (j+1)-th feature clustering process is then executed, where k is a positive integer and j is a positive integer. Optionally, taking the j-th feature clustering process as an example, if the updated cluster centers of the k updated cluster sets obtained in the j-th feature clustering process are the same as the updated cluster centers of the k updated cluster sets obtained in the (j-1)-th feature clustering process, or if the k updated cluster sets obtained in the j-th feature clustering process are the same as the k updated cluster sets obtained in the (j-1)-th feature clustering process, then the k updated cluster sets are determined to be convergent; otherwise, the k updated cluster sets are determined to be non-convergent. Optionally, convergence of the k updated cluster sets can also be determined when the sum of squared errors of the k updated cluster sets reaches a local minimum. This clustering method allows for the selection of the required number of cluster center features, enabling the acquisition of a number of features from the target domain that better match the source domain, thus improving the accuracy of knowledge introduction. Optionally, other clustering algorithms can be used to cluster the features of the M target blocks to obtain k target cluster sets, such as the k-medoids clustering algorithm (K-Medojds) or clustering algorithms used in large-scale applications (Clara), etc., without limitation. Furthermore, cluster center features can be used to augment the features of the N source blocks to obtain business-enhanced features.
[0090] For example, see Figure 5 , Figure 5This is a schematic diagram of a model training scenario provided in an embodiment of this application. For example... Figure 5 As shown, the computer device can split the source service sample 5011 into N first sample blocks 5021, split the target service sample 5012 into M second sample blocks 5022, and use the M second sample blocks 5022 to perform data augmentation on the N first sample blocks 5021 to obtain service enhancement features.
[0091] Specifically, when using cluster center features to augment N source block features to obtain business-enhanced features, the computer equipment can acquire A data augmentation methods. These A methods are then used to insert the cluster center features into the N source block features, resulting in A initial augmented features. These A initial augmented features are then integrated to obtain the business-enhanced features; A is a positive integer. Alternatively, one data augmentation method can be randomly selected from the A methods and designated as the target data augmentation method. This target method is then used to insert the cluster center features into the N source block features to obtain the business-enhanced features. Alternatively, business distribution information of N source block features can be obtained. Based on the business distribution information and N, a target data augmentation method can be determined. Using the target data augmentation method, cluster center features are inserted into the N source block features to obtain business augmented features. This business distribution information can be used to represent the feature strength of the source business samples, that is, to express the amount of information of the source business samples included in the N source block features. The greater the feature strength, the more knowledge can be introduced by the data augmentation method, which can then be determined as the target data augmentation method. This method allows for more flexible data augmentation of the source business samples, and it can better adapt to the actual situation of the teacher model, thereby improving the accuracy and flexibility of the model processing. For example, A data augmentation methods can include, but are not limited to, append augmentation, replacement augmentation, interpolation augmentation, and covariant augmentation. For example, the amount of knowledge introduced by each data augmentation method is: "replacement augmentation > interpolation augmentation > covariant augmentation > append augmentation, etc." Of course, when the values of the parameters involved in the A data augmentation methods change, the amount of knowledge introduced by each of the A data augmentation methods can be determined based on the changed A data augmentation methods. Alternatively, you can directly obtain the target data augmentation method provided by the management object, and use the target data augmentation method to insert the cluster center feature into the N source block features to obtain the business augmentation feature.
[0092] Taking a single source block feature as an example, the computer device can determine the cluster center feature with the smallest feature distance from the cluster center feature to the i-th source block feature as the neighboring target block feature of the i-th source block feature; i is a positive integer less than or equal to N. The neighboring target block features of the i-th source block feature are used to perform data augmentation on the i-th source block feature until data augmentation of N source block features is completed, resulting in the business-enhanced feature. In other words, the neighboring target block features of the i-th source block feature are used to perform data augmentation on the i-th source block feature, resulting in the i-th block-enhanced feature corresponding to the i-th source block feature, until data augmentation of N source block features is completed, resulting in the block-enhanced features corresponding to each of the N source block features. These N block-enhanced features are then combined to form the business-enhanced feature. Specifically, when using the neighboring target block features of the i-th source block feature to perform data augmentation on the i-th source block feature, it can be done by using the aforementioned A data augmentation methods and the neighboring target block features of the i-th source block feature to perform data augmentation on the i-th source block feature; or it can be done by obtaining the target data augmentation method through the target data augmentation method determination process described above, and then using the target data augmentation method and the neighboring target block features of the i-th source block feature to perform data augmentation on the i-th source block feature.
[0093] Optionally, when augmenting the i-th source block feature using neighboring target block features, a sample influence probability can be obtained. Based on this probability, the augmentation state for the i-th source block feature can be determined. This sample influence probability represents the degree of influence of the target business sample on the source business sample and can be a hyperparameter. For example, if the sample influence probability is 40%, there is a 40% probability that the i-th source block feature will be in the first augmentation state, and a 60% probability that it will be in the second augmentation state. If the augmentation state is the first augmentation state, then neighboring target block features are used to augment the i-th source block feature; if the augmentation state is the second augmentation state, then the augmentation state for the (i+1)-th source block feature is determined based on the sample influence probability.
[0094] In one data augmentation method, a computer device can acquire the neighboring target block features corresponding to N source block features, and add the N neighboring target block features to the N source block features to obtain the service augmentation features. Specifically, the i-th neighboring target block feature and the i-th source block feature can be determined as the i-th block augmentation feature corresponding to the i-th source block feature. This data augmentation method can be referred to as the appended augmentation method.
[0095] In one data augmentation method, a computer device can acquire the neighboring target block features corresponding to N source block features, and determine the N neighboring target block features as service augmentation features. Specifically, the i-th neighboring target block feature can be determined as the i-th block augmentation feature corresponding to the i-th source block feature. This data augmentation method can be referred to as a substitution augmentation method.
[0096] In one data augmentation method, a computer device can acquire feature balancing parameters and perform a weighted summation of each source block feature and its corresponding neighboring target block features based on these parameters to obtain a service augmentation feature. Specifically, the feature of the i-th neighboring target block and the i-th source block feature can be weighted and summed based on the feature balancing parameters to obtain the i-th block augmentation feature corresponding to the i-th source block feature. This data augmentation method can be referred to as interpolation augmentation. The feature balancing parameter can be denoted as λ, representing the degree of influence of the target service sample on the source service sample. The i-th source block feature is denoted as f, the i-th neighboring target block feature is denoted as c, and the i-th block augmentation feature is denoted as f. I = (1-λ)f+λc. Alternatively, in this data augmentation method, the features of the i-th neighboring target block and the i-th source block can be weighted and summed based on the feature balancing parameter to obtain the i-th interpolated feature corresponding to the i-th source block feature. This i-th interpolated feature and the i-th source block feature are then used as the i-th block augmentation feature corresponding to the i-th source block feature. In this approach, introducing knowledge from the target domain into the source domain does not destroy the features of the source domain. Furthermore, by balancing the impact of the target domain on the model training of the source domain through the feature balancing parameter, the completeness of the information in the source domain can be guaranteed. Relevant knowledge from the target domain can also be introduced to improve the accuracy and generalization of the model training in the source domain, while ensuring the functional realization of the model in the source domain.
[0097] In one data augmentation method, a computer device can acquire the neighboring target block features corresponding to N source block features, construct a feature distribution model for the neighboring target block features corresponding to the N source block features, determine the feature offset values corresponding to the N source block features based on the N feature distribution models, and add the feature offset value corresponding to each source block feature to obtain the business augmentation feature. Specifically, a feature distribution model for the neighboring target block features corresponding to the i-th source block feature can be constructed, and the covariance matrix of the i-th neighboring target block feature can be obtained, denoted as Σ. C ; Construct a feature distribution model based on the i-th covariance matrix. This feature distribution model can be a multivariate normal distribution model, which can be denoted as N(0, Σ). C Based on the distribution model of the i-th feature, determine the feature offset value δ corresponding to the i-th source block feature, where δ ~ N(0, Σ). C); Based on the i-th source block feature, add the feature offset value corresponding to the i-th source block feature to obtain the i-th block enhancement feature corresponding to the i-th source block feature, which can be denoted as f. C =f+λδ,δ~N(0,Σ) C ), where λ is the feature balancing parameter. Optionally, the feature offset value corresponding to the i-th source block feature can be added to the i-th source block feature to obtain the i-th covariant feature corresponding to the i-th source block feature. The i-th source block feature and the i-th covariant feature are then determined as the i-th block augmentation feature corresponding to the i-th source block feature. This data augmentation method can be denoted as the covariant augmentation method.
[0098] For example, see Figure 6 , Figure 6 This is a schematic diagram of a data augmentation scenario provided in an embodiment of this application, such as... Figure 6 As shown, the computer device can acquire source block features 603 corresponding to N first sample blocks 601, such as f1, f2, ... and f N Obtain the target block features corresponding to M second sample blocks 602 respectively, and perform clustering processing on the M target block features to obtain cluster center features 604, such as denoted as c1, c2, ... and c N' Taking source block feature 6051 as an example, assuming that the neighboring target block feature of source block feature 6051 is determined to be neighboring target block feature 6052, the neighboring target block feature 6052 can be determined as the initial enhanced feature 6062 of source block feature 6051 through substitution enhancement; the source block feature 6051 and the neighboring target block feature 6052 can be determined as the initial enhanced feature 6063 of source block feature 6051 through append enhancement; the initial enhanced feature 6064 of source block feature 6051 can be obtained through interpolation enhancement; and the initial enhanced feature 6065 of source block feature 6051 can be obtained through covariance enhancement, etc. Source block feature 6051, initial enhanced feature 6062, initial enhanced feature 6063, initial enhanced feature 6064, and initial enhanced feature 6065 are determined as the block enhanced feature 606 corresponding to source block feature 6051.
[0099] Optionally, the computer device can acquire source business samples and target business samples. It can acquire a first dataset and a second dataset provided by the management object, identifying the business samples included in the first dataset as source business samples and the business samples included in the second dataset as target business samples. Alternatively, it can acquire the first business sample and the second business sample, identifying the business sample with the largest number of items between the two as source business samples and the business sample with the smallest number of items between the two as target business samples. Alternatively, it can acquire the first data processing task indicated by the first business sample and the second data processing task indicated by the second business sample, identifying the business sample corresponding to the data processing task with the larger task scope between the first and second data processing tasks as source business samples and the business sample corresponding to the data processing task with the smaller task scope between the first and second data processing tasks as target business samples.
[0100] Alternatively, in response to a model acquisition request for a second data processing task, the business sample corresponding to the second data processing task is identified as the target business sample. The second initial model indicated by the model acquisition request is acquired, along with its model structure and the task type of the second data processing task. The model with the model structure corresponding to the task type is identified as the first initial model. For example, if the model acquisition request is for pathological testing, and pathological image data may be limited, the pathological image data can be identified as the target business sample; alternatively, global pathological images can be acquired and identified as the source business sample.
[0101] Step S402: Input the business enhancement features into the first initial model for prediction to obtain the first prediction result of the source business sample. Obtain the initial feature distance between the source business sample and the target business sample through the first initial model. Adjust the parameters of the first initial model according to the first prediction result and the initial feature distance to obtain the first business model.
[0102] In this embodiment, the computer device can input service enhancement features into a first initial model for prediction, thereby obtaining a first prediction result for the source service sample. For example... Figure 5 As shown, business enhancement features can be input into the first initial model 5031 for prediction to obtain the first intermediate feature 5041. Then, through the first function prediction module 5051 in the first initial model, the first prediction result of the source business sample is predicted. M can be used... t (·) represents the first initial model and the first business model obtained by training the first initial model, and the first intermediate feature 5041 is denoted as h. t1 The first prediction result obtained by the first functional prediction module 5051 is denoted as p. t1The first functional prediction module refers to the module in the first business model used to predict the model results, such as an image classification layer, an image recognition layer, or an image segmentation layer. Specifically, it is determined based on the data processing functions of the first business model and the second business model, and may include fully connected layers, etc.
[0103] Furthermore, the computer equipment can acquire source sample features of the source service sample and target sample features of the target service sample. Optionally, the source sample features may include source block features corresponding to N first sample blocks, and the target sample features may include target block features corresponding to M second sample blocks. The source sample features are input into a first initial model for prediction to obtain source intermediate features; the target sample features are input into the first initial model for prediction to obtain target intermediate features. Specifically, the cluster center features of the target sample features are acquired and input into the first initial model for prediction to obtain target intermediate features. A distance constraint model is constructed based on the source and target intermediate features. The distance constraint model is analyzed to determine the service transmission flow between the source and target service samples. Based on the service transmission flow, the initial feature distance between the source and target service samples is determined. Figure 5 As shown, the source sample features can be input into the first initial model 5031 for prediction to obtain the source intermediate features 5061, which can be denoted as h. O The target sample features are input into the first initial model 5031 for prediction, resulting in the target intermediate features 5071, which can be denoted as h. G Obtain the distance offset data between the source intermediate feature 5061 and the target intermediate feature 5071.
[0104] Specifically, when constructing a distance constraint model based on source intermediate features and target intermediate features, and analyzing the distance constraint model to determine the service transmission flow between the source service sample and the target service sample, the distance between feature elements of the source intermediate features and the target intermediate features can be obtained. The inner product of the transmission flow parameter and the feature element distance is determined as the distance parameter term. The feature dimensions of the source intermediate features and the target intermediate features are obtained, and a first distance parameter and a second distance parameter are constructed based on the feature dimensions. A regularization term is constructed based on the transmission flow parameter, the first distance parameter, and the second distance parameter. The distance parameter term and the regularization term are combined to form the distance constraint model. Optionally, a distance constraint model can be shown in formula ①:
[0105]
[0106] As shown in formula ①, the input of the teacher model can be denoted as F, F = [F O C G The subscript O represents the teacher model, i.e., the source domain, and the subscript G represents the student model, i.e., the target domain. F...O and C G These are the feature vectors of the source domain and the cluster centers of the target domain, respectively, i.e., F. O C is used to represent the features of the source samples. G Used to represent the characteristics of cluster centers. Let F O and C G The intermediate features of the network (i.e., source intermediate features and target intermediate features) of the input teacher model are represented as h. O and h G We can obtain the feature element distance between the source intermediate feature and the target intermediate feature, which can be denoted as C, where the (u,v)th element in C is... h is used to represent the u-th source element feature in the source intermediate features. Gv Used to represent the v-th target element feature in the intermediate features of the target, where u is a positive integer and v is a positive integer; <·,·> F This refers to the matrix inner product, such as the Frobenius inner product, where the Frobenius inner product of two matrices is the sum of the product of corresponding elements of those two matrices. The inner product of the transport flow parameters and the distances to the feature elements is defined as the distance parameter term, i.e., <γ,C>. F γ represents the transport stream parameter.
[0107] Furthermore, the computer device can acquire the feature dimensions of the source intermediate features and the target intermediate features, and construct a first distance parameter a and a second distance parameter b based on the feature dimensions. Optionally, the source intermediate features h can be... O intermediate features h of the target G The feature dimension is denoted by q, where q is a positive integer, and... These can be considered as two uniform distributions of size q. The first regularization coefficient r can be obtained, and an entropy regularization term, denoted as Ω(γ), can be constructed based on the transmission flow parameters, the first distance parameter, and the second distance parameter, where Ω(γ) = KL(γ, ab). T The first regularization term, KL(γ,a), is constructed based on the transmission flow parameters and the first distance parameter; the second regularization term, KL(γ,a), is constructed based on the transmission flow parameters and the second distance parameter. T(b) Further, the entropy regularization term, the first regularization term, and the second regularization term are weighted and summed using the first regularization coefficient, the second regularization coefficient, and the third regularization coefficient to obtain the regularization term. Here, r, r1, and r2 are regularization coefficients, which are the first regularization coefficient, the second regularization coefficient, and the third regularization coefficient, respectively. These can be considered hyperparameters, and their values can be 0.1, 0.5, and 0.5, etc., without restriction. They can be tuned based on the model's training performance. KL(·,·) can be the Kullback-Leibler divergence, and γ is the value that minimizes the distance-constrained model, representing the optimal transport flow. For each pair of inputs (h... O ,h G The model can be constructed using formula ①.
[0108] Furthermore, the computer equipment can analyze the distance constraint model to determine the parameter data of the transport flow when the result of the distance constraint model is minimized. This parameter data is then defined as the transport flow between the source and target service samples. The optimal transport flow represents how teacher features can be transformed into a distribution with the same distribution as student features at the lowest cost. As the cost of transporting the distribution decreases, the calculated distance between the two features also decreases. For example, this problem can be solved using algorithms such as the Sinkhorn-Knopp algorithm.
[0109] For example, see Figure 7 As shown, Figure 7 This is a schematic diagram of a feature distance resolution scenario provided in an embodiment of this application, such as... Figure 7 As shown, a distance constraint model can be constructed for the source intermediate feature 7011 and the target intermediate feature 7012 through the data transmission model; the distance constraint model is analyzed to obtain the service transmission flow 702 between the source service sample and the target service sample.
[0110] Furthermore, the computer equipment can determine the initial feature distance between the source service sample and the target service sample, d = ∑Cγ, based on the service transport stream. For example... Figure 7 As shown, the computer device can obtain the service transmission flow 7041 between the source intermediate feature 7031 and the target intermediate feature 7032 through the data transmission model, obtain the feature distance data 7042 between the source intermediate feature 7031 and the target intermediate feature 7032 through the data transmission model, and perform inner product processing on the service transmission flow 7041 and the feature distance data 7042 to obtain the initial feature distance.
[0111] Furthermore, the computer equipment can construct a first loss function based on the first prediction result, obtain model transfer coefficients, and construct distance offset data based on the model transfer coefficients and the distance to the initial features. The first loss function is combined with the distance offset data to obtain the source loss function for the first initial model. The parameters of the first initial model are adjusted based on the source loss function until the parameters converge, resulting in the first business model. The source loss function can be seen in Equation 5:
[0112] L O =L t +βL dist =L t +β∑C(h O ,h G )·γ(h O ,h G ) ②
[0113] As shown in formula ②, L O Used to represent the source loss function, L t The first loss function used to represent the teacher model is ∑C(h) O ,h G )·γ(h O ,h G ) represents the initial feature distance. β>0 is the model transfer coefficient, used to represent the influence of the distance between two models on the model; it can be a hyperparameter or provided by the management object. The first loss function is the teacher model's own loss function, such as the cross-entropy loss function, mean squared error loss function, or mean bias error loss function, etc., without restriction here. For example, the first prediction result and the source sample labels of the source business samples can be obtained, and the first loss function can be constructed based on the difference data between the first prediction result and the source sample labels, such as... Figure 5 As shown, a first loss function is constructed based on the first prediction result 5051. This first loss function can be combined with the distance offset data to form the source loss function.
[0114] Furthermore, the parameters of the first initial model can be adjusted based on the source loss function until the parameters of the first initial model converge. The first initial model with converged parameters is then determined as the first business model.
[0115] Step S403: Predict the second prediction result of the target business sample using the first business model, predict the third prediction result of the target business sample using the second initial model, and adjust the parameters of the second initial model based on the second and third prediction results to obtain the second business model.
[0116] In this embodiment, the first business model and the second business model have the same model structure. The first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data. The first business model and the second business model refer to two models with the same model structure but different parameters. Therefore, optionally, the first initial model and the second initial model can be the same.
[0117] Specifically, the computer device can construct a second loss function based on the third prediction result; obtain the result distance data between the second and third prediction results, perform attention processing on the result distance data to obtain model bias data; and combine the second loss function with the model bias data to obtain the target loss function for the second initial model. Optionally, one target loss function can be found in formula ③:
[0118]
[0119] As shown in formula ③, L G Used to represent the target loss function, L s Here, α is the loss function over the target domain G, where α is a coefficient representing the influence of the teacher model on the student model and can be a hyperparameter. MHA(·) is multi-head attention, used to adjust the source-specific features of the teacher model to target-specific features, that is, to adjust the source sample features to business enhancement features, making them more suitable for the student model's learning. t ,h s These are the package characteristics of teachers and students, respectively. For example... Figure 5 As shown, the target business features can be input into the first business model 501 for prediction, resulting in a second prediction result 5032, which can be denoted as h. t2 The feature mapping module 5042 performs feature transformation on the second prediction result 5032 to obtain the source domain features (i.e., h in formula ③). t The feature mapping module 5042 can be denoted as A(·), where the parameters of the feature mapping module 5042 can be randomly initialized initially. The target business features are input into the second initial model 5052 for prediction, resulting in the second intermediate feature 5062, which can be represented by M. s (·) represents the second initial model and the second business model trained on the second initial model. The second intermediate feature 5062 can be predicted using the second function prediction module 5072 in the second initial model to obtain the third prediction result for the target business sample, which can be denoted as p. sFurthermore, a second loss function can be constructed based on the third prediction result. This second loss function is the student model's own loss function, such as the cross-entropy loss function, mean squared error loss function, or mean bias error loss function, etc. There are no restrictions here. For example, the third prediction result and the target sample labels of the target business sample can be obtained. Based on the difference data between the third prediction result and the target sample labels, the second loss function can be constructed, such as... Figure 5 As shown, a second loss function L is constructed based on the third prediction result. s .
[0120] Furthermore, the computer device can obtain the distance data between the second and third prediction results. Specifically, it can analyze the source domain features (h... t Attention mapping is performed to obtain the mapped features, as shown in formula ③. Here, B and p can be considered coefficients in power temperature scaling (PTS), which can be regarded as hyperparameters. For example, B can be set to 0.1 and p to 3. Optionally, when the optimal value of the power temperature scaling coefficient changes due to the optimization of PTS, this application can obtain new optimal values for B and p, and obtain new power temperature scaling coefficients to construct the target loss function. Where h t Used to represent source domain features. Obtain the mapped features and the second intermediate feature (h). s The distance data between the results, i.e. The model influence coefficient α is used to weight the distance data to obtain model bias data. The second loss function is then combined with the model bias data to obtain the target loss function L for the second initial model. G .
[0121] Furthermore, the computer equipment can adjust the parameters of the second initial model based on the target loss function until the parameters converge, thus obtaining the second business model. For example, Figure 5 As shown, the arrows with slashes are used to indicate that the parameters remain unchanged. That is, the parameters in the second initial model 5052, the second function prediction module, and the feature mapping module 5042 are updated. During the parameter adjustment process, the second prediction result 5032 can be considered unchanged.
[0122] The target-aware feature alignment module establishes transferable latent relationships between source and target features, rather than pursuing perfect consistency. This also prevents target-domain-related features from being ignored during training. Figure 7As shown, the input to the TAFA module is the source domain features and their nearest target domain feature cluster centers. Within the TAFA module, establishing transferable potential relationships is treated as an optimal transport (OT) problem, i.e., the process of determining the traffic transport flow. The OT distance is derived through the transport plan with the lowest cost, providing a comprehensive perspective on shape, density, and distribution differences, thus improving the accuracy and efficiency of the model processing.
[0123] In this embodiment, source business samples and target business samples are obtained. The source business samples are augmented using the target business samples to obtain business augmentation features. The business augmentation features are input into a first initial model for prediction to obtain a first prediction result for the source business samples. An initial feature distance between the source business samples and the target business samples is obtained. The parameters of the first initial model are adjusted based on the first prediction result and the initial feature distance to obtain a first business model. A second prediction result for the target business samples is predicted using the first business model. A third prediction result for the target business samples is predicted using the second initial model. The parameters of the second initial model are adjusted based on the second and third prediction results to obtain a second business model. The first business model and the second business model have the same model structure. The first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data. By directly incorporating target business samples into the source business samples, data augmentation is applied to the source business samples to improve the training of the first initial model. This enables the teacher model (i.e., the first initial model) to learn common knowledge across two domains in a teacher (i.e., source business sample)-student (i.e., target business sample) paradigm, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, the rich data augmentation inherently helps the first initial model learn more generalized features. In addition, the feature distance between the two types of business samples is introduced during the training of the first initial model to assist in its training, establishing a transferable relationship between the source and target domains. This allows the teacher model to focus on the features of the target business samples, enabling the first initial model to learn more common knowledge across the two domains. This common knowledge is then fed back into the training process of the second initial model, achieving training of models in both domains and improving the accuracy and efficiency of model processing.
[0124] This application conducted different experiments on three datasets: 1) gene expression dataset (NSCLC, abbreviated as N) to Camelyon16 (abbreviated as C), 2) RCC (abbreviated as R) to Camelyon16, 3) RCC to NSCLC, and 4) NSCLC to RCC. Area Under Curve (AUC), F1 score, and accuracy were used as the experimental metrics because these three metrics comprehensively reflect the overall performance of the model. Higher values for all three metrics are better. F1 score refers to the balanced F-score, which represents the model's precision and recall.
[0125] Table 1
[0126]
[0127] Table 1 shows the accuracy (%) comparison of our proposed solution with existing solutions on datasets such as Camelyon16(C), RCC(R), and NSCLC(N). As can be seen from Table 1, our proposed method achieves the best performance on each metric, improving AUC scores by 11.7%, 7.9%, 0.6%, and 0.7% respectively compared to previous methods. Particularly on Camelyon16, our method significantly outperforms other methods, with AUC scores greatly improved to 95.2% and 92.6%. Furthermore, due to the smaller tumor size and limited sample size, achieving better results on Camelyon16 is generally considered more difficult than on the TCGA dataset. Experimental results demonstrate that our method can effectively transfer knowledge from a simpler dataset to a more challenging one.
[0128] In addition, this application conducted an ablation study to evaluate the impact of the TADA method and the TAFA module on performance. We investigated the impact of different alignment loss functions on the final performance when using the "replacement augmentation" data augmentation method, including mean squared error (MSE), cosine similarity (cos), and OT distance. The experimental results are shown in Table 2. When the "replacement augmentation" method was introduced into the teacher model training, the AUC score improved by 1.10%. Using MSE, cos, and OT, the AUC score further improved by 1.00%, 1.10%, and 2.00%, respectively, demonstrating the effectiveness of the OT distance. See Table 2 for details.
[0129] Table 2
[0130] method AUC↑ F1↑ Acc↑ Unenhanced 0.921 0.855 0.871 +R 0.932 0.862 0.873 +R, MSE 0.942 0.861 0.873 +R, cos 0.943 0.877 0.889 +R, OT 0.952 0.896 0.904
[0131] Table 2 shows the results of various indicators of the proposed solution and their growth rates relative to the prior art when using the replacement enhancement method and combining loss functions such as MSE, cosine, and OT. Table 3 shows...
[0132] Table 3
[0133] method AUC↑ F1↑ Acc↑ +A, OT 0.939 0.885 0.897 +R, OT 0.952 0.896 0.904 +I,OT 0.933 0.854 0.871 +C, OT 0.931 0.854 0.868 +J, OT 0.941 0.865 0.876
[0134] Table 3 shows the performance indicators for different data augmentation methods used in this application. Here, A represents append augmentation, R represents replace augmentation, I represents interpolate augmentation, C represents covariant augmentation, and J represents joint augmentation. Joint augmentation refers to using multiple data augmentation methods simultaneously to augment the source business sample.
[0135] Further, please see Figure 8 , Figure 8 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application. The data processing apparatus can be a computer program (including program code, etc.) running on a computer device; for example, the data processing apparatus can be application software. The apparatus can be used to execute corresponding steps in the methods provided in the embodiments of this application. Figure 8 As shown, the data processing device 800 can be used for Figure 4 Specifically, the computer device in the corresponding embodiment may include: a sample processing module 11, a first training module 12, and a second training module 13.
[0136] Sample processing module 11 is used to acquire source business samples and target business samples, and to perform data augmentation on source business samples using target business samples to obtain business augmentation features;
[0137] The first training module 12 is used to input business enhancement features into the first initial model for prediction, obtain the first prediction result of the source business sample, obtain the initial feature distance between the source business sample and the target business sample according to the first initial model, and adjust the parameters of the first initial model according to the first prediction result and the initial feature distance to obtain the first business model.
[0138] The second training module 13 is used to predict the second prediction result of the target business sample through the first business model, predict the third prediction result of the target business sample through the second initial model, and adjust the parameters of the second initial model according to the second prediction result and the third prediction result to obtain the second business model. The first business model and the second business model have the same model structure. The first business model is used to perform the first task processing on the business data, and the second business model is used to perform the second task processing on the business data.
[0139] Specifically, when using the target business sample to perform data augmentation on the source business sample to obtain business augmentation features, the sample processing module 11 is used for:
[0140] The source business sample is split into N first sample blocks, and the source block features corresponding to the N first sample blocks are obtained respectively; N is a positive integer.
[0141] The target business sample is divided into M second sample blocks, and the target block features corresponding to the M second sample blocks are obtained respectively; M is a positive integer.
[0142] Clustering is performed on the features of M target blocks to obtain cluster center features;
[0143] Data augmentation is performed on the features of N source blocks using cluster center features to obtain business-enhanced features.
[0144] Specifically, when using cluster center features to augment the features of N source blocks to obtain business enhancement features, the sample processing module 11 is used for:
[0145] Obtain A data augmentation methods, and use each of the A methods to insert the cluster center features into N source block features, resulting in A initial augmented features. Integrate these A initial augmented features to obtain the business augmented features; A is a positive integer; or...
[0146] Obtain the business distribution information of N source block features, determine the target data augmentation method based on the business distribution information and N, and insert the cluster center feature into the N source block features using the target data augmentation method to obtain the business augmentation feature.
[0147] Specifically, when using cluster center features to augment the features of N source blocks to obtain business enhancement features, the sample processing module 11 is used for:
[0148] Based on the feature distance between the cluster center feature and the i-th source block feature, the cluster center feature with the smallest feature distance is determined as the neighboring target block feature of the i-th source block feature; i is a positive integer less than or equal to N;
[0149] The data augmentation of the i-th source block feature is performed using the neighboring target block features of the i-th source block feature, until the data augmentation of N source block features is completed, thus obtaining the business augmentation feature.
[0150] Specifically, when performing data augmentation on the i-th source block feature using the neighboring target block features of the i-th source block feature, the sample processing module 111 is used for:
[0151] Obtain the sample influence probability, and determine the enhancement state of the i-th source block feature based on the sample influence probability;
[0152] If the enhancement state is the first enhancement state, then the neighboring target block features of the i-th source block feature are used to perform data augmentation on the i-th source block feature;
[0153] If the enhancement state is the second enhancement state, then the enhancement state of the (i+1)th source block feature is determined based on the sample influence probability.
[0154] Specifically, when using cluster center features to augment the features of N source blocks to obtain business enhancement features, the sample processing module 11 is used for:
[0155] Obtain the neighboring target block features corresponding to each of the N source block features, and add the N neighboring target block features to the N source block features to obtain the business enhancement features; or...
[0156] Obtain the neighboring target block features corresponding to each of the N source block features, and determine the N neighboring target block features as service enhancement features; or...
[0157] Obtain feature balance parameters, and based on these parameters, perform a weighted summation of the features of each source block and its corresponding neighboring target blocks to obtain the business enhancement features; or...
[0158] Obtain the neighboring target block features corresponding to N source block features, construct the feature distribution model of the neighboring target block features corresponding to N source block features, determine the feature offset value corresponding to N source block features based on the N feature distribution model, and add the feature offset value corresponding to each source block feature to obtain the business enhancement feature.
[0159] Specifically, when obtaining the initial feature distance between the source business sample and the target business sample based on the first initial model, the first training module 12 is used for:
[0160] Obtain the source sample features of the source business sample, and obtain the target sample features of the target business sample;
[0161] The source sample features are input into the first initial model for prediction to obtain the source intermediate features, and the target sample features are input into the first initial model for prediction to obtain the target intermediate features.
[0162] A distance constraint model is constructed based on the intermediate features of the source and the intermediate features of the target. The distance constraint model is then analyzed to determine the service transmission flow between the source service sample and the target service sample.
[0163] Based on the service transmission flow, determine the initial feature distance between the source service sample and the target service sample.
[0164] Specifically, when constructing a distance constraint model based on source intermediate features and target intermediate features, analyzing the distance constraint model, and determining the service transmission flow between the source service sample and the target service sample, the first training module 12 is used for:
[0165] Obtain the feature element distance between the source intermediate feature and the target intermediate feature, and determine the distance parameter term by the inner product of the transmission flow parameter and the feature element distance;
[0166] Obtain the feature dimensions of the source intermediate features and the target intermediate features, and construct the first distance parameter and the second distance parameter based on the feature dimensions;
[0167] Based on the transport stream parameters, the first distance parameter, and the second distance parameter, a regularization term is constructed;
[0168] Combine the distance parameter term with the regularization term to form a distance-constrained model;
[0169] The distance constraint model is analyzed to determine the parameter data of the transmission flow when the result of the distance constraint model is minimized. The parameter data is then used to define the service transmission flow between the source service sample and the target service sample.
[0170] Specifically, when adjusting the parameters of the first initial model based on the first prediction result and the initial feature distance to obtain the first business model, the first training module 12 is used for:
[0171] Based on the first prediction result, a first loss function is constructed, the model transfer coefficient is obtained, and distance offset data is constructed based on the model transfer coefficient and the initial feature distance.
[0172] The first loss function is combined with the distance offset data to obtain the source loss function for the first initial model;
[0173] The parameters of the first initial model are adjusted based on the source loss function until the parameters converge, thus obtaining the first business model.
[0174] Specifically, when adjusting the parameters of the second initial model based on the second and third prediction results to obtain the second business model, the second training module 13 is used for:
[0175] A second loss function is constructed based on the third prediction result;
[0176] Obtain the distance data between the second and third prediction results, perform attention processing on the distance data, and obtain the model bias data.
[0177] The second loss function is combined with the model bias data to obtain the target loss function for the second initial model;
[0178] The parameters of the second initial model are adjusted based on the objective loss function until the parameters converge, thus obtaining the second business model.
[0179] Specifically, when acquiring source business samples and target business samples, the sample processing module 11 is used for:
[0180] Obtain a first business sample and a second business sample; determine the business sample with the largest number of occurrences between the first and second business samples as the source business sample; and determine the business sample with the smallest number of occurrences between the first and second business samples as the target business sample; or...
[0181] Obtain the first data processing task indicated by the first business sample and the second data processing task indicated by the second business sample. Determine the business sample corresponding to the data processing task with the larger task scope between the first and second data processing tasks as the source business sample, and determine the business sample corresponding to the data processing task with the smaller task scope between the first and second data processing tasks as the target business sample.
[0182] The device 800 also includes:
[0183] The request response module 14 is used to respond to the model acquisition request for the second data processing task and determine the business sample corresponding to the second data processing task as the target business sample.
[0184] The request parsing module 15 is used to obtain the second initial model indicated by the model acquisition request, obtain the model structure of the second initial model, and the task type of the second data processing task;
[0185] The source determination module 16 is used to determine the model with model structure corresponding to the task type as the first initial model.
[0186] This application provides a data processing apparatus that can acquire source business samples and target business samples, perform data augmentation on the source business samples using the target business samples to obtain business augmentation features, input the business augmentation features into a first initial model for prediction to obtain a first prediction result for the source business samples, obtain an initial feature distance between the source business samples and the target business samples, adjust the parameters of the first initial model based on the first prediction result and the initial feature distance to obtain a first business model, predict a second prediction result for the target business samples using the first business model, predict a third prediction result for the target business samples using a second initial model, and adjust the parameters of the second initial model based on the second and third prediction results to obtain a second business model. The first business model and the second business model have the same model structure, the first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data. By directly incorporating target business samples into the source business samples, data augmentation is applied to the source business samples to improve the training of the first initial model. This enables the teacher model (i.e., the first initial model) to learn common knowledge across two domains in a teacher (i.e., source business sample)-student (i.e., target business sample) paradigm, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, the rich data augmentation inherently helps the first initial model learn more generalized features. In addition, the feature distance between the two types of business samples is introduced during the training of the first initial model to assist in its training, establishing a transferable relationship between the source and target domains. This allows the teacher model to focus on the features of the target business samples, enabling the first initial model to learn more common knowledge across the two domains. This common knowledge is then fed back into the training process of the second initial model, achieving training of models in both domains and improving the accuracy and efficiency of model processing.
[0187] See Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 9 As shown, the computer device in this embodiment may include one or more processors 901, a memory 902, and an input / output interface 903. The processor 901, memory 902, and input / output interface 903 are connected via a bus 904. The memory 902 stores a computer program, which includes program instructions. The input / output interface 903 receives and outputs data, such as for data interaction between the computer device and a business device. The processor 901 executes the program instructions stored in the memory 902.
[0188] The processor 901 can perform the following operations:
[0189] Obtain source business samples and target business samples, and use the target business samples to perform data augmentation on the source business samples to obtain business augmentation features;
[0190] The business enhancement features are input into the first initial model for prediction to obtain the first prediction result of the source business sample. The initial feature distance between the source business sample and the target business sample is obtained according to the first initial model. The parameters of the first initial model are adjusted according to the first prediction result and the initial feature distance to obtain the first business model.
[0191] The second prediction result of the target business sample is predicted by the first business model, and the third prediction result of the target business sample is predicted by the second initial model. The parameters of the second initial model are adjusted according to the second and third prediction results to obtain the second business model. The first business model and the second business model have the same model structure. The first business model is used to perform the first task processing on the business data, and the second business model is used to perform the second task processing on the business data.
[0192] In some feasible implementations, the processor 901 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0193] The memory 902 may include read-only memory and random access memory, and provides instructions and data to the processor 901 and the input / output interface 903. A portion of the memory 902 may also include non-volatile random access memory. For example, the memory 902 may also store device type information.
[0194] In practice, the computer device can perform actions such as these through its built-in functional modules. Figure 4 For details on the implementation methods provided for each step, please refer to [the relevant documentation / document / etc.]. Figure 4 The implementation methods provided for each step are not elaborated here.
[0195] This application provides a computer device including a processor, an input / output interface, and a memory. The processor retrieves a computer program from the memory and executes it. Figure 4Each step of the method shown involves data processing operations. This embodiment of the application acquires source business samples and target business samples; uses the target business samples to augment the source business samples, obtaining business augmentation features; inputs the business augmentation features into a first initial model for prediction, obtaining a first prediction result for the source business samples; obtains an initial feature distance between the source and target business samples based on the first initial model; adjusts the parameters of the first initial model based on the first prediction result and the initial feature distance, obtaining a first business model; predicts a second prediction result for the target business samples using the first business model; predicts a third prediction result for the target business samples using the second initial model; adjusts the parameters of the second initial model based on the second and third prediction results, obtaining a second business model; the first and second business models have the same model structure, with the first business model used for a first task of processing business data and the second business model used for a second task of processing business data. By directly incorporating target business samples into the source business samples, data augmentation is applied to the source business samples to improve the training of the first initial model. This enables the teacher model (i.e., the first initial model) to learn common knowledge across two domains in a teacher (i.e., source business sample)-student (i.e., target business sample) paradigm, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, the rich data augmentation inherently helps the first initial model learn more generalized features. In addition, the feature distance between the two types of business samples is introduced during the training of the first initial model to assist in its training, establishing a transferable relationship between the source and target domains. This allows the teacher model to focus on the features of the target business samples, enabling the first initial model to learn more common knowledge across the two domains. This common knowledge is then fed back into the training process of the second initial model, achieving training of models in both domains and improving the accuracy and efficiency of model processing.
[0196] This application also provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor. Figure 4 For details on the data processing methods provided in each step, please refer to the document. Figure 4 The implementation methods provided for each step are not repeated here. Furthermore, the beneficial effects of using the same method are also not repeated. For technical details not disclosed in the computer-readable storage medium embodiments involved in this application, please refer to the description of the method embodiments of this application. As an example, a computer program may be deployed to execute on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network.
[0197] The computer-readable storage medium can be the data processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0198] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform... Figure 4 The methods provided among the various options enable the direct introduction of target business samples into the source business samples, performing data augmentation on the source business samples to improve the training of the first initial model. This allows the teacher model (i.e., the first initial model) to learn common knowledge across two domains in a teacher (i.e., source business sample)-student (i.e., target business sample) paradigm, thereby enhancing the transferability of learned knowledge from the source domain to the target domain. Furthermore, the rich data augmentation inherently helps the first initial model learn more generalized features. In addition, the feature distance between the two types of business samples is introduced during the training of the first initial model to assist in its training, establishing a transferable relationship between the source and target domains. This allows the teacher model to focus on the features of the target business samples, enabling the first initial model to learn more common knowledge across the two domains. This common knowledge is then fed back into the training process of the second initial model, achieving training of models in both domains and improving the accuracy and efficiency of model processing.
[0199] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0200] 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.
[0201] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0202] The methods and related apparatus provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
[0203] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0204] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0205] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: Obtain source business samples and target business samples, and use the target business samples to perform data augmentation on the source business samples to obtain business enhancement features; The business enhancement features are input into the first initial model for prediction to obtain the first prediction result of the source business sample. The initial feature distance between the source business sample and the target business sample is obtained through the first initial model. The parameters of the first initial model are adjusted according to the first prediction result and the initial feature distance to obtain the first business model. The first business model predicts a second prediction result for the target business sample, and the second initial model predicts a third prediction result for the target business sample. Based on the second and third prediction results, the parameters of the second initial model are adjusted to obtain a second business model. The first business model and the second business model have the same model structure. The first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data.
2. The method as described in claim 1, characterized in that, The step of using the target service sample to perform data augmentation on the source service sample to obtain service enhancement features includes: The source service sample is divided into N first sample blocks, and the source block features corresponding to the N first sample blocks are obtained respectively; N is a positive integer; The target business sample is divided into M second sample blocks, and the target block features corresponding to the M second sample blocks are obtained respectively; M is a positive integer; Clustering is performed on the features of M target blocks to obtain cluster center features; The cluster center features are used to augment the features of N source blocks to obtain business enhancement features.
3. The method as described in claim 2, characterized in that, The process of using the cluster center features to augment the features of N source blocks to obtain business-enhanced features includes: Obtain A data augmentation methods, and insert the cluster center features into the N source block features using the A data augmentation methods respectively to obtain A initial augmented features. Integrate the A initial augmented features to obtain the business augmented features; A is a positive integer; or... Obtain the service distribution information of N source block features, determine the target data augmentation method based on the service distribution information and N, and insert the cluster center feature into the N source block features using the target data augmentation method to obtain the service augmentation feature.
4. The method as described in claim 2, characterized in that, The process of using the cluster center features to augment the features of N source blocks to obtain business-enhanced features includes: The cluster center feature with the smallest feature distance between the cluster center feature and the i-th source block feature is determined as the neighboring target block feature of the i-th source block feature; i is a positive integer less than or equal to N; The data augmentation of the i-th source block feature is performed using the neighboring target block features of the i-th source block feature until the data augmentation of the N source block features is completed, thus obtaining the service augmentation feature.
5. The method as described in claim 4, characterized in that, The step of using the neighboring target block features of the i-th source block feature to perform data augmentation on the i-th source block feature includes: Obtain the sample influence probability, and determine the enhancement state of the i-th source block feature based on the sample influence probability; If the enhancement state is the first enhancement state, then the neighboring target block features of the i-th source block feature are used to perform data enhancement on the i-th source block feature; If the enhancement state is the second enhancement state, then the enhancement state for the (i+1)th source block feature is determined based on the sample influence probability.
6. The method as described in claim 2, characterized in that, The process of using the cluster center features to augment the features of N source blocks to obtain business-enhanced features includes: Obtain the neighboring target block features corresponding to the N source block features respectively, and add the N neighboring target block features to the N source block features to obtain the service enhancement features; or... Obtain the neighboring target block features corresponding to the N source block features respectively, and determine the N neighboring target block features as service enhancement features; or, Obtain feature balance parameters, and based on these parameters, perform a weighted summation of the features of each source block and its corresponding neighboring target blocks to obtain service enhancement features; or... Obtain the neighboring target block features corresponding to the N source block features respectively, construct the feature distribution model of the neighboring target block features corresponding to the N source block features respectively, determine the feature offset value corresponding to the N source block features based on the N feature distribution model, and add the feature offset value corresponding to each source block feature to obtain the service enhancement feature.
7. The method as described in claim 1, characterized in that, The step of obtaining the initial feature distance between the source business sample and the target business sample through the first initial model includes: Obtain the source sample features of the source business sample, and obtain the target sample features of the target business sample; The source sample features are input into the first initial model for prediction to obtain source intermediate features, and the target sample features are input into the first initial model for prediction to obtain target intermediate features; A distance constraint model is constructed based on the source intermediate features and the target intermediate features. The distance constraint model is then analyzed to determine the service transmission flow between the source service sample and the target service sample. Based on the service transmission flow, determine the initial feature distance between the source service sample and the target service sample.
8. The method as described in claim 7, characterized in that, The step of constructing a distance constraint model based on the source intermediate features and the target intermediate features, parsing the distance constraint model, and determining the service transmission flow between the source service sample and the target service sample includes: Obtain the feature element distance between the source intermediate feature and the target intermediate feature, and determine the distance parameter term by the inner product of the transmission flow parameter and the feature element distance; Obtain the feature dimensions of the source intermediate feature and the target intermediate feature, and construct a first distance parameter and a second distance parameter based on the feature dimensions; A regularization term is constructed based on the transport stream parameters, the first distance parameter, and the second distance parameter; The distance parameter term and the regularization term are combined to form a distance constraint model; The distance constraint model is analyzed to determine the parameter data of the transmission flow parameters when the result of the distance constraint model is minimized. The parameter data is then determined as the service transmission flow between the source service sample and the target service sample.
9. The method as described in claim 1, characterized in that, The step of adjusting the parameters of the first initial model based on the first prediction result and the initial feature distance to obtain the first business model includes: A first loss function is constructed based on the first prediction result, model transfer coefficients are obtained, and distance offset data is constructed based on the model transfer coefficients and the initial feature distance. The first loss function is combined with the distance offset data to obtain the source loss function for the first initial model; The parameters of the first initial model are adjusted based on the source loss function until the parameters converge to obtain the first business model.
10. The method as described in claim 1, characterized in that, The step of adjusting the parameters of the second initial model based on the second prediction result and the third prediction result to obtain the second business model includes: A second loss function is constructed based on the third prediction result; Obtain the result distance data between the second prediction result and the third prediction result, and perform attention processing on the result distance data to obtain model bias data; The second loss function is combined with the model bias data to obtain the target loss function for the second initial model; The parameters of the second initial model are adjusted based on the target loss function until the parameters converge to obtain the second business model.
11. The method as described in claim 1, characterized in that, The acquisition of source service samples and target service samples includes: Obtain a first business sample and a second business sample; determine the business sample with the largest number of occurrences between the first and second business samples as the source business sample; and determine the business sample with the smallest number of occurrences between the first and second business samples as the target business sample; or... Obtain the first data processing task indicated by the first business sample and the second data processing task indicated by the second business sample. Determine the business sample corresponding to the data processing task with the larger task scope between the first data processing task and the second data processing task as the source business sample, and determine the business sample corresponding to the data processing task with the smaller task scope between the first data processing task and the second data processing task as the target business sample.
12. The method as described in claim 1, characterized in that, The method further includes: In response to the model acquisition request for the second data processing task, the business sample corresponding to the second data processing task is determined as the target business sample; Obtain the second initial model indicated by the model acquisition request, obtain the model structure of the second initial model, and the task type of the second data processing task; The model with the specified model structure corresponding to the task type is determined as the first initial model.
13. A data processing apparatus, characterized in that, The device includes: The sample processing module is used to acquire source business samples and target business samples, and to perform data augmentation on the source business samples using the target business samples to obtain business enhancement features. The first training module is used to input the business enhancement features into the first initial model for prediction, obtain the first prediction result of the source business sample, obtain the initial feature distance between the source business sample and the target business sample through the first initial model, and adjust the parameters of the first initial model according to the first prediction result and the initial feature distance to obtain the first business model. The second training module is used to predict a second prediction result of the target business sample using the first business model, predict a third prediction result of the target business sample using the second initial model, and adjust the parameters of the second initial model based on the second prediction result and the third prediction result to obtain a second business model; the first business model and the second business model have the same model structure, the first business model is used to perform a first task processing on the business data, and the second business model is used to perform a second task processing on the business data.
14. A computer device, characterized in that, Includes processor, memory, and input / output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive data and output data, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method according to any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-12.
16. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-12.
Citation Information
Cited By
Scheduling method and device
CN115730777A
Scheduling method and apparatus
CN115730777B