The invention discloses a multi-interval optimization OSPWM algorithm, which is implemented by the following steps of: averagely distributing 2C GCLKs for displaying C-bit gray data to 2A sub-cycles; setting a low-gray high-brush mode refresh rate threshold value F, a register L and a register H; dividing the gray data into four gray intervals, namely low gray, secondary low gray, secondary high gray and high gray; under the low gray condition, dividing gray data into D groups, wherein each group comprises L GCLKs, and the distances among the groups are equal; under the secondary low gray condition, carrying out scattering distribution with the minimum value being 1 GCLK, wherein the distances among the groups are equal; under the secondary high gray condition, setting an optimization level of a transformation algorithm to be H, wherein the minimum opening width of the algorithm is H GCLKs; dividing the redundant gray data by H to obtain a quotient D and a remainder R; reopening the quotient D groups GCLK according to a uniform scattering sequence, wherein the distances among the groups are equal, and fixedly distributing the remaining gray data R to the 0th group; and under the high gray condition, setting the gray level data to be greater than 2A*H, and carrying out scattering distribution with the minimum value being 1 GCLK, wherein the distances among the groups are equal.