The cosmic curvature ($Omega_k$) is a fundamental parameter for cosmology. In this paper, we propose an improved model-independent method to constrain the cosmic curvature, which is geometrically related to the Hubble parameter $H(z)$ and luminosity distance $D_L(z)$. Using the currently largest $H(z)$ sample from the well-known cosmic chronometers, as well as the luminosity distance $D_L(z)$ from the relation between the UV and X-ray luminosities of 1598 quasars and the newly-compiled Pantheon sample including 1048 SNe Ia, 31 independent measurements of the cosmic curvature $Omega_k(z)$ can be expected covering the redshift range of $0.07<z<2$. Our estimation of $Omega_k(z)$ is fully compatible with flat Universe at the current level of observational precision. Meanwhile, we find that, for the Hubble diagram of 1598 quasars as a new type of standard candle, the spatial curvature is constrained to be $Omega_k=0.08pm0.31$. For the latest Pantheon sample of SNe Ia observations, we obtain $Omega_k= -0.02pm0.14$. Compared to other approaches aiming for model-independent estimations of spatial curvature, our analysis also achieves constraints with competitive precision. More interestingly, it is suggested that the reconstructed curvature $Omega_k$ is negative in the high redshift region, which is also consistent with the results from the model-dependent constraints in the literature. Such findings are confirmed by our reconstructed evolution of $Omega_k(z)$, in the framework of a model-independent method of Gaussian processes (GP) without assuming a specific form.