Speckle patterns have been widely confirmed that can be utilized to reconstruct the wavelength information. In order to achieve higher resolution, a varies of optical diffusing waveguides have been investigated with a focus on their wavelength sensitivity. However, it has been a challenge to reach the balance among cost, volumes, resolution, and stability. In this work, we designed a compact cylindrical random scattering waveguide (CRSW) as the light diffuser only by mixing TiO2 particles and ultra-violate adhesive. The speckle patterns are generated by the light multiple scattering in the CRSW. Importantly, the thin layer of upconversion nanoparticles (UCNPs) were sprayed on the end face of the CRSW. This allows the near infrared (NIR) light to be converted to the visible light, breaking the imaging limitation of visible cameras in the NIR range. We further designed a convolution neural network (CNN) to recognize the wavelength of the speckle patterns with good robustness and excellent ability of transfer learning, resulting in the achievement of a high resolution of 20 kHz ( 0.16 fm) at around 1550 nm with temperature resistance of 2 celsius. Our results provide a low-cost, compact, and simple NIR wavemeter in particular with the ultra high resolution and good temperature stability.