What data for this category looks like
Data sources include design BOM, silicon steel sheet and insulating material procurement records, vacuum drying equipment operation logs, oil test reports, high-voltage test reports from the test station, and product nameplate parameter tables. Data is updated once per product or batch of raw materials. A single product’s ledger includes multiple types of documents: winding and core assembly records, vacuum drying logs, insulating oil test data, partial discharge and withstand voltage test reports, and more. Fields include product serial number, winding turns, insulating oil breakdown voltage, partial discharge level, and others. Some fields have clear physical units, and storage formats must follow unified business rules.
Constraints imposed on database and operations maintenance workflows
The update rhythm of independent ledgers for single products requires the database to support high-concurrency writes and data isolation at the single-instance level, to avoid mixing ledger data from different products. The need to store multiple types of documents together requires the database to support storage and query of both structured metadata and unstructured reports. Strong product traceability requirements mandate that all data be bound to a unique product serial number as the primary key, to ensure accurate data association. Business characteristics with severe potential consequences require the database to have complete backup and verification mechanisms, to prevent production risks from data loss or tampering. Additionally, differences from other equipment categories require dedicated storage adaptation for the field format of insulation test data.
Configuration settings
This configuration is based on FastGPT v4.17.0. Specific configuration items and their rationales are listed below:
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
| Maximum database connection pool size | 60–90 | Adapts to concurrent write demands for multi-link production ledger synchronization, prevents database connection exhaustion |
| MongoDB connection address | MONGODB_URI=mongodb://[account:password@]database address:port/transformer ledger database?replicaSet=rs0 | Stores unstructured documents such as insulating oil reports and partial discharge test reports; replica set deployment ensures high data availability |
| PostgreSQL connection address | PG_URL=postgresql://[account:password@]database address:port/product metadata database | Stores structured metadata such as product serial numbers and design BOM association relationships, supports complex associated queries |
| Redis connection address | REDIS_URL=redis://[password@]cache address:port/database number?maxmemory-policy=allkeys-lru | Caches frequently accessed product nameplate parameters and test data indexes, reduces database query latency |
| Data backup interval | 24 hours | Ensures recoverability of production ledger data, prevents product traceability failure caused by data loss |
| Write timeout period | 30 seconds | Adapts to write demands for large files such as high-voltage test reports, prevents production process interruptions caused by timeouts |
Three common misconfigurations
- Symptom: FastGPT fails to start with a MongoDB connection error indicating version incompatibility. Cause: MongoDB version compatibility with FastGPT is not verified, and an unvalidated version is used for deployment.
- Symptom: Locally deployed Redis, MongoDB, and other services cannot be accessed by FastGPT containers. Cause: The correct network mode is not configured in docker-compose.yml, or local service ports are not mapped to the container network.
- Symptom: Retrieving test reports returns empty results or irrelevant content. Cause: The product serial number is not used as the associated field for data indexing, preventing accurate matching by single-product ledger.
How to confirm successful configuration
- Run the built-in database connectivity test script to verify the connection status of
MONGODB_URI,PG_URL, andREDIS_URL, and confirm no authentication or network exceptions exist. - Simulate the production ledger write process for a single transformer, submit complete assembly records, test reports, and other data, and check the integrity and correctness of corresponding fields in the database.
- Trigger a manual data backup task, confirm that backup files are generated normally, the storage path meets configuration requirements, and test data can be restored normally.
- Retrieve ledger data for a specified product serial number, confirm that returned results match the actual entered business data, and matching accuracy meets the threshold set by business rules.
The values provided here are common starting points, and should be evaluated against the user's own samples.