A packet processing method, comprising: acquiring, by a network-side device, a description of an application and a state of the application, wherein the description of the application comprises an identifier of the application or a stream description of the application; and acquiring, by the network-side device, a packet that matches the description of the application; and according to the state of the application, performing, by the network-side device, service quality control of network resources for a media data stream in which the matched packet is located or performing, by the network-side device, coding processing for a media data stream in which the matched packet is located; characterized in that the acquiring, by the network-side, the packet that matches the description of the application comprises: when the description of an application is an identifier of the application, parsing, by the network-side device, received packets to acquire service types or host addresses of the received packets, and acquiring, by the network-side device, a packet that matches the identifier of the application from the received packets according to a mapping relationship between an identifier of an application and a service type or a mapping relationship between an identifier of an application and a host address; when a description of an application is a stream description of the application, acquiring, by the network-side device, a packet that matches the stream description of the application directly. acquiring, by a network-side device, a description of an application and a state of the application, wherein the description of the application comprises an identifier of the application or a stream description of the application; and acquiring, by the network-side device, a packet that matches the description of the application; and performing, by the network-side device, service quality control of network resources for a media data stream in which the matched packet is located or performing, by the network-side device, coding processing for a media data stream in which the matched packet is located; characterized in that the acquiring, by the network-side, the packet that matches the description of the application comprises: when the description of an application is an identifier of the application, parsing, by the network-side device, received packets to acquire service types or host addresses of the received packets, and acquiring, by the network-side device, a packet that matches the identifier of the application from the received packets according to a mapping relationship between an identifier of an application and a service type or a mapping relationship between an identifier of an application and a host address; when a description of an application is a stream description of the application, acquiring, by the network-side device, a packet that matches the stream description of the application directly. when the description of an application is an identifier of the application, parsing, by the network-side device, received packets to acquire service types or host addresses of the received packets, and acquiring, by the network-side device, a packet that matches the identifier of the application from the received packets according to a mapping relationship between an identifier of an application and a service type or a mapping relationship between an identifier of an application and a host address; when a description of an application is a stream description of the application, acquiring, by the network-side device, a packet that matches the stream description of the application directly.