A method for controlling communication compensation for compensating attenuation caused by a long communication distance, comprising: determining a length class of a communication link according to a time length of pulse data transmitted on the communication link; and determining a compensation scheme for communication compensation according to the length class of the communication link. wherein determining the length class of the communication link according to the time length of the pulse data transmitted on the communication link comprises: determining the time length of the pulse data; determining that the communication link is of a first length class when the time length of the pulse data is greater than a set threshold; and determining that the communication link is of a second length class when the time length of the pulse data is smaller than a set threshold; wherein, the time length of pulse data includes the time length of a high-level signal of the pulse; a length range of the communication link corresponding to the first length class is smaller than the length range of the communication link corresponding to the second length class, wherein. determining the compensation scheme for communication compensation according to the length class of the communication link comprises: not performing communication compensation if the communication link is of the first length class; and determining a communication compensation value according to a state of the signal when data enter the communication link if the communication link is of the second length class. determining a length class of a communication link according to a time length of pulse data transmitted on the communication link; and determining a compensation scheme for communication compensation according to the length class of the communication link. wherein determining the length class of the communication link according to the time length of the pulse data transmitted on the communication link comprises: determining the time length of the pulse data; determining that the communication link is of a first length class when the time length of the pulse data is greater than a set threshold; and determining that the communication link is of a second length class when the time length of the pulse data is smaller than a set threshold; wherein, the time length of pulse data includes the time length of a high-level signal of the pulse; a length range of the communication link corresponding to the first length class is smaller than the length range of the communication link corresponding to the second length class, wherein. determining the compensation scheme for communication compensation according to the length class of the communication link comprises: not performing communication compensation if the communication link is of the first length class; and determining a communication compensation value according to a state of the signal when data enter the communication link if the communication link is of the second length class. determining the time length of the pulse data; determining that the communication link is of a first length class when the time length of the pulse data is greater than a set threshold; and determining that the communication link is of a second length class when the time length of the pulse data is smaller than a set threshold; wherein, the time length of pulse data includes the time length of a high-level signal of the pulse; a length range of the communication link corresponding to the first length class is smaller than the length range of the communication link corresponding to the second length class, wherein. determining the compensation scheme for communication compensation according to the length class of the communication link comprises: not performing communication compensation if the communication link is of the first length class; and determining a communication compensation value according to a state of the signal when data enter the communication link if the communication link is of the second length class. not performing communication compensation if the communication link is of the first length class; and determining a communication compensation value according to a state of the signal when data enter the communication link if the communication link is of the second length class.