A new approach to multiwavelength associations of astronomical sources