An Algorithm of Fire Judgment in Early Stage