The invention discloses an
air pollution risk prediction and early warning method based on multi-
task learning, and the method comprises the following steps: S1, collecting multi-source
air pollution monitoring data, and carrying out the preprocessing of the data, and generating preprocessing data; s2, constructing a multi-
task learning model, and generating a preliminary prediction result through the multi-
task learning model based on an improved multi-head attention mechanism; s3, optimizing parameters of a shared
feature extraction layer and a task specific prediction layer; s4, optimizing the preliminary prediction result, and generating an optimized prediction result; s5, generating a
risk level, and generating a
risk assessment report by integrating the risk information of time and space dimensions; and S6, designing a trigger condition according to the
risk level, defining a joint early warning rule, judging and triggering early warning through a dynamic threshold value, and generating early warning information. According to the method, multi-task learning and an improved multi-head attention mechanism are combined, multi-
pollutant concentration prediction and risk early warning are realized, and the method has the advantages of high timeliness, high prediction precision and comprehensive
risk assessment.