As one of the most common weathers in daily life, the rain can change the atmospheric compositions and humidity in a short time, which may cause non-ignorable attenuation in free-space quantum communication system. Besides, the absorption and scattering effects caused by raindrops can also bring huge attenuation to photon's propagation. In order to solve this burst interference caused by rain weather, optimal mean photon number per pulse and chameleon self-adaptive algorithm (CSA) are proposed based on the rainfall distribution model and decoy-state quantum key distribution. Due to the lack of producing mature ideal single photon source technology, the decoy-state protocol with highly attenuated laser becomes the most practical and most widely used quantum secure communication protocol currently. Among all the different kinds of decoy-state protocols, the vacuum+weak decoy state quantum communication secure protocol is chosen to be the basis of our research. Besides, in order to study the influence of mean photon number per signal pulse, we set the pulse ratio between signal state, decoy state and vacuum state to be fixed at 2:2:1. Since the performance of the vacuum+weak decoy state quantum communication system is closely related to the mean photon number per pulse, it is very necessary to confirm the optimal value. Combining the Weibull rainfall distribution model and Mie scattering theory, we first analyze the attenuation caused by rainfall in a free-space quantum communication system. Then the functional relationship among opt, rainfall intensity (J) and link distance (L) is built by studying the propagation of highly attenuated laser in depolarizing channel. Finally, two parameters, secure key rate and channel survival function, are chosen to evaluate the system's performance of reliability and validity. These two parameters are respectively compared between the system with and without CSA. Simulation results show that, as J=30 mm/24 h, L=30 km, the secure key generation rate rises from 210-4 up to 3.510-4 when using the CSA in the quantum communication system; as J=60 mm/24 h, L=20 km, the quantum channel survival function value increases from 0.52 to 0.63; as the quantum channel survival function value is required no lower than 0.5, the rainfall intensity in which quantum communication system can survive rises from 62 mm/24 h up to 74 mm/24 h. These results prove that there is a close relationship between opt and the channel parameters of the quantum communication system under the background of rainfall. Therefore, it is necessary for us to self-adapt the opt value by combining rainfall intensity with the CSA strategy if the reliability and survivability of free space quantum communication system are required to be improved.