Self-supervised inter-intra period-aware ECG representation learning for detecting atrial fibrillation