Un método de control de tráfico, que comprende: recibir (S100), por un dispositivo esclavo, un mensaje de notificación enviado por un dispositivo maestro; analizar (S5), por el dispositivo esclavo, el mensaje de notificación; determinar, por el dispositivo esclavo, que un tipo de red utilizada por el dispositivo maestro es un tipo de red celular cuando el mensaje de notificación incluye un primer identificador, siendo el primer identificador un identificador de tipo de dispositivo del dispositivo maestro, siendo el tipo de red utilizada por el dispositivo maestro un tipo de red de área local inalámbrica cuando el mensaje de notificación no incluye el primer identificador; mostrar (S5), por el dispositivo esclavo, un identificador de equipo de servicio, SSID, de una red de área local inalámbrica proporcionada por el dispositivo maestro incluida en el mensaje de notificación y el tipo de red utilizada por el dispositivo maestro; establecer (S7), por el dispositivo esclavo, una conexión con el dispositivo maestro después de que un usuario seleccione el identificador SSID; y después de que el dispositivo esclavo y el dispositivo maestro establezcan la conexión, recordar al usuario si debe continuar cuando detecte que el usuario quiere descargar un vídeo en un software de vídeo cuando el tipo de red utilizada por el dispositivo maestro es el tipo de red celular, sin restringir, por el dispositivo esclavo, el uso del tráfico de red en el software de vídeo cuando el tipo de red utilizada por el dispositivo maestro es el tipo de red de área local inalámbrica; en el que el dispositivo esclavo accede a Internet utilizando el dispositivo maestro como punto de acceso.
A traffic control method and apparatus is disclosed, where the traffic control method includes: receiving, by a slave device, a notification message sent by a master device, where the notification message carries a type of a network used by the master device, and the type of the network includes a cellular network type or a wireless local area network type; and restricting, by the slave device, use of network traffic in an application on the slave device if the type of the network used by the master device is the cellular network type, where the slave device accesses the Internet by using the master device as an access point. In the present invention, when a master device uses a network of a cellular network type, use of network traffic in an application on a slave device can be restricted, thereby saving traffic.