A machine learning-based framework for online prediction of battery ageing trajectory and lifetime using histogram data