A method for collecting a traffic flow value of a Border Gateway Protocol, BGP, community attribute or BGP extended community attribute, implemented by a first device, characterized in that the method comprises: obtaining (S301, S801) at least one of BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value and corresponding to a traffic flow according to a traffic flow reporting instruction; and reporting (S302, S802) the at least one of the obtained BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value to a second device through a traffic flow reporting protocol, wherein the reporting of the at least one of the obtained BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value to the second device through the traffic flow reporting protocol comprises: reporting the at least one of the obtained BGP community attribute information or BGP extended community attribute information to the second device through one or more Information Elements, IEs, defined to report the at least one of the BGP community attribute information or the BGP extended community attribute information in the traffic flow reporting protocol, wherein the one or more IEs comprises at least one of: a first IE defined to report the BGP community attribute information corresponding to a source address of the traffic flow; a second IE defined to report the BGP community attribute information corresponding to a destination address of the traffic flow; a third IE defined to report the BGP extended community attribute information corresponding to the source address of the traffic flow; or, a fourth IE defined to report the BGP extended community attribute information corresponding to the destination address of the traffic flow. obtaining (S301, S801) at least one of BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value and corresponding to a traffic flow according to a traffic flow reporting instruction; and reporting (S302, S802) the at least one of the obtained BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value to a second device through a traffic flow reporting protocol, wherein the reporting of the at least one of the obtained BGP community attribute information or BGP extended community attribute information corresponding to the traffic flow value to the second device through the traffic flow reporting protocol comprises: reporting the at least one of the obtained BGP community attribute information or BGP extended community attribute information to the second device through one or more Information Elements, IEs, defined to report the at least one of the BGP community attribute information or the BGP extended community attribute information in the traffic flow reporting protocol, wherein the one or more IEs comprises at least one of: a first IE defined to report the BGP community attribute information corresponding to a source address of the traffic flow; a second IE defined to report the BGP community attribute information corresponding to a destination address of the traffic flow; a third IE defined to report the BGP extended community attribute information corresponding to the source address of the traffic flow; or, a fourth IE defined to report the BGP extended community attribute information corresponding to the destination address of the traffic flow. a first IE defined to report the BGP community attribute information corresponding to a source address of the traffic flow; a second IE defined to report the BGP community attribute information corresponding to a destination address of the traffic flow; a third IE defined to report the BGP extended community attribute information corresponding to the source address of the traffic flow; or, a fourth IE defined to report the BGP extended community attribute information corresponding to the destination address of the traffic flow.