AI model iterative update method and system
By dynamically adjusting the sample data type, quantity and feature pruning method, the iterative update efficiency of AI models is improved, and the problem of low efficiency of AI model update optimization in the existing technology is solved, and more efficient model training and better Generalization ability.
Patent Information
- Application Number
- CN202411487045.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The existing AI model iterative update methods are inefficient and difficult to meet production needs, especially when processing complex and diverse data.
By obtaining and classifying the sample data set, calculating the historical grade points of the task model, matching the learning strategy to collect sample data to generate training data, and pruning according to the feature score during the training process, dynamically adjusting the sample data type and quantity to improve Training efficiency.
It improves the iterative update efficiency of AI models, reduces the computational volume and memory consumption, and enhances the generalization ability and adaptability of the model.
Smart Images

Figure CN119005364B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model iteration technology, and in particular to an AI model iterative update method and system. Background Art
[0002] The AI model is a system that can simulate human intelligent behavior through computer algorithms and data training. It uses technologies such as machine learning to input known data into the computer for training, and finally generates a system that can automatically complete specific tasks. The AI model can process a large amount of data, usually with tens of billions or even trillions of parameters, and can handle complex tasks. In order to ensure the accuracy of the AI model, the model needs to be continuously optimized to adapt to changes in the environment.
[0003] The existing iterative update method of AI models can improve model accuracy to a certain extent by collecting a large number of samples to train and test or improve the model. However, due to the large scale of AI models, the complexity and diversity of the data to be identified, and the need to train multiple models of different systems, the efficiency of AI model update optimization is low and it is difficult to meet production needs. Summary of the invention
[0004] The present invention provides an AI model iterative update method and system to solve the problem of low efficiency of existing AI model iterative update.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides an AI model iterative update method, comprising:
[0006] Obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; obtain the historical performance points of the task model, match the learning strategy according to the historical performance points, and collect sample data according to the learning strategy to generate training data;
[0007] Training each task model according to a preset training cycle and the training data, and updating the parameters of each task model; and in each training cycle, calculating the feature score of each task model during the training process, and pruning the task model according to the feature score; until the preset conditions are met, obtaining the updated task model;
[0008] Randomly sample various types of sample data to generate verification data for each task model, and verify the updated task model based on the verification data;
[0009] The gradient information of the task model is calculated, and the global parameters of the AI model are updated according to the gradient information to obtain the final AI model.
[0010] The present invention calculates the historical performance points of the task model according to the model performance, and then matches the learning strategy according to the historical performance points of each task model to perform sampling training in the sample data with different learning strategies, so that the task model training process can dynamically adjust the type and quantity of sample data to avoid the problem of increased training complexity due to a large amount of sample data and low model iteration efficiency due to redundant samples; in addition, during the training process, each task model is pruned according to the feature score to reduce the computational complexity and memory consumption of model training; dynamic sampling is combined with dynamic pruning to dynamically train each task model in the AI model to further improve the iteration efficiency of the AI model.
[0011] Furthermore, the acquisition of the historical performance points of the task model, matching the learning strategy according to the historical performance points, and collecting sample data according to the learning strategy to generate training data are specifically as follows:
[0012] Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator;
[0013] Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model;
[0014] A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
[0015] Furthermore, the matching learning strategy according to the historical GPA and collecting sample data from the sample data according to the learning strategy to generate training data are specifically as follows:
[0016] When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data;
[0017] When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data;
[0018] When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data.
[0019] Furthermore, in each training cycle, the feature score of the task model in the training process is calculated, and the task model is pruned according to the feature score, specifically:
[0020] Matching a feature calculation strategy according to a structural type of the task model, and calculating a feature score of each feature in the task model according to the feature calculation strategy;
[0021] The features are sorted according to the feature scores, feature pruning is performed according to a preset pruning strategy, and the weight coefficients of the features for the next training cycle are adjusted.
[0022] Furthermore, the feature calculation strategy is matched according to the structural type of the task model, and the feature score of each feature in the task model is calculated according to the feature calculation strategy, specifically:
[0023] Matching a feature calculation strategy according to the structural type of the task model, and adjusting a weight coefficient of a feature score according to the feature calculation strategy; the feature calculation strategy includes information calculation and coefficient calculation;
[0024] According to the weight coefficient and the feature score calculation formula, the feature score calculation formula is specifically:
[0025] ;
[0026] in, is the weight coefficient, and ; Information calculation value, Calculate values for the coefficients.
[0027] Furthermore, the gradient information of the computing task model is calculated, and the global parameters of the AI model are updated according to the gradient information to obtain the final AI model, specifically:
[0028] Calculating the loss value of the task model according to the verification data, and calculating the gradient information of the task model and the global gradient information of the AI model according to the loss value;
[0029] The global parameters of the AI model are updated according to the preset learning rate and the global gradient information until the preset patience value is reached, and the updating is stopped to obtain the final AI model.
[0030] Furthermore, the loss value of the task model is calculated according to the verification data, specifically:
[0031] The verification data is input into the updated task model, and the loss value of the task model is calculated according to the multi-fusion loss function, which is specifically:
[0032] ;
[0033] in, For the task model, is the binary cross entropy loss is the hinge loss, is the log cosine function, is the mean absolute error function, , , and is the weight coefficient.
[0034] In a second aspect, the present invention provides an AI model iterative update system, including: a learning strategy matching module, a model training module, a verification module and a global update module;
[0035] The learning strategy matching module is used to obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; obtain the historical performance points of the task model, match the learning strategy according to the historical performance points, and collect sample data according to the learning strategy to generate training data;
[0036] The model training model is used to train each task model according to a preset training cycle and the training data, and update the parameters of each task model; and in each training cycle, calculate the feature score of each task model in the training process, and prune the task model according to the feature score; until the preset conditions are met, the updated task model is obtained;
[0037] The verification module is used to randomly sample various types of sample data to generate verification data for each task model, and verify the updated task model based on the verification data;
[0038] The global update module is used to calculate the gradient information of the task model and update the global parameters of the AI model according to the gradient information to obtain the final AI model.
[0039] Furthermore, the learning strategy matching module is specifically used to:
[0040] Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator;
[0041] Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model;
[0042] A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
[0043] Furthermore, the learning strategy matching module is specifically used to:
[0044] When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data;
[0045] When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data;
[0046] When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart of an AI model iterative update method provided by an embodiment of the present invention;
[0048] Figure 2 A structural diagram of an AI model iterative update system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0050] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] Embodiment 1
[0053] Please refer to Figure 1 , Figure 1 A flowchart of an AI model iterative update method provided by an embodiment of the present invention. An AI model iterative update method is provided in an embodiment of the present invention, comprising steps 101 to 104, which are as follows:
[0054] Step 101: Obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; calculate the historical performance points of the task model according to the model performance, match the learning strategy according to the historical performance points, and collect sample data according to the learning strategy to generate training data;
[0055] In this embodiment, after obtaining a large amount of sample data, a sample data set is constructed, and the sample data is classified according to the data type of the sample data, and the data type includes character data, numerical data, image data, audio data, etc. Different preprocessing operations are performed on the sample data according to the data type and task type, and the preprocessing operations include data cleaning, data transformation, feature encoding and feature selection, etc. For example, if the data type is numerical data, the numerical data needs to be cleaned to remove missing values and abnormal values in the sample data. If the data type is image data, the image needs to be data enhanced and normalized.
[0056] In this embodiment, after the sample data is classified, different task models are matched according to different categories of sample data. The task model is a substructure model in the AI model, which is used to process specific tasks or extract features from specific data.
[0057] In this embodiment, the historical performance points of the task model are calculated according to the model performance, the learning strategy is matched according to the historical performance points, and the sample data is collected according to the learning strategy to generate training data, specifically:
[0058] Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator;
[0059] Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model;
[0060] A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
[0061] In this embodiment, since the types of task models in the AI model are different, it is necessary to determine the evaluation indicators of the task model according to the model type; wherein the task types include classification tasks, regression tasks, and sorting tasks, etc. For classification tasks, the evaluation indicators include model accuracy, model precision, model recall, F1 score, confusion matrix ROC curve, and AUC curve, etc. For regression tasks, the evaluation indicators include mean square error, mean absolute error, and determination coefficient, etc. For sorting tasks, the evaluation indicators include average Kyoto mean and normalized discounted cumulative gain, etc.
[0062] In an optional embodiment, the task of a task model is to determine whether an email is spam, and its evaluation indicators include accuracy, precision and call rate. The indicator score of each indicator is obtained, and a weighted calculation is performed based on a preset indicator coefficient to obtain the historical performance points of each task model.
[0063] In this embodiment, the matching learning strategy according to the historical GPA and collecting sample data from the sample data according to the learning strategy to generate training data are specifically as follows:
[0064] When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data;
[0065] When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data;
[0066] When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data.
[0067] In this embodiment, the performance of the task model is evaluated according to the historical performance points of the task model, and sampling is performed according to the historical performance point matching learning strategy.
[0068] In this embodiment, the model grades are graded in advance, and two benchmark values are preset, namely, a first benchmark grade and a second benchmark grade. When the historical grade of the task model is greater than the first benchmark grade, the task model has excellent performance, so it is matched with random sampling learning, thereby reducing the number of samples and avoiding low model iteration efficiency due to a large number of samples; when the historical grade of the task model is less than or equal to the first benchmark grade and greater than the preset second benchmark grade, the task model has average performance, so it is matched with dynamic sampling learning, and the data samples are dynamically adjusted according to the performance of the task performance for different samples, so that the character model can be adequately trained on samples with poor performance; when the historical grade of the task model is less than or equal to the second benchmark grade, the performance of the character model is poor, so it is matched with updated sampling learning, the original model parameters are reset, and data expansion is performed on the original sample data to generate a sufficient number of sample data for training, thereby improving the feature extraction capability of the task model.
[0069] In this embodiment, the random sampling learning includes simple random sampling and stratified sampling. Different random sampling methods can be selected according to different task types. For example, when the task type is a classification task, the random sampling learning is stratified sampling, and sample data is randomly selected from the sample data of each category to generate training data.
[0070] In this embodiment, in the dynamic sampling learning, a resampling cycle is preset. In the first resampling cycle, sample data is randomly collected from the sample data for training, and the performance scores of the model in each category of samples are calculated. The scores are selected according to the performance scores to adjust the number of samples in each category to generate training data.
[0071] In this embodiment, in the update learning, due to the poor performance of the model, the model parameters of the original task model are reset, and it is trained according to the sample data to update the model parameters; the sample data is expanded to generate an expanded sample set as training data.
[0072] Step 102: Train each task model according to a preset training cycle and the training data, and update the parameters of each task model; and in each training cycle, calculate the feature score of each task model in the training process, and prune the task model according to the feature score; until the preset conditions are met, obtain the updated task model;
[0073] In this embodiment, the training cycle and the number of cycles are preset, and training is performed based on the training data collected from each task model.
[0074] In this embodiment, in each training cycle, the feature score of the task model in the training process is calculated, and the task model is pruned according to the feature score, specifically:
[0075] Matching a feature calculation strategy according to a structural type of the task model, and calculating a feature score of each feature in the task model according to the feature calculation strategy;
[0076] The features are sorted according to the feature scores, feature pruning is performed according to a preset pruning strategy, and the weight coefficients of the features for the next training cycle are adjusted.
[0077] In this embodiment, the feature calculation strategy is matched according to the structure type of the task model, and the feature score of each feature in the task model is calculated according to the feature calculation strategy, specifically:
[0078] Matching a feature calculation strategy according to the structural type of the task model, and adjusting a weight coefficient of a feature score according to the feature calculation strategy; the feature calculation strategy includes information calculation and coefficient calculation;
[0079] According to the weight coefficient and the feature score calculation formula, the feature score calculation formula is specifically:
[0080] (1);
[0081] in, is the weight coefficient, and ; Information calculation value, Calculate values for the coefficients.
[0082] In this embodiment, the feature calculation strategy includes information calculation and coefficient calculation.
[0083] In this embodiment, if the task model is a classification task or a regression task, then Set to 1, Set to 0, the information calculation value Specifically:
[0084] (2);
[0085] (3);
[0086] (4);
[0087] (5);
[0088] (6);
[0089] in, is the mutual information of feature x, x is the feature, y is the target variable, is the joint probability density function, is the marginal probability density function; H is the information gain of the feature, is the entropy of the discrete random variable Y, Target variable Y value The probability of Take the value of feature X probability.
[0090] In this embodiment, the feature calculation strategy is information calculation to calculate the feature score of each feature in the task model based on information gain and mutual information. The information gain is the reduction in uncertainty of the feature to the target variable, and the mutual information is the mutual dependence between the feature and the target variable.
[0091] In this embodiment, if the task model is a sorting task, the feature calculation strategy is coefficient calculation, and the feature score of each feature in the task model is calculated according to the feature normalization score and feature contribution. Set to 0, Set to 1,
[0092] (7);
[0093] (8);
[0094] in, is the feature normalization score, is the feature contribution score, is the characteristic value, is the standard deviation of the eigenvalues, is a normal distribution.
[0095] In this embodiment, Calculated according to the structure type, for linear models, the is the absolute value of the coefficient of the feature. For the tree model, Features The sum of the split contributions in all numbers.
[0096] In an optional embodiment, when the structural type of the task model is a decision tree, the information gain of the child nodes of each feature and the Gini index of the parent node can be calculated according to the decision tree, so as to calculate the feature score according to the information gain and the Gini index.
[0097] In this embodiment, each feature is sorted according to the task model, and the weight coefficients of some features with lower sorting are set to 0 according to a preset pruning threshold for pruning, and the weight coefficients of each feature are adjusted according to the feature sorting, wherein the higher the sorting, the greater the weight coefficient.
[0098] In this embodiment, after the next training cycle is completed, the performance of the model is evaluated based on the model accuracy. If the model performance does not reach the preset target or decreases, the pruning threshold is adjusted to avoid excessive pruning that damages the effectiveness of the model.
[0099] In this embodiment, the model is simplified by pruning to remove overfitting of the training data, thereby improving the model's prediction ability for new data, reducing feature branches with lower contributions, making the model more generalizable, and at the same time reducing the memory occupied by the model.
[0100] Step 103: randomly sampling various types of sample data to generate verification data for each task model, and verifying the updated task model according to the verification data;
[0101] In this embodiment, after completing the training of each task model, random sampling is performed on various types of sample data to generate verification data for each task model, thereby performing performance evaluation on the task model.
[0102] Step 104: Calculate the gradient information of the task model, and update the global parameters of the AI model according to the gradient information to obtain the final AI model.
[0103] In this embodiment, the gradient information of the computing task model is updated according to the gradient information to obtain the final AI model, specifically:
[0104] Calculating the loss value of the task model according to the verification data, and calculating the gradient information of the task model and the global gradient information of the AI model according to the loss value;
[0105] The global parameters of the AI model are updated according to the preset learning rate and the global gradient information until the preset patience value is reached, and the updating is stopped to obtain the final AI model.
[0106] In this embodiment, the loss value of the task model is calculated according to the verification data, specifically:
[0107] The verification data is input into the updated task model, and the loss value of the task model is calculated according to the multi-fusion loss function, which is specifically:
[0108] (9);
[0109] in, For the task model, is the binary cross entropy loss is the hinge loss, is the log cosine function, is the mean absolute error function, , , and is the weight coefficient.
[0110] In this embodiment, + + =1, when the task model is a binary classification task, the weight coefficient + ,and and is 0, when the task model is a regression task, the =1, and Both are 0.
[0111] In this embodiment, the binary cross loss function is specifically:
[0112] (10);
[0113] in, is the number of samples in the validation data, Predict the probability of the sample.
[0114] In this embodiment, the hinge loss function is specifically:
[0115] (11);
[0116] in, is the number of samples in the validation data, Predict the probability of the sample.
[0117] In this embodiment, the mean absolute error function is specifically:
[0118] (12);
[0119] in, is the number of samples in the validation data, Predict the probability of the sample.
[0120] In this embodiment, the logarithmic cosine function is specifically:
[0121] (13);
[0122] in, is the number of samples in the validation data, Predict the probability of the sample.
[0123] In this embodiment, the loss value of the task model for the verification data is calculated, and the gradient information of each task model is calculated respectively. The global gradient information of the AI model is calculated based on the gradient information, i.e., the total number of task models. The global parameters of the AI model are adjusted based on the global gradient information and the preset global learning rate until the preset patience value is reached, and the update is stopped to obtain the final AI model.
[0124] In this embodiment, the patience value refers to the number of rounds or times that training is allowed to continue if the validation set performance (usually validation loss or accuracy) of the model does not improve. By setting the patience value, overfitting of training data during AI model training can be avoided, and unnecessary iterative training cycles can be reduced, further improving model iteration efficiency and saving computing resources and computing time.
[0125] In this embodiment, by calculating the historical performance points of the task model according to the model performance, the learning strategy is matched according to the historical performance points of each task model, and sampling training is performed in the sample data with different learning strategies, so that the task model training process dynamically adjusts the type and quantity of sample data to avoid the problem of increased training complexity due to a large amount of sample data and low model iteration efficiency due to redundant samples; in addition, during the training process, each task model is pruned according to the feature score to reduce the computational amount and memory consumption of model training; dynamic sampling is combined with dynamic pruning to dynamically train each task model in the AI model to further improve the iteration efficiency of the AI model.
[0126] Please refer to Figure 2 , Figure 2 A structural diagram of an AI model iterative update system provided by an embodiment of the present invention includes: a learning strategy matching module 201, a model training module 202, a verification module 203 and a global update module 204;
[0127] The learning strategy matching module 201 is used to obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; obtain the historical performance points of the task model, match the learning strategy according to the historical performance points, and collect sample data according to the learning strategy to generate training data;
[0128] The model training module 202 is used to train each task model according to a preset training cycle and the training data, and update the parameters of each task model; and in each training cycle, calculate the feature score of each task model in the training process, and prune the task model according to the feature score; until the preset conditions are met, the updated task model is obtained;
[0129] The verification module 203 is used to randomly sample various types of sample data to generate verification data for each task model, and verify the updated task model according to the verification data;
[0130] The global update module 204 is used to calculate the gradient information of the task model and update the global parameters of the AI model according to the gradient information to obtain the final AI model.
[0131] In this embodiment, the learning strategy matching module is specifically used to:
[0132] Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator;
[0133] Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model;
[0134] A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
[0135] In this embodiment, the learning strategy matching module is specifically used to:
[0136] When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data;
[0137] When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data;
[0138] When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data.
[0139] In this embodiment, the model training module is specifically used for:
[0140] Matching a feature calculation strategy according to a structural type of the task model, and calculating a feature score of each feature in the task model according to the feature calculation strategy;
[0141] The features are sorted according to the feature scores, feature pruning is performed according to a preset pruning strategy, and the weight coefficients of the features for the next training cycle are adjusted.
[0142] In this embodiment, the global update module is specifically used to:
[0143] Calculating the loss value of the task model according to the verification data, and calculating the gradient information of the task model and the global gradient information of the AI model according to the loss value;
[0144] The global parameters of the AI model are updated according to the preset learning rate and the global gradient information until the preset patience value is reached, and the updating is stopped to obtain the final AI model.
[0145] In this embodiment, by calculating the historical performance points of the task model according to the model performance, the learning strategy is matched according to the historical performance points of each task model, and sampling training is performed in the sample data with different learning strategies. The task model training process dynamically adjusts the type and quantity of sample data to avoid the problem of increased training complexity due to a large amount of sample data and low model iteration efficiency due to redundant samples. In addition, during the training process, each task model is pruned according to the feature score to reduce the computational complexity and memory consumption of model training.
[0146] In this embodiment, through iterative training of the AI model and iterative training of each task model in the AI model, dynamic sampling is combined with dynamic pruning to dynamically train each task model in the AI model, thereby further improving the iterative efficiency of the AI model.
[0147] In an embodiment of the present invention, a multi-device access platform processing device is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned multi-device access platform processing method is implemented.
[0148] In an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned multi-device access platform processing method.
[0149] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the multi-device access platform processing device.
[0150] The multi-device access platform processing device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The multi-device access platform processing device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of the multi-device access platform processing device and do not constitute a limitation on the multi-device access platform processing device. It may include more or fewer components than the components, or a combination of certain components, or different components. For example, the multi-device access platform processing device may also include input and output devices, network access devices, buses, and the like.
[0151] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the multi-device access platform processing device, and uses various interfaces and lines to connect various parts of the entire multi-device access platform processing device.
[0152] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the multi-device access platform processing device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0153] Among them, if the module based on the processing of the multi-device access platform is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0154] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. An AI model iterative update method, characterized in that: include: Obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; the data type of the sample data includes image data and audio data; Calculating the historical performance points of the task model according to the model performance, matching the learning strategy according to the historical performance points, and collecting sample data according to the learning strategy to generate training data; Training each task model according to a preset training cycle and the training data, and updating the parameters of each task model; and in each training cycle, calculating the feature score of each task model during the training process, specifically: matching the feature calculation strategy according to the structural type of the task model, and adjusting the weight coefficient of the feature score according to the feature calculation strategy; The feature calculation strategy includes information calculation and coefficient calculation; According to the weight coefficient and the feature score calculation formula, the feature score calculation formula is specifically: S = β1S1 + β2S2; Among them, β1 and β2 are weight coefficients, and β1+β2=1; S1 is the information calculation value, and S2 is the coefficient calculation value; If the task model is a classification task or a regression task, β1 is set to 1, β2 is set to 0, and the information calculation value S1 is specifically: H = H(Y) - H(Y|X); H(Y)=-∑ y∈Y d(y)log2 d(y): H(Y|X)=∑ x∈X d(x)H(Y|X=x); Where, I is the mutual information of feature x, x is the feature, y is the target variable, p(x, y) is the joint probability density function, p(x) and p(y) are the marginal probability density functions; H is the information gain of the feature, H(Y) is the entropy of the discrete random variable Y, H(Y|X) is the entropy of the discrete random variable Y when the feature is X; d(y) is the probability that the target variable Y takes the value y, and d(x) is the probability that the feature X takes the value x; If the task model is a sorting task, the feature calculation strategy is coefficient calculation. The feature score of each feature in the task model is calculated according to the feature normalization score and feature contribution. Then, β1 is set to 0 and β2 is set to 1. Among them, S m is the feature normalization score, S n is the feature contribution score, x is the eigenvalue, σ is the standard deviation of the eigenvalue, and μ is the normal distribution; Pruning the task model according to the feature score; until a preset condition is met, obtaining an updated task model; Randomly sample various types of sample data to generate verification data for each task model, and verify the updated task model based on the verification data; The gradient information of the task model is calculated, and the global parameters of the AI model are updated according to the gradient information to obtain the final AI model.
2. The AI model iterative update method according to claim 1, characterized in that: The historical performance points of the task model are calculated according to the model performance, the learning strategy is matched according to the historical performance points, and the sample data is collected according to the learning strategy to generate training data, specifically: Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator; Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model; A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
3. The AI model iterative update method according to claim 2, characterized in that: The matching learning strategy according to the historical GPA and collecting sample data from the sample data according to the learning strategy to generate training data are specifically as follows: When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data; When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data; When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data.
4. The AI model iterative update method according to claim 3, characterized in that: The pruning of the task model according to the feature score is specifically as follows: The features are sorted according to the feature scores, feature pruning is performed according to a preset pruning strategy, and the weight coefficients of the features for the next training cycle are adjusted.
5. The AI model iterative update method according to claim 4, characterized in that: The gradient information of the computing task model is calculated, and the global parameters of the AI model are updated according to the gradient information to obtain the final AI model, specifically: Calculating the loss value of the task model according to the verification data, and calculating the gradient information of the task model and the global gradient information of the AI model according to the loss value; The global parameters of the AI model are updated according to the preset learning rate and the global gradient information until the preset patience value is reached, and the updating is stopped to obtain the final AI model.
6. The AI model iterative update method according to claim 5, characterized in that: The loss value of the task model is calculated according to the verification data, specifically: The verification data is input into the updated task model, and the loss value of the task model is calculated according to the multi-fusion loss function, which is specifically: Among them, Y i For the task model, is the binary cross entropy loss, is the hinge loss, is the log cosine function, is the mean absolute error function, and a1, a2, a3 and a4 are weight coefficients.
7. An AI model iterative update system, characterized in that: Used to implement an AI model iterative update method as described in any one of claims 1 to 6, comprising: a learning strategy matching module, a model training module, a verification module and a global update module; The learning strategy matching module is used to obtain a sample data set, classify the sample data in the sample data set, and determine the task model corresponding to each type of sample data; obtain the historical performance points of the task model, match the learning strategy according to the historical performance points, and collect sample data according to the learning strategy to generate training data; The model training module is used to train each task model according to a preset training cycle and the training data, and update the parameters of each task model; and in each training cycle, calculate the feature score of each task model in the training process, and prune the task model according to the feature score; until the preset conditions are met, the updated task model is obtained; The verification module is used to randomly sample various types of sample data to generate verification data for each task model, and verify the updated task model based on the verification data; The global update module is used to calculate the gradient information of the task model and update the global parameters of the AI model according to the gradient information to obtain the final AI model.
8. An AI model iterative update system as claimed in claim 7, characterized in that: The learning strategy matching module is specifically used for: Determine an evaluation indicator of the task model according to the model type, and calculate a historical indicator score of the task model according to the evaluation indicator; Perform weighted calculation based on historical indicator scores and preset indicator coefficients to obtain the historical performance points of each task model; A learning strategy is matched according to the historical GPA, and sample data is collected from the sample data according to the learning strategy to generate training data.
9. The AI model iterative update system according to claim 7, characterized in that: The learning strategy matching module is specifically used for: When the historical GPA is greater than the preset first benchmark GPA, the learning strategy is random sampling learning, specifically: according to the preset number of samples, sample data is randomly selected from the sample data corresponding to the task model as training data; When the historical grade point is less than or equal to the first benchmark grade point and greater than the preset second benchmark grade point, the learning strategy is dynamic sampling learning, specifically: randomly collecting sample data from the sample data corresponding to the task model for training, and after a preset resampling period, collecting sample data from the sample data corresponding to the task model according to the difficult sample sampling method as training data; When the historical GPA is less than or equal to the second benchmark GPA, the learning strategy is updated sampling learning, specifically: the task model is initialized, and the model parameters are updated according to all sample data corresponding to the initialized task model, and the sample data is enhanced to obtain an expanded sample set, and the expanded sample set is used as training data.
Citation Information
Patent Citations
Training method and application of image classification model based on meta-learning
CN115564987A
Clinical decision-making system for acute and critical diseases based on multi-modal pre-training large model
CN117174298A