Relativistic heavy-ion collisions are an important experimental way of studying the new state of matter as well as the phase diagram of the quantum chromodynamics (QCD) under extremely high temperatures and high densities. The elliptic flow is an important experimental observable in relativistic heavy-ion collisions. In recent years, the beam-energy scan program has been carried out on the relativistic heavy-ion collider at Brookhaven National Laboratory in USA, where phenomena different from those in heavy-ion collisions at extremely high energies, such as the elliptic flow splittings between particles and their antiparticles, are observed. Based on an extended multiphase transport model, this phenomenon can be explained through different mean-field potentials for particles and their antiparticles. In the almond-shaped medium produced in these collisions, particles affected by the repulsive potential are more likely to leave the system, while those affected by the attractive potential are more likely to be trapped in the system, enhancing and reducing their respective elliptic flow. The partonic mean-field potentials are extracted from an extended 3-flavor Nambu-Jona-Lasinio (NJL) model. Quarks are affected by more repulsive potentials compared with their antiquarks as a result of the vector-isoscalar coupling, while d quarks are affected by a more repulsive potential compared with u quarks as a result of the vector-isovector coupling, in the baryon-rich and d -quark-rich medium. The hadronic mean-field potentials are also incorporated through the relativistc mean-field model for baryons and antibaryons, and through the chiral effective field theory for kaons and antikaons as well as for π + and π − . In the baryon-rich and neutron-rich medium, antinucleons, antikaons, and π + are affected by more attractive potentials than nucleons, kaons, and π − , respectively. It is found that a strong vector-isoscalar and vector-isovector coupling are needed to reproduce the elliptic flow splittings between nucleons and antinucleons, kaons and antikaons, as well as π + and π − , as observed experimentally by the STAR Collaboration. On the other hand, the NJL model can be used to study the spontaneous chiral symmetry breaking and the phase diagram of the chiral phase transition. In order to describe both the chiral and deconfinement phase transition, one needs to extend the NJL model by incorporating the Polyakov-loop contribution (pNJL). Although the temperature of the crtical point for the chiral phase transition is higher in the pNJL model, it is found that the position or the behavior of the critical point is sensitive to the strength of the vector-isoscalar and the vector-isovector couplings in both the NJL and the pNJL model. In addition, the equation of state of baryon-rich and d -quark-rich quark matter is sensitive to these couplings as well. With these couplings constrainted by the elliptic flow splittings between particles and their antiparticles, information of the quark matter equation of state as well as the QCD phase diagram at finite baryon and isospin chemical potentials can be thus extracted. The study shows that the QCD critical point may be at very low temperatures or does not even exist, while the strong vector-isoscalar and vector-isovector couplings favor a stiff equation of state of quark matter at high net-baryon and isovector densities. In future studies, the transport framework can be further extended to incorporate the Polyakov-loop contribution.