Image classification method and device based on orthogonal sparse network
By adopting orthogonal sparse networks and shared parameters in the image classification model, the problem of catastrophic forgetting in image classification is solved, the accuracy and efficiency of image classification are improved, and the application of technology in real-life applications is promoted.
Patent Information
- Application Number
- CN202410100761.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-01-24
AI Technical Summary
When the prior art solves the catastrophic forgetting problem in image classification, the model has poor image classification capabilities in new tasks, and is limited by memory and efficiency, and has limited processing capabilities.
The image classification method based on orthogonal sparse network is adopted, and the adaptability of the model to new tasks is optimized through the shared parameters in the pruned classification model, combined with orthogonal projection and unconstrained gradient descent update.
It improves the accuracy and efficiency of image classification, enhances the performance of the model in long-term classification tasks, and promotes the application of image classification technology in real-life applications.
Smart Images

Figure CN118015346B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition and classification, and in particular relates to an image classification method and device based on an orthogonal sparse network. Background Art
[0002] Image classification is a core task in computer vision. Its goal is to distinguish images of different categories based on the different features reflected in the image information. With the rapid development of artificial intelligence technology, image classification technology based on deep neural networks has been widely used in reality. However, deep neural networks are often subject to the dilemma of "catastrophic forgetting", which leads to their lack of ability to continuously and adaptively identify and accurately classify images in a dynamic data stream environment. In real-world scenarios such as medical image analysis, autonomous driving, and image search engines, solving the problem of catastrophic forgetting has become a key issue in improving the image classification performance of deep learning networks due to the needs of saving memory or protecting privacy.
[0003] In recent years, researchers have proposed many image classification algorithm models to deal with catastrophic forgetting. The most direct method is based on regularization, which limits the training of classification model parameters on new classification image data. The knowledge replay-based method assists the classification task of new images by storing or generating representative virtual data. The network parameter expansion-based method expands the number of parameters of the classification model to classify images of new tasks. These methods perform well in specific experimental settings, but are usually subject to limitations such as memory size or training efficiency, and in fact these methods are usually very limited in their ability to deal with catastrophic forgetting.
[0004] At present, in order to more effectively solve the problem of catastrophic forgetting in image classification, researchers apply parameter pruning methods to image classification models. Such methods aim to assign a separate subnetwork model to each image classification task, which is fixed when classifying image data of new tasks, in order to solve catastrophic forgetting. Such methods can not only solve the problem of catastrophic forgetting well, but also the model will not be limited by memory or efficiency. However, the pruned subnetwork is monopolized by specific old tasks, which will lead to the poor ability of the model to classify new task images. Such limitations will seriously affect the application of image classification in real life. In fact, the main reason for the above limitations is that parameter pruning methods usually focus on using subnetworks to preserve knowledge learned from old images, while ignoring the potential contribution of subnetworks to learning image data of new tasks, resulting in poor classification results. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides an image classification method and device based on an orthogonal sparse network. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] In a first aspect, the present invention provides an image classification method based on an orthogonal sparse network, comprising:
[0007] S100, acquiring an image monitored in a current environment at a current moment from an electronic device as an image to be classified, and generating a current classification task for the image to be classified;
[0008] S200, executing the current classification task to input the image to be classified into the trained classification model so that the classification model outputs the category of the image to be classified; the trained classification model has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge.
[0009] In a second aspect, the present invention provides an image classification device based on an orthogonal sparse network, comprising:
[0010] An acquisition module is configured to acquire an image monitored in a current environment from an electronic device as an image to be classified, and generate a current classification task for the image to be classified;
[0011] The classification module is configured to execute the current classification task to input the image to be classified into a trained classification model so that the classification model outputs the category of the image to be classified; the trained classification model has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge.
[0012] Beneficial effects:
[0013] 1. The present invention solves the catastrophic forgetting problem in the image classification model by sharing parameters in the pruned classification model, so as to improve the accuracy and efficiency of the classification of the currently monitored images. This is the key to promoting the practical application of image classification technology.
[0014] 2. The present invention learns shared knowledge through selected important parameters, updates these task-shared parameters through orthogonal projection, and performs unconstrained gradient descent updates on the unpruned parameters on new tasks, which can greatly improve the performance of the model in long-term classification tasks.
[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1It is a flowchart of an image classification method based on an orthogonal sparse network provided by the present invention;
[0017] Figure 2 is a schematic diagram of learning parameter pruning provided by the present invention;
[0018] Figure 3 It is a schematic diagram for comparing the pruning scheme provided by the present invention with other pruning schemes. DETAILED DESCRIPTION
[0019] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0020] First, as Figure 1 As shown, the present invention provides an image classification method based on an orthogonal sparse network, comprising:
[0021] S100, acquiring an image monitored in a current environment at a current moment from an electronic device as an image to be classified, and generating a current classification task for the image to be classified;
[0022] It is worth noting that: if the current environment is a drone flight environment, the current task is to classify the objects in the surrounding environment, such as buildings, trees, pedestrians, etc. Then the image to be classified is collected from the drone camera and then classified. If the current environment is a handwriting detection environment, the previous task is to classify handwriting, such as Songti, Kaiti, etc. or whether it is someone's handwriting. Then the image to be classified is collected from the camera electronic device and then classified.
[0023] S200, executing the current classification task to input the image to be classified into a trained classification model, so that the classification model outputs the category of the image to be classified;
[0024] refer to Figure 2 and Figure 3 The trained classification model of the present invention has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge.
[0025] The present invention proposes an image classification method based on an orthogonal network, which obtains an image monitored in the current environment at the current moment from an electronic device as an image to be classified, and generates a current classification task for the image to be classified; the current classification task is executed to input the image to be classified into a trained classification model, so that the classification model outputs the category of the image to be classified. The trained classification model of the present invention has fixed parameters of old knowledge, shared parameters of old knowledge and new knowledge, and free parameters of new knowledge. The present invention solves the catastrophic forgetting problem in the image classification model through the shared parameters in the pruned classification model, so that the classification accuracy and efficiency of the currently monitored image can be improved, which is the key to promoting the practical application of image classification technology.
[0026] Combination Figure 1 and Figure 2 In a specific embodiment of the present invention, the training process of the trained classification model includes:
[0027] S1, constructing a dataset using images of multiple categories, and dividing the dataset into a number of independent tasks, wherein each task contains the same number of images of different categories;
[0028] It is worth noting that the dataset for continuous learning is usually divided from the traditional image classification dataset, that is, all the categories contained in the original dataset are equally divided into different tasks containing several categories. In the present invention, the categories between tasks and within tasks are different. Continuous learning requires that the model has good performance on all tasks;
[0029] For example, handwritten digit recognition has 10 categories in total. If it is divided into 5 tasks, each task contains 2 categories of digital images.
[0030] S2, taking any one of the plurality of independent tasks as an old task, executing the old task to train the classification model using images included in the old task, so that the classification model learns the knowledge of the old task to obtain a first classification model;
[0031] This step initializes the model parameters and trains the images in the task dataset. The loss function is the traditional cross entropy loss. After the task training is completed, the learning parameters in the model are pruned according to the given parameter ratio to preserve the knowledge learned from the task, that is, the old knowledge.
[0032] S3, pruning the learning parameters of the first classification model to remove unimportant learning parameters;
[0033] This step prunes the learning parameters of the first classification model according to a given parameter ratio to prune unimportant learning parameters, thereby preserving the knowledge learned from the classification model from the old task; the pruning process is specifically expressed as follows:
[0034]
[0035] Among them, l and t are the number of network layers and task ordinal number of the classification model respectively. is the cross entropy loss function, Then it is the data set of the tth task; Represents a binary mask that prunes model parameters by operating ⊙ (multiplying corresponding positions) That is, the learning parameters or important parameters after pruning, It will be updated by Huffman coding after each learning parameter pruning.
[0036] S4, using the network repartitioning strategy to select shared parameters from the remaining learning parameters after S3 pruning, and taking the remaining learning parameters among the important learning parameters as free parameters to obtain the pruned classification model;
[0037] This step S4 includes: S41 using the task-aware network repartitioning strategy, and based on the training gradient size of the classification model on the new task, selecting shared parameters for exploring knowledge sharing between new tasks and old tasks from the remaining learning parameters after pruning in S3; S42 using the remaining learning parameters except the shared parameters in the remaining learning parameters after pruning in S3 as free parameters to obtain the pruned classification model.
[0038] Among them, S41 includes: S411, using the task-aware network repartitioning strategy to introduce a weight importance score to quantitatively measure the importance of each learning parameter when training on task t; S412, selecting shared parameters for exploring knowledge sharing between new tasks and old tasks according to the weight importance scores of the remaining learning parameters after pruning in S3;
[0039] It is worth noting that this step further introduces a task-aware network repartitioning strategy to classify the pruned parameters, with the aim of selecting the parameters that are important for learning the new task, that is, the parameters used to explore the shared knowledge between the new and old tasks. The present invention uses the training gradient of each parameter on the new task as the criterion for its importance. This is reliable because the gradient can directly and clearly show the impact of parameter changes on the final training loss. Specifically, the present invention introduces a weight importance score c to quantitatively calculate the importance of each parameter when training on task t. The weight importance score is expressed as:
[0040]
[0041] Among them, ‖·‖1 is the L1 norm, Represents the learning parameters The weighted importance score of is a binary mask representing the corresponding parameters with high weight importance score c When training a new task, the selected learning parameters are selected by and The intersection of
[0042] S5, selecting another task as a new task, and executing the new task to retrain the pruned classification model using the images included in the new task, to obtain a second classification model trained using the old task and the new task;
[0043] This step S5 includes: S51, selecting another task as a new task; S52, executing the new task to retrain the pruned classification model using the images contained in the new task, retaining the fixed parameters of the old task and updating the shared parameters during the training process to search for shared knowledge between the new task and the old task, and learning the free parameters of the new task to obtain a second classification model trained using the old task and the new task.
[0044] After obtaining the shared parameters, the present invention should apply them to learning and retain the shared knowledge between the old and new tasks to achieve better knowledge transfer and model plasticity. Therefore, the present invention trains these selected parameters on the new task and projects the update direction into the orthogonal projection space of the old task. When training a new task, the method of updating the network parameters in each training step is performed in the orthogonal space of the input features of the old task, so that the network will maintain the training loss for all old tasks and avoid forgetting. Therefore, the present invention applies such a training strategy to the above-mentioned selected shared parameters to explore the shared knowledge of the new and old tasks, and the update method of updating the shared parameters in S52 is:
[0045]
[0046] Among them, the hyperparameter η is the learning rate, is the orthogonal projection matrix, representing the direction orthogonal to the feature space of the first t-1 old tasks at the lth layer;
[0047] In addition, the unselected parameters in the subnetwork are used to learn new knowledge, while the unpruned parameters, i.e., fixed parameters, can retain the old knowledge. The update method is:
[0048]
[0049] S6, pruning the learning parameters of the second classification model to prune unimportant learning parameters and retain important learning parameters;
[0050] S7, repeat the process from S4 to S6 until all tasks in S1 are completed, and obtain a trained classification model.
[0051] This step S7 includes: S71, updating the binary mask To save the knowledge of the old task; S72, repeat the process from S4 to S6 to learn the knowledge of the new task until all tasks in S1 are completed and a trained classification model is obtained.
[0052] In a specific embodiment of the present invention, after S200, the image classification method based on orthogonal sparse network further includes:
[0053] Pruning the learning parameters of the trained classification model to update the trained classification model;
[0054] The image monitored in the next environment at the next moment is used as a new image to be classified, so as to classify the new image to be classified by using the updated classification model.
[0055] It is worth noting that in a specific time sequence task, each task is the current task. After the current task is completed, the task at the next moment is the current task. If the image monitored in the next environment at the next moment is used as the image to be classified for the current task, the classification process is executed to obtain the category of the image.
[0056] In a second aspect, the present invention provides an image classification device based on an orthogonal sparse network, comprising:
[0057] An acquisition module is configured to acquire an image monitored in a current environment from an electronic device as an image to be classified, and generate a current classification task for the image to be classified;
[0058] The classification module is configured to execute the current classification task to input the image to be classified into a trained classification model so that the classification model outputs the category of the image to be classified; the trained classification model has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge.
[0059] The device and method embodiments of the present invention correspond one to one and will not be described in detail here.
[0060] The present invention proposes an image classification device based on an orthogonal network, which obtains an image monitored in the current environment at the current moment from an electronic device as an image to be classified, and generates a current classification task for the image to be classified; the current classification task is executed to input the image to be classified into a trained classification model, so that the classification model outputs the category of the image to be classified. The trained classification model of the present invention has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for new knowledge. The present invention solves the catastrophic forgetting problem in the image classification model through the shared parameters in the pruned classification model, so as to improve the accuracy and efficiency of the classification of the currently monitored image. This is the key to promoting the practical application of image classification technology.
[0061] The classification effect of the present invention is illustrated by experiments below.
[0062] The present invention is based on the PyTorch framework and experiments are performed on a single NVIDIA RTX 2080Ti GPU.
[0063] The present invention conducted a series of experiments on several real datasets, covering PMNIST, Split CIFAR-100, CIFAR-100Superclass, 5-Datasets and Split TinyImageNet. When constructing PMNIST, the present invention performed different random permutations on the original MNIST and generated 10 different tasks. The CIFAR-100 dataset was divided into 10 non-overlapping tasks, each task containing 10 different categories. CIFAR-100Superclass divides CIFAR-100 into 20 tasks, each task containing 5 semantically related categories. 5-Datasets includes five different datasets: CIFAR-10, MNIST, SVHN, FashionMNIST and notMNIST. TinyImageNet contains 200 categories, each with 600 different 64×64 RGB images.
[0064] To compare with other continuous learning models, we use two common continuous learning evaluation metrics, Average Accuracy (ACC) and Backward Transfer (BWT). ACC is the average test accuracy of all tasks after training, while Backward Transfer measures the degree of forgetting of old tasks after learning from new tasks.
[0065] Table 1 Quantitative index results on the PMNIST dataset
[0066] method Literature Source ACC BWT EWC CoRR'2016 92.01 -0.03 PackNet CVPR'2018 96.37 0.00 SupSup NeurIPS'2020 96.31 0.00 GPM ICLR'2021 94.96 -0.02 TRGP ICLR'2022 96.34 -0.80 WSN ICML'2022 96.51 0.00 Ours - 97.27 0.00
[0067] Table 2 Quantitative index results on the Split CIFAR-100 dataset
[0068] method Literature Source ACC BWT EWC CoRR'2016 68.80 -2.02 PackNet CVPR'2018 72.39 0.00 SupSup NeurIPS'2020 75.47 0.00 La-MaML CoRR'2021 71.37 -5.39 FS-DGPM NeurIPS'2021 74.33 -2.71 GPM ICLR'2021 72.48 -0.90 TRGP ICLR'2022 74.46 -0.90 WSN ICML'2022 75.86 0.00 Connector CVPR'2022 78.10 -0.30 DualGPM CVPR'2023 71.33 -0.12 API CVPR'2023 72.00 0.37 Ours - 78.23 -0.02
[0069] Table 3 Quantitative indicator results on the CIFAR-100Superclass dataset
[0070]
[0071]
[0072] Table 4 Quantitative indicator results on dataset 5-Datasets
[0073] method Literature Source ACC BWT EWC CoRR'2016 88.64 -0.04 PackNet CVPR'2018 92.81 0.00 SupSup NeurIPS'2020 93.28 0.00 GPM ICLR'2021 91.22 -0.01 TRGP ICLR'2022 93.56 -0.04 WSN ICML'2022 92.30 0.00 Connector CVPR'2022 85.50 -2.90 DualGPM CVPR'2023 88.70 -1.90 API CVPR'2023 91.10 -0.50 Ours - 93.88 -0.08
[0074] Table 5 Quantitative index results on the Split CIFAR-100 dataset
[0075] method Literature Source ACC BWT PackNet CVPR'2018 55.46 0.00 SupSup NeurIPS'2020 59.60 0.00 La-MaML CoRR'2021 66.90 -9.13 FS-DGPM NeurIPS'2021 70.41 -2.11 GPM ICLR'2021 67.39 1.45 TRGP ICLR'2022 68.32 1.71 WSN ICML'2022 71.96 0.00 Ours - 76.23 -1.24
[0076] After comparing the results of Table 1, Table 2, Table 3, Table 4 and Table 5 on PMNIST, Split CIFAR-100, CIFAR-100Superclass, 5-Datasets and Split TinyImageNet, it can be clearly observed that the method proposed in the present invention has achieved significant improvements in ACC and BWT evaluation indicators. These results strongly indicate that the images processed by the method of the present invention have achieved significant improvements in continuous learning and have a higher quality level; it not only verifies the excellent performance of the method of the present invention in image reconstruction tasks, but also provides strong support for the potential advantages of the method in practical applications; in different actual data set application scenarios, the better average accuracy and backward migration represented by high ACC and BWT will provide practical help for the wide application of the method and promote further research and development in the field of image processing.
[0077] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0078] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality of components or steps.
[0079] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. An image classification method based on orthogonal sparse network, characterized in that: include: S100, acquiring an image monitored in a current environment at a current moment from an electronic device as an image to be classified, and generating a current classification task for the image to be classified; S200, executing the current classification task to input the image to be classified into a trained classification model so that the classification model outputs the category of the image to be classified; the trained classification model has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge; The training process of the trained classification model includes: S1, constructing a dataset using images of multiple categories, and dividing the dataset into a number of independent tasks, wherein each task contains the same number of images of different categories; S2, taking any one of the plurality of independent tasks as an old task, executing the old task to train the classification model using images included in the old task, so that the classification model learns the knowledge of the old task to obtain a first classification model; S3, pruning the learning parameters of the first classification model to remove unimportant learning parameters; S4, using the network repartitioning strategy to select shared parameters from the remaining learning parameters after S3 pruning, and taking the remaining learning parameters among the important learning parameters as free parameters to obtain the pruned classification model; S5, selecting another task as a new task, and executing the new task to retrain the pruned classification model using the images included in the new task, to obtain a second classification model trained using the old task and the new task; S6, pruning the learning parameters of the second classification model to prune unimportant learning parameters and retain important learning parameters; S7, repeat the process from S4 to S6 until all tasks in S1 are completed, and a trained classification model is obtained; The S5 includes: S51, selecting another task as a new task; S52, executing the new task to retrain the pruned classification model using the images included in the new task, retaining the fixed parameters of the old task during the training process, and updating the shared parameters to search for shared knowledge between the new task and the old task, and updating the free parameters used to learn the new task, to obtain a second classification model trained using the old task and the new task; The updating method of updating the shared parameters in S52 is: Among them, the hyperparameter η is the learning rate, is an orthogonal projection matrix, which represents the direction orthogonal to the feature space of the first t-1 old tasks; l and t are the number of network layers and the ordinal number of tasks in the classification model, respectively. is the cross entropy loss function, is a binary mask representing the corresponding parameters with high weight importance score c When training a new task, the selected learning parameters are selected by and The intersection of The updating method of the fixed parameters is as follows:
2. The image classification method based on orthogonal sparse network according to claim 1, characterized in that: S3 includes: The learning parameters of the first classification model are pruned according to a given parameter ratio to remove unimportant learning parameters, thereby preserving the knowledge learned from the classification model from the old task; the pruning process is specifically expressed as follows: in, Then it is the data set of the tth task; represents a binary mask that prunes the model parameters by operating That is, the learning parameters or important parameters after pruning, It will be updated by Huffman coding after each learning parameter pruning.
3. The image classification method based on orthogonal sparse network according to claim 1, characterized in that S4 include: S41, using the task-aware network repartitioning strategy, and based on the training gradient size of the classification model on the new task, select the shared parameters for exploring knowledge sharing between new and old tasks from the remaining learning parameters after S3 pruning; S42, taking the remaining learning parameters except the shared parameters among the learning parameters remaining after pruning in S3 as free parameters to obtain a pruned classification model.
4. The image classification method based on orthogonal sparse network according to claim 3 is characterized in that: S41 includes: S411, using a task-aware network repartitioning strategy to introduce a weight importance score to quantitatively measure the importance of each learning parameter when training on task t; S412, selecting shared parameters for exploring knowledge sharing between new tasks and old tasks according to the importance scores of the remaining learning parameters after pruning in S3; Wherein, the weight importance score is expressed as: Among them, ‖·‖1 is the L1 norm, Represents the learning parameters The weighted importance score of .
5. The image classification method based on orthogonal sparse network according to claim 1, characterized in that: S7 includes: S71, Update binary mask to preserve knowledge of old tasks; S72, repeat the process from S4 to S6 to learn the knowledge of the new task until all tasks in S1 are completed and a trained classification model is obtained.
6. The image classification method based on orthogonal sparse network according to claim 1, characterized in that: After S200, the image classification method based on orthogonal sparse network further includes: Pruning the learning parameters of the trained classification model to update the trained classification model; The image monitored in the next environment at the next moment is used as a new image to be classified, so as to classify the new image to be classified by using the updated classification model.
7. An image classification device based on an orthogonal sparse network, characterized in that: include: An acquisition module is configured to acquire an image monitored in a current environment from an electronic device as an image to be classified, and generate a current classification task for the image to be classified; A classification module, configured to perform the current classification task, so as to input the image to be classified into a trained classification model, so that the classification model outputs the category of the image to be classified; the trained classification model has fixed parameters for preserving old knowledge, shared parameters for sharing old knowledge and new knowledge, and free parameters for learning new knowledge; The training process of the trained classification model includes: S1, constructing a dataset using images of multiple categories, and dividing the dataset into a number of independent tasks, wherein each task contains the same number of images of different categories; S2, taking any one of the plurality of independent tasks as an old task, executing the old task to train the classification model using images included in the old task, so that the classification model learns the knowledge of the old task to obtain a first classification model; S3, pruning the learning parameters of the first classification model to remove unimportant learning parameters; S4, using the network repartitioning strategy to select shared parameters from the remaining learning parameters after S3 pruning, and taking the remaining learning parameters among the important learning parameters as free parameters to obtain the pruned classification model; S5, selecting another task as a new task, and executing the new task to retrain the pruned classification model using the images included in the new task, to obtain a second classification model trained using the old task and the new task; S6, pruning the learning parameters of the second classification model to prune unimportant learning parameters and retain important learning parameters; S7, repeat the process from S4 to S6 until all tasks in S1 are completed, and a trained classification model is obtained; The S5 includes: S51, selecting another task as a new task; S52, executing the new task to retrain the pruned classification model using the images included in the new task, retaining the fixed parameters of the old task during the training process, and updating the shared parameters to search for shared knowledge between the new task and the old task, and updating the free parameters used to learn the new task, to obtain a second classification model trained using the old task and the new task; The updating method of updating the shared parameters in S52 is: Among them, the hyperparameter η is the learning rate, is an orthogonal projection matrix, which represents the direction orthogonal to the feature space of the first t-1 old tasks; l and t are the number of network layers and the ordinal number of tasks in the classification model, respectively. is the cross entropy loss function, is a binary mask representing the corresponding parameters with high weight importance score c When training a new task, the selected learning parameters are selected by and The intersection of The updating method of the fixed parameters is as follows: