Enhancing dynamic ECG heartbeat classification with lightweight transformer model