GW170817: The Energy Extraction Process of the Off-axis Relativistic Outflow and the Constraint on the Equation of State of Neutron Stars