In simultaneous EEG/fMRI acquisition, the ballistocardiogram (BCG) artifact presents a major challenge for meaningful EEG signal interpretation and needs to be removed. This is very difficult, especially in continuous studies where BCG cannot be removed with averaging. In this study, we take advantage of a high-density EEG-cap and propose an integrated learning and inference approach to estimate the BCG contribution to the overall noisy recording. In particular, we present a special-designed experiment to enable a near-optimal subset selection scheme to identify a small set (20 out of 256 channels), and argue that in real-recording, BCG artifact signal from all channels can be estimated from this set. We call this new approach "Direct Recording Temporal Spatial Encoding" (DRTSE) to reflect these properties. In a preliminary evaluation, the DRTSE is combined with a direct subtraction and an optimization scheme to reconstruct the EEG signal. The performance was compared against the benchmark Optimal Basis Set (OBS) method. In the challenging nonevent-related EEG studies, the DRTSE method, with the optimization-based approach, yields an EEG reconstruction that reduces the normalized RMSE by approximately 13 folds, compared to OBS.