Skin cancer patients experience high rates of anxiety and depression, yet routine screening is inconsistent. This study collects social media content from 500 patients over 24 months (12 months retrospective + 12 months prospective). Linguistic markers are identified using a custom Skin Cancer Linguistic Inquiry and Word Count (SC-LIWC) dictionary developed through expert consensus. A hierarchical transformer network with multi-head self-attention is built, comprising word-level (RoBERTa-wwm-ext), post-level (BiGRU+attention), and user-level (8-head self-attention) encoders with platform embeddings to address cross-platform heterogeneity. The model predicts suicide ideation risk (C-SSRS score ≥2) within 12 months, achieving AUC=0.91 in validation. An AI Early Warning System (EWS) is prospectively tested: alerts are triggered at threshold 0.38, reviewed by psychologists (12.4 min/alert), and interventions (crisis hotline, online counselling, psychoeducational materials) are automatically delivered. All data collection complies with China's Personal Information Protection Law (PIPL) and uses a 5-layer de-identification protocol (direct identifier removal, SHA-256 hashing, NER redaction, timestamp shifting, role-based access control). The study also examines cross-platform performance, optimal observation windows, and false-positive patterns to guide refinement