Data difference comparison method, device, equipment and medium
By standardizing and structuring business metadata and building a physical data model, the problem of comparing the differences between the physical data model and the actual database data is solved, and the convenience and efficiency of data governance are achieved.
Patent Information
- Application Number
- CN202211125482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-09-13
AI Technical Summary
The existing technology does not facilitate the comparison of differences between data in the physical data model and data in the actual database, which makes it difficult to carry out data governance work.
By acquiring business metadata, performing standardization processing to obtain standardized metadata, building a physical data model, and then performing structured processing on it, the difference is compared with the data in the actual database to establish the blood relationship between the business metadata and the physical data model.
It facilitates the comparison of differences between physical data models and actual database data, provides a basis for data governance, and improves the efficiency of data governance work.
Smart Images

Figure CN115543959B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data comparison technology, and in particular to a method, device, equipment and medium for comparing data differences. Background Art
[0002] A physical data model provides the foundational elements required for initial system design, as well as the relationships between these elements. It serves as a higher-level description of the storage structure and access mechanisms. It describes how data is stored in the computer, expressing information such as record structure, record order, and access paths. The physical data model enables database implementation at the system level. The physical design phase of the database requires detailed backend design based on this foundation, including database stored procedures, operations, triggers, views, and index tables. To facilitate data governance, the data in the actual database must be compared with the data in the physical data model.
[0003] However, the existing technology does not facilitate the comparison of differences between data in the physical data model and data in the actual database, and is not conducive to the development of data governance. Summary of the Invention
[0004] The main purpose of this application is to provide a data difference comparison method, device, equipment and medium, aiming to solve the technical problems in the existing technology that it is not convenient to compare the differences between data in the physical data model and the data in the actual database, and it is not convenient to carry out data governance work.
[0005] To achieve the above objectives, the present application provides a first aspect of a data difference comparison method, the method comprising:
[0006] Acquire a number of business metadata; wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data and business meaning data;
[0007] Standardizing the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0008] Based on the business form data and the standardized metadata, a physical data model is constructed; wherein the physical data model includes a plurality of entity tables, each of which includes actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0009] Structuring the data in the plurality of entity tables in the physical data model to obtain a structured physical data model;
[0010] Based on the structured physical data model, a difference comparison is performed with the data in the actual database.
[0011] Optionally, the performing standardization processing on the plurality of business metadata to obtain standardized metadata includes:
[0012] Obtaining information on identical characters with different meanings and information on synonymous characters with different meanings from the plurality of business metadata; wherein the information on identical characters with different meanings includes information that the same field has multiple meanings, and the information on synonymous characters with different meanings includes information that the same meaning corresponds to multiple fields;
[0013] The information on homonyms but different meanings and the information on synonyms but different words are processed to obtain standardized metadata.
[0014] Optionally, the processing of the information on homonyms but different meanings and the information on synonyms but different characters to obtain standardized metadata includes:
[0015] Merging the information on homonyms with different meanings and the information on synonyms with different characters to obtain homonymous and synonymous information; wherein the information on homonyms with different meanings includes that the same field corresponds to a unique meaning, and the same meaning corresponds to a unique field;
[0016] Based on the information about synonyms and synonyms, standardized metadata is obtained.
[0017] Optionally, performing a difference comparison between the structured physical data model and the data in the actual database includes:
[0018] Obtaining a difference entity table; the difference entity table includes an entity table that exists in the structured physical data model but does not exist in the actual database; or an entity table that exists in the actual database but does not exist in the structured physical data model;
[0019] Obtain differential business metadata; wherein the differential business metadata includes entity tables existing in both the structured physical data model and the actual database, and data having different business metadata in the entity tables.
[0020] Optionally, after the step of obtaining differential business metadata, the method further includes:
[0021] Obtaining a difference report based on the difference entity table and the difference business metadata;
[0022] The structured physical data model is optimized based on the difference report.
[0023] Optionally, constructing a physical data model based on the standardized metadata and business form data includes:
[0024] Build a physical data model framework;
[0025] Establishing a mapping relationship between the data in the standardized metadata and the corresponding data in the business form data; wherein the business form data includes actual Chinese name data, actual English name data, actual data type data, actual data length data, and actual data decimal point data;
[0026] The data in the standardized metadata and the data in the business form having a mapping relationship are both transferred to the physical data model framework to construct a physical data model.
[0027] Optionally, the acquiring of several business metadata includes:
[0028] Obtain the business coverage of the target object;
[0029] Based on the service coverage of the target object, a plurality of service blocks are obtained;
[0030] Based on the plurality of business blocks, a plurality of business metadata are obtained.
[0031] In a second aspect, the present application provides a data difference comparison device, the device comprising:
[0032] An acquisition module, configured to acquire a number of business metadata, wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data, and business meaning data;
[0033] A first obtaining module is configured to perform standardization processing on the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0034] A construction module is used to construct a physical data model based on the business form data and the standardized metadata; wherein the physical data model includes a plurality of entity tables, each of which includes actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0035] A second obtaining module is configured to perform structural processing on the data in the plurality of entity tables in the physical data model to obtain a structured physical data model;
[0036] The comparison module is used to compare the structured physical data model with the data in the actual database.
[0037] In a third aspect, the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the embodiment.
[0038] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the method described in the embodiment.
[0039] Through the above technical solution, this application has at least the following beneficial effects:
[0040] The data difference comparison method, device, equipment and medium proposed in the embodiments of the present application first obtain a number of business metadata; wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data and business meaning data; then the several business metadata are standardized to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data and standard data decimal point data; then based on the business form data and the standardized metadata, a physical data model is constructed; wherein the physical data model includes a number of entity tables, and the entity tables include actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data and standard data decimal point data; then the data in the several entity tables in the physical data model are structured to obtain a structured physical data model; finally, based on the structured physical data model, a difference comparison is performed with the data in the actual database. Specifically, the technical solution of this application establishes a reference relationship between the business metadata and the physical data model because the business metadata is standardized and the physical data model references the standardized metadata. This establishes a kinship between the business metadata and the physical data model. Furthermore, because the physical data model incorporates actual business form data, the structured data model, after structuring, is more easily compared with data in the actual database. This provides a basis for data model governance and further facilitates data governance efforts. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the computer device structure of the hardware operating environment involved in the embodiments of the present application;
[0042] Figure 2 This is a flow chart of a data difference comparison method according to an embodiment of the present application;
[0043] Figure 3 This is a flowchart of a specific execution method of step S11 in the embodiment of the present application;
[0044] Figure 4 This is a flow chart of comparing results using data differences in an embodiment of the present application;
[0045] Figure 5 Schematic diagram of a data difference comparison device according to an embodiment of the present application.
[0046] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0048] A physical data model provides the foundational elements required for initial system design, as well as the relationships between these elements. This higher-level description serves as a framework for storage structure and access mechanisms. It describes how data is stored in a computer, expressing information such as record structure, record order, and access paths. Using a physical data model allows for database implementation at the system level. The physical design phase of a database requires detailed backend design, including stored procedures, operations, triggers, views, and index tables. Traditionally, due to tight development timelines, physical model design for applications often begins before metadata is registered. This prevents the establishment of a relationship between metadata and the data model. Furthermore, a standardized metadata definition precedes data storage and is then implemented before data model design. This approach results in low development efficiency, particularly for applications with immature business models and rapidly evolving requirements. This standardized approach cannot rapidly respond to system development. Furthermore, for applications launched before metadata lexicons are established, metadata is not systematically identified and managed, and the metadata standards used for data models across various systems are inconsistent, leading to widespread metadata ambiguity. To address these three issues, traditional data model design and representation methods often fail to meet the enterprise's vision of data model design and management based on a unified metadata vocabulary. Consequently, they fail to establish a kinship between enterprise metadata and data models, and they also hinder consistency comparisons between physical data models and databases. In summary, the current inability to compare data in physical data models with data in actual databases hinders data governance efforts.
[0049] In order to solve the above technical problems, the present application provides a data difference comparison method, device, equipment and medium. Before introducing the specific technical solution of the present application, the hardware operating environment involved in the embodiment of the present application is first introduced.
[0050] Reference Figure 1 , Figure 1 This is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application.
[0051] like Figure 1As shown, the computer device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0052] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0053] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and an electronic program.
[0054] exist Figure 1 In the computer device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the computer device of the present invention can be set in the computer device, and the computer device calls the data difference comparison device stored in the memory 1005 through the processor 1001, and executes the data difference comparison method provided in the embodiment of the present application.
[0055] Reference Figure 2 Based on the hardware environment of the aforementioned embodiment, an embodiment of the present application provides a data difference comparison method, which includes:
[0056] S10: Acquire some business metadata; wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data and business meaning data.
[0057] In the specific implementation process, business metadata refers to the data in the business block, including Chinese naming data, English naming data, data type selection data, data length data, and business meaning data. In other words, it includes Chinese naming fields, English naming fields, data type selection fields, data length fields, and business meaning fields, which can be obtained through conventional methods. Specifically, the following steps are used to obtain some business metadata:
[0058] First, the service coverage of the target object is obtained, and then a number of service blocks are obtained based on the service coverage of the target object; and then a number of service metadata are obtained based on the number of service blocks.
[0059] In practice, the target enterprise can be the enterprise being researched. Specifically, the enterprise's business scope is systematically analyzed to identify its business segments. Then, for each segment, business metadata is organized and standardized, including Chinese and English naming, data type selection, data length settings, and business meaning descriptions. This allows for clearer and more organized business metadata for each segment.
[0060] S11: Standardizing the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data.
[0061] In the specific implementation process, in order to make the comparison of business metadata have a unified standard, it is necessary to standardize the business metadata. Figure 3 As shown, the business metadata is standardized through the following steps.
[0062] S111: Obtain information on same-word but different meanings and information on synonymous but different words in the plurality of business metadata; wherein the information on same-word but different meanings includes information that the same field has several meanings, and the information on synonymous but different words includes information that the same meaning corresponds to several fields.
[0063] S112: Processing the information about homonyms but different meanings and the information about synonyms but different words to obtain standardized metadata.
[0064] During implementation, the information on identical characters with different meanings and the information on synonyms with different characters are first merged to obtain identical characters with synonyms. This information includes information where the same field corresponds to a unique meaning, and the same meaning corresponds to a unique field. Standardized metadata is then obtained based on this information. More specifically, the sorted business metadata is merged to eliminate ambiguity in the metadata, such as identical characters with different meanings and synonyms with different characters, and to determine the business to which each piece of business metadata belongs. This lays the foundation for establishing a correct relationship between metadata and the data model.
[0065] S12: Construct a physical data model based on the business form data and the standardized metadata; wherein the physical data model includes several entity tables, and the entity tables include actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data and standard data decimal point data.
[0066] In the specific implementation process, business form data refers to the data in the business form formed in the actual business. Specifically, the business form data includes actual Chinese name data, actual English name data, actual data type data, actual data length data and actual data decimal point data. The business form data can be obtained through conventional methods.
[0067] More specifically, the physical data model is designed based on the standardized metadata after sorting out the business forms and processes. The headers of each entity table in the physical data model are the Chinese representation name, actual English name, actual data type, actual data length, actual data decimal point, standardized Chinese name, standard English name, standard data type, standard data length, and standard data decimal point. Among them, the Chinese representation name is used to generate field notes. When using this model for physical data model design, the business fields contained in each entity in the physical data model must reference the standardized business metadata (standard Chinese name, standard English name, standard data type, standard data length, and standard data decimal point) and also fill in the actual metadata information (Chinese representation name, actual English name, actual data type, actual data length, and actual data decimal point) based on the actual physical library table.
[0068] S13: Structuring the data in the plurality of entity tables in the physical data model to obtain a structured physical data model.
[0069] During implementation, the physical data model is designed by referencing standardized business metadata, establishing a reference relationship between the business metadata and the physical data model. This relationship is known as data lineage. The benefit of this design pattern is that the business metadata contained within each entity in the physical data model implements standardized metadata (standard Chinese name, standard English name, standard data type, standard data length, and standard data decimal point), thereby establishing a lineage relationship between the business metadata and the data model, providing a basis for statistically analyzing the distribution of business metadata within the data model. Furthermore, actual metadata information (Chinese name, actual English name, actual data type, actual data length, and actual data decimal point) is introduced. The data of each entity in the physical data model is structured within the system, the results of the processing are stored, and metadata information for the database tables corresponding to the physical data model is extracted. This structured physical model data can then be used for consistency verification with the actual database tables, providing a basis for data model governance.
[0070] S14: Based on the structured physical data model, a difference comparison is performed with the data in the actual database.
[0071] During the specific implementation process, a data processing script is compiled to perform a difference comparison between the metadata information of each entity in the structured physical data model and the metadata information of the actual database table. Specifically, the comparison is mainly carried out from the following two aspects: First, obtaining a difference entity table; the difference entity table includes an entity table that exists in the structured physical data model but does not exist in the actual database; or an entity table that exists in the actual database but does not exist in the structured physical data model. Second, obtaining difference business metadata; wherein, the difference business metadata includes entity tables that exist in both the structured physical data model and the actual database, and the business metadata in the entity tables are different.
[0072] More specifically, the difference comparison first compares the physical names of entities in the structured physical data model with the physical names of the actual database tables. This identifies entities that exist in the structured physical data model but not in the database, as well as entities that exist in the database but not in the structured physical data model. Secondly, the English names of entities that exist in both the structured physical data model and the actual database are compared to identify differences between the two, namely, metadata that exists in the structured physical data model but not in the database tables, and metadata that exists in the database tables but not in the structured physical data model. The comparison scope between the physical data model and the actual database tables can be flexibly configured. This includes comparing the existence of entity tables in the physical data model with the actual database tables, as well as comparing the consistency of field physical names, data types, data lengths, and decimal points between the entity tables in the physical data model and the database tables. This approach makes it easier to identify differences between data in the structured physical data model and the actual database, thereby facilitating data governance.
[0073] In summary, the physical data model of the technical solution of the present application not only introduces the concept of standard metadata, but also refers to the user-defined metadata when designing the actual database table. In this way, the lineage between metadata and data model can be established, and the physical data model can be guaranteed to be consistent with the actual database table. At the same time, since standardized metadata is obtained after the business metadata is standardized, and the physical data model references the standardized metadata, a reference relationship between the business metadata and the physical data model is established, that is, the business metadata and the physical data model have a lineage relationship. And since actual business form data is introduced into the physical data model, the structured data model after structured processing is more convenient for comparison with the data in the actual database, thereby providing a basis for the governance of the data model, and thus making it easier to carry out data governance work.
[0074] In some embodiments, as Figure 4 As shown, after the step of obtaining the differential business metadata, the method further includes:
[0075] S20: Obtain a difference report based on the difference entity table and the difference business metadata.
[0076] In practice, a difference report reports the differences between the data in the structured physical data model and the actual database. These differences primarily include difference entity tables and difference business metadata. Difference entity tables refer to the differences between entity tables, while difference business metadata refers to the differences between business metadata within entity tables. This provides a more specific and detailed understanding of the differences between data in the structured physical data model and the actual database, making it easier to identify the differences between data in the structured physical data model and the actual database based on specific needs.
[0077] S21: Optimizing the structured physical data model based on the difference report.
[0078] During implementation, ambiguity exists between the English names of entities in the structured physical data model and the English names of actual database tables. In other words, when performing the aforementioned difference comparison, it's possible that the entity in the structured physical data model and the database table are the same object, but due to inconsistencies between the English names of the entities in the structured physical data model and the database table, misreporting may occur. Therefore, when designing the structured physical data model, the actual database table physical name is added to the original Chinese name and physical name of the entity to avoid misreporting due to ambiguity. This optimization of the structured physical data model based on the difference entity tables and difference business metadata in the difference report provides a reference for data model governance.
[0079] In a specific implementation process, the step of constructing a physical data model based on the standardized metadata and business form data includes:
[0080] First, a physical data model framework is constructed; then a mapping relationship is established between the data in the standardized metadata and the corresponding data in the business form data; wherein the business form data includes actual Chinese name data, actual English name data, actual data type data, actual data length data and actual data decimal point data; finally, the data in the standardized metadata and the data in the business form with a mapping relationship are transferred to the physical data model framework to construct a physical data model.
[0081] In this embodiment, the physical data model framework can be built by conventional means, and then a mapping relationship is established between the standard Chinese name data, standard English name data, standard data type data, standard data length data and standard data decimal point data in the standardized metadata and the actual Chinese name data, actual English name data, actual data type data, actual data length data and actual data decimal point data in the business form data. That is, the mapping relationship between the standard Chinese name data and the actual Chinese name data, between the standard English name data and the actual English name data, between the standard data type data and the actual data type data, between the standard data length data and the actual data length data, and between the standard data decimal point data and the actual data decimal point data. By establishing the mapping relationship between these data, it can be more convenient to compare with the consistency of later data.
[0082] In another embodiment, if Figure 5 As shown, based on the same inventive concept as the above embodiment, the embodiment of the present application further provides a data difference comparison device, which includes:
[0083] An acquisition module, configured to acquire a number of business metadata, wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data, and business meaning data;
[0084] A first obtaining module is configured to perform standardization processing on the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0085] A construction module is used to construct a physical data model based on the business form data and the standardized metadata; wherein the physical data model includes a plurality of entity tables, each of which includes actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data;
[0086] A second obtaining module is configured to perform structural processing on the data in the plurality of entity tables in the physical data model to obtain a structured physical data model;
[0087] The comparison module is used to compare the structured physical data model with the data in the actual database.
[0088] It should be noted that each module in the data difference comparison device in this embodiment corresponds one-to-one to each step in the data difference comparison method in the aforementioned embodiment. Therefore, the specific implementation method and technical effects achieved in this embodiment can refer to the implementation method of the aforementioned data difference comparison method, and will not be repeated here.
[0089] In addition, in one embodiment, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the method in the aforementioned embodiment when executed by the processor.
[0090] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method in the aforementioned embodiment is implemented.
[0091] In some embodiments, the computer-readable storage medium may be a memory device such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface mount memory, optical disk, or CD-ROM; or various devices including any one or any combination of the above memories. The computer may be various computing devices including smart terminals and servers.
[0092] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0093] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0094] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0095] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0096] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0097] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0098] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data difference comparison method, characterized in that: The method comprises: Acquire a number of business metadata; wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data and business meaning data; Standardizing the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data; Based on the business form data and the standardized metadata, a physical data model is constructed; wherein the physical data model includes a plurality of entity tables, each of which includes actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data; Structuring the data in the plurality of entity tables in the physical data model to obtain a structured physical data model; Based on the structured physical data model, a difference comparison is performed with the data in the actual database.
2. The data difference comparison method according to claim 1, characterized in that: The standardizing of the plurality of business metadata to obtain standardized metadata includes: Obtaining information on identical characters with different meanings and information on synonymous characters with different meanings from the plurality of business metadata; wherein the information on identical characters with different meanings includes information that the same field has multiple meanings, and the information on synonymous characters with different meanings includes information that the same meaning corresponds to multiple fields; The information on homonyms but different meanings and the information on synonyms but different words are processed to obtain standardized metadata.
3. The data difference comparison method according to claim 2, characterized in that: The processing of the information on homonyms but different meanings and the information on synonyms but different characters to obtain standardized metadata includes: Merging the information on homonyms with different meanings and the information on synonyms with different characters to obtain homonymous and synonymous information; wherein the information on homonyms with different meanings includes that the same field corresponds to a unique meaning, and the same meaning corresponds to a unique field; Based on the information about synonyms and synonyms, standardized metadata is obtained.
4. The data difference comparison method according to claim 1, wherein: The difference comparison between the data in the actual database and the structured physical data model includes: Obtaining a difference entity table; the difference entity table includes an entity table that exists in the structured physical data model but does not exist in the actual database; or an entity table that exists in the actual database but does not exist in the structured physical data model; Obtain differential business metadata; wherein the differential business metadata includes entity tables existing in both the structured physical data model and the actual database, and data having different business metadata in the entity tables.
5. The data difference comparison method according to claim 4, characterized in that: After the step of obtaining the differential business metadata, the method further includes: Obtaining a difference report based on the difference entity table and the difference business metadata; The structured physical data model is optimized based on the difference report.
6. The data difference comparison method according to claim 1, wherein: The step of constructing a physical data model based on the standardized metadata and business form data includes: Build a physical data model framework; Establishing a mapping relationship between the data in the standardized metadata and the corresponding data in the business form data; wherein the business form data includes actual Chinese name data, actual English name data, actual data type data, actual data length data, and actual data decimal point data; The data in the standardized metadata and the data in the business form having a mapping relationship are both transferred to the physical data model framework to construct a physical data model.
7. The data difference comparison method according to claim 1, wherein: The obtaining of several business metadata includes: Obtain the business coverage of the target object; Based on the service coverage of the target object, a plurality of service blocks are obtained; Based on the several business blocks, several business metadata are obtained.
8. A data difference comparison device, characterized in that: The device comprises: An acquisition module, configured to acquire a number of business metadata, wherein the business metadata includes Chinese naming data, English naming data, data type selection data, data length data, and business meaning data; A first obtaining module is configured to perform standardization processing on the plurality of business metadata to obtain standardized metadata; wherein the standardized metadata includes standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data; A construction module is used to construct a physical data model based on the business form data and the standardized metadata; wherein the physical data model includes a plurality of entity tables, each of which includes actual Chinese name data, actual English name data, actual data type data, actual data length data, actual data decimal point data, standard Chinese name data, standard English name data, standard data type data, standard data length data, and standard data decimal point data; A second obtaining module is configured to perform structural processing on the data in the plurality of entity tables in the physical data model to obtain a structured physical data model; The comparison module is used to compare the structured physical data model with the data in the actual database.
9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data model management and control method and device and server
CN109656912A
Construction method and device of metadata model, computer equipment and storage medium
CN109684486A