A method for controlling an optical switch matrix, wherein the optical switch matrix is an M×N optical switch matrix of a crossbar structure, the optical switch matrix comprises M input ports and N output ports, any optical switch in M×N optical switches of the optical switch matrix comprises a first drive and a second drive, first drives of N optical switches in each row of the optical switch matrix are connected together to form a row drive, and second drives of M optical switches in each column of the optical switch matrix are connected together to form a column drive, wherein M and N are both positive integers, and at least one of M and N is greater than or equal to 2; and the method is characterized by: setting P row drives corresponding to P input ports in the M input ports to a reset row drive value, and setting Q column drives corresponding to Q output ports in the N output ports to a reset column drive value, so that P×Q optical switches at intersections of the P input ports and the Q output ports are in a first state, wherein P is less than or equal to M, and Q is less than or equal to N; and simultaneously performing the following operations on the P row drives corresponding to the P input ports and the Q column drives corresponding to the Q output ports: successively setting, based on time, a row drive corresponding to an i th input port in the P input ports to values in a switching row drive sequence, and successively setting, based on time, a column drive corresponding to a j th output port in the Q output ports to values in a switching column drive sequence, wherein the switching row drive sequence and the switching column drive sequence make a target optical switch in the P×Q optical switches remain in the first state all the time, and the switching row drive sequence and the switching column drive sequence make other optical switches in the P×Q optical switches different from the target optical switch switched from the first state to a second state in first time periods respectively corresponding to the other optical switches, wherein the target optical switch is at least one optical switch at an intersection of at least one input port in the P input ports and a target output port corresponding to the at least one input port, a value of i is 1, 2,..., or P, and a value of j is 1, 2,..., or Q. setting P row drives corresponding to P input ports in the M input ports to a reset row drive value, and setting Q column drives corresponding to Q output ports in the N output ports to a reset column drive value, so that P×Q optical switches at intersections of the P input ports and the Q output ports are in a first state, wherein P is less than or equal to M, and Q is less than or equal to N; and simultaneously performing the following operations on the P row drives corresponding to the P input ports and the Q column drives corresponding to the Q output ports: successively setting, based on time, a row drive corresponding to an i th input port in the P input ports to values in a switching row drive sequence, and successively setting, based on time, a column drive corresponding to a j th output port in the Q output ports to values in a switching column drive sequence, wherein the switching row drive sequence and the switching column drive sequence make a target optical switch in the P×Q optical switches remain in the first state all the time, and the switching row drive sequence and the switching column drive sequence make other optical switches in the P×Q optical switches different from the target optical switch switched from the first state to a second state in first time periods respectively corresponding to the other optical switches, wherein the target optical switch is at least one optical switch at an intersection of at least one input port in the P input ports and a target output port corresponding to the at least one input port, a value of i is 1, 2,..., or P, and a value of j is 1, 2,..., or Q.