The invention proposes a physical layer security transmission method in a UAV-assisted cognitive wireless network, which belongs to the field of wireless communication. , and the wireless communication scenario of the eavesdropper, then, within the spectrum sensing time τ of the time slot T, the UAV performs spectrum sensing; the primary user may perform data transmission, and calculate the safe transmission rate at this time; at the same time, in the time slot T data transmission time period T a Inside, the UAV judges the access status of the current primary user channel based on spectrum sensing, chooses to be a friendly jammer or a secondary signal transmitter, and discusses the safe transmission model in four cases; based on this, the optimization model of the total safe transmission rate is formulated ; Use the particle swarm optimization algorithm to solve the problem; the UAV performs the safe transmission of the signal physical layer according to the optimal parameters obtained. The invention considers the safe transmission of primary and secondary users, thereby improving the safe transmission performance of the system.