Method and device for transmitting data stream

The embodiments of the present invention provide a method and device for transmitting data stream, which relate to the technical field of communication and can improve the flexibility of data stream control. The method comprises: a Traffic Detection Function (TDF) starts a detection of service data stream; the TDF performs corresponding operation according to the detection result; or the TDF obtains policy rules, and performs corresponding operation according to the detection result and the policy rules. The embodiments of the present invention are used for data stream transmission.