In the screenshot, the power-on detection circuit informs the IC and explains the functions of each device. Thank you.
This is a circuit that converts AC sine signal into corresponding inverse rectangular wave signal. R6, R7 and D2 form a negative half-cycle limiting circuit (about 0.7v), while R6, R7, D 1, R5 and +5V form a positive half-cycle limiting circuit (about 0.7V+5V). R4, R3, Q 1 and R 1 form a switching inverting output shaping circuit, which shapes the positive and negative limiting output signals output by the previous stage into inverting rectangular wave signals. R 1 is the collector load resistance of Q 1, and R2 is the output current limiting resistance.