The invention discloses a traffic signal optimization method, and relates to the field of traffic signal control. The method comprises the following steps of: A: establishing a root node T(n) of a decision tree; B: self-increasing n by 1; and establishing a node T(n) corresponding to each u(n) in Uad according to constraint conditions, and connecting T(n) serving as a sub-node of T(n-1) to the decision tree; C: judging whether n is equal to N, if the n is equal to N, executing a step D, otherwise, performing pruning operation on the decision tree, and then executing the step B; D: finding outa branch with the minimum total waiting time from the decision tree to obtain a corresponding control sequence; and E: outputting a control sequence for previous k green light phases according to thecontrol sequence, and executing the step A. Through the traffic signal optimization method, the total waiting time of all vehicles at road crossings can be obviously shortened, meanwhile, since the pruning operation is performed on the decision tree, the method has controllable amount of calculation and is convenient to popularize.