Hello,
If You want to mark IP packets destined to BGP prefixes that fall into specific AS_PATH group, then You need to use Juniper feature called "Destination Class Usage"/DCU.
If You want to mark IP packets sourced from BGP prefixes that fall into specific AS_PATH group, then You need to use Juniper feature called "Source Class Usage"/SCU
https://www.juniper.net/documentation/en_US/junos/topics/concept/source-class-usage-options-junos-nm.html
Then You can match the SCU or DCU value in a forwarding-table output FW filter, and assign DSCP or Forwarding Class/FC, or both. If You assign just FC, then You should also have class-of-service rewrite rule for this FC configured.
HTH
Thx
Alex
P.S. The equivalent CSCO feature is called QPPB