It's exactly as described on the diagram, it's a zero crossing detector.
You have to understand why it's needed to see how it works. The remainder of the circuit (including the missing RC parts) is there to produce a pulse to trigger the triac. When you trigger the triac it starts conducting but will not turn off until the voltage across it is removed (or reduced to a very low voltage). When you are trying to control the power to the load it is necessary to control the time within each voltage cycle you produce the trigger pulse. If you trigger immediately the voltage starts to rise, it will conduct over the whole half cycle, if you trigger it at the end it will only conduct for a short time before the lack of voltage will stop it conducting by itself. So to set the power you require you adjust the trigger point delay from the start of each cycle. To do that you need to discover the zero crossing point which is where the AC passes through the zero as it changes between negative and positive polarities, in other words the start of the cycle.
Looking at the two opto-couplers you will notice the output sides are in parallel so if either LED turns on, the transistors will conduct and output side will go to a low voltage. The low voltage is used to feed the timing circuit. The LED side of the opto-couplers are wired in parallel but with the connections reversed. This means on one half cycle one LED will illuminate and on the other half cycle the other will illuminate, at the point where the voltage is below the LEDs Vf, neither will illuminate. The output of the opto-couplers will therefore be a high pulse starting just before AC zero crossing and ending just after it. This is the reference time or zero crossing point you use as the timing reference.
You can do the same by using a bridge rectifier and single opto-coupler but the extra voltage drop in the bridge rectifier makes detecting the exact zero point less precise.
Brian.