Government affair work order intelligent processing method and system based on space-time semantic clustering and large language model

By improving the DBSCAN algorithm and large language model, intelligent processing of government work orders has been achieved, solving the problems of low clustering accuracy, inaccurate priority evaluation, and insufficient user satisfaction, thereby improving the processing efficiency and user satisfaction of government services.

CN120821848BActive Publication Date: 2025-11-18THE CHINESE UNIV OF HONG KONG (SHENZHEN) +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511333257.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-11-18
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

The existing government work order processing system lacks intelligent clustering analysis capabilities and cannot effectively integrate spatiotemporal semantic features, resulting in confused clustering of work orders with different events in the same location or colleagues in different locations, leading to low clustering accuracy; the priority evaluation model is static and it is difficult to dynamically integrate the influence of multiple factors, making it impossible to quickly identify high-risk work orders; the generation of handling suggestions relies on human experience and lacks intelligent assistance; the feedback loop is missing, resulting in low user satisfaction.

Method used

The DBSCAN algorithm is improved by adopting a weighted spatiotemporal semantic three-dimensional distance metric formula for joint clustering. Work order priorities are calculated based on weighted scores, and resources are dynamically allocated. Differentiated handling solutions are generated through the RAG framework and FAISS retrieval library, and an interactive GIS platform and quality feedback closed loop are established.

Benefits of technology

Significantly improves the purity of work order classification and the ability to identify emergencies, quickly identifies high-priority events, generates diverse handling suggestions, achieves load balancing and user satisfaction feedback optimization, and reduces complaint return rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821848B_ABST
    Figure CN120821848B_ABST
Patent Text Reader

Abstract

The application relates to the field of government affair work order intelligent processing, in particular to a government affair work order intelligent processing method and system based on space-time semantic clustering and a large language model. The scheme comprises the following steps: uniformly modeling data features of to-be-processed work orders, performing an improved DBSCAN clustering algorithm on the work orders through a weighted space-time semantic three-dimensional distance measurement formula, and realizing joint clustering of space, time and semantic features; calculating priority scores of the work orders, and dynamically allocating and scheduling resources according to the clustering scale and the work order priority; based on a RAG framework and a retrieval enhancement generation technology of a FAISS vector retrieval library, matching historical similar work orders, generating a few-sample learning case, and generating two sets of differential treatment schemes by controlling a large language model temperature parameter; realizing visual display and interactive analysis of work order clustering through an interactive GIS platform; and establishing a quality feedback closed loop of work order reconstruction. The application is suitable for government affair work order intelligent processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent processing of government work orders, specifically to an intelligent processing method and system for government work orders based on spatiotemporal semantic clustering and a large language model. Background Technology

[0002] With the acceleration of urbanization and the deepening of digital transformation of government services, the daily number of work orders received by government hotline platforms continues to rise. Existing government work order processing systems mostly rely on static rule engines and manual processing, which presents the following technical problems:

[0003] (1) Lack of intelligent clustering analysis capability. Existing clustering methods (such as DBSCAN based on spatial Euclidean distance or text similarity threshold method) cannot effectively integrate multi-dimensional features such as spatiotemporal semantics, and lack a weight adjustment mechanism, which leads to confusion in the clustering of work orders of "different events in the same place" or "colleagues in different places", affecting the clustering accuracy and processing efficiency.

[0004] (2) The lack of an emergency response mechanism leads to insufficient system throughput and a backlog of work orders in emergency scenarios such as natural disasters;

[0005] (3) Priority assessment models mostly use static rules or simple threshold scoring models, which are difficult to dynamically integrate the influence of multiple factors such as complaint volume, emotional intensity, urgency and timeliness, and cannot quickly identify high-risk and urgent work orders.

[0006] (4) The handling suggestion generation module lacks intelligent assistance. The generation of handling suggestions relies heavily on the operator's experience and cannot achieve intelligent and diversified handling suggestions based on historical cases.

[0007] (5) The feedback loop is missing. For work orders that citizens are dissatisfied with, there is a lack of automatic reconstruction and priority redistribution capabilities, which can easily lead to a return of complaints.

[0008] In summary, existing government work order processing technologies suffer from a series of technical bottlenecks, such as low clustering accuracy, inaccurate priority assessment, limited handling suggestions, and insufficient user satisfaction response. There is an urgent need to build a new intelligent work order processing method and system that integrates multi-dimensional feature modeling, AI intelligent decision-making, and dynamic feedback optimization to improve the processing efficiency, response speed, and user satisfaction of government services. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a system for intelligent processing of government work orders based on spatiotemporal semantic clustering and large language models, so as to achieve efficient classification, intelligent scheduling and generation of diversified handling suggestions for massive multidimensional government work order data.

[0010] This invention achieves the above objectives by adopting the following technical solution: This invention provides an intelligent processing method for government work orders based on spatiotemporal semantic clustering and a large language model, comprising:

[0011] S1. Perform unified data feature modeling on the work orders to be processed, and execute the improved DBSCAN clustering algorithm on the work orders through the weighted spatiotemporal semantic three-dimensional distance metric formula to achieve joint clustering of spatial, temporal and semantic features;

[0012] S2, Weighted Scoring Calculate work order priority, where This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , The weights of the corresponding items;

[0013] S3. Dynamically allocate processing resources based on cluster size and work order priority;

[0014] S4. Based on the RAG (Retrieval-Augmented Generation) framework and the FAISS (Facebook AI Similarity Search) vector retrieval library, the retrieval enhancement generation technology matches historical similar work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model.

[0015] S5. Visualize and interactively analyze work order clustering through an interactive GIS platform;

[0016] S6. Establish a quality feedback loop for work order refactoring.

[0017] Furthermore, in step S1, the weighted spatiotemporal semantic three-dimensional distance metric formula is:

[0018] ;

[0019] In the formula, R is the city characteristic radius. T represents the time window, set according to the government processing cycle. Let be the weighting coefficient, satisfying , Indicates the work order Semantic vectors used for text encoding Indicates the work order Semantic vectors used for text encoding These represent work orders. The UNIX timestamp of the work order j.

[0020] The improved DBSCAN clustering algorithm is implemented to achieve joint clustering of spatial, temporal, and semantic features, specifically including:

[0021] In the spatial dimension, the work order address is first converted into latitude and longitude coordinates in the WGS84 coordinate system through geocoding, and then transformed into a standardized planar coordinate system through UTM projection. In the temporal dimension, the work order submission time is... The work order text is converted to UNIX timestamp format. In terms of semantic dimension, a pre-trained text representation model is used to encode the work order text into a 384-dimensional semantic vector.

[0022] Furthermore, for any work order in the work order set D... When satisfied work orders The number exceeds the preset threshold hour, These work orders are then marked as belonging to the same spatiotemporal semantic cluster, i.e.:

[0023] ;

[0024] In the formula, Indicates work order candidate set, and The two parameters were determined through training and optimization using historical data. Indicates work order In the field, Indicates a preset threshold;

[0025] For new work orders Please follow these steps to process:

[0026] calculate 3D distance to all processed work orders Filter out those that meet the requirements The work orders constitute the candidate set ;

[0027] like If all work orders are not categorized, then when At that time, with Create a new cluster for the core, otherwise... Temporarily marked as a noise point;

[0028] like If there are already categorized work orders, then find them. The work orders have been categorized in China The nearest work order ,Will Into The cluster to which it belongs;

[0029] If there are cases that cannot be classified, and the domain does not have sufficient density, temporarily label 𝑞 as a noise point, and re-evaluate it in subsequent clustering cycles.

[0030] Furthermore, in step S2, This reflects the current number of complaints about this type of issue. The sentiment analysis model is used to quantify the sentiment value of the request text. The urgency of the work order is determined by combining a large language model with predefined rules. The timeliness coefficient is the normalized value of the work order's retention time, and the calculation formula is as follows: ,in As the attenuation factor, The duration of work order delay.

[0031] Furthermore, step S3 specifically includes:

[0032] Based on cluster size Compared with the preset threshold of single-person handling capacity Calculate the required number of handlers , And select the task with the fewest pending tasks from the pool of handlers. A working group composed of several disposal personnel;

[0033] For new work orders, a round-robin method is used to distribute them to members within the work group. The round-robin rule is to distribute them sequentially according to the members' order. If a member's load reaches a threshold, the work order is skipped to ensure load balancing.

[0034] Furthermore, step S4 specifically includes:

[0035] Based on the RAG framework and the FAISS vector retrieval library, this search enhancement generation technique retrieves Top-K cases from a historical case database using cosine similarity. The cosine similarity calculation formula is as follows:

[0036] ;

[0037] In the formula, and These are the semantic vector representations of the current work order and historical case work orders, respectively. Indicates pending work orders and historical case work orders Cosine similarity;

[0038] From the retrieved cases, those deemed satisfactory are selected based on user ratings. These selected cases are then sorted in descending order of similarity to construct a few-shot learning example set, which is added to the prompt words, resulting in a final structured prompt word set. Its composition is as follows:

[0039] Clustering The summary description, the content of work order q, a few-shot learning example set of historical work orders, and the output structure are all used to control temperature parameters. The large language model generates two sets of differentiated processing suggestions, A and B:

[0040] ;

[0041] ;

[0042] In the formula, , Let A and B represent the recommended options, respectively. Representing a large language model, This represents the temperature parameter.

[0043] Furthermore, step S5 specifically includes:

[0044] Create an interactive map with the following layers using the Dash-Leaflet library:

[0045] The base map includes integrated Tianditu or OpenStreetMap services as the base map support;

[0046] Real-time work orders are clustered and displayed spatially as point feature layers. The size and urgency of the clusters are indicated by size and color. Gradient circles with corresponding diameter pixels represent the cluster size. The urgency level is mapped using the HSV color space, establishing a linear mapping from cool to warm colors. Cool colors indicate low urgency, and warm colors indicate high urgency. The size of the point symbols is adaptively adjusted based on the cluster size, and the color gradient is mapped to the HSV color space according to the priority level and urgency level to achieve a visual comparison of high and low urgency. The panel displays the specific information of the queried work orders in real time, and shows recommended solutions A and B.

[0047] Establish a double-buffered data pipeline. The front end maintains the current frame's visual state, while the back end's multi-threaded task automatically pulls the latest work order status data every set time and updates the memory cache. The front end view seamlessly switches to the new data buffer every refresh cycle.

[0048] Furthermore, in step S6, if the feedback is satisfactory, the work order is closed and added to the historical work order database. If the feedback is unsatisfactory, the work order reconstruction process is automatically triggered. The reconstruction process includes: extracting the original work order content, processing records, and citizen feedback; merging the extracted original work order content, processing records, and citizen feedback according to structured data to generate a new work order data entity; the newly generated work order automatically re-executes the dynamic priority scoring process, and adds weight to the urgency and timeliness factors in the weight coefficients, and prioritizes its allocation to the original processing department for processing.

[0049] The system monitors the rate of repeated complaints for the same work order in real time. If multiple unsatisfactory feedbacks are received for the same work order, an early warning mechanism is automatically triggered, sending an alarm message to management and prompting manual intervention.

[0050] This invention also provides an intelligent processing system for government work orders based on spatiotemporal semantic clustering and a large language model, used to implement the aforementioned intelligent processing method for government work orders based on spatiotemporal semantic clustering and a large language model. The system includes:

[0051] The spatiotemporal semantic 3D clustering module is used to perform unified data feature modeling on work orders to be processed. It executes an improved DBSCAN clustering algorithm on the work orders through a weighted spatiotemporal semantic 3D distance metric formula to achieve joint clustering of spatial, temporal and semantic features.

[0052] Priority evaluation module, used for weighted scoring Calculate work order priority, where Weighted scoring, This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , The weights of the corresponding items;

[0053] The real-time allocation and scheduling module is used to dynamically allocate scheduling resources based on cluster size and work order priority;

[0054] The intelligent response generation module is used for retrieval enhancement generation technology based on the RAG framework and FAISS vector retrieval library. It matches similar historical work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model.

[0055] The interactive GIS visualization module is used to visualize and interactively analyze work order clustering through an interactive GIS platform.

[0056] The quality feedback module is used to establish a quality feedback closed loop for work order refactoring.

[0057] The beneficial effects of this invention are as follows:

[0058] This invention is a work order clustering method based on the improved DBSCAN algorithm. By integrating geographic coordinates, timestamps and text semantic features to construct a unified distance metric model, it achieves intelligent identification of cross-dimensional related work orders. This solves the problems of low accuracy of single-dimensional feature clustering and cross-category mis-clustering in the existing technology, and significantly improves the purity of work order classification and the ability to identify sudden events.

[0059] This invention establishes a dynamic priority assessment system that integrates cluster size, emotional intensity, urgency, and timeliness coefficient. It adopts a quantitative scoring algorithm to improve the accuracy of emergency event identification, overcomes the shortcomings of existing priority assessment models that are static and slow to react, and enables rapid identification and early warning of high-priority events.

[0060] This invention is based on a government work order intelligent response generation mechanism that combines retrieval enhancement generation and Few-shot learning. By adjusting structured prompts and temperature parameters, it automatically generates differentiated handling solutions, enabling the large language model to generate diversified, personalized, and context-adaptive suggestions for handling government work orders. This effectively solves the problems of limited content and poor reference value in existing generation methods.

[0061] This invention designs a dynamic scheduling load balancing algorithm with adaptive clustering size. It combines dynamic perception of handler load, elastic configuration of workgroups, and round-robin load balancing to achieve efficient resource allocation and flow scheduling for work orders of different sizes and multiple priorities, significantly improving system throughput and handling resource utilization.

[0062] This invention constructs a GIS visualization front-end interface that supports multi-channel interaction, establishes a hierarchical interaction paradigm of "macro clustering - meso work order - micro details", realizes real-time dynamic display of work order data, and effectively improves users' ability to control the status of government work order processing in real time;

[0063] This invention establishes a closed-loop quality management method that includes evaluation collection, work order feedback, and early warning escalation, ensuring continuous tracking of problem handling. It supports automatic reconstruction, priority re-scoring, secondary allocation, and feedback early warning for "unsatisfactory" work orders, overcoming the problems of existing systems' reliance on manual processes and lack of automatic tracking and optimization in user satisfaction handling, effectively reducing complaint feedback rates and improving citizen satisfaction. Attached Figure Description

[0064] Figure 1 This is a flowchart of an intelligent processing method for government work orders based on spatiotemporal semantic clustering and a large language model, provided by an embodiment of the present invention.

[0065] Figure 2This is an architecture diagram of an intelligent government work order processing system based on spatiotemporal semantic clustering and a large language model, provided by an embodiment of the present invention. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0067] This invention provides an intelligent processing method for government work orders based on spatiotemporal semantic clustering and a large language model, such as... Figure 1 As shown, it includes:

[0068] S1. Perform unified data feature modeling on the work orders to be processed, and execute the improved DBSCAN clustering algorithm on the work orders through the weighted spatiotemporal semantic three-dimensional distance metric formula to achieve joint clustering of spatial, temporal and semantic features;

[0069] The formula for the weighted spatiotemporal semantic three-dimensional distance metric is:

[0070] ;

[0071] In the formula, R is the city characteristic radius. T represents the time window, set according to the government processing cycle. Let be the weighting coefficient, satisfying , Indicates the work order Semantic vectors used for text encoding Indicates the work order Semantic vectors used for text encoding Indicates work order The three-dimensional distance from work order j Indicates work order plane coordinates, Represents the planar coordinates of work order j. These represent work orders. The UNIX timestamp of the work order j.

[0072] The improved DBSCAN clustering algorithm is implemented to achieve joint clustering of spatial, temporal, and semantic features, specifically including:

[0073] In the spatial dimension, the work order address is first converted into latitude and longitude coordinates in the WGS84 coordinate system through geocoding, and then transformed into a standardized planar coordinate system through UTM projection. In the temporal dimension, the work order submission time is... The work order text is converted to UNIX timestamp format. In terms of semantic dimension, a pre-trained text representation model is used to encode the work order text into a 384-dimensional semantic vector.

[0074] For any work order in the work order set D When satisfied work orders The number exceeds the preset threshold hour, These work orders are then marked as belonging to the same spatiotemporal semantic cluster, i.e.:

[0075] ;

[0076] In the formula, Indicates work order candidate set, and The two parameters were determined through training and optimization using historical data. Indicates work order In the field, Indicates a preset threshold;

[0077] For new work orders Please follow these steps to process:

[0078] calculate 3D distance to all processed work orders Filter out those that meet the requirements The work orders constitute the candidate set ;

[0079] like If all work orders are not categorized, then when At that time, with Create a new cluster for the core, otherwise... Temporarily marked as a noise point;

[0080] like If there are already categorized work orders, then find them. The work orders have been categorized in China The nearest work order ,Will Into The cluster to which it belongs;

[0081] If there are cases that cannot be classified, and the domain does not have sufficient density, temporarily label 𝑞 as a noise point, and re-evaluate it in subsequent clustering cycles.

[0082] S2, Weighted Scoring Calculate work order priority, where This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , The weights of the corresponding items;

[0083] For each work order cluster or individual work order, extract the following key features:

[0084] Number of complaints The number of work orders within a cluster is used to measure the social impact of an event.

[0085] Emotional intensity The sentiment score of the appeal text is quantified using a sentiment analysis model (preferably a pre-trained sentiment analysis model based on the BERT architecture). The scores are: anger = 1.0, anxiety = 0.7, neutral = 0.2. Higher scores reflect a higher subjective urgency of the issue.

[0086] urgency Based on a large language model inference engine, the system performs entity extraction, keyword classification, and semantic reasoning on work order content. It automatically determines whether high-risk factors such as life safety, property loss, and public safety are involved, and outputs an emergency level score with a value range of [0,1]. The weight of emergency events is significantly increased. It determines the level of threat to life and property (e.g., "fire" = 1.0, "water leak" = 0.3).

[0087] Time efficiency coefficient The normalized value of the work order dwell time is calculated using a time decay function. The calculation formula is as follows:

[0088] ;

[0089] in Current time - ticket submission time The attenuation factor controls the timeliness sensitivity. Its meaning is the attenuation rate of work order timeliness. The value range is 0.01 to 0.1, preferably 0.05. The larger the value, the faster the timeliness of the work order attenuates. In practice, it can be trained and optimized based on historical completion cycle data.

[0090] Then, the work order priority score is calculated according to the formula:

[0091] ;

[0092] Work orders are ranked according to priority scores to ensure that high-priority events are processed first. , , , These are the weight coefficients for each feature, which must satisfy... The range and determination principles of the weighting coefficients are as follows: , , , The specific values ​​can be determined through training with historical data, setting based on expert experience, or dynamically adjusted based on business scenarios, with the urgency level weight being... It is usually set to the maximum value to ensure that emergency events are handled with priority.

[0093] S3. Dynamically allocate scheduling resources based on cluster size and work order priority;

[0094] To address the technical problems in existing government work order allocation mechanisms, such as manual static scheduling, uneven resource utilization, and inability to respond to changes in work order priority in real time, this invention dynamically calculates the required resource allocation based on work order cluster size, priority score, current workload of handlers, and individual handling capacity threshold, and performs intelligent matching of multiple work orders and multiple personnel in real time.

[0095] For each newly formed clustering work order According to its size Determine the allocation plan:

[0096] ;

[0097] in The preset threshold for single-person handling capacity (e.g.) = 50 items / day (as the typical configuration is 50 orders / person / day). The required number of people in the working group.

[0098] Sort the handlers in the pool according to the number of pending tasks from lowest to highest, and select the handler with the fewest pending tasks. Disposal personnel.

[0099] For subsequent addition of clustering New work orders are assigned to the workgroup members bound to the cluster using a round-robin method. The system dynamically monitors the current task queue length and average processing speed of each handler, skipping members who have reached their maximum load threshold to achieve balanced task distribution. The system also monitors the load of each member in real time and dynamically adjusts the allocation accordingly.

[0100] The system monitors the overall load in real time. When it detects that any member of a workgroup experiences a backlog of tasks, processing delays, or resource shortages within a short period of time, it automatically triggers a rescheduling mechanism to dynamically transfer tasks to available personnel, ensuring smooth overall task flow and timely response.

[0101] S4. Based on the RAG framework and FAISS vector retrieval library, the retrieval enhancement generation technology matches similar historical work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model.

[0102] To address the technical problems existing in the generation of government work order handling suggestions, such as homogenized content, lack of historical case support, and a single, unspecific generation scheme, the intelligent response generation method implemented in this invention is as follows:

[0103] Clustering of current pending work orders This involves using a large language model to generate a summary description of the events. For clustering... Any pending work order The Top-K most similar cases are retrieved from the historical work order case database using vector similarity (cosine similarity calculation).

[0104] ;

[0105] In the formula, and These are the semantic vector representations of the current work order and historical case work orders, respectively. Indicates pending work orders and historical case work orders Cosine similarity;

[0106] From the retrieved cases, those deemed satisfactory are selected based on user ratings. These selected cases are then sorted in descending order of similarity to construct a few-shot learning example set, which is added to the prompt words, resulting in a final structured prompt word set. Its composition is as follows:

[0107] Clustering The summary description, the content of work order q, a few-shot learning example set of historical work orders, and the output structure are all used to control temperature parameters. The large language model generates two sets of differentiated processing suggestions, A and B:

[0108] ;

[0109] ;

[0110] In the formula, , Let A and B represent the recommended options, respectively. Representing a large language model, This represents the temperature parameter.

[0111] Among them, Solution A, with lower temperature parameters, is more conservative and is an optimized solution based on the most similar case. Solution B, with higher temperature parameters, is more innovative. The two final solutions, A and B, are returned to the front end via API and simultaneously displayed in the work order details area of ​​the interactive GIS visualization platform for staff to evaluate and choose from.

[0112] S5. Visualize and interactively analyze work order clustering through an interactive GIS platform;

[0113] To address the technical problems of insufficient visualization layers, weak situational awareness, and limited spatial filtering functions in existing government work order processing systems, this invention implements an interactive GIS visualization system using a Dash-Leaflet architecture to achieve dynamic visualization and intelligent interactive analysis of the spatiotemporal distribution characteristics of government work orders. Its technical implementation method includes the following core components:

[0114] (1) Base map (including but not limited to integrating Tianditu or OpenStreetMap services as base map support);

[0115] (2) Real-time work order clustering displays spatial distribution using point feature layers. The size and color of the clusters indicate their scale and urgency. Scale dimension: Cluster size is represented by gradient circles with a diameter of 5-20 pixels (preferably 5 pixels for <5 work orders, 20 pixels for >50 work orders, with intermediate values ​​linearly interpolated). Urgency dimension: HSV color space mapping is used to establish a linear mapping from cool tones (low urgency) to warm tones (high urgency). The size of the point symbols is adaptively adjusted based on the cluster size, and the color gradient is mapped to the HSV color space according to the priority level and urgency, enabling a visual comparison of high and low urgency.

[0116] (3) The real-time dashboard displays the specific information of the queried work order, the recommended processing solutions A and B shown in the large model, and additional solutions that users can input.

[0117] Establish a double-buffered data pipeline. The front-end maintains the current frame's visualization state, while the back-end multi-threaded task automatically retrieves the latest work order status data every 10 seconds and updates the memory cache. The front-end view seamlessly switches to the new data buffer with each refresh cycle, achieving a smooth, low-latency, and flicker-free visualization experience. Implement the following intelligent interactive functions:

[0118] Supports map zooming and panning.

[0119] Clicking the cluster symbol expands it into a discrete set of work order points; double-clicking a single work order point displays a work order information card, providing a structured display of information including work order ID, problem type, specific problem, and processing progress.

[0120] Implement the following interactive filtering:

[0121] The time dimension allows you to select a time range using an interactive time-series slider.

[0122] Spatial dimensions support drawing geometric ranges such as polygons, circles, and rectangles for filtering.

[0123] The business dimension offers multiple filters such as department and work order type.

[0124] S6. Establish a quality feedback loop for work order refactoring.

[0125] Once the administrator completes the response to the work order, a response and satisfaction rating request will be automatically sent to the citizen. If the citizen responds with satisfaction, the work order will be closed and added to the historical work order database for future retrieval.

[0126] If a citizen's feedback is unsatisfactory, the subsequent work order reconstruction process is automatically triggered. The following three elements are automatically extracted from the PostgreSQL database: 1) the original work order content; 2) processing records and steps; and 3) the citizen's feedback text. Natural language processing technology is used to extract key information, perform semantic fusion, and formatted reconstruction on these three types of data, automatically generating a new work order entity.

[0127] Newly generated work orders will automatically re-execute the dynamic priority scoring process, and the urgency and timeliness factors will be increased in the weighting coefficient (e.g., the original priority score will be multiplied by 1.5) to increase the priority of secondary handling and prioritize the refactoring of work orders to the original handler.

[0128] The system monitors the rate of repeated complaints for the same work order in real time. If multiple unsatisfactory feedbacks are received for the same work order, an early warning mechanism is automatically triggered, sending an alarm message to management and prompting manual intervention.

[0129] This invention also provides an intelligent processing system for government work orders based on spatiotemporal semantic clustering and a large language model, comprising:

[0130] The spatiotemporal semantic 3D clustering module is used to perform unified data feature modeling on work orders. It applies an improved DBSCAN clustering algorithm to the work orders using a weighted spatiotemporal semantic 3D distance metric formula, achieving joint clustering of spatial, temporal, and semantic features. An improved multi-dimensional feature weighted clustering method is implemented, integrating the spatial coordinates, submission time, and textual semantic vector features of the work orders. A custom weighted distance metric model is used to achieve unified modeling of multi-dimensional information. Compared to existing methods based on single-space clustering or semantic similarity, this module can effectively improve the purity of work order classification and the ability to distinguish multiple events.

[0131] Priority evaluation module, used for weighted scoring Calculate work order priority, where Weighted scoring, This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , This represents the weight of the corresponding item. This priority assessment module constructs a dynamic weighted scoring model based on multi-dimensional indicators such as cluster size, sentiment intensity, urgency, and work order dwell time, enabling dynamic quantitative assessment of the urgency of work order handling.

[0132] The real-time allocation and scheduling module dynamically allocates scheduling resources based on cluster size and work order priority. Based on priority scores, it presets a single-person handling capacity threshold, dynamically calculates the required number of personnel, and employs load balancing and round-robin mechanisms to achieve rapid resource allocation for high-priority work orders, avoiding uneven resource distribution.

[0133] The intelligent response generation module is used for retrieval enhancement generation technology based on the RAG framework and FAISS vector retrieval library. It matches similar historical work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model.

[0134] This intelligent response generation module is the first to apply a retrieval-enhanced generation framework and a dual-control mechanism of temperature parameters to the generation of government work order handling suggestions. By retrieving Top-K satisfactory cases from a historical case database, combining few-shot learning examples with the current work order content, it constructs multi-level prompt words, and uses different temperature parameters to control the large language model to generate differentiated handling suggestions, thereby improving the diversity and relevance of automatically generated handling suggestions.

[0135] The interactive GIS visualization module, based on the Dash-Leaflet architecture, supports real-time visualization and intelligent interactive filtering of multi-dimensional features such as work order spatial distribution and priority level, enhancing decision-makers' ability to perceive the overall situation of work orders.

[0136] The quality feedback module establishes a closed-loop mechanism of evaluation-reconstruction-priority reallocation. For work orders with unsatisfactory user evaluations, the system automatically performs feature extraction, content reconstruction, and priority adjustment, and triggers a secondary processing flow, effectively reducing the complaint return rate.

[0137] The following will illustrate this with specific examples.

[0138] The government work order intelligent processing system disclosed in this embodiment adopts a microservice architecture based on the Python language, is deployed on a cloud platform, and achieves high availability and scalability through containerization technology. Figure 2 As shown, the details are as follows:

[0139] Application and service layer:

[0140] Reverse proxy (Nginx): As the unified entry point of the system, it is responsible for receiving and load balancing external HTTP requests and forwarding them to the backend web services.

[0141] Web service (FastAPI): Provides high-performance RESTful API interfaces, handles synchronous requests from the front end (such as user requests, data queries, and data display), and acts as a task producer to distribute time-consuming computational tasks to asynchronous task queues.

[0142] Asynchronous Task Workers (Celery): As the core of distributed task scheduling, they consume tasks from the message broker. All time-consuming computational tasks (such as spatiotemporal semantic clustering, priority evaluation, vector retrieval, big oracle model inference, intelligent response generation, etc.) are submitted to the task queue as asynchronous tasks and processed in parallel by multiple worker nodes to alleviate the blocking problem of the main service thread.

[0143] Data and storage layer:

[0144] Relational database (PostgreSQL + PostGIS): Serving as the main business database, it persistently stores structured data such as work order details, user data, processing records, clustering results, and priority scores. The PostGIS extension provides powerful geospatial data processing capabilities.

[0145] Caching and Message Broker (Redis): It plays a dual role. As a message broker, it serves as the task queue middleware for Celery; as a cache, it stores frequently accessed data to accelerate API response times.

[0146] Vector Storage (FAISS): Stores semantic vectors of historical work order text content, providing efficient similarity retrieval support for the intelligent response generation module's retrieval enhancement generation function.

[0147] Display panel and user interaction layer:

[0148] Interactive GIS Visualization Module (Dash + Dash Leaflet): Constructs the front-end interface for data dashboards, responsible for geospatial visualization of work order data, display of statistical charts, and interactive operations with users.

[0149] Computation and Deployment Layer: To improve the efficiency of AI inference and semantic vector encoding, the system is deployed in a hybrid CPU and GPU server environment. CPU nodes handle I / O-intensive tasks such as web processing and database operations, while GPU nodes are dedicated to AI computationally intensive tasks such as large language model inference and text vectorization. All application components are containerized using Docker and combined with Kubernetes for automatic deployment, elastic scaling, and fault tolerance, ensuring system stability and scalability.

[0150] After receiving a new work order, the system will process it automatically and intelligently according to the following steps:

[0151] S1: When a new work order enters the system via FastAPI, an asynchronous clustering task is created and pushed to Redis. A Celery Worker retrieves the task and begins execution:

[0152] S11: Data Preprocessing: Use the Pandas and GeoPandas libraries to clean and transform the work order data. This includes calling a geocoding service to convert the address text into WGS84 latitude and longitude coordinates, and then transforming it into planar coordinates through UTM projection; converting the work order submission time into a UNIX timestamp; and calling a pre-trained text representation model (such as the Sentence-Transformers library or the Wenxin Yiyan Embedding-V1 model) to encode the text content of the work orders into 384-dimensional semantic vectors.

[0153] S13: Implement work order clustering based on the DBSCAN algorithm in the scikit-learn library, using a spatiotemporal semantic three-dimensional distance metric formula. This formula integrates geospatial distance, temporal difference, and cosine distance of semantic vectors. The clustering results (the cluster ID to which the work order belongs) are updated back to the corresponding work order record in the PostgreSQL database.

[0154] S2: After the work order is clustered, the system automatically triggers a priority evaluation task. Celery Worker performs the following operations:

[0155] S21: Extract clustering features (such as the number of work orders within a cluster Q) from PostgreSQL, and combine them with sentiment analysis models (to calculate sentiment intensity E), large language model rules (to determine urgency U), and dwell time (to calculate timeliness coefficient A) to quantify all indicators.

[0156] S22: Applying the dynamic priority scoring formula The final priority score is calculated and the result is stored in PostgreSQL.

[0157] S3: Based on the calculated cluster size and priority, the system executes the allocation and scheduling task.

[0158] S31: The system queries PostgreSQL for information on currently available operators (including the number of pending work orders, average processing time, areas of expertise, etc.) to ensure that work order allocation does not overload some operators. For high-priority work order clusters, the system will prioritize assigning them to operators with higher processing efficiency and relatively lower current load.

[0159] S32: Record the final assignment result (including operator ID, work order ID, assignment time, etc.) in the PostgreSQL work order assignment table, update the work order status to "assigned", and add the task to the operator's task flow.

[0160] S4: Implementation of the intelligent response generation module. This module is triggered when a user clicks on a specific work order on the front-end interface, and is a direct manifestation of the search-enhanced generation architecture.

[0161] S41: Case Retrieval: After receiving a request from the frontend, FastAPI triggers a Celery task. This task first retrieves the details of the current work order from PostgreSQL, and then uses its semantic vector to perform an efficient k-nearest neighbor search in the FAISS vector library to retrieve the Top-K most similar historical successful cases.

[0162] S42: Augmentation: Combine the detailed information of the current work order with the structured information (problem description, solution, etc.) of the K retrieved historical cases into a single augmentation word.

[0163] S43: Generation: The Celery Worker carries this enhanced prompt and makes two requests to the Large Language Model (LLM) deployed on the GPU server or via API call: one to generate a conservative solution A based on historical experience and with rigorous logic using a lower temperature parameter (e.g., 0.2); and another to generate a more divergent and innovative improved solution B using a higher temperature parameter (e.g., 0.8).

[0164] S5: Implementation of the interactive GIS visualization module. The user front-end of this system is a web application built on the Dash and DashLeaflet libraries.

[0165] S51: The application's main interface is an interactive map that uses the dash_leaflet.GeoJSON component to pull geospatial data of work orders in real time and renders the work order points as aggregated clusters. Users can zoom and pan the map, and click on an aggregated cluster to expand and view the individual work orders within it.

[0166] S52: The map contains multiple statistical dashboards, drawn using Plotly Express, such as a bar chart showing "number of work orders per hour" and data on "work order category distribution".

[0167] S53: Interactive Analysis: (1) When a user clicks on a single work order point on the map, the "Work Order Details" panel on the right will be updated immediately, displaying the work order's title, time, content, etc. At the same time, the click event will trigger the S4 process, asynchronously loading and displaying scheme A and scheme B in the "Large Model Recommended Scheme" area below. (2) In addition, users can use the drawing tool (dash_leaflet.EditControl) on the map to draw polygons, and the system will immediately query and list all work orders in that area in tabular form.

[0168] S6: Quality Feedback Module Implementation. After the responding personnel adopt the suggestions and complete the work order, the system executes the following steps:

[0169] S61: After receiving a work order completion request, FastAPI immediately updates the status of the work order in PostgreSQL to "Completed" and records the completion time. At the same time, the system sends a satisfaction evaluation link to the citizen via SMS or WeChat mini-program, with evaluation options including three levels: "Satisfied", "Neutral", and "Dissatisfied".

[0170] S62: After a citizen submits an evaluation, the system stores the evaluation results in the PostgreSQL satisfaction evaluation table, which includes fields such as work order ID, evaluation level, evaluation time, citizen contact information, and specific comments text.

[0171] S63: When an unsatisfactory evaluation is detected, FastAPI automatically creates a new Celery task. This task performs the following operations: (1) extracts all information of the original work order from PostgreSQL (work order content, processing records, information of the personnel handling the issue, etc.); (2) combines the citizen's new opinion to generate a new work order description and sets a higher priority coefficient (e.g., multiplying the original priority score by 1.5); (3) marks the new work order as a "related work order" and establishes a foreign key relationship with the original work order.

[0172] S64: Newly created related work orders automatically trigger the complete processing flow of S1-S5, including re-clustering, priority evaluation, allocation and scheduling, and response generation. The system will prioritize assigning the work order to operators with experience in handling similar issues or different from the original handler to ensure that the issue is resolved better.

[0173] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for intelligent processing of government work orders based on spatiotemporal semantic clustering and large language models, characterized in that, include: S1. Perform unified data feature modeling on the work orders to be processed, and execute the improved DBSCAN clustering algorithm on the work orders through the weighted spatiotemporal semantic three-dimensional distance metric formula to achieve joint clustering of spatial, temporal and semantic features; S2, Weighted Scoring Calculate work order priority, where Weighted scoring, This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , The weights of the corresponding items; S3. Dynamically allocate scheduling resources based on cluster size and work order priority; S4. Based on the RAG framework and FAISS vector retrieval library, the retrieval enhancement generation technology matches similar historical work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model. S5. Visualize and interactively analyze work order clustering through an interactive GIS platform; S6. Establish a quality feedback loop for work order refactoring; The formula for the weighted spatiotemporal semantic three-dimensional distance metric is: ; In the formula, R is the city characteristic radius. T represents the time window, set according to the government processing cycle. For the weighting coefficients, satisfying , Indicates the work order Semantic vectors used for text encoding Indicates the work order Semantic vectors used for text encoding Indicates work order The three-dimensional distance from work order j Indicates work order plane coordinates, Represents the planar coordinates of work order j. These represent work orders. The UNIX timestamp of the work order j; The improved DBSCAN clustering algorithm is implemented to achieve joint clustering of spatial, temporal, and semantic features, specifically including: In the spatial dimension, the work order address is first converted into latitude and longitude coordinates in the WGS84 coordinate system through geocoding, and then transformed into a standardized planar coordinate system through UTM projection. In the temporal dimension, the work order submission time is... The work order text is converted to UNIX timestamp format. In terms of semantic dimension, a pre-trained text representation model is used to encode the work order text into a 384-dimensional semantic vector.

2. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 1, characterized in that, For any work order in the work order set D When satisfied work orders The number exceeds the preset threshold When these work orders are in the same spatiotemporal semantic cluster, they are then marked as such: ; In the formula, Indicates work order candidate set, and The two parameters were determined through training and optimization using historical data. Indicates work order In the field, Indicates a preset threshold; For new work orders Please follow these steps to process: calculate 3D distance to all processed work orders Filter out those that meet the requirements The work orders constitute the candidate set ; like If all work orders are not categorized, then when At that time, with Create a new cluster for the core, otherwise... Temporarily marked as a noise point; like If there are already categorized work orders, then find them. The work orders have been categorized in China The nearest work order ,Will Into The cluster to which it belongs; If there are cases that cannot be categorized and the domain does not have sufficient density, temporarily label them. These are identified as noise points and will be re-evaluated in subsequent clustering cycles.

3. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 1, characterized in that, In step S2, This reflects the current number of complaints about this type of issue. The sentiment analysis model is used to quantify the sentiment value of the request text. The urgency of the work order is determined by combining a large language model with predefined rules. The timeliness coefficient is the normalized value of the work order's retention time, and the calculation formula is as follows: ,in As the attenuation factor, The duration of work order delay.

4. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 1, characterized in that, Step S3 specifically includes: Based on cluster size Compared with the preset threshold of single-person handling capacity Calculate the required number of handlers , And select the task with the fewest pending tasks from the pool of handlers. A working group composed of several disposal personnel; For new work orders, a round-robin method is used to distribute them to members within the work group. The round-robin rule is to distribute them sequentially according to the members' order. If a member's load reaches a threshold, the work order is skipped to ensure load balancing.

5. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 1, characterized in that, Step S4 specifically includes: Based on the RAG framework and the FAISS vector retrieval library, this search enhancement generation technique retrieves Top-K cases from a historical case database using cosine similarity. The cosine similarity calculation formula is as follows: ; In the formula, and These are the semantic vector representations of the current work order and historical case work orders, respectively. Indicates pending work orders and historical case work orders Cosine similarity; From the retrieved cases, those deemed satisfactory are selected based on user ratings. These selected cases are then sorted in descending order of similarity to construct a few-shot learning example set, which is added to the prompt words, resulting in a final structured prompt word set. Its composition is as follows: Clustering The summary description, the content of work order q, a few-shot learning example set of historical work orders, and the output structure are all used to control temperature parameters. The large language model generates two sets of differentiated processing suggestions, A and B: ; ; In the formula, , Let A and B represent the recommended options, respectively. Representing a large language model, This represents the temperature parameter.

6. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 5, characterized in that, Step S5 specifically includes: Create an interactive map with the following layers using the Dash-Leaflet library: The base map includes integrated Tianditu or OpenStreetMap services as the base map support; Real-time work orders are clustered and displayed spatially as point feature layers. The size and urgency of the clusters are indicated by size and color. Gradient circles with corresponding diameter pixels represent the cluster size. The urgency level is mapped using the HSV color space, establishing a linear mapping from cool to warm colors. Cool colors indicate low urgency, and warm colors indicate high urgency. The size of the point symbols is adaptively adjusted based on the cluster size, and the color gradient is mapped to the HSV color space according to the priority level and urgency level to achieve a visual comparison of high and low urgency. The panel displays the specific information of the queried work orders in real time, and shows recommended solutions A and B. Establish a double-buffered data pipeline. The front end maintains the current frame's visual state, while the back end's multi-threaded task automatically pulls the latest work order status data every set time and updates the memory cache. The front end view seamlessly switches to the new data buffer every refresh cycle.

7. The intelligent processing method for government work orders based on spatiotemporal semantic clustering and large language model according to claim 1, characterized in that, In step S6, if the feedback is satisfactory, the work order is closed and added to the historical work order database. If the feedback is unsatisfactory, the work order reconstruction process is automatically triggered. The reconstruction process includes: extracting the original work order content, processing records and citizen feedback, merging the extracted original work order content, processing records and citizen feedback according to structured data to generate a new work order data entity, and automatically re-executing the dynamic priority scoring process for the newly generated work order, and adding weights to the urgency and timeliness factors in the weight coefficients, and prioritizing its allocation to the original processing department for processing. The system monitors the rate of repeated complaints for the same work order in real time. If multiple unsatisfactory feedbacks are received for the same work order, an early warning mechanism is automatically triggered, sending an alarm message to management and prompting manual intervention.

8. A government work order intelligent processing system based on spatiotemporal semantic clustering and a large language model, used to implement the government work order intelligent processing method based on spatiotemporal semantic clustering and a large language model as described in any one of claims 1-7, characterized in that, include: The spatiotemporal semantic 3D clustering module is used to perform unified data feature modeling on work orders to be processed. It executes an improved DBSCAN clustering algorithm on the work orders through a weighted spatiotemporal semantic 3D distance metric formula to achieve joint clustering of spatial, temporal and semantic features. Priority evaluation module, used for weighted scoring Calculate work order priority, where Weighted scoring, This represents the current number of clustered work orders. For emotional intensity, Due to the level of urgency, For timeliness coefficient, , , , The weights of the corresponding items; The real-time allocation and scheduling module is used to dynamically allocate scheduling resources based on cluster size and work order priority; The intelligent response generation module is used for retrieval enhancement generation technology based on the RAG framework and FAISS vector retrieval library. It matches similar historical work orders, generates few-sample learning cases, and generates two sets of differentiated treatment plans by controlling the temperature parameters of the large language model. The interactive GIS visualization module is used to visualize and interactively analyze work order clustering through an interactive GIS platform. The quality feedback module is used to establish a quality feedback closed loop for work order refactoring.

Citation Information

Patent Citations

  • Intelligent government affair hotline group appeal analysis and detection method

    CN120373828A

  • Lower-dimensional subspace approximation of a dataset

    US20180107716A1