public double calRedProbability(String input) {

		double fm = 0.0;
		
		// 输入参数检查
		List<String> list = SSH.RED.getNumsFromInuput(input);
		if (null == list) {
			log.info(input + "不是合法输入");
			return fm;
		}
		int size = list.size();
			
		// 首先获取第一个元素出现的概率
		int value = redisDao.hget(SSH.RED.getRedisKey(), list.get(0));
		int totalValue = 0;
		for (int i = 1; i <= SSH.RED.getMAX(); i++) {
			totalValue += redisDao.hget(SSH.RED.getRedisKey(), String.format("%02d", i));
		}
		fm = (double)value / (double)totalValue;
		
		// 循环计算后面的概率
		for (int i = 0; i < size - 1; i++) {
			value = redisDao.hget(SSH.RED.getRedisKey(), list.get(i) + ":" + list.get(i + 1));
			totalValue = redisDao.hget(SSH.RED.getRedisKey(), list.get(i));
			fm *= (double)value / (double)totalValue; 
		}
			
		// 结果
		log.info(input + " : " + fm);
		return fm;
		
	}