An in-situ flow detection method for a Generalized Bit Index Explicit Replication, G-BIER, service packet based on Internet Protocol Version 6, IPv6, multicast, the method being applied to a network device, and comprising: in response to the network device serving as a Bit Forwarding Ingress Router, BFIR, of a G-BIER domain, forwarding a G-BIER service packet in the G-BIER domain when receiving a raw multicast service packet to be subjected to in-situ flow detection; and reporting detection data associated with in-situ flow detection information to a specified analyzer such that the analyzer detects network quality based on the reported detection data; wherein the G-BIER service packet carries an IPv6 extension header and an IPv6 payload field; the IPv6 payload field comprises the raw multicast service packet; the IPv6 extension header comprises a Destination Option Header, DOH, wherein the DOH at least comprises: a G-BIER option and an in-situ flow detection option; the G-BIER option indicates performing packet forwarding in the G-BIER domain, and the in-situ flow detection option carries an in-situ flow detection flag and the in-situ flow detection information; the in-situ flow detection flag indicates performing in-situ flow detection; the in-situ flow detection information at least comprises: a Flow identity, ID, a Sequence Number, a Timestamp Received and a Timestamp Sent; the Flow ID and the Sequence Number are self-defined by the BFIR and prohibited from being modified in the G-BIER domain after being self-defined; the Flow ID is determined according to packet characteristics, wherein Flow IDs of different packets having different packet characteristics are different; the Sequence Number represents a sequence for forwarding each of packets having same packet characteristics; the Timestamp Received indicates a timestamp of receiving a packet; and the Timestamp Sent indicates a timestamp of sending a packet. in response to the network device serving as a Bit Forwarding Ingress Router, BFIR, of a G-BIER domain, forwarding a G-BIER service packet in the G-BIER domain when receiving a raw multicast service packet to be subjected to in-situ flow detection; and reporting detection data associated with in-situ flow detection information to a specified analyzer such that the analyzer detects network quality based on the reported detection data; wherein the G-BIER service packet carries an IPv6 extension header and an IPv6 payload field; the IPv6 payload field comprises the raw multicast service packet; the IPv6 extension header comprises a Destination Option Header, DOH, wherein the DOH at least comprises: a G-BIER option and an in-situ flow detection option; the G-BIER option indicates performing packet forwarding in the G-BIER domain, and the in-situ flow detection option carries an in-situ flow detection flag and the in-situ flow detection information; the in-situ flow detection flag indicates performing in-situ flow detection; the in-situ flow detection information at least comprises: a Flow identity, ID, a Sequence Number, a Timestamp Received and a Timestamp Sent; the Flow ID and the Sequence Number are self-defined by the BFIR and prohibited from being modified in the G-BIER domain after being self-defined; the Flow ID is determined according to packet characteristics, wherein Flow IDs of different packets having different packet characteristics are different; the Sequence Number represents a sequence for forwarding each of packets having same packet characteristics; the Timestamp Received indicates a timestamp of receiving a packet; and the Timestamp Sent indicates a timestamp of sending a packet. <EOS>