GIS multitask asynchronous processing and management method
The dual-channel mechanism resolves the conflict between user interface responsiveness and task processing reliability in geographic information processing systems, enabling real-time feedback and reliable multi-task processing, simplifying system architecture and supporting distributed deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCHANG HANGKONG UNIVERSITY
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
Existing geographic information processing systems face the challenge of balancing user interface responsiveness and task processing reliability when dealing with multi-task concurrent processing scenarios. Synchronous methods lead to interface blocking, while asynchronous methods lack immediate confirmation and status transparency.
A dual-channel mechanism is adopted, using an MQTT network publishing channel and a signal slot communication channel to handle task publishing and status updates respectively. Combined with a delay timer to simulate the GIS calculation process, it ensures real-time feedback from the user interface and reliability of task processing.
It achieves real-time user interface responsiveness, high reliability in task processing, accurate state synchronization, and a simple and easily expandable system that facilitates distributed deployment and development debugging.
Smart Images

Figure CN122248049A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of asynchronous task processing technology for geographic information, specifically to a method for asynchronous processing and management of GIS multi-tasks. Background Technology
[0002] In existing geographic information processing systems, as application complexity increases, single functions are no longer sufficient to meet the demands. Systems need to integrate multiple processing tasks, such as wide-area search, target recognition, contour extraction, elevation query, path planning, change detection, image file transfer, distance measurement, vector data transfer, and image matching navigation. The computation time for these tasks varies. For example, the time taken for wide-area search is affected by the amount of data; contour extraction and terrain analysis depend on algorithm complexity and computational resources; and target recognition depends on the model inference speed. These tasks exhibit significant differences in computation time.
[0003] To handle such tasks, existing technologies mainly employ two methods: one is a purely synchronous request, where the user interface directly calls the backend processing service via protocols such as HTTP and maintains the connection while waiting for the result. This method has the following drawbacks: (1) Interface blocking: For time-consuming contour extraction or wide-area search tasks, the user interface will be unresponsive for a long time, resulting in "lag" and a very poor user experience; (2) Reliability check: Network or service interruption will directly lead to task failure and is difficult to recover; (3) It has poor scalability, long connections occupy server resources, and it is difficult to support high concurrency scenarios.
[0004] Another approach is a purely asynchronous message queue method. Users submit tasks to the message queue, and the backend processes them asynchronously. Task status and results are typically returned via polling or another asynchronous channel. This method has the following drawbacks: (1) Feedback delay: After the task is submitted, the user cannot immediately obtain confirmation of whether the system has successfully received and started processing. There is a "blind spot" in the interface response, which makes the user uncertain whether the operation is successful. (2) Poor status awareness: Users have difficulty obtaining task completion messages in real time and can only passively wait for frequent polling, lacking transparency; (3) Unfriendly support for heterogeneous tasks: A unified queue is difficult to implement differentiated priority scheduling and routing management based on different task types, such as search, identification, and extraction.
[0005] Based on the above technical background, existing geographic information processing systems mainly face the following technical problems when dealing with multi-task concurrent processing scenarios with varying computation times, such as wide-area search, target recognition, and contour extraction: (1) The contradiction between user interface responsiveness and long-term task processing: Existing methods cannot ensure that users receive immediate and clear feedback after submitting tasks, while also preventing the interface from being blocked by long-term computing tasks. Users are prone to waiting without feedback or encountering interface lag. (2) In pure synchronous mode, service exceptions will directly lead to task loss; (3) In the pure asynchronous mode, although decoupled, there is a lack of immediate confirmation, and the design of complex task routing and state recovery mechanisms is difficult. Summary of the Invention
[0006] The purpose of this invention is to provide a method for asynchronous processing and management of GIS multi-tasks, which solves the problem of difficulty in balancing interface response delay and processing reliability in existing GIS multi-task processing methods, ensuring both real-time response of the user interface and reliable task processing.
[0007] The technical solution adopted in this invention is: a GIS multi-task asynchronous processing and management method, comprising the following steps: S1: Configure parameters on the task creation interface, serialize the configured parameters into a structured message object, and calculate the buffer size of the message object; S2: Simultaneously enable two independent processing channels to distribute tasks and trigger status updates; the first channel is the MQTT network publishing channel, which publishes task topics through the task publishing MQTT client; the second channel is the signal-slot communication channel, which is used to directly emit custom signals of the structured message object while publishing the task topic. S3: The task list interface connects to the custom signal through the signal slot connection statement, responds instantly and creates a tree list item to display the task name, and embeds a circular button with an initial state of red in the column adjacent to the task name to display the task status, and binds the pointer of the structured message object to the user role data of the tree list item; S4: The task processing server starts an independent subscription object to continuously listen to the task topic; when the task subscription MQTT client receives the task message, it parses the buffer and reconstructs the returned message object in the callback function, and then calls the asynchronous processing logic through the signal and slot mechanism; the asynchronous processing logic simulates the GIS calculation process by starting a delay timer; S5: When the delay timer is triggered, it indicates that the processing is complete, and a feedback message object is generated. The feedback message object includes the original task name and processing status. The feedback message object is published by the result publishing MQTT client according to the set feedback topic. S6: The task list interface subscribes to the result feedback topic through the MQTT client; when a feedback message object is received, the local tree list is traversed according to the task name in the message to find the corresponding list item, and the associated circular button is retrieved through the user role data bound to the task list item, and the style sheet of the circular button is dynamically updated to green.
[0008] Furthermore, in step S1, the user configures task parameters through a graphical interaction method, the task parameters including task name and geographical range.
[0009] Furthermore, the geographical range is determined by a graphical selection method: the user clicks and drags on the map interface to form a rectangular area, the system captures the screen coordinates corresponding to the mouse press and release events in real time, converts the screen coordinates into latitude and longitude coordinates through the coordinate conversion module, and automatically fills them into the start longitude input box, start latitude input box, end longitude input box and end latitude input box of the task configuration interface.
[0010] Furthermore, the specific method for publishing the task topic in the first channel is as follows: the message object is written into the buffer, and the task topic is published with a service quality level (QoS) of 1 through the task publishing MQTT client; the second channel transmits the signal through the signal transmitter.
[0011] Furthermore, the task publishing MQTT client and the task subscription MQTT client are two independent client instances. Both MQTT clients are configured with the same proxy server address, port and authentication information, and call the loop_start() method to start the background thread to ensure that network communication does not block the main interface thread.
[0012] Furthermore, in step S3, the pointers to the message object and the circular button are bound to the tree list items in the form of QVariant, respectively, to achieve a strong association between task data, list item display elements and status controls.
[0013] Furthermore, in step S6, when the task list interface traverses the tree list to perform status matching, it adopts a nested loop approach. First, it traverses the top-level item topLevelItem to find the fixed root node, and then traverses all the child items of the fixed root node. It performs precise matching by comparing the text of the child items with the task name string in the feedback message.
[0014] Furthermore, steps S1 and S2 are implemented through the task configuration submission module, which provides a graphical task parameter configuration interface, integrates map selection interaction function, and has a built-in task publishing MQTT client and signal transmitter. Steps S3 and S6 are implemented through the task list management module, which is used to display all tasks and their status, and has a built-in result subscription MQTT client; Steps S4 and S5 are implemented on the server side, which runs as an independent process or thread and has a built-in task subscription MQTT client and result publishing MQTT client for subscribing to task topics, performing simulation calculations and publishing results.
[0015] Furthermore, the task list management module uses an object parent-child relationship for component management; wherein, the task publishing client uses the task creation interface instance as the parent object, and the result subscription MQTT client uses the task list interface instance as the parent object, and the object tree mechanism of the cross-platform graphical interface development framework Qt is used to realize the automatic lifecycle management of components.
[0016] The beneficial effects of this invention are as follows: (1) The interface response is immediate: Through the direct signal channel, users can see the feedback on the monitoring interface immediately after creating a task, eliminating the sense of response delay of traditional asynchronous methods; (2) High reliability of task processing: Through the MQTT asynchronous channel, reliable transmission of task data is ensured, and messages will not be lost even if the server is temporarily unavailable; (3) Accurate state synchronization: The dual-channel state synchronization mechanism ensures the consistency between the displayed state and the actual processing state, so users can see the real-time state without manually refreshing. (4) The system is simple: It effectively avoids complex intermediate components such as message queues, task schedulers, and load balancers, reducing system complexity and maintenance costs; (5) Easy to expand: The task processing logic of the present invention is concentrated in a single module, which is easy to split into independent service processes, thereby effectively supporting distributed deployment; (6) Convenient development and debugging: The calculation process is simulated by a timer, which facilitates system integration testing and demonstration without real GIS algorithms. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is an overall architecture diagram of an embodiment of the present invention; Figure 2 This is a complete timing diagram of task processing according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the internal processing flow of the task processing server in an embodiment of the present invention. Figure 4 This is a schematic diagram illustrating the synchronization of the user list interface status according to an embodiment of the present invention. Detailed Implementation
[0019] To better understand the above-described objects, features, and advantages of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the invention; however, the invention may be practiced in other ways different from those described herein, and therefore, the invention is not limited to the specific embodiments disclosed below.
[0020] like Figures 1-4 As shown, this embodiment of the invention provides a method for asynchronous processing and management of GIS multi-tasks, including the following steps: S1: Configure parameters on the task creation interface, serialize the configured parameters into a structured message object, and calculate the buffer size of the message object; the user configures task parameters through graphical interaction, the task parameters including task name and geographical range.
[0021] In this embodiment of the invention, the geographical range is determined by a graphical selection method: the user clicks and drags on the map interface to form a rectangular area, the system captures the screen coordinates corresponding to the mouse press and release events in real time, converts the screen coordinates into latitude and longitude coordinates through the coordinate conversion module, and automatically fills them into the start longitude input box, start latitude input box, end longitude input box and end latitude input box of the task configuration interface.
[0022] S2: Simultaneously enable two independent processing channels to distribute tasks and trigger status updates; the first channel is the MQTT network publishing channel, which publishes task topics through the task publishing MQTT client; the second channel is the signal-slot communication channel, which is used to directly emit custom signals of the structured message object while publishing the task topic.
[0023] The specific method for publishing the task topic in the first channel is as follows: write the message object into the buffer and publish the task topic with QoS 1 through the task publishing MQTT client; the second channel transmits the signal through the signal transmitter.
[0024] S3: The task list interface connects to the custom signal via a signal slot connection statement, responds instantly, creates a tree list item to display the task name, and embeds a circular button with an initial state of red in the column adjacent to the task name to display the task status. The pointer of the structured message object is bound to the user role data of the tree list item.
[0025] In this embodiment of the invention, the pointers to the message object and the circular button are bound to the tree list items in the form of QVariant, thereby achieving a strong association between task data, list item display elements and status controls.
[0026] S4: The task processing server starts an independent subscription object to continuously listen to the task topic. The specific workflow is as follows: Figure 3 As shown, when the task subscription MQTT client receives a task message, it parses the buffer and reconstructs the returned message object in the callback function, and then calls the asynchronous processing logic through the signal-slot mechanism; the asynchronous processing logic simulates the GIS calculation process by starting a delay timer. In this embodiment of the invention, the delay timer is set to 10s.
[0027] S5: When the delay timer is triggered, it indicates that the processing is complete, and a feedback message object is generated. The feedback message object includes the original task name and processing status. The feedback message object is published by the result publishing MQTT client according to the set feedback topic.
[0028] S6: The task list interface subscribes to the result feedback topic through the MQTT client; when a feedback message object is received, the local tree list is traversed according to the task name in the message to find the corresponding list item, and the associated circular button is retrieved through the user role data bound to the task list item, and the style sheet of the circular button is dynamically updated to green.
[0029] When traversing the tree list for status matching, the task list interface uses a nested loop approach. First, it traverses the top-level item `topLevelItem` to find the fixed root node, and then it traverses all child items of the fixed root node. It performs a precise match by comparing the text of the child items with the task name string in the feedback message.
[0030] In this embodiment of the invention, steps S1 and S2 are implemented through a task configuration submission module. The task configuration submission module provides a graphical task parameter configuration interface, integrates map selection interaction function, and has a built-in task publishing MQTT client and signal transmitter. Steps S3 and S6 are implemented through a task list management module, which displays all tasks and their statuses, and includes a built-in result subscription MQTT client. The task list management module manages components using a parent-child object relationship; specifically, the task publishing client uses the task creation interface instance as its parent object, and the result subscription MQTT client uses the task list interface instance as its parent object. The automatic lifecycle management of components is achieved using the object tree mechanism of the cross-platform graphical interface development framework Qt. The update process for the list in steps S3 and S6 is as follows: Figure 4As shown, the list is updated twice: once when a task is first created, adding a new item to the task list interface; and once after the result subscription MQTT client receives feedback from the result publishing MQTT client, updating the button colors in the task list.
[0031] Steps S4 and S5 are implemented on the server side, which runs as an independent process or thread and has a built-in task subscription MQTT client and result publishing MQTT client for subscribing to task topics, performing simulation calculations and publishing results.
[0032] Figure 2 This is a complete sequence diagram of task processing in an embodiment of the present invention, illustrating the interaction flow between the task creation end, the task list end, the MQTT message relay server, and the task processing server. It is divided into three stages: Stage 1 is the task creation and publishing stage, employing a dual-channel mechanism to achieve fast synchronization and reliable transmission of tasks; Stage 2 is the server processing stage, where the task processing server receives the task message, parses the task data, initiates asynchronous processing logic, executes GIS calculations, and finally generates the calculation results; Stage 3 is the result feedback stage, where the task processing server publishes the generated results as feedback messages through the MQTT message relay server. The task list end receives this message through the result subscription MQTT client, traverses the tree list to find the corresponding list item, and updates the task status button to green.
[0033] In this embodiment of the invention, when a user submits a task at the task creation end, two communication channels are simultaneously activated: an asynchronous MQTT channel encapsulates the task data into an MQTT message and publishes it to the corresponding topic, ensuring reliable message transmission to the server; the direct semaphore channel immediately notifies the task monitoring interface to update its display through intra-process or inter-process semaphore mechanisms. This dual-channel design ensures both reliable asynchronous message transmission and real-time feedback to the user interface. This embodiment of the invention uses two independent MQTT topics: one dedicated to sending tasks from the task creation end to the task processing server; and the other dedicated to the task processing server feeding back processing results to itself and other monitoring ends. Topic separation avoids message cross-interference and simplifies message routing logic.
[0034] The server-side integrates core modules such as task subscription, message processing, and state management into a single server-side application process, thereby avoiding complex communication between multiple services in the past and greatly simplifying the complexity of system deployment and maintenance.
[0035] Task status is synchronized in two phases: initial synchronization immediately sets the task button to a red "incomplete" state via a direct signal; final synchronization updates the task to a green "complete" state via an MQTT result feedback message. This mechanism ensures that users can see the accurate task status at any time, and that status transitions are triggered by clear events.
[0036] In actual deployment, the embodiments of the present invention were applied to a geographic information processing scenario. The test results showed that the response time from when the user clicked "OK" to when the interface displayed a new task was less than 50 milliseconds; in a test environment with an unstable network, the MQTT channel could guarantee reliable message transmission; in long-term running tests, there was no inconsistency between the status display and the actual processing; and there were no abnormalities after 72 hours of continuous operation, with stable memory usage.
[0037] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for asynchronous processing and management of GIS multi-tasks, characterized in that, Includes the following steps: S1: Configure parameters on the task creation interface, serialize the configured parameters into a structured message object, and calculate the buffer size of the message object; S2: Simultaneously enable two independent processing channels to distribute tasks and trigger status updates; the first channel is the MQTT network publishing channel, which publishes task topics through the task publishing MQTT client; the second channel is the signal-slot communication channel, which is used to directly emit custom signals of the structured message object while publishing the task topic. S3: The task list interface connects to the custom signal through the signal slot connection statement, responds instantly and creates a tree list item to display the task name, and embeds a circular button with an initial state of red in the column adjacent to the task name to display the task status, and binds the pointer of the structured message object to the user role data of the tree list item; S4: The task processing server starts an independent subscription object to continuously listen to the task topic; When the task subscription MQTT client receives a task message, it parses the buffer and reconstructs the returned message object in the callback function, and then calls the asynchronous processing logic through the signal and slot mechanism; the asynchronous processing logic simulates the GIS calculation process by starting a delay timer; S5: When the delay timer is triggered, it indicates that the processing is complete, and a feedback message object is generated. The feedback message object includes the original task name and processing status. The feedback message object is published by the result publishing MQTT client according to the set feedback topic. S6: The task list interface subscribes to the result feedback topic through the MQTT client; When a feedback message object is received, the local tree list is traversed according to the task name to find the corresponding list item, and the associated circular button is retrieved through the user role data bound to the task list item. The style sheet of the circular button is then dynamically updated to green.
2. The GIS multi-task asynchronous processing and management method according to claim 1, characterized in that, In step S1, the user configures task parameters through a graphical interaction method. The task parameters include the task name and geographical range.
3. The GIS multi-task asynchronous processing and management method according to claim 2, characterized in that, The geographical area is determined by a graphical selection method: the user clicks and drags on the map interface to form a rectangular area. The system captures the screen coordinates corresponding to the mouse press and release events in real time, converts the screen coordinates into latitude and longitude coordinates through the coordinate conversion module, and automatically fills them into the start longitude input box, start latitude input box, end longitude input box, and end latitude input box of the task configuration interface.
4. The GIS multi-task asynchronous processing and management method according to claim 3, characterized in that, The specific method for publishing the task topic in the first channel is as follows: write the message object into the buffer and publish the task topic with QoS 1 through the task publishing MQTT client; the second channel transmits the signal through the signal transmitter.
5. The GIS multi-task asynchronous processing and management method according to claim 4, characterized in that, The task publishing MQTT client and the task subscription MQTT client are two independent client instances. Both MQTT clients are configured with the same proxy server address, port and authentication information, and call the loop_start() method to start the background thread to ensure that network communication does not block the main interface thread.
6. The GIS multi-task asynchronous processing and management method according to claim 5, characterized in that, In step S3, the pointers to the message object and the circular button are bound to the tree list items in the form of QVariant, respectively, to achieve a strong association between task data, list item display elements and status controls.
7. The GIS multi-task asynchronous processing and management method according to claim 6, characterized in that, In step S6, when the task list interface traverses the tree list to perform status matching, it adopts a nested loop approach. First, it traverses the top-level item topLevelItem to find the fixed root node, and then traverses all the child items of the fixed root node. It performs precise matching by comparing the text of the child items with the task name string in the feedback message.
8. The GIS multi-task asynchronous processing and management method according to claim 7, characterized in that, Steps S1 and S2 are implemented through the task configuration submission module, which provides a graphical task parameter configuration interface, integrates map selection interaction function, and has a built-in task publishing MQTT client and signal transmitter. Steps S3 and S6 are implemented through the task list management module, which is used to display all tasks and their status, and has a built-in result subscription MQTT client; Steps S4 and S5 are implemented on the server side, which runs as an independent process or thread and has a built-in task subscription MQTT client and result publishing MQTT client for subscribing to task topics, performing simulation calculations and publishing results.
9. A GIS multi-task asynchronous processing and management method according to claim 8, characterized in that, The task list management module uses a parent-child relationship for component management; the task publishing client uses the task creation interface instance as the parent object, and the result subscription MQTT client uses the task list interface instance as the parent object. The object tree mechanism of the cross-platform graphical interface development framework Qt is used to realize automatic lifecycle management of components.