  In this work, we achieve the determination of the cosmic curvature $\Omega_K$
in a cosmological model-independent way, by using the Hubble parameter
measurements $H(z)$ and type Ia supernovae (SNe Ia). In our analysis, two
nonlinear interpolating tools are used to reconstruct the Hubble parameter, one
is the Artificial Neural Network (ANN) method, and the other is the Gaussian
process (GP) method. We find that $\Omega_K$ based on the GP method can be
greatly influenced by the prior of $H_0$, while the ANN method can overcome
this. Therefore, the ANN method may have more advantages than GP in the
measurement of the cosmic curvature. Based on the ANN method, we find a
spatially open universe is preferred by the current $H(z)$ and SNe Ia data, and
the difference between our result and the value inferred from Planck CMB is
$1.6\sigma$. In order to test the reliability of the ANN method, and the
potentiality of the future gravitational waves (GW) standard sirens in the
measurement of the cosmic curvature, we constrain $\Omega_K$ using the
simulated Hubble parameter and GW standard sirens in a model-independent way.
We find that the ANN method is reliable and unbiased, and the error of
$\Omega_K$ is $\sim0.186$ when 100 GW events with electromagnetic counterparts
are detected, which is $\sim56\%$ smaller than that constrained from the
Pantheon SNe Ia. Therefore, the data-driven method based on ANN has potential
in the measurement of the cosmic curvature.
