If you try to get this information each time when you are showing a list of products (for ex: search result page or category page) you will have performance issues. An approach can be to create a cache with product and campaigns but it can also cause performance issues if you are using dynamic product lists for campaigns and your products are updated frequently.
If you are using campaign price lists for campaigns then you can get all the products in campaigns via those price lists for example.