Government affair data census metadata table type automatic identification and classification method and system
Patent Information
- Application Number
- CN202610880380.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-10-13
AI Technical Summary
为了克服以上不足,发明的目的在于提供面向政务数据普查元数据表类型自动识别分类方法及系统,以解决现有政务数据普查中的数据库表分类完全依赖人工或简单工具,存在效率低下、标准不一、缺乏智能辅助、交互笨拙且无法支持增量迭代优化的技术缺陷的技术问题
[0025]AI分类引擎在合并用户自定义规则与内置规则时,会自动对规则集进行去重和优先级排序,即使多条规则相互交叉或冲突,系统也能有条不紊地执行匹配,保证了分类逻辑的清晰与可预测性。同时,确认与回写模块支持单条确认和批量确认,且批量确认严格限定仅对“待确认”状态的记录生效,有效防止误覆盖已确认的表,用户放心全选批量操作也不必担心数据安全,兼顾了批处理效率和状态保护。
Smart Images

Figure CN122903508A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of government data governance and metadata management technology, and in particular relates to a method and system for automatic identification and classification of metadata table types for government data census. Background Technology
[0002] In the process of conducting a comprehensive survey of government data resources, it is necessary to classify and manage hundreds or even thousands of database tables in the information systems of various commissions and bureaus. These tables are typically divided into business tables (core business data), configuration tables (system or application configuration parameters), and operation tables (logs, transaction records, and other process data) to facilitate subsequent data resource cataloging, linking, and registration. Currently, existing data management platforms mainly rely on manual experience, manually setting the type for each table by checking its name, comments, and field information. While some platforms provide basic metadata collection functions, they lack intelligent classification assistance methods. This traditional approach has significant drawbacks in practical applications: First, it is extremely inefficient. A medium-sized department may contain hundreds of tables, and manual analysis and classification of each table would take several person-weeks, severely impacting the overall progress of the census. Second, standards are inconsistent. Different managers have varying understandings of "business tables," "configuration tables," and "operation tables," leading to a lack of consistency and standardization in the classification results. Third, it lacks auxiliary tools, especially in government scenarios, where many tables have non-standard naming conventions and missing annotations, making it difficult for users to determine the business type based solely on the table name. Fourth, the interaction is cumbersome. When classifying large numbers of tables, it lacks batch operation and intelligent table partitioning functions, preventing users from guiding the system to automate classification through custom rules or flexibly performing secondary confirmation and adjustments. Fifth, it is ill-suited to the iterative nature of the census. Users may need to adjust rules based on the initial classification results and then reclassify. Existing technologies either require complete reclassification to overwrite confirmed results or cannot perform incremental classification, resulting in a large amount of repetitive work. These problems are seriously inconsistent with the "comprehensive, accurate, and efficient" requirements of government data censuses, necessitating an intelligent classification method that balances efficiency, accuracy, and user controllability. Summary of the Invention
[0003] (a) Purpose of the invention To overcome the above shortcomings, the purpose of this invention is to provide an automatic identification and classification method and system for metadata table types in government data census, so as to solve the technical problems in the existing government data census where database table classification relies entirely on manual or simple tools, resulting in low efficiency, inconsistent standards, lack of intelligent assistance, clumsy interaction, and inability to support incremental iterative optimization.
[0004] (II) Technical Solution To achieve the above objectives, this application provides the following technical solution: The method for automatically identifying and classifying metadata table types for government data census includes the following steps: Step S1: Obtain and display a list of metadata tables for the target data source, where each table has an initial "incomplete" state; Step S2: In response to the user's initial type setting operation for at least one target table, set the corresponding table type for the target table and update its status to "confirmed"; Step S3: In response to the user's operation of starting AI intelligent table partitioning, enter the intelligent table partitioning page and receive the user's input of custom classification rules or no rules; Step S4: Call the AI engine to merge the user-inputted custom rules with the system's built-in government affairs scenario rule library, automatically classify the tables in the user's selected tables that are in a "not completed" or "pending confirmation" status, generate recommendation types, and mark the status of these tables as "pending confirmation"; Step S5: Provide a confirmation interaction for the classification results of the "Pending Confirmation" status. In response to the user's confirmation operation, update the type status of the corresponding table to "Confirmed" and synchronize the final confirmed type to the original table list page.
[0005] By combining manual pre-setting with AI-automated classification, this method retains the accuracy of human judgment while significantly improving classification efficiency through AI. Users only need to perform initial settings on a small number of tables, and the remaining tables can be recommended with AI assistance. A final confirmation is all that's needed to complete the process. The status of the tables is clearly traceable throughout the process, avoiding omissions or duplication of work. Compared to purely manual operation, this method frees census workers from the tedious task of analyzing each table individually, while ensuring the consistency and traceability of classification results.
[0006] In some embodiments, the initial type setting operation in step S2 includes: single-table manual setting and / or batch manual setting.
[0007] This flexible configuration caters to different work habits at different granularities. For tables with standardized naming conventions and distinct characteristics, batch settings can significantly reduce redundant clicks; for individual tables requiring special handling, single-table settings offer more granularity. Users are not forced to choose between the two modes and can operate in combination during actual use, improving efficiency in the initial data preparation phase.
[0008] In some embodiments, when the AI engine merges user-defined rules with built-in rules in step S4, it further includes: deduplicating and prioritizing the merged rule set.
[0009] This process ensures the clarity and predictability of the classification logic. Users do not need to worry about their custom rules conflicting with the system's existing rules and causing classification chaos. The system backend automatically coordinates, making the rule fusion process transparent to users and reducing the psychological burden and technical barrier for users to use custom rules.
[0010] In some embodiments, step S5 provides a confirmation interaction for the classification result of the "pending confirmation" status, including: Single record confirmation: After confirming or manually modifying the recommendation type of a single record, the status changes to "Confirmed"; Batch Confirmation: Select multiple records and perform a batch confirmation operation. Change the status of all selected records to "Confirmed" at once and adopt their current type.
[0011] This dual-confirmation mechanism balances the needs for accurate identification with efficient processing. For batch tables with highly accurate AI judgments, users can adopt the entire result with a single click; for tables with ambiguous boundaries or that are important, users can review and correct each entry individually. The two modes can be freely switched within the same interface, eliminating the need for users to jump between different pages, resulting in a smooth and natural operation.
[0012] In some embodiments, the method further includes an iterative classification step: When a user modifies the table partitioning rules on the smart table partitioning page and then performs table partitioning again, the system will only re-classify the tables that were selected this time and whose status is still "unconfirmed". Confirmed tables will not be affected.
[0013] This design effectively solves the common "trial and error adjustment" problem in census work. Users may find that the rules are not perfect based on the first batch of classification results. At this time, they only need to modify the rules, and the system will automatically bypass the already confirmed tables and only re-run the classification on the remaining unprocessed tables. The confirmed results are strictly protected and will not be overwritten by errors due to rule adjustments. Users are encouraged to try different rules, and the classification quality can gradually approach the optimal level through multiple iterations.
[0014] In some embodiments, if a user performs table partitioning without selecting any tables on the intelligent table partitioning page, the system will automatically classify all tables on the current page that are in the "unconfirmed" state as the category objects.
[0015] This intelligent default behavior greatly simplifies the operation process. In actual censuses, the number of unconfirmed forms may reach hundreds or even thousands, and selecting them one by one is very time-consuming. The system automatically identifies the "unconfirmed" range, and unless the user deliberately selects any, the system will operate on all pending forms by default, which aligns with natural human operating expectations and reduces unnecessary confirmation steps.
[0016] In some embodiments, step S5 synchronizes the finally confirmed type to the original table list page, specifically as follows: When a user confirms or modifies any table on the intelligent table partitioning page, the data synchronization interface is triggered, and the updated type and status are written back to the corresponding table record on the original metadata table list page in real time, without the need for manual refresh.
[0017] This real-time cross-page synchronization ensures that users see consistent data when switching between different pages. Users do not need to remember which tables they have modified, nor do they need to frequently refresh to confirm the synchronization status. The system background automatically completes the data unification, avoiding duplicate work or misjudgments caused by data inconsistency.
[0018] In some embodiments, the table types include at least: business tables, configuration tables, and operation tables.
[0019] These three types are the most basic and commonly used classification dimensions in government data censuses. While the methodology may expand to include more types, these three types cover the vast majority of census scenarios, allowing users to flexibly map their data resources within this framework.
[0020] This application also provides an automatic identification and classification system for metadata table types for government data resource census, including: Metadata Acquisition Module: Used to obtain a list of metadata tables from the target data source; Interaction and Display Module: Used to display tables and lists and provide a user interface; Initial setup module: In response to the user's initial type setting operation, it sets the corresponding table type for at least one target table and marks its status as "confirmed"; Rule Management Module: Used to maintain the built-in government affairs scenario rule library and receive user-inputted custom classification rules; AI Classification Engine: After receiving AI intelligent table segmentation instructions, it merges user-defined rules with built-in rules, automatically classifies tables with a status of "incomplete" or "pending confirmation", generates recommendation types, and marks them as "pending confirmation". Confirmation and Write-back Module: This module receives user confirmation of the classification results for the "Pending Confirmation" status, updates the type status of the corresponding table to "Confirmed", and writes the final confirmed type back to the original metadata table list page.
[0021] The system's modules have clearly defined responsibilities and explicit calling relationships, collectively forming a complete closed loop from data acquisition, rule management, intelligent classification to manual confirmation and status synchronization. Users initiate operations through the interactive interface, and the underlying modules collaborate sequentially to ultimately produce standardized classification results that are automatically returned to the original list. This modular design makes the system easy to maintain and expand, while ensuring the rigor of the classification process and strong data consistency.
[0022] In some embodiments, the AI classification engine is also used to: deduplicate and prioritize the merged rule set; The confirmation and write-back module supports single confirmation and batch confirmation, with batch confirmation only applicable to records in the "pending confirmation" status. The AI classification engine is also used to: respond to a user modifying the rules on the smart table partitioning page and then re-execute the table partitioning, only re-classifying the tables that were selected this time and whose status is still "unconfirmed", while the confirmed tables are not affected.
[0023] The AI classification engine is also used to automatically classify all tables with a status of "unconfirmed" on the current page as classification objects when the user performs table splitting without selecting any tables.
[0024] When the confirmation and write-back module writes the final confirmed type back to the original metadata table list page, it uses a real-time synchronization method, eliminating the need for manual refresh by the user.
[0025] When merging user-defined and built-in rules, the AI classification engine automatically deduplicates and prioritizes the rule set. Even if multiple rules overlap or conflict, the system can still perform matching in an orderly manner, ensuring the clarity and predictability of the classification logic. Meanwhile, the confirmation and write-back modules support single-record confirmation and batch confirmation. Batch confirmation is strictly limited to records in the "pending confirmation" state, effectively preventing accidental overwriting of already confirmed records. Users can confidently perform batch operations without worrying about data security, balancing batch processing efficiency and state protection. Attached Figure Description
[0026] Figure 1 This is a flowchart of an invention for an automatic identification and classification method of metadata table types for government data resource census; Figure 2 This is a sequence diagram of the interaction between the metadata table type automatic identification and classification system. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0028] This invention provides an automatic identification and classification method for metadata table types in government data census. The first step, S1, involves acquiring and displaying a list of metadata tables from the target data source. Specifically, the system establishes a connection with the information system databases of various commissions and bureaus through a data exploration sub-platform. This connection can use JDBC or ODBC standard interfaces, supporting common relational databases such as MySQL, Oracle, and SQL Server. The system collects complete metadata information, including table names, Chinese table names (i.e., comments), the name of the system to which the table belongs, and field information, and then generates a list of tables to be categorized. The system displays these tables in list form on the user interface, and pre-sets a status field for each table, with the initial value uniformly set to "incomplete". In this way, survey personnel can intuitively see all the database tables to be processed by opening the page, and clearly see the current stage of each table.
[0029] Further, in step S2, the system responds to the user's initial type setting operation for at least one target table, sets the corresponding table type for the target table, and updates its status to "Confirmed". In actual operation, the operation column of the table list dynamically displays buttons based on the current status. When a table's status is "Incomplete", three buttons will be displayed on the interface: "Set as Business Table", "Set as Configuration Table", and "Set as Operation Table". Clicking any one of these buttons will cause the system to record the corresponding type for that table and simultaneously change its status directly from "Incomplete" to "Confirmed". This manual setting step allows users to prioritize assigning the correct type labels to a small number of typical tables based on their understanding of the business. These confirmed tables can serve as a reference benchmark for subsequent AI classification.
[0030] Based on this, step S3 is executed: In response to the user's operation to initiate AI intelligent table partitioning, the system enters the intelligent table partitioning page and receives the user's input of custom classification rules, or allows the user to leave the system blank. Specifically, the user can select one or more tables on the original table list page using checkboxes, and then click the "AI Intelligent Table Partitioning" button. If the user does not select any tables, the system will display a prompt asking the user to select the tables to be partitioned first. After a valid selection, the system redirects to a dedicated intelligent table partitioning confirmation page. This page has a "Table Partitioning Rule" input box where the user can enter custom rules in free text format. For example, the user can enter "Tables whose names contain 'log' or 'log' are designated as operation tables," or "Tables whose comments contain 'configuration' are designated as configuration tables." Of course, if the user does not want to write custom rules for the time being, they can leave the input box blank and rely entirely on the system's built-in rule library for partitioning.
[0031] It's worth noting that in step S4: the AI engine is invoked to merge the user-inputted custom rules with the system's built-in government affairs scenario rule library. Then, tables selected by the user with a status of "incomplete" or "pending confirmation" are automatically categorized, recommended types are generated, and the status of these tables is marked as "pending confirmation." The system's built-in government affairs scenario rule library pre-stores a large number of typical rules for government affairs scenarios. For example, tables with names containing keywords such as "user," "order," or "order" tend to be classified as business tables; tables with names containing "sys_config" or "parameter configuration" tend to be classified as configuration tables; and tables with names containing "log," "log," or "transaction log" tend to be classified as operation tables. After receiving the "execute table splitting" command, the AI engine first reads the built-in rules from the rule management module and the rules just input by the user, and then merges these two sets of rules into a complete rule set. Preferably, the engine also performs deduplication on the merged rule set—if a user rule completely duplicates a built-in rule, only that rule is retained; simultaneously, the rules are arranged according to a preset priority order, for example, user-defined rules have higher priority than built-in rules, or the user can specify the priority level of each rule. After completing the rule merging and sorting, the engine reads the tables selected by the user one by one, matching the table name, comments, and other metadata information of each table with the conditions in the rule set. Once a match is successful, the corresponding recommendation type is assigned to the table. It is worth noting that the AI engine only performs classification on tables with a status of "incomplete" or "pending confirmation." If a table's status is already "confirmed," the engine will automatically skip it, thus protecting the classification results already accepted by the user. After the table partitioning is completed, the intelligent table partitioning page will load and display a list of results, where each row contains the table name, the current type (i.e., the type recommended by the AI), and a status field. At this time, the status of all classified tables is marked as "pending confirmation."
[0032] Next, step S5 is executed: providing a confirmation interaction for the classification results in the "Pending Confirmation" state. In response to the user's confirmation operation, the type status of the corresponding table is updated to "Confirmed," and the final confirmed type is synchronized to the original table list page. In the intelligent table partitioning result list, each record's operation column displays a "Confirm" button, as well as modification buttons such as "Set as Business Table" and "Set as Operation Table." Users can directly click "Confirm" to adopt the AI's recommendation results, or they can manually adjust the type by clicking the modification button before confirming. Once the user performs the confirmation operation, the status of that record changes to "Confirmed." At the same time, the system triggers a data synchronization interface to write the final type and latest status of the table back to the corresponding table record in the original table list page in real time. In this way, when the user closes the intelligent table partitioning page and returns to the main page, there is no need to manually refresh; the type and status of the corresponding table in the main page are already up-to-date. In this way, users enjoy the efficient classification capabilities of AI while retaining the right to final review and correction, ensuring the accuracy and interpretability of the classification results.
[0033] Preferably, in step S2, the initial type setting operation includes both single-table manual setting and batch manual setting. Single-table manual setting is the method described above, where each table is set individually by clicking the button. Batch manual setting allows the user to select multiple tables at once using checkboxes, and then click the "Batch Set Table Type" button. From the pop-up options, the user selects a specific type (such as "Business Table"), and the system uniformly sets the type for all selected tables and changes the status of these tables to "Confirmed". This batch operation is particularly useful for large batches of tables with consistent naming conventions and types, significantly reducing the number of repeated clicks and improving the efficiency of data preparation in the early stages of the census.
[0034] Preferably, the confirmation interaction provided in step S5 further includes two methods: single-record confirmation and batch confirmation. Single-record confirmation refers to the aforementioned method of operating on each record individually. For batch confirmation, the user can select multiple records in the table results list and then click the "Batch Confirm" button. The system will change the status of all selected records to "Confirmed" at once and adopt their currently displayed type (whether AI-recommended or manually modified by the user). Specifically, the batch confirmation operation internally performs status verification: only records with a status of "Pending Confirmation" will be batch confirmed; if the user mistakenly selects records already in the "Confirmed" status, the system will automatically ignore these records, thus avoiding duplicate confirmation or accidental overwriting of existing results. This batch operation design based on status constraints allows users to confidently select the entire page for batch confirmation without worrying about disrupting completed work.
[0035] Building upon this, the method of the present invention further includes an iterative classification step. Specifically, in response to a user modifying the table partitioning rules on the intelligent table partitioning page and then re-executing table partitioning, the system only re-classifies the tables that were selected in the previous iteration and whose status is still "unconfirmed," while the confirmed tables remain completely unaffected. For example, a user first uses a certain rule to classify a batch of tables and confirms some of them. Subsequently, the user finds that the rule is not perfect, for example, some operation tables are misclassified as business tables. At this time, the user can modify the rule text on the intelligent table partitioning page (for example, adding a rule "set tables whose names contain 'audit' as operation tables") and then click the "execute table partitioning" button again. The system will automatically identify all tables with a status of "unconfirmed" on the current page (i.e., those tables that have not yet been confirmed by the user) and only apply the new rule to classify these tables. Previously confirmed tables retain their original type and status and will not be overwritten by the new rule. This mechanism effectively solves the common "trial and error adjustment" problem in census work. Users can boldly try different rule combinations, and the classification quality can gradually approach the optimal level in multiple iterations without worrying about destroying existing results.
[0036] Preferably, if a user hasn't selected any tables on the intelligent table partitioning page and directly clicks the "Execute Table Partitioning" button, the system will automatically classify all tables currently listed as "Unconfirmed" as the categorization objects. This means users don't need to select each table individually; they can initiate intelligent table partitioning for all remaining unconfirmed tables with a single click. Furthermore, the top of the page provides search and filtering functions by table name and Chinese name. Users can first filter a batch of tables using keywords (e.g., searching for "log" to find all log-related tables), and then directly click "Execute Table Partitioning." The system will also automatically categorize the tables in the filtered results that are currently listed as "Unconfirmed." This intelligent default behavior greatly simplifies the operation path, making it particularly suitable for scenarios with a large number of unconfirmed tables (e.g., hundreds or more), while also allowing users to flexibly construct subsets to be categorized.
[0037] Preferably, the specific implementation method for synchronizing the finally confirmed type to the original table list page in step S5 is real-time write-back. When a user performs a confirmation or modification operation on any table in the intelligent table partitioning page, the front end immediately calls the data synchronization interface provided by the back end, passing the updated type and status as parameters. After receiving the request, the back end updates the database record corresponding to the original table list page and returns a success flag. Throughout the process, the front end page does not need to be manually refreshed; the data in the main page is silently updated in the background. When the user switches back to the main page, they will see the completely consistent latest status. This cross-page real-time synchronization mechanism ensures strong data consistency during multi-page operations, avoiding duplicate work or misjudgments caused by asynchronous status.
[0038] In this method, the table types include at least business tables, configuration tables, and operation tables. Business tables store core business data, such as citizen information tables, enterprise registration tables, and order record tables; configuration tables store system or application configuration parameters, such as permission configuration tables and system parameter tables; operation tables store procedural data such as logs and transaction logs, such as login log tables and operation transaction log tables. These three types basically cover the most common data table classification needs in government data resource census. It is worth noting that the method of this invention is not limited to these three types—by modifying the classification tags and corresponding matching conditions in the built-in rule base, it can be easily extended to other metadata annotation tasks such as data grading, sensitivity classification, and data lifecycle management, demonstrating good versatility.
[0039] Preferably, in step S4, when the AI engine merges user-defined rules and built-in rules, it uses the following specific methods to achieve deduplication and priority sorting: First, each free text rule input by the user is converted into a structured matching condition using a regular expression template. For example, "tables whose names contain 'log' or 'log' are set as operation tables" is parsed as "the table name field matches the regular expression '.(log|log).' and the result type is operation table". Then, the converted user rules and built-in rules are placed in the same rule list, and deduplication is performed based on the matching condition string of each rule. If the matching conditions of two rules are exactly the same, the one with the higher priority is retained. Finally, the rule list is sorted according to a preset priority order, which is: the priority level explicitly specified by the user takes precedence; if no priority is specified, user-defined rules take precedence over built-in rules; rules from the same source are arranged according to the order of input. Based on this, the AI engine matches each table sequentially according to the sorted rule list. Once a rule is successfully matched, the matching of subsequent rules stops, and the type specified by that rule is taken as the recommended type. This approach ensures the determinism and predictability of rule execution, and users do not need to worry about the details of conflicts between rules, as the system backend automatically handles the coordination.
[0040] Preferably, on the intelligent table partitioning page, the system also provides an option switch for "Execute only on tables awaiting confirmation," which is enabled by default. When the switch is enabled, the AI engine strictly follows the status filtering logic, only performing classification on tables with a status of "incomplete" or "awaiting confirmation." When the user actively disables this switch, the system allows reclassification of all selected tables (including confirmed tables), but a secondary confirmation prompt will pop up before execution, warning the user that "confirmed tables will be overwritten, do you want to continue?" If the user confirms to continue, all selected tables (regardless of their status) will be reclassified, and the original confirmed status will be reset to "awaiting confirmation." Simultaneously, the system automatically saves a historical snapshot of the current rules and classification results after each table partitioning execution. Users can restore to the state of any historical snapshot using the "rollback" button. This design, while retaining the default security behavior of "protecting confirmed results," provides advanced users with the flexibility to force reclassification, and further reduces the risk of accidental operation through the historical snapshot mechanism, meeting the "start over" needs that may occur in census work.
[0041] On the other hand, this invention also provides an automatic identification and classification system for metadata table types for government data resource census. In one specific embodiment, the system includes a metadata acquisition module, an interaction and display module, an initial setup module, a rule management module, an AI classification engine, and a confirmation and write-back module. The interaction relationships between these modules can be found in [reference needed]. Figure 2 The timing diagram shown.
[0042] The metadata acquisition module is responsible for obtaining a list of metadata tables from the target data source. In actual deployment, this module establishes a connection with the databases of various commissions and bureaus through the data exploration sub-platform, supporting the collection of complete metadata information, including table names, comments, and field lists, via JDBC or ODBC interfaces. This module can be configured with multiple data sources, each corresponding to the business systems of different commissions and bureaus.
[0043] The interaction and display module is used to display the above table list and provide a user interface. This module generates a visual table page, including table name, Chinese name, current status, and buttons such as "Set as Business Table," "Set as Configuration Table," and "Set as Operation Table." It also supports functions such as checkboxes, batch setting buttons, and page navigation. All user clicks and input operations are transmitted to the backend module through this module.
[0044] The initial setup module responds to the user's initial type setting operation, sets the corresponding table type for at least one target table, and marks its status as "confirmed". When the user clicks a button such as "Set as Business Table" or performs batch settings, the initial setup module receives the instruction and updates the status and type fields of the corresponding table in the database.
[0045] The rule management module maintains the built-in rule library for government scenarios and receives custom classification rules input by users. The built-in rule library can be stored in local configuration files, database tables, or a remote configuration center, and supports dynamic updates. Text rules entered by users through the intelligent table segmentation page are captured and temporarily stored by the rule management module, and then passed to the AI classification engine during classification.
[0046] The AI classification engine is the core processing unit of the system. Upon receiving an AI-powered intelligent table partitioning instruction, the engine retrieves user-defined and built-in rules from the rule management module, performs merging, deduplication, and priority sorting, and then automatically classifies metadata tables with a status of "incomplete" or "pending confirmation," generating recommendation types and marking these tables as "pending confirmation." The engine can employ regular expression-based rule matching algorithms or integrate a lightweight natural language processing model to parse the user's free text rules. Preferably, the engine first converts the user-input natural language rules into structured matching conditions; for example, parsing "table name contains 'log' or 'log'" into "table_name like '%log%' or table_name like '%log%'", and then performs the matching.
[0047] The confirmation and write-back module receives user confirmation requests for categories in the "Pending Confirmation" status, updates the corresponding table's type status to "Confirmed," and writes the final confirmed type back to the original metadata table list page. This module supports both single-record confirmation and batch confirmation; batch confirmation only applies to records in the "Pending Confirmation" status. The write-back operation is implemented by calling a data synchronization interface to ensure data consistency between the main page and subpages.
[0048] Based on the above system, in a preferred embodiment, the AI classification engine also has the following functions: deduplication and priority sorting of the merged rule set; in response to a user modifying rules on the intelligent table partitioning page and then re-executing table partitioning, only the tables currently selected and still in the "unconfirmed" state are re-classified, while confirmed tables remain unaffected; when a user executes table partitioning without selecting any tables, all tables in the current page with the "unconfirmed" state are automatically used as classification objects. Simultaneously, the confirmation and write-back module uses real-time synchronization when writing back the final confirmed type, eliminating the need for the user to manually refresh the page.
[0049] The complete interaction flow of this system is as follows: First, the user initiates the operation of viewing the table list through the interaction and display module. The interaction and display module requests metadata from the metadata acquisition module. The metadata acquisition module collects the table list from the databases of various commissions and bureaus and returns it level by level. Finally, it is displayed to the user on the original metadata table list page.
[0050] When a user selects manual or batch settings, the interaction and display module calls the initial settings module to complete the type binding, the status is updated to "confirmed", and the page display is refreshed.
[0051] When a user initiates AI-powered intelligent table partitioning, the interaction and display module passes the selected table and custom rule parameters to the AI classification engine. The engine obtains the combined set of built-in rules and user-defined rules from the rule management module, performs internal rule matching calculations, generates a recommendation type, and marks the status as "pending confirmation." The result is then displayed on the intelligent table partitioning page via the interaction and display module.
[0052] After a user confirms a record individually or in batches, the interaction and display module sends the confirmation instruction to the confirmation and write-back module. This module then synchronizes the final type and status back to the databases of each commission and bureau and the original metadata table list page, and notifies the interaction and display module to refresh the display.
[0053] If a user modifies the rules and executes table partitioning again, the system will only repeat the above AI classification and confirmation process for tables whose status is still "unconfirmed," while confirmed tables will not be affected.
[0054] Throughout the process, users can achieve real-time data consistency across pages without manually refreshing the page. Figure 2 The sequence diagram clearly illustrates the calling order, data flow, and branching and iteration logic among the modules.
[0055] The following is a complete operational example to help understand the practical application of the present invention.
[0056] Suppose that in a municipal government data resource survey, 500 database tables in the Education Bureau's information system need to be categorized. Survey personnel first open the system and see a table list page where all tables are in the "incomplete" state. The user manually sets the types of several obvious tables: "Student Information Table" and "Course Table" are set as business tables, "System Parameter Table" as configuration tables, and "Access Log Table" as operation tables. The status of these tables immediately changes to "confirmed." Next, the user selects all the remaining tables and clicks the "AI Intelligent Table Segmentation" button to enter the intelligent table segmentation page. The user enters a custom rule in the rule input box on this page: "Tables with names containing 'temp' or 'backup' are set as configuration tables," and then clicks "Execute Table Segmentation." The AI engine merges, removes duplicates, and sorts this custom rule with built-in rules (such as "user → business table," "log → operation table," etc.), and then categorizes the more than 400 tables selected by the user. After categorization, each table in the page list displays a recommended type, and its status changes to "pending confirmation." Users quickly browse the list, and for clearly correct recommendations (such as those containing "log" correctly marked as operation tables), they batch-confirm and adopt them all. For a few tables with ambiguous boundaries, users manually modify each entry before confirming. After confirmation, the status of these tables changes to "Confirmed," and the system automatically writes the results back to the original table list page. Later, users discover that some temporary tables were not correctly identified, so they return to the intelligent table partitioning page, modify the rules to add "tables with 'tmp' in their names are designated as configuration tables," and then click "Execute Table Partitioning" again. This time, the system only re-classifies the tables whose status is still "Unconfirmed" (i.e., the few tables not confirmed in the previous round), leaving the more than four hundred already confirmed tables completely unaffected. After two iterations, all five hundred tables were accurately classified and confirmed. The entire process takes far less time than purely manual operation, and the classification results are highly consistent and traceable.
[0057] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the scope of protection of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method for automatically identifying and classifying metadata table types for government data census, characterized in that: Includes the following steps: Step S1: Obtain and display a list of metadata tables for the target data source, where each table has an initial "incomplete" state; Step S2: In response to the user's initial type setting operation for at least one target table, set the corresponding table type for the target table and update its status to "confirmed"; Step S3: In response to the user's operation of starting AI intelligent table partitioning, enter the intelligent table partitioning page and receive the user's input of custom classification rules or no rules; Step S4: Call the AI engine to merge the user-inputted custom rules with the system's built-in government affairs scenario rule library, automatically classify the tables in the user-selected tables that are in a "not completed" or "pending confirmation" state, generate recommendation types, and mark the state of these tables as "pending confirmation". Step S5: Provide a confirmation interaction for the classification results of the "Pending Confirmation" status. In response to the user's confirmation operation, update the type status of the corresponding table to "Confirmed" and synchronize the finally confirmed type to the original table list page.
2. The method according to claim 1, characterized in that, The initial type setting operation in step S2 includes: manual setting for a single table and / or manual setting in batches.
3. The method according to claim 1, characterized in that, In step S4, when the AI engine merges user-defined rules with built-in rules, it also includes: deduplicating and prioritizing the merged rule set.
4. The method according to claim 1, characterized in that, Step S5 provides a confirmation interaction for the classification result of the "pending confirmation" status, including: Single record confirmation: After confirming or manually modifying the recommendation type of a single record, the status changes to "Confirmed"; Batch Confirmation: Select multiple records and perform a batch confirmation operation. Change the status of all selected records to "Confirmed" at once and adopt their current type.
5. The method according to claim 1, characterized in that, The method also includes an iterative classification step: When a user modifies the table partitioning rules on the smart table partitioning page and then performs table partitioning again, the system will only re-classify the tables that were selected this time and whose status is still "unconfirmed". Confirmed tables will not be affected.
6. The method according to claim 5, characterized in that, If a user performs table partitioning without selecting any tables on the smart table partitioning page, the system will automatically classify all tables with a status of "unconfirmed" on the current page as the category objects.
7. The method according to claim 1, characterized in that, In step S5, the finally confirmed types are synchronized to the original table list page, specifically as follows: When a user confirms or modifies any table on the intelligent table partitioning page, the data synchronization interface is triggered, and the updated type and status are written back to the corresponding table record on the original metadata table list page in real time, without the need for manual refresh.
8. The method according to claim 1, characterized in that, The table types include at least: business tables, configuration tables, and operation tables.
9. A metadata table type automatic identification and classification system for government data resource census, characterized in that, include: Metadata Acquisition Module: Used to obtain a list of metadata tables from the target data source; Interaction and display module: used to display the list of tables and provide a user interface; Initial setup module: In response to the user's initial type setting operation, it sets the corresponding table type for at least one target table and marks its status as "confirmed"; Rule Management Module: Used to maintain the built-in government affairs scenario rule library and receive user-inputted custom classification rules; AI Classification Engine: After receiving AI intelligent table partitioning instructions, it merges user-defined rules with built-in rules, automatically classifies tables with a status of "incomplete" or "pending confirmation", generates recommendation types, and marks them as "pending confirmation". Confirmation and Writeback Module: This module receives user confirmation of the classification results in the "Pending Confirmation" status, updates the type status of the corresponding table to "Confirmed", and writes the final confirmed type back to the original metadata table list page.
10. The system according to claim 9, characterized in that, The AI classification engine is also used to: deduplicate and prioritize the merged rule set; The confirmation and write-back module supports single confirmation and batch confirmation, where batch confirmation only applies to records with a status of "pending confirmation". The AI classification engine is also used to: respond to the user modifying the rules on the smart table partitioning page and then re-execute the table partitioning, only re-classify the tables that were selected this time and whose status is still "unconfirmed", and the confirmed tables are not affected; The AI classification engine is also used to: automatically classify all tables with a status of "unconfirmed" on the current page as classification objects when the user performs table splitting without selecting any tables; When the confirmation and write-back module writes the final confirmed type back to the original metadata table list page, it uses a real-time synchronization method, eliminating the need for manual refresh by the user.