How do electronic smart meters calculate electricity consumption

First, the actual line voltage and current are sampled, and the power signal is generated by the UI multiplier; second, the U/f (voltage/frequency) converter is used to convert the power signal into a pulse signal with a certain frequency, and the pulse signal is converted by the counter Accumulated electricity consumption