A unified management system for field investigation heterogeneous data
By using a reflective universal data access module and a mobile acquisition subsystem, the problems of scalability and high development costs in heterogeneous data management during field surveys are solved, achieving low marginal cost system maintenance and efficient data management.
Patent Information
- Application Number
- CN202611565147.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot effectively manage various heterogeneous survey forms in field surveys, resulting in poor scalability, high development costs, inability to iterate quickly, and low data management efficiency.
It adopts a reflective general data access module and a mobile data collection subsystem. It dynamically parses HTTP requests through Java reflection mechanism, automatically matches and assigns values to survey form fields, and combines them with the backend management subsystem to realize unified data management and review process, supporting rapid expansion of multiple survey types.
It achieves low marginal cost system maintenance and rapid iteration, significantly improving the efficiency and data accuracy of field surveys, and reducing development and maintenance costs.
Smart Images

Figure CN123178496A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data acquisition and management technology, specifically relating to a unified management system for heterogeneous data from field surveys. Background Technology
[0002] Field surveys (such as surveys of superior forest trees, monitoring of growth, population surveys, and recording of sample plot conditions) are fundamental to agricultural and forestry scientific research. The management of data collected from field surveys directly affects the effectiveness of forest resource assessment, scientific research, and ecological protection.
[0003] When conducting field data surveys, investigators typically need to carry multiple devices simultaneously—GPS locators, cameras, altimeters, calipers, paper record sheets, laptops, etc. The collected GPS coordinates, photographs, measurement data, and tabular records are scattered across different devices and media. Later data management cannot be linked in real time, requiring extensive manual sorting and matching. Furthermore, forestry surveys often involve various specialized forms, each containing 20-30 fields. Different survey forms have significantly different structures, and traditional database solutions require separate table creation and interface development for each type of form, resulting in poor scalability.
[0004] The prior art CN118246706B discloses a field survey management system based on geographic information big data. It uses a highly customizable data module approach to process different types of field survey data. That is, multiple data modules are predefined in the system design stage, and different survey scenarios are adapted through module combination, which improves the shortcomings of traditional database solutions to a certain extent.
[0005] However, in the existing technology, developers need to pre-write the corresponding data module code for each survey type. When a new survey type needs to be added, a complete new module code still needs to be written, which results in high subsequent expansion costs and long development cycles, and cannot meet the needs of actual field surveys for rapid iteration of survey forms. Summary of the Invention
[0006] To address the shortcomings of existing technologies in expanding various heterogeneous survey form structures in the field, this invention provides a unified management system for heterogeneous field survey data.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A unified management system for heterogeneous data from field surveys includes: The mobile data collection subsystem is used to define different survey form templates, fill the collected heterogeneous data into the survey form templates according to field types, and send POST requests to the backend management subsystem. The backend management subsystem includes a reflective general data access module and an auditing module; The reflective general data access module dynamically parses the target entity type in the HTTP request through the request URL path, creates a corresponding entity instance based on the target entity type, uses Java reflection to traverse all declared fields of the entity instance, performs field matching in combination with the request body in general Map format, obtains field values with the same name, and assigns the converted field values to the entity instance; wherein, one entity type corresponds to one professional survey form; The audit module sets up an audit process to conduct quality audits on the assigned entity instances, and captures all data change events through entity listeners to generate audit logs.
[0008] Preferably, the backend management subsystem further includes a user authentication and authorization module, which is used to parse the JWT token carried in the request header, identify the identity of the currently logged-in user, and implement fine-grained permission control using the role-URL pattern.
[0009] Preferably, the backend management subsystem further includes a data persistence module, which translates the received entity instances into SQL statements, writes them to a PostgreSQL database, and stores them.
[0010] Preferably, the mobile acquisition subsystem further includes: an AI measurement module, a GPS positioning module, a CSV export module, and a data synchronization module; The GPS positioning module is used to acquire current latitude, longitude, and altitude information; the AI measurement module is used to acquire heterogeneous data of the object to be measured and associate the heterogeneous data with the current GPS coordinates transmitted by the GPS positioning module; the CSV export module is used to export form data as a CSV format file, specifically using UTF-8 BOM encoding; the data synchronization module is used to discover the core management system within the local area network for data synchronization through a UDP broadcast mechanism.
[0011] Preferably, the data collected by the AI measurement module and the GPS positioning module are used to populate the corresponding fields in the survey form template through a callback mechanism and field mapping.
[0012] Preferably, the field types of the multi-type structured form module specifically include: text input field, numeric input field, checkbox field, photo field, GPS autofill field, and date field.
[0013] Preferably, the review module is configured with a tiered review system to implement a four-level status and three-level role review process for entity instances. The review status, reviewer, review comments, and review time fields are uniformly set through a reflection mechanism. Investigators create and edit survey data and submit it for review to the reviewers. Reviewers review the survey data, assess its validity, and output a pending review status, an approved status, or a rejected status, supporting approval or rejection. Each survey form template entity includes review status, reviewer, review comments, and review time fields.
[0014] The unified management system for heterogeneous data from field surveys provided by this invention has the following beneficial effects: This invention establishes a reflective universal data access module within the system. A unified, universal entry point receives all requests. When adding a new survey type form, only the target entity type in the POST request needs to be dynamically parsed. Compared to simply adding a field list, no additional business logic code is required, reducing development effort from writing extensive business logic to defining data structures. Utilizing reflection to automatically match and assign values based on the field list, the marginal cost of system maintenance is extremely low. This allows the system to adapt to emerging new needs in field surveys, lowering long-term maintenance costs and reducing iteration barriers. Attached Figure Description
[0015] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a framework diagram of a unified management system for heterogeneous data from field surveys, according to an embodiment of the present invention. Detailed Implementation
[0017] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0018] Example This invention provides a unified management system for heterogeneous data from field surveys, such as... Figure 1 As shown, it includes a mobile data acquisition subsystem, a backend management subsystem, and a core management system: The mobile data acquisition subsystem includes an AI measurement module, a GPS positioning module, a multi-type structured form module, a CSV export module, and a data synchronization module.
[0019] The AI measurement module integrates an image segmentation model and an area calculation engine to achieve image acquisition, AI segmentation, area calculation, and size measurement of the object to be measured (such as plant leaves). The measurement results are automatically associated with GPS coordinates.
[0020] The GPS positioning module obtains the current latitude, longitude, and altitude through the mobile terminal's built-in GPS sensor. In the survey form, the latitude, longitude, and altitude fields can be automatically filled with the current GPS coordinates with a single click, eliminating the need for manual input. GPS data is automatically linked to measurement records and form records. Positioning accuracy supports both standard GPS (±5 meters) and RTK high-precision positioning (±2 centimeters) modes.
[0021] The system includes multiple types of structured form modules, with various built-in survey form templates, including but not limited to: superior tree information form, growth status survey form, natural population survey record form, sample plot overview form, shrub sapling quadrat record form, seedling herb quadrat survey record form, and form for measuring each tree.
[0022] Each form template defines the following field types: (a) Text input fields: such as number, tree species name, location description; (b) Numerical input fields: such as diameter at breast height (cm), tree height (m), crown width (m), supporting numerical range validation; (c) Select fields such as growth vigor (vigorous / average / weak), trunk shape (straight / curved / branched), and health status (healthy / average / disease and pests), supporting single or multiple selection. (d) Photo field: Used to take associated photos. The photos are stored in the table records and are associated with the file path when exported. (e) GPS autofill fields: latitude and longitude, altitude, which can be obtained from the GPS module with one click; (f) Date field: Survey date, supports date picker.
[0023] The CSV export module supports exporting form data as CSV files and saving them to the phone's local storage. The photo field exports the photo file path, facilitating later viewing of associated photos on a PC via the file path. The CSV file uses UTF-8 BOM encoding to ensure correct display of Chinese characters in Microsoft Excel. The AI measurement and GPS positioning modules are deeply integrated with various structured form modules. Measurement results and GPS coordinates are automatically filled in through form fields, and photos are directly linked to records through the photo field. The three-stage process of measurement, recording, and data entry is compressed into a single integrated operation, allowing investigators to complete all work within a single application interface without switching between different devices and media. This fundamentally eliminates the error risks associated with manual copying and secondary data entry, prevents data association errors, and significantly improves fieldwork efficiency and the accuracy of collected data.
[0024] The data synchronization module is used for data synchronization with the backend management subsystem. Synchronization methods include:
[0025] (a) Network discovery mechanism: Supports multiple server address acquisition methods, including UDP broadcast automatic discovery, QR code scanning configuration, and manual input; (b) UDP Broadcast Discovery (Optional Implementation): After the backend service starts, it periodically broadcasts server information (IP address, port, service name) to the local area network; the backend service scans all network interfaces of the local machine, obtains the IPv4 addresses of Wi-Fi and wired networks and broadcasts them respectively; the mobile terminal listens to the UDP broadcast port, automatically discovers the core management system in the local area network, and automatically selects the best connection method according to the signal strength.
[0026] The backend management subsystem includes: a reflective general data access module, a hierarchical audit module, an audit log module, a user authentication and authorization module, and a data persistence module. The core management system transmits data from the mobile data collection subsystem to the backend management subsystem via a standard REST API.
[0027] This reflective general-purpose data access module employs Java reflection to implement a universal data access layer for various heterogeneous survey form structures. For new survey types, only entity classes and database migration scripts need to be defined; no additional controller and service layer code is required. Each specialized survey form corresponds to an independent entity class, with the class name corresponding to the table name, and the attributes (fields) in the class corresponding to the columns (fields) in the table.
[0028] The reflective data access module works in the following way: (a) Receive General Map<String, Any?> The request body is in the specified format (JSON is automatically parsed). (b) Determine the target entity type based on the request URL path (e.g., / api / survey / excellent-trees → ExcellentTree entity class); (c) Create an entity instance and call the generic copyFromMap method; (d) Traverse all declared fields of the entity class using reflection, excluding system-managed fields such as id, createdAt, and updatedAt; (e) For each field, retrieve the value of the field with the same name from the Map and perform automatic type conversion based on the field type: String:class.java→value.toString() Double:class.java→(value as? Number)?.toDouble() Int:class.java→(value as? Number)?.toInt() Long:class.java→(value as? Number)?.toLong() Boolean:class.java→value as? Boolean (f) Assign a value using field.set(target, convertedValue); (g) Persist via JPA's em.persist() or em.merge().
[0029] Compared to the traditional approach of developing separate Controllers, Services, and Repositories for each survey form, resulting in 21 class files across 7 types of tables and 3 layers, the reflection-based universal data access layer reduces the amount of code by approximately 70%. Adding a new survey type requires only one entity class and one database migration script, without needing to write any Controller, Service, or Repository code. Auditing, review, and query functions are automatically adapted.
[0030] The audit module includes a tiered audit module and an audit log module; The tiered approval module implements a four-level status and three-level role approval process for entity instances: Role Definitions: (a) Investigator: Creates and edits survey data and submits it for review; (b) Reviewer: Reviews survey data, supports approval or rejection, and can fill in review comments when rejecting; (c) Administrator: Manages users and roles, generates licenses, deletes data, and views audit logs.
[0031] Review status progression: DRAFT: The investigator is editing and has not yet submitted; PENDING: The investigator has submitted the document and is awaiting review by the reviewer; APPROVED: The reviewer has approved the document; REJECTED: The reviewer has rejected the document and it needs to be revised and resubmitted.
[0032] Audit operation implementation: Each survey entity contains the fields reviewStatus, reviewedBy, reviewComment, and reviewedAt; The review process uses reflection to uniformly set these fields, eliminating the need to write separate review logic for each type of survey. Automatically send a notification when an application is rejected (e.g., support email / in-app notifications).
[0033] The audit log module is used to record all critical operations, enabling tamper-proof audit tracing at the field level.
[0034] Audit content: Operation user, operation type (CREATE / UPDATE / DELETE / REVIEW / LOGIN), target table name, record ID; Field-level changes: For UPDATE operations, record the changed field name, old value, and new value; Operation reason (optional, explanation supported); IP address, User-Agent, operation timestamp.
[0035] The technical implementation involves automatically capturing changes through JPA entity listeners (@PreUpdate, @PrePersist); audit logs are append-only records and cannot be modified or deleted; log data is stored in a separate audit table, isolated from business data; administrators can query and export audit logs, but cannot modify them.
[0036] The user authentication and authorization module uses JWT (JSON Web Token) to implement stateless authentication: after logging in, users obtain an access token (valid for 24 hours) and a refresh token (valid for 7 days); access control adopts a role-URL model, with different roles having different permissions for different API paths; passwords are stored using BCrypt hashes to ensure security.
[0037] The data persistence module uses a relational database (PostgreSQL) to store all data. Database versions are managed using a database migration tool (Flyway), and table structures are defined through versioned migration scripts. The data tables include 18 tables: User Table, Project Table, Sample Plot Table, Superior Tree Information Table, Growth Status Survey Table, Population Survey Table, Sample Plot Overview Table, Shrub Sample Plot Record Table, Seedling Sample Plot Record Table, Tree Measurement Table, Measurement Record Table, Photo Table, Audit Log Table, and Permit Table.
[0038] This paper compares the development efficiency of the traditional approach (developing separate CRUD interfaces for each survey form) with the reflective approach of this application when adding new survey types. Traditional approach: Develop Controller, Service, and Repository for each of the 7 survey forms; Approach of this application: Define a generic reflective data access layer and entity classes.
[0039] The performance overhead caused by reflection (a 15% increase in response time and a 4.2% decrease in QPS) is perfectly acceptable in real-world field survey scenarios, while the improvement in development efficiency (a 90% reduction in code size) has significant practical value. Comparisons of development workload and runtime performance are shown in Tables 1 and 2, respectively.
[0040] Table 1 Comparison of Development Workload index Traditional solution This application proposal contrast Number of lines of code required to add a new survey form Approximately 450 lines Approximately 45 lines (entity class) Reduce by 90% Number of Java files required to add a new survey form 3 (Controller+Service+Repository) 1 (Entity) Reduced by 67% Development time for adding a new survey form 2.5 hours 25 minutes shortened by 83% Total number of lines of code for 7 types of survey forms Approximately 3150 lines Approximately 350 lines (including the general layer) Reduced by 89% Maintenance costs (modification of common logic) Seven services need to be modified. Modify 1 general service Reduced by 86% Table 2 Runtime Performance Comparison Table index Traditional solution This application proposal difference Average response time per request 45ms 52ms 15% Reflection overhead (per request) 0ms 7ms Acceptable Memory usage (heap memory) 85MB 88MB 3.50% Concurrency processing capacity (QPS) 520 498 -4.20% Table 3 Mobile Performance Test Table index Test value illustrate Application startup time 2.1 seconds Cold start, including model loading AI measures response time Approximately 250ms Encoding 120ms + Decoding 25ms x 2 + Post-processing 80ms Form page loading time <0.5 seconds Local SQLite query Export CSV by time (100 records) 3.2 seconds Including photo path association Data synchronization time (50 records + photos) 8.5 seconds 100 Mbps LAN Battery consumption (after 2 hours of continuous use) Approximately 18% mainstream mobile phones Memory usage Approximately 180MB Includes MobileSAM model Table 4 Backend Performance index Test value Reflective API response time (P95) 65ms Concurrent user support (recommended configuration) 100 people Database query response (complex joins) <100ms Maximum number of records in a single table (actual measurement) 1 million records (no significant performance degradation) Table 5 Overall Reliability index Test value System availability (7 days of continuous field testing) 99.80% Data integrity (power outage / abnormal test exit) 100% Synchronization conflict resolution success rate 99.50% The overall system performance test results are shown in Tables 3, 4, and 5. These results clearly demonstrate a qualitative improvement in development efficiency, fieldwork efficiency, data quality, user experience, and compliance capabilities. Applying the reflection mechanism to the management of heterogeneous tables in field surveys can reduce code volume by 90% and shorten development time by 83%.
[0041] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A unified management system for heterogeneous data from field surveys, characterized in that, include: The mobile data collection subsystem is used to define different survey form templates, fill the collected heterogeneous data into the survey form templates according to field types, and send POST requests to the backend management subsystem. The backend management subsystem includes a reflective general data access module and an auditing module; The reflective general data access module dynamically parses the target entity type in the HTTP request through the request URL path, creates a corresponding entity instance based on the target entity type, uses Java reflection to traverse all declared fields of the entity instance, performs field matching in combination with the request body in general Map format, obtains field values with the same name, and assigns the converted field values to the entity instance; wherein, one entity type corresponds to one professional survey form; The audit module sets up an audit process to conduct quality audits on the assigned entity instances, and captures all data change events through entity listeners to generate audit logs.
2. The unified management system for heterogeneous data from field surveys according to claim 1, characterized in that, The backend management subsystem also includes a user authentication and authorization module, which is used to parse the JWT token carried in the request header, identify the identity of the currently logged-in user, and implement fine-grained permission control using the role-URL pattern.
3. A unified management system for heterogeneous data from field surveys according to claim 1, characterized in that, The backend management subsystem also includes a data persistence module, which translates the received entity instances into SQL statements, writes them to a PostgreSQL database, and stores them.
4. A unified management system for heterogeneous data from field surveys according to claim 1, characterized in that, The mobile acquisition subsystem also includes: an AI measurement module, a GPS positioning module, a CSV export module, and a data synchronization module; The GPS positioning module is used to acquire current latitude, longitude, and altitude information; the AI measurement module is used to acquire heterogeneous data of the object to be measured and associate the heterogeneous data with the current GPS coordinates transmitted by the GPS positioning module; the CSV export module is used to export form data as a CSV format file, specifically using UTF-8 BOM encoding; the data synchronization module is used to discover the core management system within the local area network for data synchronization through a UDP broadcast mechanism.
5. A unified management system for heterogeneous data from field surveys according to claim 4, characterized in that, The data collected by the AI measurement module and GPS positioning module are used to populate the corresponding fields in the survey form template through a callback mechanism and field mapping.
6. A unified management system for heterogeneous data from field surveys according to claim 1, characterized in that, The field types of the multi-type structured form module specifically include: text input field, numeric input field, checkbox field, photo field, GPS autofill field, and date field.
7. A unified management system for heterogeneous data from field surveys according to claim 1, characterized in that, The review module is designed with a tiered review process, implementing a four-level status and three-level role review workflow for entity instances. It uses reflection to uniformly set the review status, reviewer, review comments, and review time fields. Investigators create and edit survey data and submit it for review to the reviewers. Reviewers review the survey data, assess its validity, and output a pending review status, an approved status, or a rejected status, supporting approval or rejection. Each survey form template entity includes review status, reviewer, review comments, and review time fields.
