Both are movies in which the leads are inside a time loop, with one trying to save the other from dying that day. Ultimately the other one saves the former.
In a specific time and space, detective Ding Qi accidentally discovered that he had the ability to reverse time and repeat the cycle five times on the same day from time to time. He used this superpower to solve many difficult cases.