# Python-12-柔性催缴系统 **Repository Path**: sanxiadaer/python12jiminanbeilvdou ## Basic Information - **Project Name**: Python-12-柔性催缴系统 - **Description**: 组长:胡智锐;组员:邱渤钧,潘永康,罗逸舟 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2026-08-10 - **Last Updated**: 2026-08-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Intelligent Collection Management System ## Project Introduction This project is a complete back-end service system for an Intelligent Collection Management System, built on the Python FastAPI framework. It provides full-process automation support for debt collection. The system integrates core functions such as machine learning prediction, LLM-based smart script generation, and compliance checks, effectively improving collection efficiency and reducing compliance risks. The system adopts a separated front-end and back-end architecture. The back-end provides RESTful API interfaces, while the front-end uses Vue.js + Ant Design to build a modern management interface. ## Core Functions The intelligent collection system provides the following core capabilities: **Intelligent Collection Engine**: Based on user profiles and billing data, automatically performs user classification and risk assessment. Combines prediction models to calculate repayment probability and dynamically adjusts collection strategies and script content. **LLM Smart Script Generation**: Integrates large language model capabilities to automatically generate personalized collection scripts based on user characteristics, overdue amounts, days past due, etc. Supports multi-stage and multi-scenario script customization. **Repayment Prediction Model**: Uses machine learning algorithms to predict user repayment probability. Combines with simulation modules to evaluate collection effectiveness and optimize collection resource allocation. **Compliance Management**: Built-in sensitive word detection mechanism. Supports custom compliance rules and real-time monitoring of sensitive information during the collection process to ensure collection behavior meets regulatory requirements. **User Segmentation Management**: Supports multi-dimensional user segmentation. Can filter target users by conditions such as risk level, VIP status, and overdue stage to achieve precise collection. ## Tech Stack **Back-end Technology Selection**: Python 3.11+ / FastAPI / SQLAlchemy / Pydantic / JWT **Machine Learning Module**: NumPy / Scikit-learn **Front-end Technology Selection**: Vue 3 / TypeScript / Ant Design Vue / Vite **Database**: SQLite (Development) / PostgreSQL (Production Recommended) ## Quick Start ### Environment Preparation Ensure that Python 3.11 or higher and Node.js 18+ are installed locally. ### Back-end Service Installation After cloning the project repository, execute the following commands in the project root directory: Create and activate the virtual environment: ```bash python -m venv venv # Linux/Mac source venv/bin/activate # Windows venv\Scripts\activate ``` Install Python dependencies: ```bash pip install -r requirements.txt ``` Initialize the database: ```bash python -m backend.seed ``` Start the back-end service: ```bash uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload ``` The back-end service runs on http://localhost:8000 by default. ### Front-end Service Installation Enter the front-end directory and install dependencies: ```bash cd frontend npm install ``` Start the development server: ```bash npm run dev ``` Visit http://localhost:5170 to open the management interface. ## Default Accounts The following test accounts are provided after system initialization: **Admin Account**: admin / admin123 **Regular User Account**: user / user123 ## Project Structure ``` python12jiminanbeilvdou/ ├── backend/ # FastAPI Backend Service │ ├── main.py # Application Entry Point │ ├── auth.py # Authentication & Authorization Module │ ├── config.py # Configuration File │ ├── database.py # Database Connection │ ├── models.py # Data Model Definitions │ ├── response.py # Response Wrapper │ ├── seed.py # Data Initialization │ └── routes/ # API Route Modules │ ├── auth.py # Auth Interfaces │ ├── collections.py # Collection Execution Interfaces │ ├── compliance.py # Compliance Management Interfaces │ ├── dashboard.py # Dashboard Interfaces │ ├── segments.py # User Segmentation Interfaces │ └── users.py # User Management Interfaces ├── core/ # Core Business Logic │ ├── pipeline.py # Collection Processing Pipeline │ ├── predictor.py # Repayment Prediction Model │ ├── profile.py # User Profile Analysis │ ├── simulation.py # Collection Effect Simulation │ ├── llm_generator.py # LLM Script Generation │ ├── trainer.py # Model Training Module │ └── compliance.py # Compliance Check Module ├── data/ # Data Files │ ├── bills.csv # Billing Data │ ├── users.csv # User Data │ ├── train.csv # Training Dataset │ ├── test.csv # Test Dataset │ └── generator.py # Mock Data Generator ├── frontend/ # Vue.js Front-end Application │ ├── src/ │ │ ├── pages/ # Page Components │ │ ├── components/ # Common Components │ │ ├── api/ # API Interface Wrapper │ │ ├── store/ # State Management │ │ ├── router/ # Router Configuration │ │ └── utils/ # Utility Functions │ └── package.json └── requirements.txt # Python Dependencies ``` ## API Interface Documentation ### Authentication Module | Interface | Method | Description | |------|------|------| | /api/auth/login | POST | User Login | | /api/auth/me | GET | Get Current User Info | | /api/auth/change-password | POST | Change Password | ### User Management | Interface | Method | Description | |------|------|------| | /api/users | GET | User List Query | | /api/users/{user_id} | GET | User Details | | /api/users/{user_id}/profile | GET | User Profile | ### Collection Management | Interface | Method | Description | |------|------|------| | /api/collections/run | POST | Execute Collection Task | | /api/collections/logs | GET | Collection Record List | | /api/collections/stats | GET | Collection Statistics | ### Compliance Management | Interface | Method | Description | |------|------|------| | /api/compliance/sensitive-words | GET/POST | Sensitive Word Management | | /api/compliance/rules | GET/PUT | Compliance Rule Management | | /api/compliance/complaints | GET | Complaint Records | | /api/compliance/satisfaction | GET | Satisfaction Data | ### Other Interfaces | Interface | Method | Description | |------|------|------| | /api/dashboard | GET | Dashboard Data | | /api/segments | GET | User Segmentation List | | /api/hello | GET | Interface Test | | /health | GET | Health Check | ## Configuration Description Main configuration items are located in `backend/config.py` and can be overridden via environment variables: | Config Item | Description | Default Value | |--------|------|--------| | SECRET_KEY | JWT Secret Key | Default built-in value | | ALGORITHM | JWT Algorithm | HS256 | | ACCESS_TOKEN_EXPIRE_MINUTES | Token Expiration Time | 60 minutes | ## License This project is for learning and research purposes only.