A method for controlling traffic lights of an upstream intersection and a downstream intersection linked by a road during a predetermined congestion time period, the method comprising: obtaining, from a server, historical track data of a plurality of vehicles that passed the road, the upstream intersection, and the downstream intersection over a historical period; obtaining a predetermined congestion time period; determining a discharge speed during the predetermined congestion time period based on a portion of the historical track data, the portion of the historical track data being corresponding to the predetermined congestion time period; determining an offset value based on a length of the road, the discharge speed, a cycle length of a first traffic light, a cycle length of a second traffic light, and a time length of a green light of the second traffic light being lit, the first traffic light being at the downstream intersection, the second traffic light being at the upstream intersection, the cycle length of the first traffic light being equal to the cycle length of the second traffic light; and determining a signal timing of the second traffic light during the predetermined congestion time period based on the offset value, wherein the discharge speed is determined by: determining a relative start time point of each of a plurality of first vehicles based on the portion of the historical track data, the first vehicles include vehicles that started to move from a stop condition and crossed the boundary between the road and the downstream intersection during one period of a green light of the first traffic light being lit; and determining the discharge speed based on the relative time points of the plurality of first vehicles, track points of the plurality of first vehicles corresponding to the relative start time points, and a linear fitting method. obtaining, from a server, historical track data of a plurality of vehicles that passed the road, the upstream intersection, and the downstream intersection over a historical period; obtaining a predetermined congestion time period; determining a discharge speed during the predetermined congestion time period based on a portion of the historical track data, the portion of the historical track data being corresponding to the predetermined congestion time period; determining an offset value based on a length of the road, the discharge speed, a cycle length of a first traffic light, a cycle length of a second traffic light, and a time length of a green light of the second traffic light being lit, the first traffic light being at the downstream intersection, the second traffic light being at the upstream intersection, the cycle length of the first traffic light being equal to the cycle length of the second traffic light; and determining a signal timing of the second traffic light during the predetermined congestion time period based on the offset value, wherein the discharge speed is determined by: determining a relative start time point of each of a plurality of first vehicles based on the portion of the historical track data, the first vehicles include vehicles that started to move from a stop condition and crossed the boundary between the road and the downstream intersection during one period of a green light of the first traffic light being lit; and determining the discharge speed based on the relative time points of the plurality of first vehicles, track points of the plurality of first vehicles corresponding to the relative start time points, and a linear fitting method. determining a relative start time point of each of a plurality of first vehicles based on the portion of the historical track data, the first vehicles include vehicles that started to move from a stop condition and crossed the boundary between the road and the downstream intersection during one period of a green light of the first traffic light being lit; and determining the discharge speed based on the relative time points of the plurality of first vehicles, track points of the plurality of first vehicles corresponding to the relative start time points, and a linear fitting method.