Ledger Aggregation and Report Generation for Land Use Rights, Mining Rights, and State-Owned Property Rights Transactions: Database and Operations Maintenance

Ledger Aggregation and Report Generation for Land Use Rights, Mining Rights, and State-Owned Property Rights Transactions: Database and Operations Maintenance

Reference only; verify against the target FastGPT release and deployment documentation.

What the data for this category looks like

Data for this category mainly comes from national public resource trading platforms, natural resource trading systems, property right exchange systems, and state-owned asset supervision systems, with a daily update frequency. Commonly involved documents include transfer announcements, trading instructions, bid application documents, margin payment vouchers, transaction confirmation documents, listing result announcements, and property right transfer specifications.

Common data fields include transaction target ID, ownership type, margin amount, listing starting price, transaction confirmation time, and more. Units include yuan, square meters, parcels, and others. Data exported from different systems has minor format differences, so support for multi-source heterogeneous structured and semi-structured data is required.

Daily updated transaction data requires the database to have stable scheduled writing and query capabilities, to avoid interruption of aggregation tasks due to connection exhaustion. Multi-source heterogeneous data formats require the database to support flexible field mapping to reduce data cleaning complexity.

The accuracy of core fields such as ownership and transaction amount directly affects transaction compliance. Therefore, the database must be configured with strict indexing and transaction mechanisms to prevent dirty data from being written. At the same time, the data involves state-owned assets, so regular backups are required to handle abnormal situations. The operations maintenance link must ensure the timeliness of data recovery.

How to set the configurations

Configuration ItemRecommended SettingRationale
MONGODB_URImongodb://[username]:[password]@host:port/[transaction_db]?authSource=adminAdapted for unstructured data storage from multi-source transaction systems, supports creating dedicated indexes for ownership fields
PG_URLpostgresql://[user]:[pass]@host:port/[ledger_db]?sslmode=require&connect_timeout=10Stores structured ledger fields, sslmode ensures data transmission security, connect_timeout limits connection wait time to 10 seconds
DB_MAX_LINK20–30 connectionsMatches the daily transaction data volume of this category, avoids database connection pool exhaustion affecting scheduled aggregation tasks
REDIS_URLredis://:password@host:port/0?ex=86400Caches daily transaction statistics results, sets cache expiration time to 86400 seconds (1 day) to reduce repeated query pressure on the database

Three common mistakes

  • FastGPT fails to start with a database connection error, but the MongoDB visualization tool can connect normally. Cause: The MONGODB_URI is not properly configured with the dedicated database authentication source for the transaction system, or the FastGPT process does not have access permissions for the corresponding database.
  • After power outage and restart, PostgreSQL or MongoDB services fail to start, and the ledger aggregation task is interrupted. Cause: No database persistent mount directory is configured, power outage causes data loss or file system damage inside the container.
  • When using a database connection plugin to connect to PostgreSQL, a workflow verification failure prompt appears. Cause: No correct transaction ledger database schema is specified in the configuration, or the field mapping does not match the structured fields in the property right transfer specifications.

How to confirm the configuration is complete

  • Run the mongo --uri $MONGODB_URI command to verify that the database connection is normal and historical transaction data can be queried.
  • Run the pg_isready -d $PG_URL command to confirm that the PostgreSQL service is connected and ownership field data can be retrieved.
  • Trigger a scheduled ledger aggregation task once, check that the task log has no database connection errors or data writing exceptions.
  • Check whether the cache key-value pair for daily transaction statistics exists in the Redis cache to verify that the cache configuration takes effect.

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

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-28.