An approach to dark energy problem through linear invariants