AIR-Bench 2024: A Safety Benchmark Based on Risk Categories from Regulations and Policies