Due to the interference and background drift between new and old task parameters,semantic segmentation model based on deep neural networks promotes catastrophic forgetting of old knowledge.Furthermore,information frequently cannot be stored owing to privacy concerns,security concerns,and other issues,which leads to model failure.Therefore,a continual semantic segmentation method based on gating mechanism and replay strategy is proposed.First,without storing old data,generative adversarial network and webpage crawling are used as data sources,the label evaluation module is used to solve the unsupervised problem and the background self-drawing module is used to solve background drift problem.Then,catastrophic forgetting is mitigated by replay strategy;Finally,gated variables are used as a regularization means to increase the sparsity of the module and study the special case of gated variables combined with continual learning replay strategy.Our evaluation results on the Pascal VOC2012 dataset show that in the settings of complex scenario 10-2,Generative Adversarial Networks(GAN)and Web,the performance of the old task after all incremental steps are improved by 3.8%and 3.7%compared with the baseline,and in scenario 10-1,they are improved by 2.7%and 1.3%compared with the baseline,respectively.