Enterprise-level model verification method and enterprise-level model verification device
By using an enterprise-level model validation method, user requirements are parsed to generate the current data model, difference analysis is performed, and incremental difference SQL scripts are generated. This solves the problems of low efficiency and insufficient accuracy in existing technologies, and achieves efficient and accurate data model validation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 中国邮政储蓄银行股份有限公司
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-02
Smart Images

Figure CN122132771A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to an enterprise-level model validation method and an enterprise-level model validation apparatus. Background Technology
[0002] Driven by digital transformation, enterprise-level modeling, as the core of business processes and system development, directly impacts decision-making and operational efficiency. Model validation, aiming to ensure the accuracy and consistency of data models, has become a crucial step in the enterprise modeling process.
[0003] Current model validation technologies generally suffer from limitations such as low efficiency and insufficient accuracy. Especially when facing large-scale data volumes, database sharding, and complex data dictionary management, existing technologies struggle to meet the comprehensive and high-precision validation requirements of enterprise-level modeling. This results in time-consuming and labor-intensive validation processes that fail to detect subtle differences, impacting business progress and model accuracy. Summary of the Invention
[0004] The main objective of this application is to provide an enterprise-level model verification method and an enterprise-level model verification device, so as to at least solve the problems of low efficiency and low accuracy in existing model verification methods.
[0005] To achieve the above objectives, according to one aspect of this application, an enterprise-level model validation method is provided, comprising: acquiring user requirement information and a previous version of the data model, and parsing the user requirement information to obtain a parsing result, the parsing result including data scope, business rules, and relationships between data; generating a current data model based on the parsing result, the current data model including a model document and its implementation attributes; performing a difference analysis on the previous version of the data model and the current data model to generate a difference analysis result, the difference analysis result including structural changes and field changes; generating an incremental difference SQL script based on the difference analysis result, the incremental difference SQL script being a script generated for the structural changes and field changes; executing the incremental difference SQL script in a target database environment, and performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script to obtain a check result.
[0006] Optionally, a current data model is generated based on the parsing results. The current data model includes a model document and its implementation attributes, including: filling the parsing results into a preset model document template to obtain the model document, wherein the preset model document template includes a fixed framework and format for describing the data model; generating and configuring the implementation attributes for each database table in the model document, wherein the implementation attributes include a timestamp field and a concurrency control field.
[0007] Optionally, a difference analysis is performed between the previous version of the data model and the current data model to generate a difference analysis result. This includes: using a semantic parsing engine to perform structural parsing on the previous version of the data model and the current data model to obtain a first structural parsing result and a second structural parsing result. The structural parsing includes the identification of table structure, indexes, and constraints. The first structural parsing result corresponds to the previous version of the data model, and the second structural parsing result corresponds to the current data model. A field-level comparison algorithm is then used to perform field comparison on the first structural parsing result and the second structural parsing result to generate the difference analysis result.
[0008] Optionally, generating an incremental difference SQL script based on the difference analysis results includes: generating corresponding incremental SQL statements for each point of change using an SQL template engine based on the difference analysis results; and integrating the incremental SQL statements to obtain the incremental difference SQL script.
[0009] Optionally, a consistency check is performed on the table structure of the target database and the current data model after executing the incremental difference SQL script to obtain a check result, including: in a sharded database environment, performing a sharded structure alignment check on the table structure of the target database and the current data model after executing the incremental difference SQL script to obtain the check result.
[0010] Optionally, in a sharded database environment, the table structure of the target database after executing the incremental difference SQL script and the current data model are subjected to inter-table structure alignment verification to obtain the verification result. This includes: obtaining the metadata information of each physical shard in the sharded database environment, wherein the metadata information of the physical shard includes a first field definition, a first data type, a first constraint condition, and a first index setting; comparing the metadata information with the table structure in the current data model to obtain the verification result; and generating a difference report based on the verification result, wherein the difference report includes the difference type and location.
[0011] Optionally, after performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the check result, the method further includes: obtaining metadata information of the database tables from multiple test environments, wherein the metadata information of the database tables includes second field definitions, second data types, second constraints, and second index settings; semantically matching the metadata information of the database tables in the multiple test environments with the current data model, and marking field-level deviations.
[0012] Optionally, after performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the check result, the method further includes: if the consistency check passes, using a semantic parsing engine to identify and extract the metadata information of the data dictionary of the current data model, wherein the metadata information of the data dictionary includes data item definitions, code value mappings, and data dictionary numbers; comparing the metadata information of the data dictionary with the data dictionary of the baseline version to obtain a data dictionary difference comparison result, wherein the data dictionary difference comparison result includes differences at the code value level, differences in data item definitions, and differences in domain value rules; and generating a data dictionary difference report based on the data dictionary difference comparison result.
[0013] Optionally, after generating a data dictionary difference report based on the data dictionary difference comparison results, the method further includes: integrating the difference analysis results, the incremental difference SQL script, and the data dictionary difference report to form a standardized delivery package.
[0014] According to another aspect of this application, an enterprise-level model verification device is provided, comprising: a first acquisition unit, configured to acquire user requirement information and a previous version of the data model, and parse the user requirement information to obtain a parsing result, the parsing result including data range, business rules, and relationships between data; a first generation unit, configured to generate a current data model based on the parsing result, the current data model including a model document and its implementation attributes; an analysis unit, configured to perform a difference analysis on the previous version of the data model and the current data model, and generate a difference analysis result, the difference analysis result including structural changes and field changes; a second generation unit, configured to generate an incremental difference SQL script based on the difference analysis result, the incremental difference SQL script being a script generated for the structural changes and field changes; and a verification unit, configured to execute the incremental difference SQL script in a target database environment, and perform a consistency verification on the table structure of the target database and the current data model after executing the incremental difference SQL script, to obtain a verification result.
[0015] This application's technical solution obtains user requirement information and the previous version's data model, parses the user requirement information to obtain parsing results, including data scope, business rules, and relationships between data. Based on the parsing results, a current data model is generated, including model documents and their implementation attributes. A difference analysis is performed between the previous version's data model and the current data model, generating difference analysis results, including structural and field changes. An incremental difference SQL script is generated based on the difference analysis results, specifically targeting structural and field changes. The incremental difference SQL script is executed in the target database environment, and the consistency of the target database's table structure and the current data model after execution is verified, yielding the verification results. This solution, by parsing user requirement information, constructing the current data model, and configuring implementation attributes, can quickly capture structural and field changes from the previous version, thereby generating accurate incremental difference SQL scripts specifically for updating the database at these change points. This not only reduces manual operation time and the possibility of errors but also ensures a high degree of consistency between the updated database table structure and the latest data model. After the script is executed, consistency checks can promptly identify and correct potential structural deviations, thus solving the problems of low efficiency and low accuracy in existing model verification methods. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for performing an enterprise-level model verification method is shown in an embodiment of this application.
[0018] Figure 2 A flowchart illustrating an enterprise-level model validation method according to an embodiment of this application is shown.
[0019] Figure 3 A flowchart illustrating a specific enterprise-level model validation method according to an embodiment of this application is shown;
[0020] Figure 4 A structural block diagram of an enterprise-level model verification apparatus provided according to an embodiment of this application is shown.
[0021] The above figures include the following reference numerals:
[0022] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] As described in the background section, existing technologies are insufficient to meet the comprehensive and high-precision verification requirements of enterprise-level modeling, resulting in time-consuming and labor-intensive verification processes that are difficult to detect subtle differences, affecting business progress and model accuracy. To address the issues of low efficiency and low accuracy in existing model verification methods, embodiments of this application provide an enterprise-level model verification method and an enterprise-level model verification device.
[0027] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0028] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for an enterprise-level model verification method according to an embodiment of the present invention. For example... Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0029] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the enterprise-level model verification method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] This embodiment provides an enterprise-level model verification method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0031] Figure 2 This is a flowchart illustrating an enterprise-level model validation method according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:
[0032] Step S201: Obtain user requirement information and the data model of the previous version, and parse the user requirement information to obtain the parsing results. The parsing results include the data range, business rules and the relationship between data.
[0033] Specifically, first, with the user's consent, user request information is obtained, specifically regarding changes to the data model. This may include modifications to the database structure, additions or deletions of fields, and changes in data types. Simultaneously, the previous version of the data model is also retrieved as a benchmark. This stage marks the starting point of the entire validation process, ensuring subsequent operations have a clear direction and reference. Next, Natural Language Processing (NLP) and semantic understanding technologies are used to deeply analyze the obtained user request information, extracting key data scopes, business rules, and relationships between data. This analysis process is crucial for understanding user intent and preparing to generate a new data model.
[0034] Step S202: Generate the current data model based on the above analysis results. The current data model includes the model document and its implementation attributes.
[0035] Specifically, based on the parsing results, the current data model is generated, including detailed model documentation and implementation attributes (such as timestamp fields, concurrency control fields, etc.). This process automates the construction of the data model, reducing errors and omissions that occur when manually designing models.
[0036] Step S203: Perform a difference analysis on the previous version of the data model and the current data model to generate difference analysis results. The difference analysis results include structural changes and field changes.
[0037] Specifically, the previous version of the data model is compared and analyzed with the current data model. The comparison of table structure, field definitions, data types, index settings and constraints is in-depth, and detailed difference analysis results are generated, covering structural changes and field changes.
[0038] Step S204: Generate an incremental difference SQL script based on the above difference analysis results. The above incremental difference SQL script is a script generated for the above structural change situation and the above field change situation.
[0039] Specifically, based on the difference analysis results, incremental difference SQL scripts are generated. These scripts accurately reflect the changes that need to be made in the database, including adding table structures, modifying fields, and deleting useless tables or fields. The use of incremental SQL scripts avoids unnecessary full updates, saving time and resources for database maintenance and updates.
[0040] Step S205: Execute the above incremental difference SQL script in the target database environment, and perform consistency verification on the table structure of the target database and the current data model after executing the above incremental difference SQL script to obtain the verification result.
[0041] Specifically, the generated incremental difference SQL script is executed in the target database environment to update the database. This execution phase ensures that the data model changes are correctly applied to the actual database system. Then, the consistency between the updated database table structure and the current data model is verified. This verification process confirms that the model changes have been correctly and completely implemented, and that the database maintains a state matching the model documentation description. If the verification passes, the model change is successful; if the verification fails, the changes need to be rolled back and the model documentation or the script needs to be re-examined.
[0042] This embodiment parses user requirement information, constructs the current data model, and configures implementation attributes. It can quickly capture structural and field changes compared to the previous version, thereby generating precise incremental difference SQL scripts specifically targeting these changes to update the database. This not only reduces the time and possibility of errors from manual operations but also ensures a high degree of consistency between the updated table structure and the latest data model. After executing the script, consistency checks can promptly identify and correct potential structural deviations, thus solving the problems of low efficiency and low accuracy in existing model validation methods.
[0043] In the specific implementation process, the current data model is generated based on the above parsing results. The current data model includes a model document and its implementation attributes, including: filling the above parsing results into a preset model document template to obtain the above model document. The preset model document template includes a fixed framework and format for the data model description; generating and configuring the above implementation attributes for each database table in the above model document. The above implementation attributes include a timestamp field and a concurrency control field.
[0044] Specifically, the parsed results are populated into a preset model document template. This template is a standardized framework containing the fixed structure and framework required to describe the data model, such as the recording methods for database table names, field definitions, data types, primary keys, foreign keys, and indexes. By populating the parsed results into the preset model document template, a well-structured and uniformly formatted model document is automatically generated, providing an accurate foundation for subsequent difference analysis and script generation.
[0045] Beyond the model document itself, implementation properties need to be generated and configured for each database table. These properties are crucial for efficient database operation and data consistency control. Implementation properties include timestamp fields and concurrency control fields. Timestamp fields record the creation or last modification time of a data row, which is critical for tracking data change history, implementing version control, and data recovery. Concurrency control fields, such as optimistic or pessimistic locking version numbers, prevent data conflicts and ensure data consistency when multiple users concurrently access the database. These fields, by recording data versions or locking states, enable the correct handling of data update operations in high-concurrency environments. Automated generation of implementation properties ensures that each database table not only has a complete and accurate description of its business logic but also includes the necessary technical fields to support efficient data management and transaction processing. The automatic configuration of these properties reduces the error rate of manual configuration and accelerates the construction of data models and database implementation, thereby improving the operational efficiency and quality of enterprise-level data systems.
[0046] This embodiment first populates a preset model document template with key information (data scope, business rules, and data relationships) extracted from user requirements. Based on this, a standardized model document is automatically generated. The preset model document template contains a fixed framework and format for describing the data model, ensuring document consistency and readability. Furthermore, it can generate and configure implementation attributes for each database table in the model document, such as timestamp fields and concurrency control fields. These attributes are crucial for monitoring data changes, supporting transaction processing, and preventing concurrency conflicts. Automatic configuration of implementation attributes not only avoids common errors and omissions in manual operations but also ensures the efficiency of database operations and data consistency.
[0047] In some embodiments of this application, a difference analysis is performed between the previous version of the data model and the current data model to generate a difference analysis result. This includes: using a semantic parsing engine to perform structural parsing on the previous version of the data model and the current data model to obtain a first structural parsing result and a second structural parsing result. The structural parsing includes the identification of table structure, indexes, and constraints. The first structural parsing result corresponds to the previous version of the data model, and the second structural parsing result corresponds to the current data model. A field-level comparison algorithm is then used to perform field comparison on the first structural parsing result and the second structural parsing result to generate the difference analysis result.
[0048] Specifically, firstly, a semantic parsing engine is used to perform deep structural parsing on the previous version of the data model and the current data model. This process generates two parsing results: a first structural parsing result (corresponding to the previous version of the data model) and a second structural parsing result (corresponding to the current data model). The content of the structural parsing includes the structure of the database tables (field definitions, data types, etc.), indexes (special data structures used to speed up data retrieval), and constraints (such as primary keys, foreign keys, uniqueness constraints, etc., used to maintain data integrity and consistency).
[0049] After obtaining the two versions of the structure parsing results, a field-level comparison algorithm is used to perform a detailed comparison. This algorithm delves into the lowest level of the database table structure—the field definition level—to compare differences in field names, data types, lengths, nullability, default values, comments, index information, and constraints (such as primary keys, foreign keys, and uniqueness constraints). This in-depth comparison is crucial for detecting even minor changes, ensuring no details are missed and generating accurate difference analysis results. These results include both structural and field changes, such as newly added fields, deleted fields, changes in data types, additions or removals of indexes, and modifications to constraints.
[0050] This embodiment employs a semantic parsing engine and field-level comparison algorithms to automate and perform high-precision difference analysis on enterprise-level data model changes, providing a reliable detection mechanism for data model version management and database update operations. This mechanism is crucial for the efficient operation and management of large enterprise data systems, significantly improving the accuracy and efficiency of data processing and model changes.
[0051] In some embodiments of this application, generating incremental difference SQL scripts based on the above difference analysis results includes: generating corresponding incremental SQL statements for each change point using an SQL template engine based on the above difference analysis results; and integrating the above incremental SQL statements to obtain the above incremental difference SQL scripts.
[0052] Specifically, an SQL template engine is a tool that can automatically generate SQL statements based on predefined templates and input parameters. In this embodiment, the corresponding SQL template is invoked based on each change point in the difference analysis results (such as the addition, modification, or deletion of a field). For example, if the difference analysis results show that the data type of a field has changed from VARCHAR(50) to VARCHAR(100), the template engine will generate a corresponding ALTER TABLE statement to modify the field's data type. Similarly, if a new field needs to be added to the table, an ADD COLUMN statement will be automatically generated. Unlike full SQL scripts, incremental difference SQL scripts only contain the SQL statements that need to be actually executed, i.e., only the parts of the model that have changed. The advantage of this is that it significantly reduces the size of the SQL script, reduces the complexity and execution time of database updates, and also reduces the consumption of database resources, especially in large-scale database environments, which has an important impact on improving efficiency and reducing risks. After all incremental SQL statements have been generated, they are integrated into a single script file to form an incremental difference SQL script. This script file contains all the necessary SQL statements, such as ALTER TABLE, ADD COLUMN, and DROP INDEX, arranged in logical order for easy one-time execution. The integration process also involves some optimizations, such as merging duplicate SQL statements or adjusting the execution order to improve the script's execution efficiency.
[0053] This embodiment utilizes an SQL template engine to generate corresponding incremental SQL statements for each specific change point in the difference analysis report (including field modification, addition, or deletion, as well as adjustments to indexes and constraints), ensuring the accuracy of database changes. The incremental difference SQL scripts contain only necessary change operations, reducing execution time and resource consumption, and avoiding unnecessary interference with existing data and database architecture, thereby significantly improving the efficiency and security of database updates.
[0054] In some embodiments of this application, consistency verification is performed on the table structure of the target database after executing the incremental difference SQL script and the current data model to obtain the verification result. This includes: in a sharded database environment, performing inter-table structure alignment verification on the table structure of the target database after executing the incremental difference SQL script and the current data model to obtain the verification result.
[0055] Specifically, after executing the incremental difference SQL script, a deep scan and comparison of all relevant table structures in the target database is performed. This verification is not limited to a single database or table, but spans multiple database instances and tables to ensure that the structure of each table is strictly updated according to the current data model. For example, if a table in the data model has multiple copies in different shards, the verification process ensures that these table structures are consistent and that no field changes or index adjustments are missed. By comparing the target database table structures before and after executing the SQL script with the latest data model definition, verification results are generated. The results list any table structure differences that are not correctly aligned, including missing fields, data type mismatches, missing indexes, or other structural inconsistencies, ensuring the completeness and accuracy of the database update. If any structural alignment issues are found during the verification process, subsequent operations are immediately stopped, and the administrator is provided with specific error information and location for quick identification and resolution of problems.
[0056] This embodiment effectively verifies whether the database table structure has been updated to fully conform to the latest data model specifications by performing deep structural alignment verification on all relevant sharded tables in the target database after executing the incremental difference SQL script. It not only checks for field additions, deletions, and modifications but also verifies details such as data types, indexes, and constraints to ensure consistency across multiple database instances, without omissions or errors. This process enhances the reliability and accuracy of database updates, avoiding data problems and business risks caused by structural inconsistencies. In summary, automated verification significantly improves database maintenance efficiency and ensures the correct implementation and efficient operation of data model changes in a sharded environment.
[0057] Furthermore, in a sharded database environment, the table structure of the target database after executing the incremental difference SQL script and the current data model are subjected to inter-table structure alignment verification to obtain the verification results. This includes: obtaining the metadata information of each physical shard in the sharded database environment, the metadata information of the physical shard includes the first field definition, the first data type, the first constraint condition, and the first index setting; comparing the metadata information with the table structure in the current data model to obtain the verification results; and generating a difference report based on the verification results, the difference report including the difference type and location.
[0058] Specifically, firstly, the metadata information of each physical shard in the sharded database environment is obtained. This metadata contains the basic elements constituting the table structure, including field definitions (first field definition), data types (first data type), constraints (such as primary key, foreign key, NOT NULL, etc., first constraint), and index settings (first index settings). Metadata is the blueprint of the database table structure, containing detailed descriptions of all fields and related attributes, and is the basis for structural comparison. Next, the metadata information of the physical shards obtained from the target database is meticulously compared and analyzed with the latest version of the data model definition to obtain verification results. This comparison is not only at the field level but also includes a comprehensive verification of attributes such as field data types, constraints, and index settings, ensuring that every detail of the database table structure is consistent with the data model. The comparison process can employ field-level comparison algorithms to ensure that even subtle structural differences can be identified. Finally, based on the verification results, a detailed discrepancy report is generated. This report clearly lists all detected structural inconsistencies, including the type of difference (such as missing fields, data type mismatch, improper index configuration, etc.) and its specific location in the database table structure. The discrepancy report is a direct output of the verification process, helping to quickly pinpoint the problem and facilitating subsequent corrections and adjustments. Through this series of steps, the accuracy of the database table structure in a sharded environment can be effectively ensured, strengthening data consistency.
[0059] This embodiment systematically acquires the metadata of each physical table, including key attributes such as field definitions, data types, constraints, and index settings, and performs a detailed comparison with the table structure in the current data model. This allows for the comprehensive identification of any structural deviations. The resulting discrepancy report clearly identifies all structural inconsistencies, including the type and specific location of the differences, providing direct evidence for quickly locating and resolving problems. This improves the efficiency and accuracy of database maintenance, especially when dealing with complex distributed database architectures. It ensures that database updates are strictly executed according to the data model requirements, avoiding data inconsistencies and potential business risks, thereby enhancing the reliability and performance of enterprise applications.
[0060] In some embodiments of this application, after performing consistency verification on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the verification result, the method further includes: obtaining metadata information of the database tables from multiple test environments, wherein the metadata information of the database tables includes second field definitions, second data types, second constraints, and second index settings; semantically matching the metadata information of the database tables in multiple test environments with the current data model, and marking field-level deviations.
[0061] Specifically, firstly, metadata information from database tables in multiple test environments is extracted. This metadata covers core attributes such as field definitions (secondary field definitions), data types (secondary data types), constraints (secondary constraints), and index settings (secondary index settings). This process aims to comprehensively collect the current state of table structures in the test environments, providing a detailed data foundation for subsequent comparative analysis. Next, the metadata of each database table in each test environment is semantically matched with the current data model. This matching process goes beyond simply comparing field names; it delves into the specific definitions of fields, such as data type, length, nullability, and constraint types, performing a refined comparison. Any field-level deviations discovered during the semantic matching process (such as mismatched field types, added or deleted fields, or differences in constraints) are marked. This deviation marking mechanism ensures that even the most subtle structural changes are detected promptly.
[0062] This embodiment, after verifying the consistency between the target database and the current data model, further delves into multiple test environments, acquiring and analyzing metadata information of the database tables in each environment, including key attributes such as field definitions, data types, constraints, and index settings. Through semantic-level precise matching with the current data model, any field-level deviations between the test environment and the model definition can be identified and marked, such as field type mismatches, the presence or absence of additional fields, changes in constraints, and differences in index configurations. This process ensures that the database structure in all test environments remains strictly consistent with the data model of the production environment, eliminating potential problems caused by structural differences between environments and improving the accuracy and efficiency of testing.
[0063] In some embodiments of this application, after performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the check result, the method further includes: if the consistency check passes, using a semantic parsing engine to identify and extract the metadata information of the data dictionary of the current data model, wherein the metadata information of the data dictionary includes data item definitions, code value mappings, and data dictionary numbers; comparing the metadata information of the data dictionary with the data dictionary of the baseline version to obtain a data dictionary difference comparison result, wherein the data dictionary difference comparison result includes differences at the code value level, differences in data item definitions, and differences in domain value rules; and generating a data dictionary difference report based on the data dictionary difference comparison result.
[0064] Specifically, the semantic parsing engine identifies and extracts metadata information from the data dictionary in the current data model. This includes data item definitions (such as field names, data types, and meanings), code-value mappings (i.e., the correspondence between data item values and actual business meanings), and data dictionary numbers (used to identify the uniqueness of the data dictionary). This process ensures that all key data dictionary attributes are captured, providing a detailed data foundation for subsequent discrepancy comparisons. Next, the metadata information extracted from the current data model is compared in depth with the baseline version of the data dictionary. This comparison covers differences at the code-value level, differences in data item definitions, and differences in domain value rules. This means not only checking the completeness of data dictionary entries but also verifying details such as the value range, default values, and constraints of each data item to ensure comprehensive consistency in data definitions. Based on the data dictionary discrepancy comparison results, a detailed data dictionary discrepancy report is generated. The report clearly lists all identified discrepancies, including added, deleted, or modified code values, data item definitions, and domain value rules, providing the type and specific location of the discrepancies for quick problem identification and correction. Furthermore, the report includes an analysis of the impact of the discrepancies on business logic, helping to understand the potential risks of changes.
[0065] The above steps ensure accurate synchronization between the data dictionary and the data model, eliminating data quality issues and business risks caused by inconsistent data definitions, and providing an additional quality control layer for the implementation and maintenance of the data model. In summary, by automating the acquisition of data dictionary metadata, conducting in-depth discrepancy comparisons, and generating detailed reports, this solution provides an efficient and comprehensive solution for data dictionary validation in enterprise-level modeling.
[0066] Furthermore, after generating a data dictionary difference report based on the above data dictionary difference comparison results, the above method also includes: integrating the above difference analysis results, the above incremental difference SQL script and the above data dictionary difference report to form a standardized delivery package.
[0067] Specifically, after completing a series of verification actions, including consistency checks between the database table structure and the current data model, and comparisons of data dictionary differences, all discrepancy analysis results and related scripts are compiled and centralized into a standardized delivery package. This comprehensive report not only includes specific discrepancies, their locations, and types, but also includes the SQL scripts used for the actual updates, as well as details of data dictionary changes, providing comprehensive information support for subsequent corrections and audits. The creation of the standardized delivery package signifies that the entire enterprise-level model validation process has been documented and standardized. This not only simplifies the interpretation and application of validation results but also provides clear documentation for communication, auditing, and tracking during model delivery, improving the overall process's transparency and management efficiency. The formation of this delivery package allows discrepancy analysis results, update scripts, and data dictionary changes to be managed and distributed as a whole, facilitating targeted adjustments and optimizations by subsequent processing teams based on the report content. Simultaneously, the standardized delivery package itself becomes part of version control, helping to track the specific details of each model change, maintain the integrity of the model history, and provide convenience for potential future retrospectives or audits.
[0068] In summary, by integrating the difference analysis results, incremental difference SQL scripts, and data dictionary difference reports into a standardized delivery package, the enterprise-level modeling verification process has been systematized, standardized, and documented. This improves the usability of the verification results and the efficiency of overall model management, and provides strong support for subsequent corrections, reviews, and version control.
[0069] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the enterprise-level model verification method of this application will be described in detail below with reference to specific embodiments.
[0070] This embodiment relates to a specific enterprise-level model validation method, such as... Figure 3 As shown, the process includes: requirement submission, semantic analysis and generation of application implementation attributes, comparison of document version differences, generation of full SQL, incremental content differences and incremental difference SQL, formal implementation of incremental SQL, verification of database and table structures, generation of data dictionary difference content, and output of deliverables. The core process is as follows:
[0071] 1. Intelligent demand analysis and model initialization:
[0072] (1) Relying on the natural language processing capabilities of the large model, intelligent semantic deconstruction is performed on the user-submitted requirements, and core dimensions (such as data range, business rules, and relationships) are automatically extracted from the requirements.
[0073] (2) Based on the preset template, the parsing results are automatically populated into the data model document to form standardized input;
[0074] (3) Link the “Application Implementation Attribute Generation Module” to automatically complete the configuration and binding of application implementation attributes without manual intervention.
[0075] 2. Model Difference Analysis and Script Generation:
[0076] (1) Call the “Model Document Difference Analysis Module” to perform a full-dimensional difference scan on the old and new versions of the data model documents, output the incremental difference content document, and clearly mark the differences such as structural changes and field additions and subtractions;
[0077] (2) Synchronously trigger the “DDL script automated generation module” to generate full SQL statements (covering the complete model construction logic) based on the difference analysis results; and incremental difference SQL scripts (containing only the changed parts, supporting lightweight deployment).
[0078] 3. Implementation of Changes and Structural Verification:
[0079] After deploying the incremental difference SQL script to the target database and implementing the model change, call the "Database Table Structure Difference Verification Center" to perform a two-way verification between the actual database table structure and the model documentation.
[0080] Verification passed: Proceed to the data dictionary difference analysis stage;
[0081] Verification failed: Revert to the "Model Document Difference Comparison" stage, correct the differences, and re-execute the process.
[0082] 4. Data dictionary closed loop and output results:
[0083] After the verification is passed, the "Data Dictionary Difference Verification Module" is invoked to perform a final verification of the consistency of the data dictionary and generate a document containing the differences in the data dictionary content.
[0084] Ultimately, by integrating the data dictionary difference content document, full SQL statements, incremental difference SQL scripts, and data dictionary difference content document, a standardized delivery package is formed, realizing a fully automated closed loop from requirement to implementation of the data model.
[0085] This system significantly reduces manual intervention by decoupling modules and automating the process, improving model delivery efficiency and consistency, while ensuring the accuracy of data assets through multiple rounds of verification.
[0086] The specific information of the relevant modules involved in this scenario is as follows:
[0087] 1. Application Implementation Attribute Generation Module: Based on enterprise-level modeling standards and business unit technical design requirements, this module automatically generates implementation attributes (such as transaction date, batch processing date, optimistic locking version number, etc.) and corresponding indexes for database tables. Building upon this, a newly added automatic verification function checks document information in real time during the generation process, automatically identifying logical errors such as missing fields, data type conflicts, and primary / foreign key mismatches. It accurately locates problems and outputs detailed error messages and repair suggestions, significantly reducing manual configuration workload.
[0088] 2. DDL Script Automation Generation Module: This module automatically generates complete DDL table creation statements based on the model document, covering key elements such as DUS, fields, indexes, tablespaces, and partitions. It obtains table structure information by parsing Excel files and uses the built-in SQL template engine, following preset syntax rules and templates adapted to the OpenENGUASS database type, to automatically generate full DDL statements including index files and technical fields.
[0089] 3. Model Version Difference Analysis Module: Supports comparison of any version of the model specification document. It performs structural analysis through a semantic parsing engine and employs a field-level bidirectional comparison algorithm to deeply compare differences in attributes such as data type, length, and constraints. It automatically marks newly added, deleted, or modified fields and generates a visual difference document.
[0090] 4. Database table structure difference verification center:
[0091] (1) Inter-table structure alignment verification: In the scenario of database sharding and table partitioning, the table structure of different physical shards (such as user_0001 and user_0002) is automatically compared to verify whether it is completely consistent with the baseline version document. Through deep field-level comparison algorithm, problems such as missing fields, type differences, and inconsistent constraints are identified, and a visual difference report is generated.
[0092] (2) Cross-environment version consistency verification: Supports batch comparison of the same version of the document with the database table structure of multiple test environments (such as DEV, SIT, UAT). Automatically extract the metadata of the table structure of each environment, perform semantic matching with the document definition, and mark field-level deviations (such as inconsistent field lengths, differences in index configuration, etc.) to ensure strict alignment of model definitions between environments.
[0093] 5. Data Dictionary Difference Verification Module: This module automatically extracts metadata such as data item definitions, code value mappings, and data dictionary numbers through a semantic parsing engine. Employing a bidirectional semantic matching algorithm, it not only identifies differences at the code value level (e.g., added code values, deleted code values, changes to code value descriptions) but also deeply analyzes changes in data item definitions (e.g., field names, data types, constraints) and domain value rules (e.g., value range, default values). It generates multi-dimensional difference reports, visually displaying the changes and providing impact analysis (e.g., affected business modules, potential data compatibility issues).
[0094] The key point of this application is:
[0095] 1. An integrated enterprise-level modeling and validation tool built on JDK11 and the Spring Boot framework, enabling multi-module collaboration to complete comprehensive multi-dimensional validation functions.
[0096] 2. Unique algorithms and technologies for each module, such as template engine technology for full DDL generation, version difference comparison algorithm and data sampling verification technology, database sharding and table structure comparison algorithm, fuzzy and exact matching technology for model document and database difference comparison, and text similarity algorithm for data dictionary difference comparison, etc.
[0097] 3. Enables one-click operation, integrates multiple verification functions into one tool, and provides an efficient and comprehensive enterprise-level model verification solution.
[0098] The advantages of this application are:
[0099] 1. Significantly improved efficiency: One-click operation replaces tedious manual operations, and all verification functions can be executed quickly. Taking full SQL generation as an example, compared with manual writing, the tool of this invention can complete the full SQL generation of a large database in minutes, greatly shortening the business development and maintenance cycle.
[0100] 2. Higher accuracy: Advanced algorithms are used for comparison and analysis, avoiding errors caused by human negligence. In version difference comparisons, subtle field changes and data differences can be accurately detected, ensuring the accuracy and consistency of the model.
[0101] 3. Comprehensive Functionality: It integrates multiple functions such as full SQL generation, version difference comparison, database sharding and table structure comparison, model document and database difference comparison, and data dictionary difference comparison. One tool meets the multi-faceted verification needs of enterprise-level modeling, while existing technologies can usually only achieve a single function.
[0102] In this application, in the full SQL generation module, in addition to using an SQL template engine, secondary development using a code generator framework (such as MyBatis Generator) can be considered. This allows for the generation of full SQL statements that meet specific requirements through customized configuration files. The hash algorithm in the version difference comparison module can be replaced with a deep learning-based text comparison algorithm (such as BERT). Training on a large number of database table structures and data samples improves the accuracy of the difference comparison. The tree structure comparison algorithm in the sharded database and table structure comparison module can utilize graph database technology to transform the table structure into a graph structure for comparison, enabling more flexible handling of complex relational structures.
[0103] This application has been practically applied in enterprise-level development and testing environments, achieving significant results. Through the implementation of an integrated verification process, labor costs have been significantly reduced, and verification efficiency has been significantly improved. Specifically, it generates full SQL statements that completely cover indexes and technical fields with 100% accuracy, achieving a zero error rate. In version difference comparison, a high-precision algorithm is used, achieving a difference detection rate of 99.99%, accurately identifying subtle changes at the field and data levels. In the database sharding and table structure comparison module: for complex architectures with hundreds of tables, the average processing time is controlled within 30 seconds, quickly locating structural differences. In the model document and database difference comparison module: it supports multi-data source parsing, automatically generating detailed comparison reports with 100% accuracy. In the data dictionary difference comparison module: it achieves intelligent comparison of data definitions between versions, with a difference identification accuracy exceeding 100%. Actual test data shows that this application achieves industry-leading levels in efficiency, accuracy, and stability, fully verifying the feasibility and practicality of the technical solution.
[0104] This application also provides an enterprise-level model verification device. It should be noted that this enterprise-level model verification device can be used to execute the enterprise-level model verification method provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0105] The following describes the enterprise-level model verification device provided in the embodiments of this application.
[0106] Figure 4 This is a structural block diagram of an enterprise-level model verification device according to an embodiment of this application. For example... Figure 4As shown, the device includes a first acquisition unit 41, a first generation unit 42, an analysis unit 43, a second generation unit 44, and a verification unit 45. The first acquisition unit acquires user requirement information and the previous version's data model, and parses the user requirement information to obtain analysis results, including data scope, business rules, and relationships between data. The first generation unit generates a current data model based on the analysis results, including a model document and its implementation attributes. The analysis unit performs a difference analysis between the previous version's data model and the current data model, generating difference analysis results, including structural changes and field changes. The second generation unit generates an incremental difference SQL script based on the difference analysis results, specifically for the structural and field changes. The verification unit executes the incremental difference SQL script in the target database environment and performs consistency verification on the table structure of the target database and the current data model after executing the incremental difference SQL script, obtaining verification results.
[0107] This embodiment parses user requirement information, constructs the current data model, and configures implementation attributes. It can quickly capture structural and field changes compared to the previous version, thereby generating precise incremental difference SQL scripts specifically targeting these changes to update the database. This not only reduces the time and possibility of errors from manual operations but also ensures a high degree of consistency between the updated table structure and the latest data model. After executing the script, consistency checks can promptly identify and correct potential structural deviations, thus solving the problems of low efficiency and low accuracy in existing model validation methods.
[0108] In the specific implementation process, the first generation unit mentioned above includes a filling module and a configuration module. The filling module is used to fill the parsing results into a preset model document template to obtain the model document. The preset model document template includes a fixed framework and format for the data model description. The configuration module is used to generate and configure the implementation attributes for each database table in the model document. The implementation attributes include a timestamp field and a concurrency control field.
[0109] This embodiment first populates a preset model document template with key information (data scope, business rules, and data relationships) extracted from user requirements. Based on this, a standardized model document is automatically generated. The preset model document template contains a fixed framework and format for describing the data model, ensuring document consistency and readability. Furthermore, it can generate and configure implementation attributes for each database table in the model document, such as timestamp fields and concurrency control fields. These attributes are crucial for monitoring data changes, supporting transaction processing, and preventing concurrency conflicts. Automatic configuration of implementation attributes not only avoids common errors and omissions in manual operations but also ensures the efficiency of database operations and data consistency.
[0110] In some embodiments of this application, the analysis unit includes a parsing module and a comparison module. The parsing module is used to perform structural parsing on the previous version of the data model and the current data model using a semantic parsing engine to obtain a first structural parsing result and a second structural parsing result. The structural parsing includes the identification of table structure, indexes, and constraints. The first structural parsing result corresponds to the previous version of the data model, and the second structural parsing result corresponds to the current data model. The comparison module is used to perform field-level comparison on the first structural parsing result and the second structural parsing result using a field-level comparison algorithm to generate the difference analysis result.
[0111] This embodiment employs a semantic parsing engine and field-level comparison algorithms to automate and perform high-precision difference analysis on enterprise-level data model changes, providing a reliable detection mechanism for data model version management and database update operations. This mechanism is crucial for the efficient operation and management of large enterprise data systems, significantly improving the accuracy and efficiency of data processing and model changes.
[0112] In some embodiments of this application, the second generation unit includes a generation module and an integration module. The generation module is used to generate corresponding incremental SQL statements for each point of change based on the difference analysis results and using an SQL template engine; the integration module is used to integrate the incremental SQL statements to obtain the incremental difference SQL script.
[0113] This embodiment utilizes an SQL template engine to generate corresponding incremental SQL statements for each specific change point in the difference analysis report (including field modification, addition, or deletion, as well as adjustments to indexes and constraints), ensuring the accuracy of database changes. The incremental difference SQL scripts contain only necessary change operations, reducing execution time and resource consumption, and avoiding unnecessary interference with existing data and database architecture, thereby significantly improving the efficiency and security of database updates.
[0114] In some embodiments of this application, the verification unit includes a verification module, which is used to perform inter-table structure alignment verification on the table structure of the target database after executing the incremental difference SQL script and the current data model in a sharded database environment, and obtain the verification result.
[0115] This embodiment effectively verifies whether the database table structure has been updated to fully conform to the latest data model specifications by performing deep structural alignment verification on all relevant sharded tables in the target database after executing the incremental difference SQL script. It not only checks for field additions, deletions, and modifications but also verifies details such as data types, indexes, and constraints to ensure consistency across multiple database instances, without omissions or errors. This process enhances the reliability and accuracy of database updates, avoiding data problems and business risks caused by structural inconsistencies. In summary, automated verification significantly improves database maintenance efficiency and ensures the correct implementation and efficient operation of data model changes in a sharded environment.
[0116] Furthermore, the aforementioned verification module includes an acquisition submodule, a comparison submodule, and a generation submodule. The acquisition submodule is used to acquire the metadata information of each physical shard table in the aforementioned sharded database environment. The metadata information of the physical shard table includes the first field definition, the first data type, the first constraint condition, and the first index setting. The comparison submodule is used to compare the aforementioned metadata information with the table structure in the aforementioned current data model to obtain the aforementioned verification result. The generation submodule is used to generate a difference report based on the aforementioned verification result. The difference report includes the difference type and location.
[0117] This embodiment systematically acquires the metadata of each physical table, including key attributes such as field definitions, data types, constraints, and index settings, and performs a detailed comparison with the table structure in the current data model. This allows for the comprehensive identification of any structural deviations. The resulting discrepancy report clearly identifies all structural inconsistencies, including the type and specific location of the differences, providing direct evidence for quickly locating and resolving problems. This improves the efficiency and accuracy of database maintenance, especially when dealing with complex distributed database architectures. It ensures that database updates are strictly executed according to the data model requirements, avoiding data inconsistencies and potential business risks, thereby enhancing the reliability and performance of enterprise applications.
[0118] In some embodiments of this application, the above-described apparatus further includes a second acquisition unit and a matching unit. The second acquisition unit is used to perform a consistency check on the table structure of the target database after executing the incremental difference SQL script and the current data model, and after obtaining the check result, acquire metadata information of the database tables from multiple test environments. The metadata information of the database tables includes second field definitions, second data types, second constraints, and second index settings. The matching unit is used to semantically match the metadata information of the database tables in the multiple test environments with the current data model, and mark field-level deviations.
[0119] This embodiment, after verifying the consistency between the target database and the current data model, further delves into multiple test environments, acquiring and analyzing metadata information of the database tables in each environment, including key attributes such as field definitions, data types, constraints, and index settings. Through semantic-level precise matching with the current data model, any field-level deviations between the test environment and the model definition can be identified and marked, such as field type mismatches, the presence or absence of additional fields, changes in constraints, and differences in index configurations. This process ensures that the database structure in all test environments remains strictly consistent with the data model of the production environment, eliminating potential problems caused by structural differences between environments and improving the accuracy and efficiency of testing.
[0120] In some embodiments of this application, the above-described apparatus further includes an extraction unit, a comparison unit, and a third generation unit. The extraction unit is used to perform a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script. After obtaining the check result, if the consistency check passes, it uses a semantic parsing engine to identify and extract the metadata information of the data dictionary of the current data model. The metadata information of the data dictionary includes data item definitions, code value mappings, and data dictionary numbers. The comparison unit is used to perform a difference comparison between the metadata information of the data dictionary and the data dictionary of the baseline version, obtaining a data dictionary difference comparison result. The data dictionary difference comparison result includes differences at the code value level, differences in data item definitions, and differences in domain value rules. The third generation unit is used to generate a data dictionary difference report based on the data dictionary difference comparison result.
[0121] This embodiment ensures precise synchronization between the data dictionary and the data model, eliminating data quality issues and business risks caused by inconsistent data definitions, and providing an additional quality control layer for the implementation and maintenance of the data model. In summary, by automating the acquisition of data dictionary metadata, conducting in-depth discrepancy comparisons, and generating detailed reports, it provides an efficient and comprehensive solution for data dictionary validation in enterprise-level modeling.
[0122] Furthermore, the aforementioned apparatus also includes an integration unit, used to integrate the aforementioned difference analysis results, the aforementioned incremental difference SQL script, and the aforementioned data dictionary difference report after generating a data dictionary difference report based on the aforementioned data dictionary difference comparison results, to form a standardized delivery package.
[0123] In summary, by integrating the difference analysis results, incremental difference SQL scripts, and data dictionary difference reports into a standardized delivery package, the enterprise-level modeling verification process has been systematized, standardized, and documented. This improves the usability of the verification results and the efficiency of overall model management, and provides strong support for subsequent corrections, reviews, and version control.
[0124] The aforementioned enterprise-level model verification device includes a processor and a memory. The first acquisition unit, first generation unit, analysis unit, second generation unit, and verification unit are all stored as program units in the memory. The processor executes these program units stored in the memory to achieve their respective functions. All of the above modules reside in the same processor; alternatively, the modules may be located in different processors in any combination.
[0125] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0126] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to execute the enterprise-level model verification method.
[0127] This invention provides a processor for running a program, wherein the program executes the enterprise-level model verification method.
[0128] This invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the aforementioned enterprise-level model verification method. The device described herein can be a server, PC, PAD, mobile phone, etc.
[0129] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of initializing a model verification method having at least the above-described enterprise-level method.
[0130] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0131] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0135] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0136] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0137] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0138] 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.
[0139] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0140] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An enterprise-level model validation method, characterized in that, include: Obtain user demand information and the data model of the previous version, and parse the user demand information to obtain the parsing results, which include data range, business rules and the relationship between data; The current data model is generated based on the parsing results, and the current data model includes a model document and its implementation attributes; Perform a difference analysis between the previous version of the data model and the current data model to generate difference analysis results, which include structural changes and field changes. An incremental difference SQL script is generated based on the difference analysis results. The incremental difference SQL script is generated for the structural change and the field change. Execute the incremental difference SQL script in the target database environment, and perform a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script to obtain the check result.
2. The method according to claim 1, characterized in that, The current data model is generated based on the parsing results. The current data model includes a model document and its implementation attributes, including: The parsing results are filled into a preset model document template to obtain the model document. The preset model document template includes a fixed framework and format for the data model description. The implementation attributes, including timestamp and concurrency control fields, are generated and configured for each database table in the model document.
3. The method according to claim 1, characterized in that, Perform a difference analysis between the previous version of the data model and the current data model to generate the difference analysis results, including: A semantic parsing engine is used to perform structural parsing on the previous version of the data model and the current data model to obtain a first structural parsing result and a second structural parsing result. The structural parsing includes the identification of table structure, indexes and constraints. The first structural parsing result corresponds to the previous version of the data model, and the second structural parsing result corresponds to the current data model. A field-level comparison algorithm is used to compare the fields of the first structure parsing result and the second structure parsing result to generate the difference analysis result.
4. The method according to claim 1, characterized in that, Based on the difference analysis results, an incremental difference SQL script is generated, including: Based on the difference analysis results, an SQL template engine is used to generate corresponding incremental SQL statements for each point of change. The incremental SQL statements are integrated to obtain the incremental difference SQL script.
5. The method according to claim 1, characterized in that, A consistency check is performed on the table structure of the target database and the current data model after executing the incremental difference SQL script, and the check results are obtained, including: In a sharded database environment, the table structure of the target database after executing the incremental difference SQL script and the current data model are checked for inter-table structure alignment to obtain the check result.
6. The method according to claim 5, characterized in that, In a sharded database environment, the table structure of the target database after executing the incremental difference SQL script and the current data model are checked for inter-table structure alignment to obtain the check results, including: Obtain the metadata information of each physical table in the sharded database environment. The metadata information of the physical table includes the first field definition, the first data type, the first constraint condition, and the first index setting. The metadata information is compared with the table structure in the current data model to obtain the verification result; A difference report is generated based on the verification results. The difference report includes the difference type and location.
7. The method according to claim 1, characterized in that, After performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the check result, the method further includes: Metadata information of database tables is obtained from multiple test environments. The metadata information of the database tables includes the definition of the second field, the second data type, the second constraint condition, and the second index setting. The metadata information of the database tables in multiple test environments is semantically matched with the current data model, and field-level deviations are marked.
8. The method according to claim 1, characterized in that, After performing a consistency check on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtaining the check result, the method further includes: If the consistency check passes, a semantic parsing engine is used to identify and extract the metadata information of the data dictionary of the current data model. The metadata information of the data dictionary includes data item definitions, code value mappings, and data dictionary numbers. The metadata information of the data dictionary is compared with the data dictionary of the baseline version to obtain the data dictionary difference comparison result. The data dictionary difference comparison result includes differences at the code value level, differences in data item definitions, and differences in domain value rules. A data dictionary difference report is generated based on the data dictionary difference comparison results.
9. The method according to claim 8, characterized in that, After generating a data dictionary difference report based on the data dictionary difference comparison results, the method further includes: The difference analysis results, the incremental difference SQL script, and the data dictionary difference report are integrated to form a standardized delivery package.
10. An enterprise-level model verification device, characterized in that, include: The first acquisition unit is used to acquire user demand information and the data model of the previous version, and to parse the user demand information to obtain the parsing result, which includes the data range, business rules and the relationship between the data. The first generation unit is used to generate a current data model based on the parsing result, wherein the current data model includes a model document and its implementation attributes; The analysis unit is used to perform a difference analysis between the previous version of the data model and the current data model, and generate difference analysis results, which include structural changes and field changes. The second generation unit is used to generate an incremental difference SQL script based on the difference analysis results. The incremental difference SQL script is a script generated for the structural change and the field change. The verification unit is used to execute the incremental difference SQL script in the target database environment, and to perform consistency verification on the table structure of the target database and the current data model after executing the incremental difference SQL script, and obtain the verification result.