  We present a direct measurement of extinction curves using corrected $Gaia$
XP spectra of the common sources in $Gaia$ DR3 and LAMOST DR7. Our analysis of
approximately 370 thousand high-quality samples yielded a high-precision
average extinction curve for the Milky Way. After incorporating infrared
photometric data from 2MASS and WISE, the extinction curve spans wavelengths
from 0.336 to 4.6 $\mu$m. We determine an average $R_{55}$ of $2.730 \pm
0.007$, corresponding to $R_V= 3.073 \pm 0.009$, and a near-infrared power-law
index $\alpha$ of $1.935 \pm 0.037$. Our study confirmed some
intermediate-scale structures within the optical range. Two new features were
identified at 540 and 769 nm, and their intensities exhibited a correlation
with extinction and $R_V$. This extinction curve can be used to investigate the
characteristics of dust and enhance the extinction correction of Milky Way
stars. A Python package for this extinction curve is available.
