Cheap chinese rice lights
Quite likely it's a CMOS ASIC, though a microcontroller is also possible (they're available from about 3 cents each packaged and that one is COB so potentially cheaper) 

The parts would be a capacitive or resistive dropper power supply to get something like 5V at perhaps a few tens or hundreds of uA for the chip to run on (though I don't see the large film capacitor typically used for capacitive droppers so maybe it's just a 1/4-W resistor). 

The output device would not be on-chip- probably something like a TO-92 2N5064 SCR which requires only a brief pulse of a few hundred uA to turn on. Add a series resistor to the chip- maybe that 3M\$\Omega\$ one- to provide zero-crossing detection and you have a workable system for a few ¥ (CNY). Looks like it's supplying half-wave to the lights, so probably flicker-y even at 60Hz and worse again at 50Hz. 

Nothing, including the output to the lights, is isolated from the mains, so you have to assume any point in the circuit is a potentially lethal shock hazard. It may also be a fire hazard- I don't see a fuse. Check to see if it has appropriate safety agency approval for use in your country (such as CSA or UL) and a legitimate file number that can be verified.