A method for monitoring data traffic, wherein the method comprises: collecting, by a monitoring apparatus based on a to-be-monitored protocol type, data traffic associated with the to-be-monitored protocol type in data traffic from user equipment or an Internet Protocol, IP, network, to obtain first data traffic, wherein the to-be-monitored protocol type is used to indicate an application associated with data traffic; obtaining, by the monitoring apparatus, traffic information of the first data traffic, wherein the traffic information of the first data traffic comprises a first data volume, and the first data volume is used to indicate a sum of lengths of all packets in the first data traffic; determining, by the monitoring apparatus based on the traffic information of the first data traffic, whether an identification error exists in the first data traffic associated with the to-be-monitored protocol type; and when the monitoring apparatus determines that an identification error exists in the first data traffic associated with the to-be-monitored protocol type, triggering, by the monitoring apparatus, an identification error protection action, wherein the determining, by the monitoring apparatus based on the traffic information of the first data traffic, whether an identification error exists in the first data traffic associated with the to-be-monitored protocol type comprises: when an absolute value of a deviation rate of a value of the traffic information of the first data traffic relative to a first threshold is greater than a first predetermined deviation rate, determining, by the monitoring apparatus, that an identification error exists in the first data traffic associated with the to-be-monitored protocol type, wherein the first threshold is a preset value. collecting, by a monitoring apparatus based on a to-be-monitored protocol type, data traffic associated with the to-be-monitored protocol type in data traffic from user equipment or an Internet Protocol, IP, network, to obtain first data traffic, wherein the to-be-monitored protocol type is used to indicate an application associated with data traffic; obtaining, by the monitoring apparatus, traffic information of the first data traffic, wherein the traffic information of the first data traffic comprises a first data volume, and the first data volume is used to indicate a sum of lengths of all packets in the first data traffic; determining, by the monitoring apparatus based on the traffic information of the first data traffic, whether an identification error exists in the first data traffic associated with the to-be-monitored protocol type; and when the monitoring apparatus determines that an identification error exists in the first data traffic associated with the to-be-monitored protocol type, triggering, by the monitoring apparatus, an identification error protection action, wherein the determining, by the monitoring apparatus based on the traffic information of the first data traffic, whether an identification error exists in the first data traffic associated with the to-be-monitored protocol type comprises: when an absolute value of a deviation rate of a value of the traffic information of the first data traffic relative to a first threshold is greater than a first predetermined deviation rate, determining, by the monitoring apparatus, that an identification error exists in the first data traffic associated with the to-be-monitored protocol type, wherein the first threshold is a preset value.