Reconfigurable Intelligent Surface (RIS) can improve the security of the physical layer of wireless communication by adjusting the phase of the reflective unit. After analyzing the common theoretical models and potential problems, this study proposes an alternative iterative model based on multiple input multiple output (MIMO), and designs the transmitter, channel and receiver. In addition, passive beamforming precoding matrix of RIS was jointly optimized, and the Lagrangian dual relaxation (LDR) was adopted to decouple the nonconvex problem. After that, the active and passive beamforming matrices were subjected to iterative calculation, and the beamforming was optimized through cyclic programming at the base station (BS). In addition, the high convergence of the proposed algorithm was proved by MATLAB simulation. The results of simulation demonstrate that the joint precoding framework algorithm can maximize the weighted sum rate (WSR), which in turn demonstrates the feasibility of our method. Finally, the authors analyzed the strong applicability of the RIS technology in complex wireless networks with different volatility, revealing the possibility of future development.