English | 简体中文
An experimental platform for AI and IoT convergence scenarios.
To build a flexible and scalable experimental environment for rapid verification of the complete workflow from industrial IoT data collection, time-series prediction analysis to final deployment delivery. We are committed to:
- Reducing Innovation Costs: Providing a quickly deployable and testable platform for various "collection + analysis + decision" scenarios.
- Accumulating Core Capabilities: Solidifying verified collection and inference patterns into reusable technical components.
- Defining Clear Boundaries: Providing a clear architecture for future expansion and maintenance by separating core logic from deployment configuration.
The project consists of three core subprojects, each responsible for "data collection", "time-series prediction" and "deployment delivery", achieving separation of concerns.
aiot-vision-collector - Data Collection & Analysis Core
A lightweight AI IoT application for collecting real-time point data from industrial/IoT devices, performing historical storage, display, and invoking prediction services.
Core Features:
- OPC UA Device Management: Add/modify/delete devices, support namespace and node browsing
- Tag Management: Maintain collection points by device (support quick add, modify, delete)
- Real-time Snapshot: Display the latest collection time, connection status, and latest values for each device tag
- Historical Query: Query historical data for a single tag within a specified minute window
- Prediction Interface: Aggregate historical data + invoke external prediction API to return prediction results
- Prediction Cache: Periodically prefetch prediction results to improve query performance
- Smart Alerts: Automatic alert function based on prediction deviation, support active alert list, statistics and confirm/ignore operations
- Alert Monitoring Dashboard: Minimalist style alert dashboard page (
/alerts/board) - REST/JSON API + Web Visualization Pages
- OpenAPI Documentation: Integrated Swagger UI
- Environment Variable Configuration: Quickly override core configurations via environment variables for containerization/cloud deployment
- Docker Support: Provides Dockerfile and build scripts
Tech Stack:
- Spring Boot 3.5.6
- Java 17
- Spring MVC, Thymeleaf
- Spring Data JPA, H2 Database (default)
- IoTDB Session Client (optional)
- Eclipse Milo OPC UA Client
- springdoc-openapi (Swagger UI)
- Lombok, Maven
aiot-vision-collector-forecast - Time-Series Prediction Service
A lightweight time-series prediction service based on the Chronos-T5-Tiny model, providing HTTP REST API interface for collection service invocation.
Core Features:
- Receive historical time-series data and return future time point predictions
- Support zero-shot prediction (no fine-tuning required)
- Output median prediction results (50% quantile)
- Lightweight model (approximately 70MB)
- Built-in health check mechanism
- Docker support
Tech Stack:
- Python 3
- Flask 3.1.2
- PyTorch 2.8.0
- Transformers 4.56.2
- chronos-forecasting 1.5.3
- Chronos-T5-Tiny Model
aiot-vision-collector-deploy - Deployment & Delivery
Responsible for application packaging, configuration and final delivery. It aggregates the build artifacts of aiot-vision-collector and aiot-vision-collector-forecast, and orchestrates all services (including IoTDB time-series database) through Docker Compose to form a complete system that can run independently.
Core Features:
- Docker Compose orchestration for all services
- Offline deployment support (package images via
generate_tar.sh) - Environment variable configuration management
- Data persistence volume management
Included Services:
- avc-server (collection service)
- avc-forecast (prediction service)
- iotdb (time-series database)
- Core Language & Framework: Java 17, Spring Boot 3.5.6
- Build & Dependency Management: Maven 3.9+
- Data Persistence: Spring Data JPA, H2 Database (default)
- Time-Series Database: Apache IoTDB 2.0.5 (optional)
- Industrial Protocol: Eclipse Milo (OPC UA)
- API Documentation: springdoc-openapi (Swagger UI)
- Language: Python 3
- Web Framework: Flask 3.1.2
- Deep Learning: PyTorch 2.8.0, Transformers 4.56.2
- Time-Series Prediction: chronos-forecasting 1.5.3, Chronos-T5-Tiny Model
- Template Engine: Thymeleaf
- Scripting Language: JavaScript (ES6+)
- Styling: CSS3
- Containerization: Docker, Docker Compose
- Interface Protocol: RESTful API (JSON)
- Docker and Docker Compose (recommended)
- Or: JDK 17+, Maven 3.9+, Python 3.x (for local development)
- Navigate to the deployment directory:
cd aiot-vision-collector-deploy- Start all services:
docker compose up -d- Access services:
- Web Management Page: http://localhost:8080/data
- OpenAPI Documentation: http://localhost:8080/swagger-ui/index.html
- Alert Monitoring Dashboard: http://localhost:8080/alerts/board
- Prediction Service: http://localhost:50000/predict
- View logs:
docker compose logs -f- Package images on an online machine:
cd aiot-vision-collector-deploy
bash generate_tar.sh-
Copy the generated
avc_images.tarto the offline machine -
Load images and start on the offline machine:
docker load -i avc_images.tar
docker compose up -dFor detailed deployment instructions, please refer to the README documentation of each subproject.
- Open http://localhost:8080/data management page
- Add OPC UA device (provide device name, protocol type and connection string)
- Browse device namespaces and nodes, select data points to collect
- Add Tags (data collection points)
- View real-time data snapshots and historical data
- Call prediction interface to get future trend predictions
- Visit
/alerts/boardto view alert monitoring dashboard
Data Query:
GET /data/api/latest- Get real-time snapshotGET /data/api/history/{deviceId}/{tagId}- Get tag historyGET /data/api/predict/{deviceId}/{tagId}- Get prediction results
Device Management:
POST /data/api/devices- Add devicePUT /data/api/devices/{deviceId}- Update deviceDELETE /data/api/devices/{deviceId}- Delete device
Tag Management:
GET /data/api/{deviceId}/tags- List device tagsPOST /data/api/{deviceId}/tags- Add tagPUT /data/api/{deviceId}/tags/{tagId}- Update tagDELETE /data/api/{deviceId}/tags/{tagId}- Delete tag
Alert Management:
GET /data/api/alerts- Get active alerts listGET /data/api/alerts/recent- Get recent alerts listGET /data/api/alerts/stats- Get alert statisticsPOST /data/api/alerts/{alertId}/ack- Acknowledge alertPOST /data/api/alerts/{alertId}/ignore- Ignore alert
Prediction Service:
POST /predict- Time-series data prediction interface
For complete API documentation, visit Swagger UI: http://localhost:8080/swagger-ui/index.html
Main configuration items (override via AVC_ prefix):
| Environment Variable | Description | Default |
|---|---|---|
AVC_SERVER_PORT |
Application port | 8080 |
AVC_IOTDB_HOST |
IoTDB host | 127.0.0.1 |
AVC_IOTDB_PORT |
IoTDB port | 6667 |
AVC_PREDICT_API_URL |
Prediction service URL | http://localhost:50000/predict |
AVC_PREDICT_API_PREDICTION_LENGTH |
Number of prediction points | 60 |
AVC_PREDICT_API_HISTORY_LENGTH |
Number of history points | 300 |
AVC_PREDICT_CACHE_ENABLED |
Enable prediction cache | true |
AVC_ALERT_ENABLED |
Enable alert feature | true |
AVC_ALERT_DEVIATION_PERCENT_THRESHOLD |
Deviation percentage threshold | 10 |
For complete configuration details, please refer to aiot-vision-collector README
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ OPC UA Device │◄────►│ avc-server │◄────►│ avc-forecast │
│ (Industrial) │ │ (Collection) │ │ (Prediction) │
└─────────────────┘ └──────────────────┘ └──────────────────┘
│ │
│ │
┌────────▼─────────┐ ┌────────▼─────────┐
│ H2 Database │ │ Chronos Model │
│ (Metadata) │ │ (Time-Series) │
└──────────────────┘ └──────────────────┘
│
┌────────▼─────────┐
│ IoTDB │
│ (Time-Series DB)│
└──────────────────┘
- Fork the project and create a new branch
feature/xxx - Code and add test cases
- Run
mvn testto ensure all tests pass - Submit Pull Request with description of changes and impact
This project is an internal development project and follows the company's related license agreements.
Open source components used follow their respective licenses:
- Spring Boot: Apache License 2.0
- Eclipse Milo: Eclipse Public License 2.0
- Chronos: Apache License 2.0
For issues or suggestions, please submit through the Issue tracking system.
Current Version:
- aiot-vision-collector: 0.0.1-SNAPSHOT
- aiot-vision-collector-forecast: 1.0.0-rc8
Last Updated: 2025-11-25