Interaction of independent single photons based on integrated nonlinear optics