For analog signals:
If the frequency of the input signal is not too high, we can consider using a comparator as a shaping circuit, with the positive input signal and the negative input reference voltage. If the frequency is high (above MHz), it is a bit troublesome, and a shaping circuit needs to be built with triodes or MOS transistors.
For digital signals:
You can use 90 or 16 1 to build a frequency division network, and then use a single chip microcomputer or other devices to collect various outputs, which can cope with higher frequencies (above 10MHz).