Optical beamforming technology is a new type of broadband RF beamforming technology, which uses optical signal as the carrier to carry RF information, which means it uses optical signal to transmit and distribute RF signal to realize the control of RF signal. In this paper, the principle of optical beamforming based on microwave photonics is introduced, focusing on the optical incoherent beamforming architecture and optical coherent beamforming architecture. Through detailed theoretical formula derivation and software simulation, it is shown that the above two kinds of optical beamforming architectures can realize the signal synthesis for the received signals of multiple antennas. In view of the urgent demand of large array antenna units system for optical beamforming technology, proposed is an optical beamforming architecture suitable for the scale of thousand antennas by using the advantages of optical coherent and incoherent beamforming. It provides solution for the application of optical beamforming technology in phased array radar, electronic countermeasure and other fields.