To address the privacy leakage, copyright disputes, and data transparency issues brought by large language models, this article systematically reviewed membership inference attacks and defense techniques. Taking the large model lifecycle and system components as two main lines: First, it explained the formal definition and threat model of membership inference, and elaborated on the theoretical basis of its evolution from overfitting to local and conditional memorization, clarifying the study’s incremental contribution compared with existing general surveys on membership inference. Then, it organized attacks in scenarios such as pretraining, fine-tuning, alignment, black-box application programming interfaces (API), multimodal, and retrieval-augmented generation (RAG), with emphasis on supplementing LiRA, MoPe, ReCaLL, and multiple types of RAG attacks. Furthermore, it quantitatively compared representative results of benchmarks such as WikiMIA and MIMIR, pointing out that the distribution bias caused by temporal splitting could significantly overestimate attack capability. Finally, it constructed a defense-in-depth framework from five levels: data governance, regularization and differential privacy, knowledge distillation, decoding filtering, and machine unlearning. The analysis shows that attack signals have shifted from global statistics to per-sample calibration, local memorization peaks, conditional changes, and system knowledge coverage, while strict in-distribution and low false-positive-rate evaluation remains a core issue constraining practical auditing.