Drafting Process Documents and Exception Reports for Non-Ferrous Metal Smelting and Electrolysis: Deployment and Upgrade

Core data for this category typically comes from concentrate and auxiliary material analysis, DCS systems, cell voltage and current monitoring

What the data for this category looks like

Core data for this category typically comes from concentrate and auxiliary material analysis, DCS systems, cell voltage and current monitoring, laboratories, energy and environmental monitoring equipment. Daily produced documents usually include batching lists, smelting records, electrolytic cell status records, test reports, anode and cathode quality records, and environmental protection ledgers. Each document contains specific parameters for the corresponding process, such as concentrate grade, cell voltage, current intensity, and others. Units include percentage, ton, millivolt, kiloampere, and others. Data update frequency varies with process nodes. Corresponding records are generated for each batch of raw materials, each furnace, or each cell. Some real-time monitoring data has an update frequency of up to seconds.

What constraints do these characteristics impose on deployment and upgrade

The multi-source real-time data, complex structured documents, and high-frequency update rhythm of this category impose multiple constraints on FastGPT deployment and upgrade. Multi-source data requires stable database and cache support to avoid data parsing interruptions caused by exhausted connections. High-frequency real-time data requires connection pool configurations adapted to high-concurrency scenarios to prevent database overload. Batch process documents and exception reports require adapted long-text vector storage and parsing. Intranet deployment scenarios require opening network paths for internal services to ensure that models, storage, and other services can access each other. Additionally, classified smelting data requires strict configuration of file and interface access permissions to prevent data leaks. This document is written based on FastGPT v4.17.0.

How to set the configurations

Configuration ItemRecommended SettingRationale for This Setting
DB_MAX_LINK10–15Adapts to the high-frequency real-time data query and write scenarios of this category, avoiding database connection exhaustion
PG_URLpostgres://{username}:{password}@{intranet PostgreSQL address}:5432/fastgptStores structured business data such as batching lists, test reports, and electrolytic cell status records
REDIS_URLredis://{username}:{password}@{intranet Redis address}:6379/0Caches high-frequency access data such as real-time cell voltage and current, latest smelting records, to reduce database pressure
FE_DOMAINhttps://{intranet access domain}:3000Configures the frontend access address after reverse proxy, adapting to intranet HTTPS access scenarios
FILE_TOKEN_KEYRandomly generated 32-bit stringProtects access permissions for uploaded classified documents such as smelting ledgers and environmental protection ledgers
STORAGE_S3_ENDPOINThttp://{intranet MinIO address}:9000Stores batch-uploaded process documents and exception reports, adapting to intranet storage requirements

Three common mistakes

  • Symptom: The channel model list only displays reranked models, and other language models cannot be selected. Cause: The API address of the model channel was not correctly configured during deployment, or the network path between the model service and FastGPT containers was not opened in the intranet environment.
  • Symptom: No response after uploading a process file, or a file parsing failure prompt is displayed. Cause: FILE_TOKEN_KEY was not correctly set, or the Nginx reverse proxy did not forward file upload request headers and ports.
  • Symptom: Deployment failure when using Synology Docker, with logs prompting a database connection error. Cause: The intranet database address in PG_URL was not correctly filled, or the Synology port mapping configuration was incorrect.

How to confirm proper configuration

  • Access the address corresponding to FE_DOMAIN, enter the system status page, and check whether the connection status of the database and Redis cache shows normal.
  • Upload a sample document of electrolytic cell status records, wait 10–20 seconds, and check whether a vector index can be normally generated and the parsing result is displayed.
  • Configure a local model channel, initiate a test query, and check whether a model response can be normally returned.
  • Check the database connection pool monitoring, confirm that the current number of connections does not exceed the set threshold of DB_MAX_LINK, and there are no frequent connection disconnection errors.

The values provided are common starting points and should be measured against the reader's own samples.