Data model processing method and device

Through comparison and automatic modification of data models, the problem of inconsistent database table structures between the data architecture management system and the production environment is solved, fast and accurate verification and correction are achieved, and the efficiency of automated processing of data consistency is improved.

CN113792052BActive Publication Date: 2024-09-17AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111092947.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-17
Publication Date
2024-09-17
Estimated Expiration
2041-09-17

AI Technical Summary

Technical Problem

In the existing technology, the database table structure between the data architecture management system and the production environment is inconsistent, making manual comparison time-consuming, labor-intensive and error-prone, especially when the amount of data is large, full inspection cannot be performed.

Method used

By obtaining the data model to be put into production and comparing it with the data model that was put into production last time, a change script is generated, and after the data model is put into production, the consistency of the data model after put into production is compared with the data model in the production environment, and the database table structure is automatically modified to Ensure consistency.

Benefits of technology

It realizes the automatic, fast, effective and accurate verification of the consistency of the database table structure in the data architecture management system and the production environment, avoiding errors and time-consuming problems of manual comparison.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113792052B
    Figure CN113792052B
Patent Text Reader

Abstract

The present invention provides a data model processing method and device. By comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and comparing the current production script with the change script of the management state, if they are inconsistent, the database table structure of the data model to be put into production this time is modified to obtain the data model of the management state; the consistency of the management state data model after production is compared with the data model in the production environment to obtain the comparison result; and the management state data model is processed according to the comparison result. In this scheme, by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, the current production script with the change script of the management state, and the consistency of the data model after production with the data model in the production environment, the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment can be automatically, quickly, effectively, and accurately verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data management, and in particular to a data model processing method and device. Background Art

[0002] At present, system developers first design the data model in the data architecture management system, complete the test in the test environment, and at the same time pass the review and approval of the rationality, standardization, integrity and sharing of the data model by authorized personnel, and then submit the database execution script to be implemented in the production environment by production operators.

[0003] In actual applications, the relevant data in the database table structure of the data architecture management system will be consumed by other systems of the bank, such as the big data platform, so it must be ensured that it accurately reflects the database table structure of the data model of the production environment. Since the data architecture management system and the production environment are not connected, the SQL scripts executed in the production environment are completely written manually by system developers. Therefore, there may be inconsistencies between the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0004] In the prior art, in order to ensure the consistency of the data model in the data architecture management system and the database table structure in the data model in the production environment, manual comparison is usually used for verification, which is not only time-consuming and labor-intensive, but also prone to errors. In addition, if the amount of data is large, it is impossible to manually check the correctness of the data in full. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a data model processing method and device to achieve the purpose of automatically, quickly, effectively, and accurately verifying the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] A first aspect of an embodiment of the present invention discloses a data model processing method, the method comprising:

[0008] Get the data model to be put into production;

[0009] Compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script;

[0010] Compare the current production script with the change script of the management state. If they are inconsistent, modify the database table structure of the data model to be put into production to obtain the data model of the management state.

[0011] After the data model in the management state is put into production, the consistency of the data model in the management state after production is compared with the data model in the production environment to obtain a comparison result;

[0012] The data model of the management state is processed according to the comparison result.

[0013] Optionally, after the data model in the management state is put into production, the consistency of the first data model after production is compared with the data model in the production environment to obtain a comparison result, including:

[0014] After the data model in the management state is put into production, based on a preset period, the structure of the first database table in which the data model in the management state after production is effective in the specified application system is obtained, wherein the preset period at least includes one or more combinations of monthly, quarterly, semi-annual and annual;

[0015] Comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether they are consistent;

[0016] If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent;

[0017] If they are inconsistent, a comparison result is obtained indicating that the structures of the first database table and the second database table are inconsistent.

[0018] Optionally, after the data model in the management state is put into production, the consistency of the data model in the management state after production is compared with the data model in the production environment to obtain a comparison result, including:

[0019] After the management state data model is put into production, the structure of the first database table in which the management state data model after production is effective in the designated application system is obtained in real time;

[0020] Comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether they are consistent;

[0021] If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent;

[0022] If they are inconsistent, a comparison result is obtained indicating that the structures of the first database table and the second database table are inconsistent.

[0023] Optionally, after the data model in the management state is put into production, the consistency of the data model in the management state after production is compared with the data model in the production environment to obtain a comparison result, including:

[0024] After the management state data model is put into production, the structure of the first database table of the management state data model after production with a preset validity frequency in the specified application system is obtained, wherein the preset validity frequency includes at least one validity period;

[0025] Comparing the structure of the first database table with the second data table structure of the data model in the generation environment to see whether they are consistent;

[0026] If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent;

[0027] If they are inconsistent, a comparison result is obtained indicating that the structures of the first database table and the second database table are inconsistent.

[0028] Optionally, comparing whether the structure of the first database table is consistent with the second data table structure of the data model in the generation environment includes:

[0029] Comparing whether the fields and attributes of the first database table and the second database table are consistent, and comparing whether the indexes of the first database table and the second database table, as well as the fields and the order of the fields of the indexes, are consistent;

[0030] If they are consistent, it is determined that the structures of the first database table and the second database table are consistent;

[0031] If any one of them is inconsistent, it is determined that the structures of the first database table and the second database table are inconsistent.

[0032] Optionally, processing the data model of the management state according to the comparison result includes:

[0033] If the comparison result is inconsistent, modify the change script of the management state according to the comparison result;

[0034] The modified management-state change script is compared with the current production script. If they are inconsistent, the database table structure of the data model to be put into production is modified to obtain a new management-state data model.

[0035] A second aspect of an embodiment of the present invention discloses a data model processing device, the device comprising: a pre-production processing module and a post-production processing module;

[0036] The pre-production processing module includes:

[0037] The first acquisition unit is used to acquire the data model to be put into production;

[0038] A first generating unit is used to compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script;

[0039] A first comparison unit is used to compare the current production script with the change script of the management state, and if they are inconsistent, execute the second generation unit;

[0040] The second generation unit is used to modify the database table structure of the data model to be put into production this time to obtain the data model in the management state;

[0041] The post-production processing module is used to compare the consistency of the management state data model after production with the data model in the production environment to obtain a comparison result after the management state data model is put into production; and process the management state data model according to the comparison result.

[0042] Optionally, the post-production processing module includes:

[0043] A second acquisition unit is used to acquire the structure of the first database table in which the data model of the management state after production is effective in the specified application system based on a preset period after the data model of the management state is put into production, wherein the preset period at least includes one or more combinations of monthly, quarterly, semi-annual and annual; or, to acquire the structure of the first database table in which the data model of the management state after production is effective in the specified application system in real time; or, to acquire the structure of the first database table in which the data model of the management state after production is effective at a preset frequency in the specified application system, wherein the preset frequency includes at least one time of effectiveness;

[0044] The second comparison unit compares whether the structure of the first database table is consistent with the second data table structure of the data model in the generation environment; if they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent; if they are inconsistent, a comparison result that the structures of the first database table and the second database table are inconsistent is obtained.

[0045] Optionally, the second comparison unit is specifically used to:

[0046] Compare whether the fields and attributes of the first database table and the second database table are consistent, and compare whether the indexes of the first database table and the second database table and the fields and field orders of the indexes are consistent; if all are consistent, it is determined that the structures of the first database table and the second database table are consistent; if any one is inconsistent, it is determined that the structures of the first database table and the second database table are inconsistent.

[0047] Optionally, the post-production processing module for processing the data model of the management state according to the comparison result is specifically used to:

[0048] If the comparison result is inconsistent, modify the management state change script according to the comparison result; compare the modified management state change script with the current production script and the management state change script. If they are inconsistent, modify the database table structure of the data model to be put into production this time to obtain a new management state data model.

[0049] A data model processing method and device are provided based on the above-mentioned embodiment of the present invention. The method includes: obtaining the data model to be put into production this time; comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and using the generated data model change script as the management state change script; comparing the current production script with the management state change script, and if there is inconsistency, modifying the database table structure of the data model to be put into production this time to obtain the management state data model; after the management state data model is put into production, comparing the consistency of the management state data model after production with the data model in the production environment to obtain a comparison result; and processing the management state data model according to the comparison result. In this solution, the management-state data model is obtained by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and by comparing the current production script with the management-state change script. After the management-state data model is put into production, the consistency of the management-state data model after production and the data model in the production environment is compared, so as to process the management-state data model, which can automatically, quickly, effectively, and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0051] Figure 1 A flowchart of a data model processing method provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a flow chart for comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention;

[0053] Figure 3A schematic diagram of another process for comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention;

[0054] Figure 4 A schematic diagram of a process for comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention;

[0055] Figure 5 A flowchart of specific comparison contents for comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention;

[0056] Figure 6 A flowchart of another data model processing method provided by an embodiment of the present invention;

[0057] Figure 7 An application scenario diagram provided for an embodiment of the present invention;

[0058] Figure 8 A schematic diagram of the structure of a data model processing device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0061] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0062] In order to facilitate understanding of the technical solution of the present invention, the technical terms appearing in the present invention are explained:

[0063] Data model: In a broad sense, it refers to the blueprint for data requirement definition, design and database development. It uses tools to convey business data concepts and information requirements to designers in a graphical way, and plays the role of a development and communication framework between business information and physical data. This invention mainly refers to the physical table structure of the database, including the field information, primary key information, index information, etc. of the physical table.

[0064] Management data model: the physical table structure state maintained by the application system in the data architecture management system.

[0065] Running data model: the physical table structure status of the application system in the actual production environment.

[0066] As can be seen from the background technology, in order to ensure the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment, manual comparison is usually used for verification, but this method is not only time-consuming and labor-intensive, but also prone to errors. In addition, if the amount of data is large, it is impossible to manually check the correctness of the data in full.

[0067] Therefore, an embodiment of the present invention provides a data model processing method and device. In this solution, the management-state data model is obtained by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and comparing the current production script with the management-state change script. After the management-state data model is put into production, the consistency of the management-state data model after production and the data model in the production environment is compared, so as to process the management-state data model, which can automatically, quickly, effectively and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0068] like Figure 1 FIG. 1 is a flow chart of a data model processing method provided by an embodiment of the present invention, and the method mainly includes the following steps:

[0069] Step S101: Obtain the data model to be put into production.

[0070] In the process of implementing step S101, when the data model is put into production, it is necessary to select the data model to be put into production in the data architecture management system and obtain it, that is, to obtain the data model to be put into production.

[0071] Step S102: Compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script.

[0072] In the process of implementing step S102, for the version of the data model that is currently effective but not put into production, that is, for the version of the data model to be put into production this time, the version of the data model to be produced this time is compared with the version of the data model that was last put into production, and a data model change script is generated for this time. The generated data model change script is used as the management state change script.

[0073] Step S103: Compare the current production script with the management state change script.

[0074] In step S103, the current production script is the production script required for the current production change.

[0075] The production scripts include but are not limited to the production SQL scripts.

[0076] In the specific process of implementing step S103, the current production script is obtained, and the current production script is compared with the change script in the management state.

[0077] Step S104: Determine whether the current production script is consistent with the change script in the management state. If not, execute step S105. If consistent, return to execute step S101.

[0078] Step S105: modify the database table structure of the data model to be put into production this time to obtain a data model in management state.

[0079] In the process of implementing step S105, if it is determined that the current production script is inconsistent with the management state change script, the database table structure of the data model to be put into production is obtained, and the database table structure of the data model to be put into production is modified to obtain the management state data model.

[0080] Step S106: After the management-state data model is put into production, the consistency of the management-state data model after production is compared with the data model in the production environment to obtain a comparison result.

[0081] In the process of specifically implementing step S106, the management state data model is put into production. After the management state data model is put into production, the consistency of the management state data model after production is compared with the data model in the production environment to obtain a comparison result.

[0082] Step S107: Process the data model in the management state according to the comparison result.

[0083] In the specific implementation of step S107, the management state data model is processed accordingly according to the comparison result to ensure the consistency between the management state data model after production and the data model in the production environment.

[0084] A data model processing method provided by an embodiment of the present invention is provided, by obtaining the data model to be put into production this time; comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and using the generated data model change script as the change script of the management state; comparing the current production script with the change script of the management state, if they are inconsistent, modifying the database table structure of the data model to be put into production this time, and obtaining the data model of the management state; after the data model of the management state is put into production, comparing the consistency of the management state data model after production with the data model in the production environment, and obtaining the comparison result; processing the data model of the management state according to the comparison result. In this scheme, by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and comparing the current production script with the change script of the management state, the data model of the management state is obtained; after the data model of the management state is put into production, comparing the consistency of the management state data model after production with the data model in the production environment, so as to process the data model of the management state, it is possible to automatically, quickly, effectively, and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0085] Based on the data model processing method provided by the above embodiment of the present invention, step S106 is executed to compare the consistency of the management state data model after production with the data model in the production environment to obtain the comparison result. Figure 2 As shown, a flow chart of comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention mainly includes the following steps:

[0086] Step S201: after the management-state data model is put into production, based on a preset cycle, the structure of the first database table of the management-state data model after production is obtained to be effective in a designated application system.

[0087] In step S201, the preset period includes at least one or more combinations of monthly, quarterly, semi-annual and annual.

[0088] In the specific implementation of step S201, the management state data model is put into production. After the management state data model is put into production, based on a preset cycle, the structure of the first database table in which the put-in-production management state data model is effective in the designated application system is obtained.

[0089] Step S202: Compare the structure of the first database table with the second data table structure of the data model in the production environment to see if they are consistent. If they are consistent, execute step S203; if they are inconsistent, execute step S204.

[0090] Step S203: Obtain a comparison result showing that the structures of the first database table and the second database table are consistent.

[0091] In the specific implementation of step S203, it is determined that the structure of the first database table is consistent with the structure of the second data table of the data model in the production environment, and a comparison result that the first database table and the second database table have consistent structures is obtained.

[0092] Step S204: Obtaining a comparison result showing that the structures of the first database table and the second database table are inconsistent.

[0093] In the process of specifically implementing step S204, it is determined that the structure of the first database table is inconsistent with the structure of the second data table of the data model in the production environment, and a comparison result that the structures of the first database table and the second database table are inconsistent is obtained.

[0094] A data model processing method provided in an embodiment of the present invention obtains a corresponding comparison result by comparing the structure of a first database table of a management-state data model that takes effect in a specified application system after commissioning with a second data table structure of a data model in a production environment, thereby providing a data basis for subsequent processing of the management-state data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0095] Based on the data model processing method provided by the above embodiment of the present invention, step S106 is executed to compare the consistency of the management state data model after production with the data model in the production environment to obtain the comparison result. Figure 3 As shown, another flowchart for comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention mainly includes the following steps:

[0096] Step S301: after the management-state data model is put into production, the structure of the first database table in which the management-state data model after production is effective in the designated application system is obtained in real time.

[0097] In the specific implementation of step S301, the management state data model is put into production. After the management state data model is put into production, the structure of the first database table in which the put-in-production management state data model is effective in the designated application system is obtained in real time.

[0098] Step S302: Compare the structure of the first database table with the second data table structure of the data model in the production environment to see if they are consistent. If they are consistent, execute step S303; if they are inconsistent, execute step S304.

[0099] Step S303: Obtain a comparison result showing that the structures of the first database table and the second database table are consistent.

[0100] Step S304: Obtain a comparison result showing that the structures of the first database table and the second database table are inconsistent.

[0101] The execution principle and process of the above steps S302 to S304 are the same as Figure 2 The execution principles and processes of steps S202 to S204 disclosed in are the same, which can be referred to and will not be repeated here.

[0102] A data model processing method provided in an embodiment of the present invention obtains a corresponding comparison result by comparing the structure of a first database table of a management-state data model that takes effect in a specified application system after commissioning with a second data table structure of a data model in a production environment, thereby providing a data basis for subsequent processing of the management-state data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0103] Based on the data model processing method provided by the above embodiment of the present invention, step S106 is executed to compare the consistency of the management state data model after production with the data model in the production environment to obtain the comparison result. Figure 4 As shown, a flowchart of another method of comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention mainly includes the following steps:

[0104] Step S401: after the management-state data model is put into production, the structure of the first database table of the preset effectiveness frequency of the management-state data model after production in the designated application system is obtained.

[0105] In step S401, the preset validity frequency includes at least one validity period.

[0106] Optionally, the preset frequency of effectiveness may be twice.

[0107] In the specific implementation of step S401, the management state data model is put into production. After the management state data model is put into production, the structure of the first database table with a preset effectiveness frequency of the put-in-production management state data model in the designated application system is obtained.

[0108] Step S402: Compare the structure of the first database table with the second data table structure of the data model in the production environment to see if they are consistent. If they are consistent, execute step S403; if they are inconsistent, execute step S404.

[0109] Step S403: Obtain a comparison result showing that the structures of the first database table and the second database table are consistent.

[0110] Step S404: Obtaining a comparison result showing that the structures of the first database table and the second database table are inconsistent.

[0111] The execution principle and process of the above steps S402 to S404 are the same as Figure 2 The execution principles and processes of steps S202 to S204 disclosed in are the same, which can be referred to and will not be repeated here.

[0112] A data model processing method provided in an embodiment of the present invention obtains a corresponding comparison result by comparing the structure of a first database table of a management-state data model that takes effect in a specified application system after commissioning with a second data table structure of a data model in a production environment, thereby providing a data basis for subsequent processing of the management-state data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0113] Based on the data model processing method provided by the above embodiment of the present invention, the process of comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether it is consistent is performed in steps S202, S302 and S402. Figure 5 As shown, a flow chart of specific comparison contents of comparing the consistency of a first data model after production with a data model in a production environment provided by an embodiment of the present invention mainly includes the following steps:

[0114] Step S501: compare the fields and attributes of the first database table and the second database table to see if they are consistent, and compare the indexes, index fields, and field order of the first database table and the second database table to see if they are consistent. If they are consistent, execute step S502; if any of them are inconsistent, execute step S503.

[0115] It should be noted that as long as the fields and attributes of the first database table and the second database table are consistent, and the indexes, fields of the indexes, and the field order of the first database table and the second database table are consistent, step S502 is executed.

[0116] As long as the fields and attributes of the first database table and the second database table are consistent, and the indexes of the first database table and the second database table and the field order are inconsistent, or the fields and attributes of the first database table and the second database table are inconsistent, and the indexes of the first database table and the second database table and the field order are consistent, or the fields and attributes of the first database table and the second database table are inconsistent, and the indexes of the first database table and the second database table and the field order are inconsistent, step S503 is executed.

[0117] It should be noted that when any inconsistency exists, the inconsistent database table and the specific inconsistent fields or indexes are returned.

[0118] Step S502: Determine whether the structures of the first database table and the second database table are consistent.

[0119] In the specific implementation of step S502, it is determined that the fields and attributes of the first database table and the second database table are consistent, and that the indexes, fields of the indexes, and field orders of the first database table and the second database table are consistent, and then it is determined that the structures of the first database table and the second database table are consistent.

[0120] Step S503: Determine that the structures of the first database table and the second database table are inconsistent.

[0121] In the process of specifically implementing step S503, it is determined that the fields and attributes of the first database table and the second database table are consistent, and it is determined that the indexes of the first database table and the second database table and the fields and the order of the fields are inconsistent; or, it is determined that the fields and attributes of the first database table and the second database table are inconsistent, and it is determined that the indexes of the first database table and the second database table and the fields and the order of the fields are consistent; or, it is determined that the fields and attributes of the first database table and the second database table are inconsistent, and it is determined that the indexes of the first database table and the second database table and the fields and the order of the fields are inconsistent, then it is determined that the structures of the first database table and the second database table are inconsistent.

[0122] A data model processing method provided in an embodiment of the present invention performs a corresponding comparison of the consistency between the first data model after production and the data model in the production environment to obtain a corresponding comparison result, thereby providing a data basis for subsequent processing of the management data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0123] Based on the data model processing method provided by the above embodiment of the present invention, Figure 6FIG. 1 is a flow chart of another data model processing method provided by an embodiment of the present invention, which mainly includes the following steps:

[0124] Step S601: Obtain the data model to be put into production.

[0125] Step S602: Compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script.

[0126] Step S603: Compare the current production script with the management state change script.

[0127] Step S604: Determine whether the current production script is consistent with the management state change script. If not, execute step S605. If consistent, return to execute step S601.

[0128] Step S605: Modify the database table structure of the data model to be put into production, and obtain the data model in management state

[0129] Step S606: After the management-state data model is put into production, the consistency of the management-state data model after production is compared with the data model in the production environment to obtain a comparison result.

[0130] The execution principle and process of the above steps S601 to S606 are the same as Figure 1 The execution principles and processes of steps S101 to S106 disclosed in are the same, which can be referred to and will not be repeated here.

[0131] Step S607: Determine whether the comparison results are consistent. If they are consistent, return to step S601; if they are inconsistent, execute step S608.

[0132] Step S608: modify the management state change script according to the comparison result.

[0133] In the process of specifically implementing step S608, if it is determined that the comparison results are inconsistent, the change script of the management state is modified according to the comparison results.

[0134] Step S609: Compare the modified management state change script with the current production script.

[0135] In the specific process of implementing step S609, the current production script is obtained, and the current production script is compared with the modified management state change script.

[0136] Step S610: Determine whether the modified management-state change script is consistent with the current production script. If not, execute step 611. If consistent, return to execute step S601.

[0137] Step S611: modify the database table structure of the data model to be put into production this time to obtain a new management state data model.

[0138] In the process of implementing step S611, if it is determined that the modified management-state change script is inconsistent with the current production script, the database table structure of the data model to be put into production is modified to obtain a new management-state data model.

[0139] It should be noted that the execution Figure 1 After steps S101 to S106, if the comparison result is inconsistent, the previously obtained management state change script is modified according to the comparison result. When the modified management state change script is inconsistent with the current production script, the database table structure of the data model to be put into production is modified to obtain a new management state data model. The whole process is a cyclic process. When the data model is processed subsequently, it can be processed with reference to this process.

[0140] A data model processing method provided by an embodiment of the present invention, according to the obtained comparison result being inconsistent, the previously obtained management state change script is modified according to the comparison result, and when the modified management state change script is inconsistent with the current production script, the database table structure of the data model to be put into production is modified to obtain a new management state data model, so that the management state data model is processed based on the new management state data model, which can automatically, quickly, effectively and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0141] In order to better understand the data model processing method provided by the above embodiment of the present invention, Figure 7 The figure shows an application scenario diagram provided by an embodiment of the present invention.

[0142] exist Figure 7 In order to verify the consistency of the data model in the data architecture management system and the database table structure in the data model in the production environment, it is achieved through "pre-comparison" and "post-check".

[0143] 1. Conduct a pre-match

[0144] The data model to be put into production is obtained, the version of the data model to be put into production is compared with the version of the data model put into production last time, and the generated data model change script is used as the management state change script.

[0145] Compare the current production script in the running state with the change script in the management state. If the current production script is inconsistent with the change script in the management state, obtain the database table structure of the data model to be put into production, modify the obtained database table structure of the data model to be put into production, and obtain the data model in the management state.

[0146] 2. Conduct a post-event inspection

[0147] The management-state data model is put into production. After the management-state data model is put into production, the consistency of the management-state data model after production is compared with the data model in the production environment to obtain a comparison result.

[0148] The management state data model is processed according to the comparison results.

[0149] A data model processing method provided in an embodiment of the present invention obtains a management-state data model by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and comparing the current production script with the management-state change script. After the management-state data model is put into production, the management-state data model after production is compared for consistency with the data model in the production environment, thereby processing the management-state data model. This method can automatically, quickly, effectively, and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0150] Corresponding to the data model processing method shown in the above embodiment of the present invention, the embodiment of the present invention also provides a data model processing device, such as Figure 8 As shown, the data model processing device includes: a pre-production processing module 81 and a post-production processing module 82.

[0151] The pre-production processing module 81 includes:

[0152] The first acquisition unit is used to acquire the data model to be put into production.

[0153] The first generating unit is used to compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script.

[0154] The first comparison unit is used to compare the current production script with the change script in the management state, and if they are inconsistent, execute the second generation unit.

[0155] The second generating unit is used to modify the database table structure of the data model to be put into production this time, and obtain the data model in the management state.

[0156] The post-production processing module 82 is used to compare the consistency of the management state data model after production with the data model in the production environment to obtain a comparison result after the management state data model is put into production; and process the management state data model according to the comparison result.

[0157] It should be noted that the specific principles and execution processes of each module or unit in the data model processing device disclosed in the above embodiment of the present invention are the same as those of the data model processing method implemented in the above embodiment of the present invention. Please refer to the corresponding parts of the data model processing method disclosed in the above embodiment of the present invention, and will not be repeated here.

[0158] A data model processing device provided by an embodiment of the present invention obtains the data model to be put into production this time; compares the version of the data model to be put into production this time with the version of the data model put into production last time, and uses the generated data model change script as the change script of the management state; compares the current production script with the change script of the management state, if they are inconsistent, then modifies the database table structure of the data model to be put into production this time, and obtains the data model of the management state; after the data model of the management state is put into production, compares the consistency of the management state data model after production with the data model in the production environment, and obtains the comparison result; and processes the data model of the management state according to the comparison result. In this scheme, by comparing the version of the data model to be put into production this time with the version of the data model put into production last time, and comparing the current production script with the change script of the management state, the data model of the management state is obtained; after the data model of the management state is put into production, compares the consistency of the management state data model after production with the data model in the production environment, so as to process the data model of the management state, and can automatically, quickly, effectively, and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0159] Optional, based on the above Figure 8 The post-production processing module 82 shown further includes: a second acquisition unit and a second comparison unit.

[0160] The second acquisition unit is used to acquire the structure of the first database table in which the management state data model after production is effective in the specified application system based on a preset period after the management state data model is put into production, and the preset period includes at least one or more combinations of monthly, quarterly, semi-annual and annual; or, to acquire the structure of the first database table in which the management state data model after production is effective in the specified application system in real time; or, to acquire the structure of the first database table in which the management state data model after production has a preset effectiveness frequency in the specified application system, and the preset effectiveness frequency includes at least one effectiveness.

[0161] The second comparison unit compares the structure of the first database table with the second data table structure of the data model in the generation environment to see if they are consistent; if they are consistent, a comparison result is obtained that the first database table and the second database table structures are consistent; if they are inconsistent, a comparison result that the first database table and the second database table structures are inconsistent is obtained.

[0162] A data model processing device provided based on an embodiment of the present invention obtains a corresponding comparison result by comparing the structure of a first database table of a management-state data model that takes effect in a specified application system after commissioning with a second data table structure of a data model in a production environment, thereby providing a data basis for subsequent processing of the management-state data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0163] Optional, based on the above Figure 8 The post-production processing module 82 shown, the second comparison unit, is specifically used for:

[0164] Compare whether the fields and attributes of the first database table and the second database table are consistent, and compare whether the indexes of the first database table and the second database table and the fields and field orders of the indexes are consistent; if all are consistent, it is determined that the structures of the first database table and the second database table are consistent; if any one is inconsistent, it is determined that the structures of the first database table and the second database table are inconsistent.

[0165] A data model processing device provided in an embodiment of the present invention performs a corresponding comparison of the consistency between the first data model after production and the data model in the production environment to obtain a corresponding comparison result, thereby providing a data basis for subsequent processing of the management-state data model, and further being able to automatically, quickly, effectively, and accurately verify the consistency of the database table structure in the data model in the data architecture management system and the data model in the production environment.

[0166] Optional, based on the above Figure 8 The post-production processing module 82 shown, which processes the data model of the management state according to the comparison result, is specifically used for:

[0167] If the comparison result is inconsistent, modify the management state change script according to the comparison result; compare the modified management state change script with the current production script and management state change script. If they are inconsistent, modify the database table structure of the data model to be put into production to obtain a new management state data model.

[0168] A data model processing device is provided based on an embodiment of the present invention. According to the obtained comparison result being inconsistent, the previously obtained management state change script is modified according to the comparison result. When the modified management state change script is inconsistent with the current production script, the database table structure of the data model to be put into production is modified to obtain a new management state data model. The management state data model is processed based on the new management state data model, which can automatically, quickly, effectively and accurately verify the consistency of the database table structure between the data model in the data architecture management system and the data model in the production environment.

[0169] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0170] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0171] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data model processing method, characterized in that: The method comprises: Get the data model to be put into production; Compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script; Compare the current production script with the change script of the management state. If they are inconsistent, modify the database table structure of the data model to be put into production to obtain the data model of the management state. After the data model in the management state is put into production, the consistency of the data model in the management state after production is compared with the data model in the production environment to obtain a comparison result; Processing the data model of the management state according to the comparison result; Wherein, after the data model in the management state is put into production, the consistency of the data model in the management state after production is compared with the data model in the production environment to obtain a comparison result, including: After the data model in the management state is put into production, based on a preset period, the structure of the first database table in which the data model in the management state after production is effective in the specified application system is obtained, wherein the preset period at least includes one or more combinations of monthly, quarterly, semi-annual and annual; Comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether they are consistent; If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent; If they are inconsistent, a comparison result is obtained that the structures of the first database table and the second database table are inconsistent; or, After the management state data model is put into production, the structure of the first database table in which the management state data model after production is effective in the designated application system is obtained in real time; Comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether they are consistent; If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent; If they are inconsistent, a comparison result is obtained that the structures of the first database table and the second database table are inconsistent; or, After the management state data model is put into production, the structure of the first database table of the management state data model after production with a preset validity frequency in the specified application system is obtained, wherein the preset validity frequency includes at least one validity period; Comparing the structure of the first database table with the second data table structure of the data model in the production environment to see whether they are consistent; If they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent; If they are inconsistent, a comparison result is obtained indicating that the structures of the first database table and the second database table are inconsistent.

2. The method according to claim 1, characterized in that The comparing whether the structure of the first database table is consistent with the second data table structure of the data model in the generation environment includes: Comparing whether the fields and attributes of the first database table and the second database table are consistent, and comparing whether the indexes of the first database table and the second database table, as well as the fields and the order of the fields of the indexes, are consistent; If they are consistent, it is determined that the structures of the first database table and the second database table are consistent; If any one of them is inconsistent, it is determined that the structures of the first database table and the second database table are inconsistent.

3. The method according to claim 1, characterized in that The processing of the management state data model according to the comparison result includes: If the comparison result is inconsistent, modify the change script of the management state according to the comparison result; The modified management-state change script is compared with the current production script. If they are inconsistent, the database table structure of the data model to be put into production is modified to obtain a new management-state data model.

4. A data model processing device, characterized in that: The device comprises: a pre-production processing module and a post-production processing module; The pre-production processing module includes: The first acquisition unit is used to acquire the data model to be put into production; A first generating unit is used to compare the version of the data model to be put into production this time with the version of the data model put into production last time, and use the generated data model change script as the management state change script; A first comparison unit is used to compare the current production script with the change script of the management state, and if they are inconsistent, execute the second generation unit; The second generation unit is used to modify the database table structure of the data model to be put into production this time to obtain the data model in the management state; The post-production processing module is used to compare the consistency of the management state data model after production with the data model in the production environment after the management state data model is put into production, and obtain a comparison result; and process the management state data model according to the comparison result; Wherein, the post-production processing module includes: A second acquisition unit is used to acquire the structure of the first database table in which the data model of the management state after production is effective in the specified application system based on a preset period after the data model of the management state is put into production, wherein the preset period at least includes one or more combinations of monthly, quarterly, semi-annual and annual; or, to acquire the structure of the first database table in which the data model of the management state after production is effective in the specified application system in real time; or, to acquire the structure of the first database table in which the data model of the management state after production is effective at a preset frequency in the specified application system, wherein the preset frequency includes at least one time of effectiveness; The second comparison unit compares whether the structure of the first database table is consistent with the second data table structure of the data model in the production environment; if they are consistent, a comparison result is obtained that the structures of the first database table and the second database table are consistent; if they are inconsistent, a comparison result that the structures of the first database table and the second database table are inconsistent is obtained.

5. The device according to claim 4, characterized in that The second comparison unit is specifically used for: Comparing whether the fields and attributes of the first database table and the second database table are consistent, and comparing whether the indexes of the first database table and the second database table, as well as the fields and the order of the fields of the indexes, are consistent; If they are consistent, it is determined that the structures of the first database table and the second database table are consistent; If any one of them is inconsistent, it is determined that the structures of the first database table and the second database table are inconsistent.

6. The device according to claim 4, characterized in that The post-production processing module for processing the data model of the management state according to the comparison result is specifically used for: If the comparison result is inconsistent, modify the management state change script according to the comparison result; compare the modified management state change script with the current production script and the management state change script. If they are inconsistent, modify the database table structure of the data model to be put into production this time to obtain a new management state data model.