What Data Looks Like for This Category
Data sources for this category include BOMs, Gerber files, and mounting coordinates provided by customers; work order data from MES systems; batch records of solder paste and components; real-time operational data from mounting machines, SPI/AOI inspection equipment, and reflow ovens; and first article confirmation reports, maintenance records, and product traceability labels. BOM and coordinate data updates occur each time a work order is generated. Changeover tables and stencil parameters update each time a line is changed. Inspection data and furnace temperature data update in real time. Data includes structured fields such as work order numbers, part numbers, and reference designators; semi-structured SPI/AOI defect reports; and time-series furnace temperature curve data. Fields cover component batch numbers, mounting coordinates (millimeters), furnace temperature (degrees Celsius), defect location coordinates, and additional relevant fields.
Constraints Imposed on Database and Operations
Dispersed multi-source data requires databases to support mixed storage of structured, semi-structured, and time-series data. This avoids increasing operational complexity by splitting into multiple independent databases. High real-time performance and high-frequency update requirements mean database connection pools must support concurrent requests. This prevents service interruptions caused by connection exhaustion. Strong relational links exist between data sets. For example, traceability labels must associate component batches, mounting positions, and inspection reports. Multi-dimensional indexes must be established to improve the efficiency of associated queries. The data volume per work order grows with product complexity. Storage capacity must be configured appropriately to avoid overflow.
How to Set Configurations
This configuration applies to FastGPT v4.17.0.
| Configuration Item | Suggested Value | Basis for This Value |
|---|---|---|
MONGODB_URI | mongodb://[用户名:密码]@[主机地址]:[端口]/smt_trace?authSource=admin | Stores semi-structured SPI/AOI reports, maintenance records and other non-fixed-format data. Replica set configuration ensures high availability |
PG_URL | postgresql://[用户名:密码]@[主机地址]:[端口]/smt_manufacture?sslmode=require | Stores structured BOMs, changeover tables, traceability labels and other work order data, supports complex associated queries |
DB_MAX_LINK | 20–30 concurrent connections | Matches the per-work-order and real-time update frequency, prevents connection pool exhaustion and failed request responses |
REDIS_URL | redis://[主机地址]:[端口]/0 | Caches real-time furnace temperature and mounting machine status data, reduces query pressure on the primary database |
Three Common Mistakes
- Calling a database node returns an empty JSON array or abnormal field format. Cause: Correct parsing rules for semi-structured AOI reports for the SMT category are not configured, and the generic database node template is used directly.
- Workflows return none when concurrent call volume reaches 2-3 per second. Cause: The
DB_MAX_LINKconfiguration value is too low, causing the database connection pool to be exhausted and unable to process subsequent requests. - Local debugging fails to connect to a remote MES database. Cause: The local debugging IP address is not added to the remote database's access whitelist, or access permissions for the corresponding port are not enabled.
How to Confirm Configuration is Successful
- Run a test workflow to query BOM data for a specified work order. Confirm the returned result includes required business fields such as part numbers and reference designators.
- Simulate concurrent business calls. Check that the database connection pool occupancy rate does not exceed the configured threshold, and ensure no connection exhaustion occurs.
- Import a JSON dataset of an SPI inspection report. Confirm the database can correctly store the data and associate it with the traceability label of the corresponding product.
- Check real-time data cached in Redis. Confirm the update frequency matches the real-time requirements set by the business.
The values provided are common starting points and should be measured against the reader's own samples.