A data classification method, system and medium reflecting urban management problems

CN122594973APending Publication Date: 2026-08-18ZHEJIANG WANGXINHUIZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610747624.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种反映城市管理问题的数据分类方法、系统及介质,以至少解决相关技术中如何提高数据分类的准确性的问题

Benefits of technology

[0017]本申请实施例提供的一种反映城市管理问题的数据分类方法、系统及介质至少具有以下技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594973A_ABST
    Figure CN122594973A_ABST
Patent Text Reader

Abstract

This application relates to a data classification method, system, and medium reflecting urban management issues. The method includes: acquiring historical data reflecting urban management issues; preprocessing the historical data to obtain a standardized dataset; constructing input-output data pairs for fine-tuning a language model; combining the input-output data pairs into a dataset and dividing it into a training set and a validation set according to a predetermined ratio; selecting a pre-trained language model as a base model; fine-tuning the base model using the training set through parameter fine-tuning rules; and adjusting hyperparameters using the validation set to obtain an urban management issue classification model; inputting the received urban management issue data to be classified into the urban management issue classification model and outputting the corresponding classification results. This achieves fully automated intelligent classification of urban management cases, replacing the traditional manual classification mode and improving the accuracy and efficiency of case classification. It addresses the problem of how to improve the accuracy of data classification in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of urban management data classification, and in particular to a data classification method, system and medium that reflects urban management issues. Background Technology

[0002] In the current operation of the smart urban management system, one of the core components is the rapid and accurate classification and assignment of problem reports submitted by grid workers or citizens through hotlines, applications, and other channels. This process aims to map unstructured textual problem descriptions (such as "a fruit truck is blocking the road at a certain intersection") to specific categories in the urban management standard issue classification system (such as "unlicensed street vendors" or "road occupation"), so that subsequent tasks can be accurately transferred to the appropriate handling departments. This classification step is a crucial preliminary step for achieving automated and efficient transfer of urban management cases.

[0003] However, existing technical solutions exhibit significant limitations when dealing with the unique data and operational complexities of the urban management field. First, the manual classification model heavily relies on the operator's proficiency and subjective judgment. Different handlers' differing interpretations of the same vague description (e.g., "street vending in front of a shop" versus "materials piled up outside a shop") can lead to inconsistent classification standards, resulting in misassignment, rejection, and repeated processing of cases, severely hindering overall efficiency. Second, traditional text classification algorithms lack semantic understanding and accuracy when handling highly colloquial urban management reports containing numerous abbreviations, misspellings, and mixed business expressions. Especially when facing the complex multi-level classification system in urban management operations (such as the subcategories "operating outside shops" and "occupying the road" under the broad category "street order"), traditional algorithms struggle to effectively distinguish subtle semantic boundaries and hierarchical relationships between categories, leading to significant confusion and misjudgment in similar categories. This fails to meet the practical application requirements of smart urban management for high-precision automated processing.

[0004] Therefore, no effective solution has yet been proposed for improving the accuracy of data classification methods that reflect urban management issues. Summary of the Invention

[0005] This application provides a data classification method, system, and medium that reflects urban management issues, in order to at least address the problem of how to improve the accuracy of data classification in related technologies.

[0006] In a first aspect, embodiments of this application provide a data classification method reflecting urban management issues, the method comprising: Historical data reflecting urban management issues are acquired, and the historical data is preprocessed to obtain a standardized dataset; Based on the standardized dataset, input-output data pairs are constructed for fine-tuning the language model; The input and output data pairs are combined to form a dataset, which is then divided into a training set and a validation set according to a predetermined ratio. A pre-trained language model is selected as the base model. The base model is fine-tuned using the training set through parameter fine-tuning rules. The hyperparameters are then adjusted using the validation set to obtain a classification model for urban management problems. The system receives data on urban management issues to be classified, inputs it into the urban management issue classification model, and outputs the corresponding classification results.

[0007] In one embodiment, the step of acquiring historical data reflecting urban management issues and performing preprocessing on the historical data to obtain a standardized dataset includes: Historical data reflecting urban management issues are collected from urban management business systems and archives; Based on the historical data reflecting urban management issues, typos, non-standard abbreviations, and garbled characters are identified and corrected to obtain the corrected data; The corrected data is then processed by removing formatted content, duplicate information, and automatically generated logs that are irrelevant to the core description of the event, resulting in deredundant data. The data after redundancy removal is subjected to symbol standardization processing, and non-standard symbols are uniformly replaced with standard characters to obtain a standardized dataset.

[0008] In one embodiment, constructing input-output data pairs for fine-tuning the language model based on the standardized dataset includes: Extract the core event description content of each case file in the standardized dataset, and convert the core event description content into instruction input text according to the preset instruction format; Based on a predefined urban management business classification system, a corresponding basic classification label is generated for each instruction input text, and the semantic similarity category corresponding to the basic classification label is identified to generate a feature identifier for distinguishing similar categories. Extract urban management terminology from the core description of the event and generate corresponding standard terminology explanation text; The basic classification labels, the similar category feature identifiers, and the terminology explanation text are integrated into a structured output text; The corresponding instruction input text is combined with the structured output text to obtain a single input-output data pair.

[0009] In one embodiment, the step of generating a corresponding basic classification label for each instruction input text according to a predefined urban management business classification system, identifying semantically similar categories corresponding to the basic classification labels, and generating feature identifiers for distinguishing similar categories includes: Based on a predefined multi-level urban management business classification system, semantic matching is performed on the instruction input text to generate basic classification labels corresponding to the instruction input text; Based on the basic classification labels, a set of semantically similar categories that have semantic overlap with the basic classification labels is retrieved from the pre-built urban management similarity category mapping library; By comparing the basic classification labels with the business definitions and law enforcement boundaries of each category in the semantically similar category set, core distinguishing features are extracted. The core distinguishing features are converted into standardized feature identifiers, and a correspondence is established between the feature identifiers and the basic classification labels.

[0010] In one embodiment, the step of forming a dataset from the input and output data pairs and dividing it into a training set and a validation set according to a predetermined ratio includes: Combine all the input and output data pairs to form the total dataset; Based on the total dataset, a training set is divided according to a preset first ratio, a validation set is divided according to a preset second ratio, and a test set is divided according to a preset third ratio. The training set is used to fine-tune the base model, the validation set is used to adjust hyperparameters during the fine-tuning process, and the test set is used to evaluate the performance of the urban management problem classification model obtained after fine-tuning.

[0011] In one embodiment, the step of selecting a pre-trained language model as a base model, fine-tuning the base model using the training set according to parameter fine-tuning rules, and adjusting hyperparameters using the validation set to obtain an urban management problem classification model includes: An open-source pre-trained language model with natural language understanding and generation capabilities was selected as the base model; By using low-rank adaptive LoRA, a low-rank matrix is ​​injected into the attention layer of the base model to obtain the model to be fine-tuned; Based on the training set, the model to be fine-tuned is trained so that the model learns to generate structured output including basic classification labels, similar category feature identifiers and terminology explanation text. After each training round, the output accuracy of the model to be fine-tuned is comprehensively evaluated using the validation set. Based on the comprehensive evaluation results of the validation set, the hyperparameters used in the fine-tuning training process are adjusted, including the learning rate, training epochs, batch size, and the rank of the low-rank matrix. When the comprehensive evaluation results of the validation set meet the preset conditions, the fine-tuning training is stopped, and the urban management problem classification model is obtained.

[0012] In one embodiment, the step of fine-tuning the model to be fine-tuned based on the training set specifically includes: Freeze all the original model parameters in the base model, and update only the parameters of the low-rank matrix during the fine-tuning training process; The input-output data pairs in the training set are input into the model to be fine-tuned in batches. The joint loss value between the output result of the model to be fine-tuned and the structured output text in the input-output data pairs is calculated. The parameters of the low-rank matrix are updated through the backpropagation algorithm to minimize the joint loss value. The joint loss value is obtained by weighting and summing the basic classification label loss, similar category feature identification loss, and terminology explanation text loss according to preset weights.

[0013] In one embodiment, the step of receiving urban management problem data to be classified, inputting it into the urban management problem classification model, and outputting the corresponding classification result includes: Receive urban management problem data to be classified, and extract the core event description content based on the urban management problem data to be classified; According to the preset instruction input format, the core description of the event is converted into instruction input text consistent with the training phase of the urban management problem classification model; The instruction input text is input into the urban management problem classification model, and the urban management problem classification model performs semantic parsing and feature extraction on the instruction input text. Based on the semantic parsing and feature extraction results, a classification result is generated, including basic classification labels, similar category feature identifiers, and terminology explanation text. The classification result is used for automatic assignment of urban management cases and to assist law enforcement decision-making.

[0014] Secondly, embodiments of this application provide a data classification system reflecting urban management issues. The system is used to execute the methods described above, and includes: a data preprocessing module, an input / output pair module, a partitioning module, a module for constructing an urban management issue classification model, and a classification result module; wherein: The data preprocessing module is used to acquire historical data reflecting urban management issues, perform preprocessing on the historical data, and obtain a standardized dataset. The input-output pair module is used to construct input-output data pairs for fine-tuning the language model based on the standardized dataset. The partitioning module is used to form a dataset from the input and output data pairs, and to divide it into a training set and a validation set according to a predetermined ratio. The module for constructing a classification model for urban management problems is used to select a pre-trained language model as a base model, fine-tune the base model using the training set through parameter fine-tuning rules, and adjust the hyperparameters using the validation set to obtain the classification model for urban management problems. The classification result module is used to input the urban management problem data to be classified into the urban management problem classification model and output the corresponding classification result.

[0015] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a data classification method reflecting urban management issues as described in the first aspect above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data classification method reflecting urban management issues as described in the first aspect above.

[0017] The data classification method, system, and medium reflecting urban management issues provided in this application embodiment have at least the following technical effects.

[0018] Historical data reflecting urban management issues is acquired and preprocessed to obtain a standardized dataset, thus improving the quality of training data from the source and laying a reliable data foundation for subsequent model training. Based on the standardized dataset, input-output data pairs for fine-tuning the language model are constructed, solving the problem of shallow semantic understanding caused by traditional single-label training and improving classification accuracy. The input-output data pairs are combined into a dataset and divided into training and validation sets according to a predetermined ratio. A pre-trained language model is selected as the base model, and the base model is fine-tuned using the training set according to parameter fine-tuning rules. Hyperparameters are then adjusted using the validation set to obtain an urban management issue classification model. While retaining the general capabilities of the base model, the model can be quickly adapted to the vertical domain of urban management tasks with only a small number of parameters, significantly reducing the computational resources and time costs required for training. This results in a high-precision, highly robust urban management classification model. The model receives urban management issue data to be classified, inputs it into the classification model, and outputs the corresponding classification results. This achieves fully automated intelligent classification of urban management cases, replacing the traditional manual classification mode and improving the accuracy and efficiency of case classification. This addresses the issue of how to improve the accuracy of data classification in related technologies.

[0019] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating a data classification method that reflects urban management issues. Figure 2 This is a flowchart illustrating step S102 according to an exemplary embodiment; Figure 3 This is a flowchart illustrating step S104 according to an exemplary embodiment; Figure 4 This is a system architecture block diagram illustrating a data classification system that reflects urban management issues, according to an exemplary embodiment. Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0022] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0023] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0024] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0025] In this document, it should be understood that the terms used may be technical means used to implement part of the present invention or other summary technical terms. For example, the terms may include: Urban management issues refer to various incidents that require handling by urban management departments, covering business areas such as urban appearance and environment, street order, construction management, illegal construction, and noise pollution. These issues are usually recorded in the urban management business system or archive in the form of natural language descriptions.

[0026] Input-output data pairs: These are standardized data units used for fine-tuning instructions in the pre-trained language model. They consist of one-to-one corresponding instruction input text and structured output text. The instruction input text is the integrated core description of urban management issues, and the structured output text is the standardized result containing basic classification labels, similar category feature identifiers, and terminology explanations.

[0027] Urban management business system: refers to the information business platform used by urban management departments to realize the whole process management of case acceptance, assignment, disposal, supervision and archiving, and is the main source of historical case file data in the embodiments of this application.

[0028] Archives: refers to a dedicated database used by urban management departments to store complete case files of urban management cases that have been closed over the years. It contains full information such as case event descriptions, handling results, and classification tags, and is a supplementary source of historical case file data in the embodiments of this application.

[0029] Urban management business classification system: refers to the multi-level standardized classification rules pre-formulated by urban management departments to regulate the classification of urban management issues. It includes a first-level major category and its subordinate second-level, third-level and other subcategories, and is the core basis for case classification in the embodiments of this application.

[0030] Urban management terminology: refers to professional terms used uniformly in the field of urban management that have specific business connotations, and are different from everyday colloquial expressions, such as "soil spillage", "street vending", and "business operations outside the premises".

[0031] Standard Terminology Explanation Text: This refers to the text content that provides a standardized explanation of the business connotation, scope of application, and judgment criteria of urban management professional terms. It is used to help the model accurately understand the semantics of professional terms and eliminate ambiguity caused by colloquial or vague descriptions.

[0032] Urban Management Similarity Category Mapping Library: This refers to a pre-built database that stores semantically highly similar urban management business categories and their corresponding relationships. Each category is associated with its easily confused categories and core distinguishing features.

[0033] Similar category feature identifier: refers to the standardized expression of the core discriminative features used to distinguish semantically similar urban management business categories, and clearly marks the essential differences between different similar categories in terms of business definition, law enforcement boundaries, etc.

[0034] Joint loss value: refers to the total loss value obtained by calculating the loss values ​​for the three dimensions of the structured output—basic classification labels, similar category feature labels, and standard terminology explanation text—in the process of fine-tuning the model, and then summing them according to preset weights. It is used to guide the update of model parameters, enabling the model to optimize the accuracy of multiple output dimensions at the same time.

[0035] Firstly, embodiments of this application provide a data classification method reflecting urban management issues. Figure 1 This is a flowchart illustrating a data classification method that reflects urban management issues, such as... Figure 1 As shown, the method includes: Step S101: Obtain historical data reflecting urban management issues, perform preprocessing on the historical data, and obtain a standardized dataset.

[0036] Step S102: Based on the standardized dataset, construct input-output data pairs for fine-tuning the language model.

[0037] Step S103: Combine the input and output data pairs into a dataset, and divide it into a training set and a validation set according to a predetermined ratio.

[0038] Step S104: Select a pre-trained language model as the base model, fine-tune the base model using the training set through parameter fine-tuning rules, and adjust the hyperparameters using the validation set to obtain the urban management problem classification model.

[0039] Step S105: Input the received urban management problem data to be classified into the urban management problem classification model and output the corresponding classification results.

[0040] In summary, this application provides a data classification method reflecting urban management issues. By acquiring historical data reflecting urban management issues and performing preprocessing on the historical data, a standardized dataset is obtained. This improves the quality of training data from the source, laying a reliable data foundation for subsequent model training. Based on the standardized dataset, input-output data pairs for fine-tuning the language model are constructed, solving the problem of shallow semantic understanding caused by traditional single-label training, thereby improving classification accuracy. The input-output data pairs are combined into a dataset and divided into training and validation sets according to a predetermined ratio. A pre-trained language model is selected as the base model. The base model is fine-tuned using the training set according to parameter fine-tuning rules, and hyperparameters are adjusted using the validation set to obtain an urban management issue classification model. While retaining the general capabilities of the base model, the model can be quickly adapted to the vertical domain of urban management tasks with only a small number of parameters, significantly reducing the computational resources and time costs required for training. A high-precision and highly robust urban management classification model is obtained. The urban management issue data to be classified is input into the urban management issue classification model, and the corresponding classification results are output. This system enables fully automated intelligent classification of urban management cases, replacing the traditional manual classification method and improving the accuracy and efficiency of case classification. It addresses the challenge of improving the accuracy of data classification within related technologies.

[0041] In one embodiment, step S101 involves acquiring historical data reflecting urban management issues, performing preprocessing on the historical data, and obtaining a standardized dataset. Specifically, this includes the following steps: Step S1011: Collect historical data reflecting urban management issues from the urban management business system and archives; Step S1012: Based on historical data reflecting urban management issues, identify and correct typos, non-standard abbreviations, and garbled characters to obtain corrected data; Step S1013: Remove formatted content, duplicate information, and automatically generated logs that are irrelevant to the core description of the event from the corrected data to obtain the deredundant data; Step S1014: Perform symbol standardization on the deredundant data, uniformly replacing non-standard symbols with standard characters to obtain a standardized dataset.

[0042] Optionally, 812,000 completed urban management case files from January 2022 to June 2025 were collected from a city management business system and historical archives, covering all business scenarios in 18 primary categories and 253 secondary categories, including urban appearance, street order, and construction management. Based on the above raw data, regular expression matching combined with manual sampling verification was first used to identify and correct typos, non-standard abbreviations, and garbled characters. For example, "excessive spillage from construction waste trucks" was corrected to the standard business expression "excessive spillage from construction waste trucks," and the colloquial abbreviation "illegal parking" was uniformly corrected to "illegal parking." Unrecognizable garbled characters, such as " "Delete all; secondly, remove content unrelated to the core description of the event in each case file through preset keyword filtering rules, including system logs automatically generated by the system; finally, perform symbol standardization processing, uniformly replace consecutive special punctuation marks in the text with standard punctuation marks, and convert full-width characters to half-width characters, ultimately obtaining a standardized dataset of 606,900 entries with uniform format and standardized content."

[0043] Step S101 effectively eliminates problems such as text non-standardization, information redundancy, and inconsistent expression in the original historical data through a hierarchical and progressive automated preprocessing process, thereby improving the effective information in the original data and providing core data support for the overall classification accuracy.

[0044] In one embodiment, Figure 2 This is a flowchart illustrating step S102 according to an exemplary embodiment, as follows: Figure 2 As shown, step S102 involves constructing input-output data pairs for fine-tuning the language model based on a standardized dataset. This specifically includes the following steps: Step S1021: Extract the core event description content of each case file in the standardized dataset, and convert the core event description content into instruction input text according to the preset instruction format; Step S1022: Based on the predefined urban management business classification system, generate corresponding basic classification labels for each instruction input text, identify semantically similar categories corresponding to the basic classification labels, and generate feature identifiers for distinguishing similar categories; specifically including: Based on a predefined multi-level urban management business classification system, semantic matching is performed on the instruction input text to generate basic classification labels corresponding to the instruction input text. Based on the basic classification labels, a set of semantically similar categories that have semantic overlap with the basic classification labels is retrieved from a pre-built urban management similarity category mapping library; By comparing the basic classification labels with the business definitions and law enforcement boundaries of each category in the semantically similar category set, core distinguishing features are extracted. The core distinguishing features are converted into standardized feature identifiers, and a correspondence is established between the feature identifiers and the basic classification labels.

[0045] Step S1023: Extract urban management professional terms involved in the core description of the event and generate corresponding standard terminology explanation text; Step S1024: Integrate the basic classification labels, similar category feature identifiers, and terminology explanation text into structured output text; Step S1025: Combine the corresponding instruction input text with the structured output text to obtain a single input-output data pair.

[0046] Optionally, the case files within the standardized dataset are processed one by one, extracting key content such as the core description of the event and the location of the incident from each case file. This is then converted into instruction input text according to a preset instruction format. For example, the core description "Vendors are occupying the road and selling fruit on a street, causing pedestrian congestion" is converted into the instruction input text: "Please analyze the following event description: Vendors are occupying the road and selling fruit on a street, causing pedestrian congestion." Semantic matching is performed on the instruction input text based on a predefined multi-level urban management business classification system to generate corresponding basic classification labels. Based on these basic classification labels, a set of semantically similar categories is retrieved from a preset urban management similarity category mapping library. The business definitions and enforcement boundaries of the basic classification labels and semantically similar categories are compared, and core distinguishing features are extracted and converted into standardized feature identifiers. Urban management professional terms are extracted from the core description of the event, generating corresponding standard terminology explanation text. The basic classification labels, similarity category feature identifiers, and standard terminology explanation text are integrated into structured output text. The one-to-one corresponding instruction input text is combined with the structured output text to obtain a single input-output data pair, thus completing the formatted construction of all fine-tuned data.

[0047] The case files within the standardized dataset are processed one by one, extracting key information such as the core event description and location for each case. First, the core event description, "Vendors are occupying the sidewalk and selling fruit on a certain street, causing pedestrian congestion," and the location information are extracted. This is then converted into input text according to a preset instruction format: "Please analyze the following event description: Vendors are occupying the sidewalk and selling fruit on a certain street, causing pedestrian congestion." Semantic matching is then performed based on a multi-level urban management business classification system to generate basic classification labels, such as "street order—" The term "street vending" is retrieved from the urban management similarity category mapping library to obtain semantically similar categories, such as "business outside shops." By comparing the business definitions and law enforcement boundaries of the two, core distinguishing features are extracted, such as "street vending occupies public sidewalks and affects public passage, while business outside shops occupies the private area in front of shops." These features are then converted into standardized feature labels. Professional terms such as "street vending" are extracted from the core description of the event, and a standard terminology explanation text is generated: "Street vending refers to the behavior of operators occupying public places such as urban roads and squares to carry out business activities, affecting passage and urban order." The basic classification labels, similar category feature labels, and standard terminology explanation text are integrated into a structured output text. Then, the instruction input text is matched one-to-one with the structured output text to form a single input-output data pair suitable for fine-tuning of large model instructions.

[0048] Step S102 involves constructing structured input-output data pairs, synchronously injecting urban management business classification rules, similar category differentiation criteria, and professional terminology into the training data. This enables the model to deeply understand colloquial and ambiguous case descriptions, effectively distinguishing highly similar categories such as street vending versus storefront operations, and road damage versus potholes. This fundamentally solves the problems of insufficient accuracy and inconsistent classification standards in traditional text classification. In one embodiment, step S103 involves combining the input and output data pairs to form a dataset, and then dividing it into a training set and a validation set according to a predetermined ratio. Specifically, this includes the following steps: Step S1031: Combine all input and output data pairs into a total dataset; Step S1032: Based on the total dataset, divide the training set according to a preset first ratio, divide the validation set according to a preset second ratio, and divide the test set according to a preset third ratio. Step S1033: The training set is used to fine-tune the base model, the validation set is used to adjust hyperparameters during the fine-tuning process, and the test set is used to evaluate the performance of the urban management problem classification model obtained after fine-tuning.

[0049] Optionally, all input and output data pairs are combined to form a total dataset. In this embodiment, the total dataset size is 606,900 records. A stratified random sampling method is used to divide the total dataset according to a preset ratio of 8:1:1, resulting in a training set of 485,500 records, a validation set of 60,700 records, and a test set of 60,700 records. The training set is used for parameter learning and updating of the base model; the validation set is used to evaluate classification performance in real time during model fine-tuning, dynamically adjust hyperparameters such as learning rate, training epochs, and batch size, and prevent model overfitting; the test set is used to conduct unbiased overall performance verification and accuracy statistics of the final urban management problem classification model after model training. Table 1 shows the test results. Table 1: Test Results Table

[0050] Step S103 divides the total dataset into independent training, validation, and test sets according to a fixed ratio. This ensures that the model can fully learn the characteristics of urban management business, effectively avoids overfitting through the validation set, and objectively reflects the model's true classification ability through the independent test set, thus providing a reliable foundation for the high accuracy of the urban management problem classification model.

[0051] In one embodiment, Figure 3 This is a flowchart illustrating step S104 according to an exemplary embodiment, as follows: Figure 3 As shown, step S104 involves selecting a pre-trained language model as the base model, fine-tuning the base model using the training set according to parameter fine-tuning rules, and adjusting hyperparameters using the validation set to obtain a classification model for urban management problems. Specifically, this includes the following steps: Step S1041: Select an open-source pre-trained language model with natural language understanding and generation capabilities as the base model; Step S1042: By using low-rank adaptive LoRA, a low-rank matrix is ​​injected into the attention layer of the base model to obtain the model to be fine-tuned; Step S1043: Based on the training set, fine-tune the model to be fine-tuned, enabling the model to learn to generate structured output including basic classification labels, similar category feature identifiers, and terminology explanation text. After each training round, the output accuracy of the model to be fine-tuned is comprehensively evaluated using the validation set. The fine-tuning training specifically includes: All original model parameters in the base model are frozen, and only the parameters of the low-rank matrix are updated during fine-tuning training. Input-output data pairs from the training set are fed into the model to be fine-tuned in batches. The joint loss value between the output of the model to be fine-tuned and the structured output text in the input-output data pairs is calculated. The parameters of the low-rank matrix are updated through the backpropagation algorithm to minimize the joint loss value. The joint loss value is obtained by weighting and summing the basic classification label loss, similar category feature identification loss, and terminology explanation text loss according to preset weights.

[0052] Step S1044: Based on the comprehensive evaluation results of the validation set, adjust the hyperparameters used in the fine-tuning training process. The hyperparameters include the learning rate, training epochs, batch size, and the rank of the low-rank matrix. Step S1045: When the comprehensive evaluation results of the validation set meet the preset conditions, stop the fine-tuning training and obtain the urban management problem classification model.

[0053] Optionally, an open-source pre-trained language model with natural language understanding and generation capabilities can be selected, such as Qwen. 3 Using 8B as the base model, a low-rank matrix is ​​injected into the self-attention layer of the base model using the low-rank adaptive LoRA technique to obtain the model to be fine-tuned. During training, all the original parameters of the base model are frozen, and only the parameters of the low-rank matrix are updated. The input and output data from the training set are input into the model to be fine-tuned in batches. The joint loss value between the structured prediction results and the structured output text of the model is calculated. This joint loss value is obtained by weighting the basic classification label loss, similar category feature identification loss, and terminology explanation text loss according to preset weights. The low-rank matrix parameters are updated through the backpropagation algorithm to minimize the joint loss value. After each round of training, the accuracy of the structured output of the model to be fine-tuned is comprehensively evaluated using the validation set. Based on the evaluation results, the learning rate, training rounds, batch size, and hyperparameters such as LoRA rank are dynamically adjusted. When the comprehensive accuracy of the validation set tends to stabilize for several consecutive rounds and meets the preset threshold, training is stopped, and the urban management problem classification model is obtained.

[0054] Step S104 uses LoRA parameters for efficient fine-tuning and freezes the original model parameters, which significantly reduces computing resources and GPU memory usage while avoiding catastrophic forgetting of the model and preserving the general language understanding ability of the base model. Through multi-objective optimization training with joint loss values, the model learns classification, similar category distinction and professional terminology interpretation capabilities simultaneously, which significantly improves the recognition accuracy of fuzzy descriptions, similar categories and colloquial expressions, effectively solving the problems of weak generalization ability and low classification accuracy of traditional fine-tuning methods.

[0055] In one embodiment, step S105 involves inputting the received urban management problem data to be classified into the urban management problem classification model and outputting the corresponding classification result. Specifically, this includes the following steps: Step S1051: Receive urban management problem data to be classified, and extract the core description of events based on the urban management problem data to be classified; Step S1052: According to the preset instruction input format, convert the core description of the event into instruction input text consistent with the training phase of the urban management problem classification model; Step S1053: Input the instruction input text into the urban management problem classification model, and perform semantic parsing and feature extraction on the instruction input text through the urban management problem classification model; Step S1054: Based on the semantic parsing and feature extraction results, generate classification results including basic classification labels, similar category feature identifiers, and terminology explanation text. The classification results are used for automatic assignment of urban management cases and to assist law enforcement decision-making.

[0056] Optionally, the system receives urban management problem data to be classified, such as "Traffic barriers on XX road section are damaged, broken, and tilted, affecting traffic." It extracts the core description of the event and converts it into standard instruction input text according to a preset instruction input format consistent with the training phase: "Please analyze the following event description: Traffic barriers on XX road section are damaged, broken, and tilted, affecting traffic." This instruction input text is then input into the trained urban management problem classification model, where the model performs semantic parsing and business feature extraction. Based on the parsing and extraction results, a structured classification result is generated, containing multi-level basic classification labels "Traffic Order (Level 1) — Traffic Barrier Damage (Level 2)," similar category feature identifiers (the distinguishing feature from "Damage to Road Ancillary Facilities" is "directly affects traffic order and falls under the category of traffic facilities"), and terminology explanation text "Traffic barrier damage: refers to damage to road safety and traffic order caused by broken, tilted, or missing guardrails on both sides or in the center of the road." This structured classification result can be directly used for automatic assignment of urban management cases, push of enforcement evidence, and auxiliary decision-making.

[0057] Step S105 ensures the stability of the model's inference process and the consistency of results by using the same instruction format input and structured output method as the training phase. It can directly output complete classification information that is interpretable and applicable. At the same time, the output similar category distinction criteria and terminology explanations can directly support law enforcement standardization and rapid case handling, realizing fully automatic intelligent classification of urban management cases. This replaces the traditional manual classification mode, improves the accuracy and efficiency of case classification, and significantly improves the efficiency and consistency of urban management case handling.

[0058] In summary, this application provides a data classification method reflecting urban management issues. By acquiring historical data reflecting urban management issues and performing preprocessing on the historical data, a standardized dataset is obtained. This improves the quality of training data from the source, laying a reliable data foundation for subsequent model training. Based on the standardized dataset, input-output data pairs for fine-tuning the language model are constructed, solving the problem of shallow semantic understanding caused by traditional single-label training, thereby improving classification accuracy. The input-output data pairs are combined into a dataset and divided into training and validation sets according to a predetermined ratio. A pre-trained language model is selected as the base model. The base model is fine-tuned using the training set according to parameter fine-tuning rules, and hyperparameters are adjusted using the validation set to obtain an urban management issue classification model. While retaining the general capabilities of the base model, the model can be quickly adapted to the vertical domain of urban management tasks with only a small number of parameters, significantly reducing the computational resources and time costs required for training. A high-precision and highly robust urban management classification model is obtained. The urban management issue data to be classified is input into the urban management issue classification model, and the corresponding classification results are output. This system enables fully automated intelligent classification of urban management cases, replacing the traditional manual classification method and improving the accuracy and efficiency of case classification. It addresses the challenge of improving the accuracy of data classification within related technologies.

[0059] Secondly, embodiments of this application provide a data classification system that reflects urban management issues. Figure 4 This is a system architecture block diagram illustrating a data classification system reflecting urban management issues, according to an exemplary embodiment. For example... Figure 4 As shown, the system includes: a data preprocessing module 410, an input / output pair module 420, a partitioning module 430, a module for constructing a classification model for urban management problems 440, and a classification result module 450; wherein: Data preprocessing module 410 is used to acquire historical data reflecting urban management issues, perform preprocessing on the historical data, and obtain a standardized dataset; Input-output pair module 420 is used to construct input-output data pairs for fine-tuning the language model based on a standardized dataset; The partitioning module 430 is used to combine input and output data pairs into a dataset and divide it into a training set and a validation set according to a predetermined ratio. A module 440 for constructing a classification model for urban management problems is used to select a pre-trained language model as a base model, fine-tune the base model using the training set through parameter fine-tuning rules, and adjust the hyperparameters using the validation set to obtain the classification model for urban management problems. The classification result module 450 is used to input the urban management problem data to be classified into the urban management problem classification model and output the corresponding classification results.

[0060] In summary, the data preprocessing module, input / output pair module, partitioning module, urban management problem classification model construction module, and classification result module provided in this application achieve fully automated intelligent classification of urban management cases, replacing the traditional manual classification mode and improving the accuracy and efficiency of case classification. This addresses the problem of how to improve the accuracy of data classification in related technologies.

[0061] It should be noted that the data classification system reflecting urban management issues provided in this embodiment is used to implement the above-described implementation methods, and details already described will not be repeated. As used above, terms such as "module," "unit," and "subunit" can refer to combinations of software and / or hardware that perform predetermined functions. Although the apparatus described in the above embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0062] Thirdly, embodiments of this application provide an electronic device, Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. (e.g.) Figure 5 As shown, the electronic device may include a processor 51 and a memory 52 storing computer program instructions.

[0063] Specifically, the processor 51 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0064] The memory 52 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 52 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 52 may include removable or non-removable (or fixed) media. Where appropriate, the memory 52 may be internal or external to a data processing device. In a particular embodiment, the memory 52 is non-volatile memory. In a particular embodiment, the memory 52 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0065] The memory 52 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 51.

[0066] The processor 51 reads and executes computer program instructions stored in the memory 52 to implement any of the data classification methods reflecting urban management issues in the above embodiments.

[0067] In one embodiment, a data classification device reflecting urban management issues may further include a communication interface 53 and a bus 50. Wherein, as... Figure 5 As shown, the processor 51, memory 52, and communication interface 53 are connected through bus 50 and complete communication with each other.

[0068] The communication interface 53 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of this application. The communication interface 53 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0069] Bus 50 includes hardware, software, or both, that couples together components of a data classification device that reflects urban management issues. Bus 50 includes, but is not limited to, at least one of the following: Data Bus, Address Bus, Control Bus, Expansion Bus, and Local Bus. For example, and not as a limitation, bus 50 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 50 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0070] Fourthly, embodiments of this application provide a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a data classification method for reflecting urban management issues provided in the first aspect.

[0071] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0072] In a possible implementation, the present invention can also be implemented as a program product comprising program code, which, when the program product is run on a terminal device, causes the terminal device to perform steps implementing the data classification method for reflecting urban management issues provided in the first aspect.

[0073] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0074] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0075] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A data classification method reflecting urban management issues, characterized in that, The method includes: Historical data reflecting urban management issues are acquired, and the historical data is preprocessed to obtain a standardized dataset; Based on the standardized dataset, input-output data pairs are constructed for fine-tuning the language model; The input and output data pairs are combined to form a dataset, which is then divided into a training set and a validation set according to a predetermined ratio. A pre-trained language model is selected as the base model. The base model is fine-tuned using the training set through parameter fine-tuning rules. The hyperparameters are then adjusted using the validation set to obtain a classification model for urban management problems. The system receives data on urban management issues to be classified, inputs it into the urban management issue classification model, and outputs the corresponding classification results.

2. The data classification method for reflecting urban management issues according to claim 1, characterized in that, The process involves selecting a pre-trained language model as the base model, fine-tuning the base model using the training set according to parameter fine-tuning rules, and adjusting hyperparameters using the validation set to obtain a city management problem classification model, including: An open-source pre-trained language model with natural language understanding and generation capabilities was selected as the base model; By using low-rank adaptive LoRA, a low-rank matrix is ​​injected into the attention layer of the base model to obtain the model to be fine-tuned; Based on the training set, the model to be fine-tuned is trained so that the model learns to generate structured output including basic classification labels, similar category feature identifiers and terminology explanation text. After each training round, the output accuracy of the model to be fine-tuned is comprehensively evaluated using the validation set. Based on the comprehensive evaluation results of the validation set, the hyperparameters used in the fine-tuning training process are adjusted, including the learning rate, training epochs, batch size, and the rank of the low-rank matrix. When the comprehensive evaluation results of the validation set meet the preset conditions, the fine-tuning training is stopped, and the urban management problem classification model is obtained.

3. The data classification method for reflecting urban management issues according to claim 2, characterized in that, The fine-tuning training of the model to be fine-tuned based on the training set specifically includes: Freeze all the original model parameters in the base model, and update only the parameters of the low-rank matrix during the fine-tuning training process; The input-output data pairs in the training set are input into the model to be fine-tuned in batches. The joint loss value between the output result of the model to be fine-tuned and the structured output text in the input-output data pairs is calculated. The parameters of the low-rank matrix are updated through the backpropagation algorithm to minimize the joint loss value. The joint loss value is obtained by weighting and summing the basic classification label loss, similar category feature identification loss, and terminology explanation text loss according to preset weights.

4. The data classification method for reflecting urban management issues according to claim 1, characterized in that, The step of constructing input-output data pairs for fine-tuning the language model based on the standardized dataset includes: Extract the core event description content of each case file in the standardized dataset, and convert the core event description content into instruction input text according to the preset instruction format; Based on a predefined urban management business classification system, a corresponding basic classification label is generated for each instruction input text, and the semantic similarity category corresponding to the basic classification label is identified to generate a feature identifier for distinguishing similar categories. Extract urban management terminology from the core description of the event and generate corresponding standard terminology explanation text; The basic classification labels, the similar category feature identifiers, and the terminology explanation text are integrated into a structured output text; The corresponding instruction input text is combined with the structured output text to obtain a single input-output data pair.

5. The data classification method for reflecting urban management issues according to claim 4, characterized in that, The process involves generating a corresponding basic classification label for each instruction input text based on a predefined urban management business classification system, identifying semantically similar categories corresponding to the basic classification labels, and generating feature identifiers to distinguish similar categories, including: Based on a predefined multi-level urban management business classification system, semantic matching is performed on the instruction input text to generate basic classification labels corresponding to the instruction input text; Based on the basic classification labels, a set of semantically similar categories that have semantic overlap with the basic classification labels is retrieved from the pre-built urban management similarity category mapping library; By comparing the basic classification labels with the business definitions and law enforcement boundaries of each category in the semantically similar category set, core distinguishing features are extracted. The core distinguishing features are converted into standardized feature identifiers, and a correspondence is established between the feature identifiers and the basic classification labels.

6. The data classification method for reflecting urban management issues according to claim 1, characterized in that, The process of acquiring historical data reflecting urban management issues, performing preprocessing on the historical data to obtain a standardized dataset, includes: Historical data reflecting urban management issues are collected from urban management business systems and archives; Based on the historical data reflecting urban management issues, typos, non-standard abbreviations, and garbled characters are identified and corrected to obtain the corrected data; The corrected data is then processed by removing formatted content, duplicate information, and automatically generated logs that are irrelevant to the core description of the event, resulting in deredundant data. The data after redundancy removal is subjected to symbol standardization processing, and non-standard symbols are uniformly replaced with standard characters to obtain a standardized dataset.

7. The data classification method for reflecting urban management issues according to claim 1, characterized in that, The step of forming a dataset from the input and output data pairs and dividing it into a training set and a validation set according to a predetermined ratio includes: Combine all the input and output data pairs to form the total dataset; Based on the total dataset, a training set is divided according to a preset first ratio, a validation set is divided according to a preset second ratio, and a test set is divided according to a preset third ratio. The training set is used to fine-tune the base model, the validation set is used to adjust hyperparameters during the fine-tuning process, and the test set is used to evaluate the performance of the urban management problem classification model obtained after fine-tuning.

8. The data classification method for reflecting urban management issues according to claim 1, characterized in that, The process of receiving urban management problem data to be classified, inputting it into the urban management problem classification model, and outputting the corresponding classification results includes: Receive urban management problem data to be classified, and extract the core event description content based on the urban management problem data to be classified; According to the preset instruction input format, the core description of the event is converted into instruction input text consistent with the training phase of the urban management problem classification model; The instruction input text is input into the urban management problem classification model, and the urban management problem classification model performs semantic parsing and feature extraction on the instruction input text. Based on the semantic parsing and feature extraction results, a classification result is generated, including basic classification labels, similar category feature identifiers, and terminology explanation text. The classification result is used for automatic assignment of urban management cases and to assist law enforcement decision-making.

9. A data classification system reflecting urban management issues, characterized in that, The system is used to execute the method according to any one of claims 1 to 8, and the system includes: a data preprocessing module, an input / output pair module, a partitioning module, a module for constructing a classification model for urban management problems, and a classification result module; wherein: The data preprocessing module is used to acquire historical data reflecting urban management issues, perform preprocessing on the historical data, and obtain a standardized dataset. The input-output pair module is used to construct input-output data pairs for fine-tuning the language model based on the standardized dataset. The partitioning module is used to form a dataset from the input and output data pairs, and to divide it into a training set and a validation set according to a predetermined ratio. The module for constructing a classification model for urban management problems is used to select a pre-trained language model as a base model, fine-tune the base model using the training set through parameter fine-tuning rules, and adjust the hyperparameters using the validation set to obtain the classification model for urban management problems. The classification result module is used to input the urban management problem data to be classified into the urban management problem classification model and output the corresponding classification result.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a data classification method reflecting urban management issues as described in any one of claims 1 to 8.