A method, device and electronic device for checking data definition consistency

By establishing a data baseline table and a table field relationship mapping table, query scripts are dynamically generated to automatically check and process data differences, solving the problem of inconsistent data definitions across systems, improving inspection efficiency and accuracy, and reducing labor costs.

CN112395850BActive Publication Date: 2024-11-12CHINA LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011225616.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-05
Publication Date
2024-11-12
Estimated Expiration
2040-11-05

AI Technical Summary

Technical Problem

In existing technologies, checking for data definition inconsistencies across different business systems is inefficient, slow in response, and has a high error rate. It is also costly to process manually and cannot meet business needs.

Method used

Establish a data baseline table, perform automatic comparison through a table field relationship mapping table, dynamically generate query scripts, and use automated check keys to perform data difference analysis and complete or delete operations to achieve cross-system data consistency management.

Benefits of technology

It improves the response speed and accuracy of data definition consistency checks, reduces manual processing costs, realizes automated data consistency checks, and reduces human processing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395850B_ABST
    Figure CN112395850B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a method, device and electronic device for checking the consistency of data definitions; the method includes: establishing a data reference table, and manually searching the data definition tables belonging to different business systems according to the definitions therein; establishing a table-field relationship mapping table according to the field contents contained therein and the corresponding relationship between the field contents; and dynamically generating query statements from the established table-field relationship mapping table; using the data reference table as a comparison standard and the dynamically generated query statements, automatic comparisons can be performed between the data definition tables of various business systems, and the differences between the data reference tables can be obtained, thereby replacing the existing solutions of human brain analysis and manual processing; establishing an automatic check button at the foreground to start the above steps, and establishing a complete data button to execute the addition of data definitions, thereby improving the speed of responding to problems and effectively avoiding the error rate caused by manual processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the technical field of data table structure definition, and more particularly, to a method, device, and electronic device for checking data definition consistency. Background Art

[0002] With the continuous expansion of insurance, banking, medical and other industries, each business system is responsible for storing more and more information. In each company, there are also a wide variety of different business systems, such as regulatory systems, financial and human resources systems, decision-making and statistical systems, etc. Most of them involve some basic information definition tables. However, each business system is managed by different departments and personnel, so it is easy for the content of the data to be inconsistent with the corresponding defined table structure, resulting in difficulties and errors in data collation and troubleshooting. However, the existing solution is to conduct offline single data table analysis when inconsistent data definitions are found, and all of them are human brain analysis and manual processing, which makes it difficult to meet the needs of real business in terms of data response efficiency and accuracy.

[0003] Based on this, in real business systems, when data definitions are inconsistent, a technical solution is needed that can effectively improve efficiency and accuracy. Summary of the invention

[0004] In view of this, the purpose of one or more embodiments of the present specification is to propose a method, device and electronic device for checking data definition consistency to solve the problems of slow response speed, low change efficiency and high error rate caused by inconsistent business data definitions between manual processing systems.

[0005] Based on the above purpose, one or more embodiments of this specification provide a method for checking data definition consistency, including:

[0006] First, a data reference table is established, and according to the content of the established reference table, the data definition tables that need to be compared in different business systems are searched; according to the specific meanings of the fields in the content of each data definition table, a table-field relationship mapping table is established for the fields with the same meaning; then the established relationship mapping table is used to dynamically generate query script statements; the dynamically generated query script statements will use the initially established data reference table as a standard to automatically compare the data definition tables of each system and obtain the differences between the data definitions of different business systems; finally, two operation buttons are established at the foreground of the program operation, one is an automatic check button to start automatic comparison, and the other is a button to complete and delete the corresponding data.

[0007] Based on the same inventive concept, one or more embodiments of this specification further provide a device for checking consistency of data definitions, including:

[0008] A mapping module is configured to execute an associated script according to a pre-established field relationship mapping table after receiving a request for a data definition consistency check for a data definition table of any business system; wherein the field relationship mapping table records a mapping relationship between field names of fields with the same meaning in a pre-established data reference table and a data definition table of each business system; the data reference table includes: at least one field and its corresponding meaning;

[0009] A comparison module executes the association script to dynamically generate a query statement, wherein the query statement specifically performs a comparison between each of the data definition tables and the data reference table to obtain data differences between the data reference table and the data definition table;

[0010] The start and execution module is configured to start the associated script through an automatic check button established in the foreground; and based on the data differences compared by the query statement, use the insert or delete statement in the data definition table to add or delete corresponding data records.

[0011] Based on the same inventive concept, one or more embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the methods described above is implemented.

[0012] Based on the same inventive concept, one or more embodiments of the present specification further provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for checking data definition consistency as described above.

[0013] From the above, it can be seen that a method, device and electronic device for checking data definition consistency provided by one or more embodiments of the present specification are based on the execution of table fields and mapping scripts in the database, and comprehensively consider the difficulties in data management and integration between multiple systems, as well as the high cost of manual processing of business data in the prior art. The data definition consistency solution proposed by the inventor realizes automated verification of data consistency and replaces the manual processing solution, thereby effectively reducing the error rate of human brain analysis and processing of inconsistent data, and while reducing labor costs, the response speed to changing inconsistent data is also greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate one or more embodiments of the present specification 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 one or more embodiments of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 A schematic diagram of a method for checking data definition consistency for one or more embodiments of the present specification;

[0016] Figure 2 A schematic diagram of an apparatus for checking consistency of data definitions for one or more embodiments of the present specification;

[0017] Figure 3 A schematic diagram of the structure of an electronic device according to one or more embodiments of the present specification. DETAILED DESCRIPTION

[0018] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0019] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of this specification should be understood by people with ordinary skills in the field to which the present disclosure belongs. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0020] As described in the background technology section, the existing methods for checking data consistency across different business systems are still difficult to meet business needs. In the process of implementing the present disclosure, the applicant found that the main problem with the existing solutions for checking data consistency between various systems is that when manual screening leads to inconsistent data definitions, the response speed is slow, affecting business progress, and compared with the use of machines, the solution of manually checking data definitions and correcting them is not only prone to errors, but also requires professional technicians to perform, involving high labor costs and communication costs between various business systems.

[0021] In view of this, for the existing manual inspection scheme, one or more embodiments of the present specification provide a method for checking data consistency, automatically checking data definitions, and making additions and deletions. Specifically, first, a data reference table is established manually, and the data definition tables that need to be compared between various systems are manually searched; a table-field relationship mapping table is established for the fields with the same meaning in the manually found data definition tables; after the query statement is set, the table-field relationship mapping table can dynamically generate a query script; then, based on the reference table manually established in the above steps, the dynamically generated query script is used to automatically compare the data definition tables in each system to obtain the differences in data definitions; finally, an automatic check button is established in the foreground to execute the above-mentioned steps of comparing differences, and a data completion button is established to add and delete data content for data with differences.

[0022] The technical solutions of one or more embodiments of this specification are described in detail below through specific examples.

[0023] refer to Figure 1 , a method for checking data definition consistency according to an embodiment of the present specification includes the following steps:

[0024] Step S101: after receiving a request for a data definition consistency check on a data definition table of any business system, executing an associated script according to a pre-established field relationship mapping table.

[0025] In this step, a data reference table is first established, which includes fields in all data tables that need to be compared in the following steps, for example, including: ID, ProductName, Type, etc. Each field has a corresponding actual meaning in a specific system, for example, the field ID represents the customer code, the field ProductName represents the product name code, and the field Type represents the product type code.

[0026] Then, find the data definition table of each system from the database, wherein the data definition table includes the corresponding fields of the data used in the system, and each field represents the corresponding actual meaning. For example, in system B, the fields in its data definition table include: IdentityNO, ProductName, Type and other fields, wherein field IdentityNO represents the customer code, field PN represents the product name code, and field Type represents the product name code; in system C, its data definition table includes: NUM, ProductName, Type and other fields, wherein field NUM represents the customer code, field ProductName represents the product name code, and field Type represents the product name code.

[0027] In this embodiment, there is no specific limitation on the establishment method of the data reference table, and in one implementation, it can be completed manually. In addition, the data reference table and the data definition table are both in the form of table fields, and there is no specific limitation on the number of fields included in the data reference table and the data definition table, which can be four or an unlimited number.

[0028] Furthermore, for the fields with the same meaning in each of the data definition tables, a table field relationship mapping table is established according to the corresponding relationship between their meanings.

[0029] The data definition tables found in each business system are analyzed in order to find out the fields with the same meaning among the business systems. In the process, the design documents or code dictionary tables and other files that record the actual meaning of the fields can be used for analysis. For example, in the data definition table B of the B system, IdentityNO represents the customer code, and the ID in the data reference table also represents the customer code. Then IdentityNO and ID are fields with the same meaning. Similarly, in the data definition table C of the C system, NUM represents the customer code, so NUM, IdentityNO and ID are fields with the same meaning.

[0030] In this embodiment, the file recording the actual meaning of the field is not specifically limited, and may be a paper document dictionary, or an electronic file with or without a program writing function.

[0031] Then, according to the correspondence between fields with the same meaning, a table field relationship mapping table with mutual association is established for the fields in the data reference table and the data definition table in the database, wherein the association between the fields is expressed by a right association statement. The relationship mapping table is expressed by a field map, and its form is shown in Table 1:

[0032] Table 1, relationship mapping table of table fields in method embodiment

[0033] Table name 1 Table Field 1 Relevance Table name 2 Table Field 2 A ID right join B IdentityNO A ID right join C NUM

[0034] Among them, table name 1 is the data reference table, which is table A in this embodiment. Table name 2 is the data definition table in each business system, which is table B and table C in this embodiment. The table field ID contained in the data reference table is table field 1, and table field 2 is a field in table B and table C that has the same meaning as the ID of table field 1. From the previous step, it can be seen that ID, IdentityNO, and NUM are fields with the same meaning; the fields with the same meaning are associated by the right join statement.

[0035] In this embodiment, there is no specific limitation on the database used, which may be an SQL database or an Oracle database, etc.; and there is no specific limitation on the operation and connection method of the database, which may be remotely operated by an electronic device connected to the database, or directly operated by an electronic device that hosts the database itself.

[0036] As an optional embodiment, the association script is formed according to the relationship mapping table. First, according to the relationship mapping table, Table 1, the following script is executed in the electronic device connected to the database:

[0037] Select * from map. Table name 1 associated with table name 2 on table name 1. Table field 1 = table name 2. Table field 2

[0038] Step S102, executing the association script to dynamically generate a query statement, which will specifically perform a comparison between each of the data definition tables and the data reference table to obtain the data difference between the data reference table and the data definition table.

[0039] The query statement of the table field relationship is generated by the association script, and its generation process should be automatic, that is, dynamic.

[0040] In this step, the relationship mapping table of the table fields in Table 1 is taken as an example. During the database query process, the program will automatically generate the following relationship query statement based on the above script:

[0041] Select*from map.A right join B on A.ID=B.IdentityNO

[0042] That is, through the Select statement, A representing the data base table is selected from the map representing the relationship mapping table, and associated with B on the right representing the data definition table in the business system. The associated fields are ID representing the customer code in the data base table A, and IdentityNO representing the customer code in the data definition table.

[0043] The established data reference table is used as a standard, and the query script statement is used to compare with the data definition table of each system, and all other business system data definition tables that need to be compared are listed, compared, and the differences are obtained. For example, the table name and fields of Table C will be automatically listed in sequence and automatically generated, that is, the relationship query statement is dynamically generated:

[0044] Select*from map.A right join C on A.ID=C.NUM

[0045] Specifically, the program will execute: use the data in field NUM in data table C to compare one by one with the data in field ID in data table A, and check whether the specific data of field NUM, such as 01, 02, 03, is already available in field ID; at the same time, check whether the data under field NUM is repeated with the data under field ID, that is, whether they have the same data.

[0046] As an optional embodiment, refer to Figure 1 , the method steps in the above embodiment further include:

[0047] Step S103, establishing an automatic check button in the foreground to start the associated script; and based on the data differences compared by the query statement, using the insert or delete statement in the data definition table to add or delete corresponding data records.

[0048] The automatic check button uses a Command statement to start the comparison; and a data completion button is established in the foreground to execute the addition of the corresponding data.

[0049] In this embodiment, for example, if there is data in the IdentityNO field in the data definition table B, but there is no data in the ID field in the data reference table A, then the Insert statement is used to add the data in the IdentityNO field in the data definition table B to the ID field in the data reference table A:

[0050] Select B.on B.name from map.A right join B on A.ID=B.IdentityNO

[0051] Insert into A

[0052] Or, for example: the data in the NO field in the sales system has the same duplicate data in the ID field in the data base table A, then use the Delete statement to delete the duplicate data in the ID field in the data base table A; after deleting the duplicate data in the ID field, the data base table A has the conditions for executing the above-mentioned Insert statement, and then automatically circles to the Insert statement; that is, when compared with the IndentityNO field in the data definition table B, the data in the ID field in the data base table A is missing, and the above-mentioned Insert statement is automatically executed, as the program script is completed, and the comparison operation on the field will no longer continue.

[0053] It can be seen that the method for checking data definition consistency in one or more embodiments of the present specification is based on the application of the database and the execution of the mapping script, and comprehensively considers the difficulties in data management and integration between multiple systems, as well as the high cost of manual processing of business data in the prior art. The data definition consistency solution proposed by the inventor realizes automated verification of data consistency, and proposes a reasonable solution to integrate the difference data, replacing the manual processing solution. Therefore, it effectively reduces the error rate of human brain analysis and processing of inconsistent data, and while reducing labor costs, the response speed to changing inconsistent data is also greatly improved, achieving a once-and-for-all effect.

[0054] It should be noted that the method of one or more embodiments of this specification can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the described method.

[0055] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0056] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, one or more embodiments of this specification further provide a device for checking the consistency of data definitions.

[0057] refer to Figure 2, combined with the specific example of the sales system and the compensation system in the insurance industry, the device for checking data consistency includes:

[0058] The mapping module S201 is configured to execute the associated script according to a pre-established field relationship mapping table after receiving a request for a data definition consistency check for a data definition table of any business system; wherein the field relationship mapping table records the mapping relationship between the field names of the fields with the same meaning in the pre-established data reference table and the data definition table of each business system; the data reference table includes: at least one field and its corresponding meaning;

[0059] The comparison module S202 is configured to execute the association script to dynamically generate a query statement, wherein the query statement specifically performs a comparison between each of the data definition tables and the data reference table to obtain data differences between the data reference table and the data definition table;

[0060] The start and execution module S203 is configured to start the associated script through an automatic check button established in the foreground; and based on the data differences compared by the query statement, use the insert or delete statement in the data definition table to add or delete corresponding data records.

[0061] As an optional embodiment, the mapping module S201 is specifically configured as an electronic device connected to a database and capable of establishing a data reference table, which may be a computer device. The data reference table includes fields in all data tables that need to be compared in the following steps, for example, including: ID, ProductName, BCode, HCode, etc. Each field has a corresponding actual meaning in a specific system: field ID represents the customer code, field ProductName represents the product name code, field BCode represents the payment bank code, field Hcode represents the medical unit code, etc.; and the data reference table is set to A.

[0062] Then, find out the data definition tables in the sales system and the compensation system from the database, wherein the data definition tables include the corresponding fields of the data used in the system, and each field represents the corresponding actual meaning. For example, in the sales system, the fields in its data definition table include: IdentityNO, PN, BCode, etc., wherein the field IdentityNO represents the customer code, the field PN represents the product name code, and the field BCode represents the payment bank code; in the compensation system, the data definition table includes: NUM, ProductName, HCode, etc., wherein the field NUM represents the customer code, the field ProductName represents the product name code, and the field HCode represents the medical unit code; and set the data definition table of the sales system to B, and set the data definition table of the compensation system to C.

[0063] In this embodiment, the data base table and the data definition table are both in the form of table fields. There is no specific limitation on the number of fields included in the data base table and the data definition table, which can be four or an infinite list. There is no specific limitation on the specific fields included in the data base table, which can be ID, ProductName, BCode, Hcode, and Type, Price, etc. can also be added according to specific needs.

[0064] As an optional embodiment, for the fields with the same meaning in the data definition tables of the sales system and the compensation system, a relationship mapping table of the table fields is established according to the corresponding relationship of their meanings.

[0065] First, based on the previous module, the data definition tables found in the two business systems are manually analyzed, with the aim of analyzing the fields with the same meaning between the various business systems. In the process, the design documents or code dictionary tables that record the actual meaning of the fields can be used for analysis. For example, after looking through the data code dictionary of the insurance company, it is found that in the data definition table B of the insurance company's sales system, the field IdentityNO represents the customer code and the field PN represents the product name code, while the field ID in the manually established data reference table A represents the customer code and the field ProductName represents the product name code, so IdentityNO and ID are fields with the same meaning, and PN and ProductName are fields with the same meaning; similarly, after looking through the data code dictionary of the insurance company, it is found that in the data definition table C of the insurance company's compensation system, the field NUM represents the customer code and the field ProductName represents the product name code, so NUM and ID in A are fields with the same meaning, and ProducName in C and ProductName in A are fields with the same meaning.

[0066] In this embodiment, the file recording the actual meaning of the field is not specifically limited, and may be a paper document dictionary, or an electronic file with or without a program writing function.

[0067] Then, according to the correspondence between fields with the same meaning, a table field relationship mapping table with mutual association is established for the fields in the data reference table A and the data definition tables B and C in the SQL database, wherein the association between the fields is expressed by a right association statement. A table field relationship mapping table is established. The relationship mapping table is expressed by a field map, and its form is shown in Table 2:

[0068] Table 2, relationship mapping table of table fields in the device embodiment

[0069] Table name 1 Table Field 1 Relevance Table name 2 Table Field 2 A ID right join B IdentityNO A ID right join C NUM A ProductName right join B PN A ProductName right join C ProductName A BCode right join B BCode A Hcode right join C HCode

[0070] In this embodiment, table name 1 in Table 2 is Table A, table name 2 is data definition tables in two business systems, which are Table B and Table C in this embodiment. The table field ID, ProducName, BCode and HCode contained in the data reference table are table field 1, and table field 2 is a field in Table B and Table C that has the same meaning as the ID of table field 1. From the previous step, it can be seen that the ID in table field 1 and IdentityNO and NUM in table field 2 are fields with the same meaning; the ProducName in table field 1 and the PN and ProductName in table field 2 are fields with the same meaning; the BCode in table field 1 and the BCode in table field 2 are fields with the same meaning; the HCode in table field 1 and the HCode in table field 2 are fields with the same meaning; the fields with the same meaning are all associated by the statement right join.

[0071] In this embodiment, there is no specific limitation on the database used, which may be an SQL database or an Oracle database, etc.; and there is no specific limitation on the operation and connection method of the database, which may be remotely operated by an electronic device connected to the database, or directly operated by an electronic device that hosts the database itself.

[0072] Further, in the SQL database environment, the association script is executed according to the relationship mapping table in the previous module. The specific script is as follows:

[0073] Select * from map. Table name 1 associated with table name 2 on table name 1. Table field 1 = table name 2. Table field 2;

[0074] As an optional embodiment, the comparison module S202 is specifically configured to generate the query statement from the association script, and the generation process should be automatic generation, that is, dynamic generation. During the query process of the database, the program will automatically generate the following relationship query statement based on the above script:

[0075] Select*from map.A right join B on A.ID=B.IdentityNO

[0076] That is, through the Select statement, A representing the data base table is selected from the map representing the relationship mapping table, and associated with B on the right representing the data definition table in the sales system. The associated fields are ID representing the customer code in the data base table A, and IdentityNO representing the customer code in the data definition table.

[0077] Furthermore, the established data reference table is used as a standard, and the query script statement is used to compare with the data definition table of each system to obtain the difference in data definition; and all other business system data definition tables that need to be compared are listed, compared, and the differences are obtained. For example, in the compensation system, the table name and fields of the data definition table C, as well as other fields in the two system data definition tables, will be automatically listed in sequence and automatically generated, that is, a relational query statement is dynamically generated:

[0078] Select*from map.A right join C on A.ID=C.NUM

[0079] Select*from map.A right join C on A.ProductName=B.PN

[0080] Select*from map.A right join C on A.ProductName=C.ProductNameSelect*from map.A right join C on A.BCode=B.BCode

[0081] Select*from map.A right join C on A.HCode=B.Hcode

[0082] Specifically, the program will execute, for example: use the data in field NUM in data table C to compare one by one with the data in field ID in data table A, to check whether the specific data of field NUM, such as 01, 02, 03, is already available in field ID; at the same time, check whether the data under field NUM is repeated with the data under field ID, that is, whether they have the same data.

[0083] As an optional embodiment, the start and execution module S203 is specifically configured to establish an automatic check button through the front end of a programmable electronic device, that is, the foreground position, and the automatic check button uses a Command statement to start the comparison; and establish a data completion button in the foreground to execute the addition and deletion of the corresponding data.

[0084] In this embodiment, for example, the NO field in the sales system has 10 customer codes, and there is no data in the ID field in the data reference table A. Then, an Insert statement is used to add the customer codes in the NO field in the data definition table B to the ID field in the data reference table A:

[0085] Select B.on B.name from map.A right join B on A.ID=B.NO

[0086] Insert into A

[0087] Or, for example: the data in the NO field in the sales system has the same duplicate data in the ID field in the data base table A, then use the Delete statement to delete the duplicate data in the ID field in the data base table A; after deleting the duplicate data in the ID field, the data base table A has the conditions for executing the above-mentioned Insert statement, and then automatically circles to the Insert statement; that is, when compared with the IndentityNO field in the data definition table B, the data in the ID field in the data base table A is missing, and the above-mentioned Insert statement is automatically executed, as the program script is completed, and the comparison operation on the field will no longer continue.

[0088] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more embodiments of this specification, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0089] The device of the above embodiment is used to implement the corresponding method of checking data definition consistency in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0090] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, one or more embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for checking the consistency of data definitions as described in any of the above embodiments is implemented.

[0091] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0092] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0093] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0094] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0095] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0096] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0097] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0098] The electronic device of the above embodiment is used to implement the corresponding method of checking data definition consistency in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0099] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, one or more embodiments of the present specification also provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for checking data definition consistency as described in any of the above embodiments.

[0100] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0101] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for checking the consistency of data definitions as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0102] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. In line with the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present specification as described above, which are not provided in detail for the sake of simplicity.

[0103] In addition, to simplify the description and discussion, and in order not to obscure one or more embodiments of the present specification, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring one or more embodiments of the present specification, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present specification will be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that one or more embodiments of the present specification may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0104] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0105] One or more embodiments of this specification are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of this disclosure.

Claims

1. A method for checking consistency of data definition, comprising: After receiving a request for a data definition consistency check on a data definition table of any business system, the associated script is executed according to a pre-established field relationship mapping table; The field relationship mapping table records the mapping relationship between the field names of the fields with the same meaning in the pre-established data reference table and the data definition table of each business system; The data reference table includes: at least one field and its corresponding meaning; Based on the execution of the association script, a query statement is dynamically generated, and the query statement specifically performs a comparison between each of the data definition tables and the data reference table to obtain the data difference between the data reference table and the data definition table; Based on the data differences compared by the query statements, using insert or delete statements in the data definition table to add or delete corresponding data records; The field relationship mapping table is established through the following process: Obtain the data definition tables of each business system that needs to be compared; For each data definition table, the field names of the fields having the same meaning in the data reference table and the data definition table are respectively determined and a mapping relationship between the two is established; and the mapping relationship is added to the field relationship mapping table.

2. The method according to claim 1, wherein: The method further comprises: After receiving a data completion request for a data definition table of any task system, the associated script is executed according to a pre-established field relationship mapping table; And, an automatic check button is established in the foreground to start the associated script.

3. The method according to claim 1 or 2, wherein: The executing of the association script according to the pre-established field relationship mapping table includes: According to the table name of the data definition table, searching the field relationship mapping table for the mapping relationship between the field names of the fields having the same meaning in the data reference table and the data definition table; The association script is executed according to the table name of the data base table, the table name of the data definition table, the field name in the data base table having the mapping relationship, and the field name in the data definition table; wherein the association script is used to associate the field name in the data base table having the mapping relationship with the field name in the data definition table.

4. The method according to claim 3, wherein: The association script is: select * from map. table name 1 associate table name 2 on table name 1. table field 1 = table name 2. table field 2; wherein, table name 1 is the table name of the data definition table; table name 2 is the table name of the data definition table; table field 1 and table field 2 are respectively the field names in the data reference table having the mapping relationship and the field names in the data definition table.

5. The method according to claim 1, wherein: According to the data difference, adding or deleting corresponding data records in the data definition table includes: Based on the data reference table, adding data records that exist in the data reference table but do not exist in the data definition table to the data definition table; Alternatively, based on the data reference table, data records that exist in the data definition table but do not exist in the data reference table are deleted from the data definition table.

6. A device for checking data definition consistency, characterized in that: include: A mapping module is configured to execute an associated script according to a pre-established field relationship mapping table after receiving a request for a data definition consistency check for a data definition table of any business system; wherein the field relationship mapping table records a mapping relationship between field names of fields having the same meaning in a pre-established data reference table and a data definition table of each business system; The data reference table includes: at least one field and its corresponding meaning; A comparison module is configured to execute the association script to dynamically generate a query statement, wherein the query statement specifically performs a comparison between each of the data definition tables and the data reference table to obtain data differences between the data reference table and the data definition table; The start and execution module is configured to start the associated script through an automatic check button established in the foreground; and based on the data differences compared by the query statement, use the insert or delete statement in the data definition table to add or delete corresponding data records; The field relationship mapping table is established through the following process: Obtain the data definition tables of each business system that needs to be compared; For each data definition table, the field names of the fields having the same meaning in the data reference table and the data definition table are respectively determined and a mapping relationship between the two is established; and the mapping relationship is added to the field relationship mapping table.

7. The device for checking data definition consistency according to claim 6, wherein: include: The content of the data definition table includes: the fields and the meanings of the fields; the content of the data reference table includes: the fields and the meanings of the fields.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 5.