CN112395850A - Method and device for checking data definition consistency and electronic equipment - Google Patents

Method and device for checking data definition consistency and electronic equipment Download PDF

Info

Publication number
CN112395850A
CN112395850A CN202011225616.0A CN202011225616A CN112395850A CN 112395850 A CN112395850 A CN 112395850A CN 202011225616 A CN202011225616 A CN 202011225616A CN 112395850 A CN112395850 A CN 112395850A
Authority
CN
China
Prior art keywords
data
field
data definition
mapping
reference table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011225616.0A
Other languages
Chinese (zh)
Inventor
李海波
臧滔
杨金伟
祁铭超
唐培洪
李立新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Life Insurance Co Ltd China
Original Assignee
China Life Insurance Co Ltd China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Life Insurance Co Ltd China filed Critical China Life Insurance Co Ltd China
Priority to CN202011225616.0A priority Critical patent/CN112395850A/en
Publication of CN112395850A publication Critical patent/CN112395850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

One or more embodiments of the present specification provide a method, an apparatus, and an electronic device for checking data definition consistency; the method comprises the following steps: establishing a data reference table, and manually searching data definition tables belonging to different service systems according to the definitions in the data reference table; establishing a table field relation mapping table according to the field contents contained in the table field relation mapping table and the corresponding relation between the field contents; then, dynamically generating a query statement according to the established table field relation mapping table; the data reference table is used as a comparison standard, the query statement generated dynamically is used, automatic comparison can be carried out between each business system and the data definition table of the business system, and the difference between the business system and the data reference table is obtained, so that the existing scheme of human brain analysis and manual processing is replaced; and establishing an automatic check key in a foreground to start the steps, establishing a completion data key to add the data definition, further improving the speed of responding to the problem and effectively avoiding the error rate generated by manual processing.

Description

Method and device for checking data definition consistency and electronic equipment
Technical Field
One or more embodiments of the present specification relate to the technical field of data table structure definition, and in particular, to a method, an apparatus, and an electronic device for checking consistency of data definition.
Background
With the continuous expansion of various industries such as insurance business, banking business, medical business and the like, more and more information is managed and stored by each business system, and in each company, various different business systems such as supervision and tired systems, financial manpower systems, decision statistical systems and the like exist, wherein most of the business systems relate to some basic information definition tables. However, each business system belongs to different departments and personnel for management, so that the data content is easily inconsistent with the corresponding defined table structure, and the data arrangement and the data checking are difficult and wrong. However, the existing solutions perform offline single data table analysis when the data definition is not consistent, and all the data table analysis and manual processing are human brain analysis, which makes the response efficiency and accuracy of the data difficult to meet the requirements of real business.
Based on this, in a real service system, a technical scheme capable of effectively improving efficiency and accuracy is needed for the case of inconsistent data definition.
Disclosure of Invention
In view of this, an object of one or more embodiments of the present disclosure is to provide a method, an apparatus, and an electronic device for checking consistency of data definitions, so as to solve the problems of slow response speed, low modification efficiency, and high error rate caused by inconsistency of service data definitions between manual processing systems.
In view of the above, one or more embodiments of the present specification provide a method for checking consistency of data definitions, including:
firstly, establishing a data reference table, and searching a data definition table which belongs to different service systems and needs to be compared according to the content of the established reference table; according to the specific meanings of fields in the data definition table contents, establishing a table field relation mapping table for the fields with the same meaning; then, the established relational mapping table is used for dynamically generating a process of inquiring a script statement; the dynamically generated query script statement takes the initially established data reference table as a standard, automatically compares the data definition tables of all the systems, and obtains the difference between the data definitions of different service systems; and finally, establishing two operation keys on the foreground of program operation, wherein one operation key is an automatic check key for starting automatic comparison, and the other operation key is a data completing and deleting key for adding corresponding data.
Based on the same inventive concept, one or more embodiments of the present specification further provide an apparatus for checking consistency of data definitions, including:
the mapping module is configured to execute the associated script according to a pre-established field relation mapping table after receiving a data definition consistency check request aiming at a data definition table of any service system; the field relation mapping table records the mapping relation between the field names of the fields with the same meaning in a pre-established data reference table and a data definition table of each service system; the data reference table includes: at least one field and its corresponding meaning;
the comparison module executes the associated script to dynamically generate a query statement, and the query statement specifically executes the comparison work of each data definition table and the data reference table to obtain the data difference between the data reference table and the data definition table;
the starting and executing module is configured to start the associated script through an automatic checking key established in a foreground; and based on the data difference compared by the query statement, adding or deleting corresponding data records in the data definition table by using insert or delete statement.
Based on the same inventive concept, one or more embodiments of the present specification further provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method as described in any one of the above items when executing the program.
Based on the same inventive concept, 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 for causing the computer to perform the method of checking data definition consistency as described above.
As can be seen from the foregoing, according to the method, the apparatus, and the electronic device for checking consistency of data definitions provided in one or more embodiments of the present disclosure, based on the execution of the table fields and the mapping scripts in the database, difficulties in data management and integration among multiple systems are comprehensively considered, and high costs caused by manual processing of service data in the prior art are considered.
Drawings
In order to more clearly illustrate one or more embodiments or prior art solutions of the present specification, the drawings that are needed in the description of the embodiments or prior art will be briefly described below, and it is obvious that the drawings in the following description are only one or more embodiments of the present specification, and that other drawings may be obtained by those skilled in the art without inventive effort from these drawings.
FIG. 1 is a schematic diagram of a method for checking consistency of data definitions according to one or more embodiments of the present disclosure;
FIG. 2 is a schematic diagram of an apparatus for checking data definition consistency according to one or more embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to one or more embodiments of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present specification should have the ordinary meaning as understood by those of ordinary skill in the art to which this disclosure belongs. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
As described in the background section, it is difficult for existing methods for checking data consistency across different business systems to meet business needs. In the process of implementing the present disclosure, the applicant finds that a main problem of an existing scheme for checking data consistency between systems is that when a problem of inconsistent data definition occurs due to manual screening, response speed is delayed, and business progress is affected, and compared with a solution that is implemented by using a machine, manual checking and correcting of data definition is not only easy to make mistakes, but also needs professional technicians, and involves high labor cost, communication cost with each business system, and the like.
In view of this, one or more embodiments of the present disclosure provide a method for checking data consistency, which automatically checks data definitions and adds and deletes data definitions, specifically, first, a data reference table is established by a manual method, and a data definition table that needs to be compared among systems is manually searched; establishing a table field relation mapping table for fields with the same meaning in a manually found data definition table; after the query statement is set, the table field relational mapping table can dynamically generate a query script; then, taking the manually established reference table in the steps as a standard, and automatically comparing the data definition tables in each system by using a dynamically generated query script to obtain the difference of data definition; and finally, establishing an automatic checking key in the foreground for executing the step of comparing the difference, and establishing a completion data key for adding and deleting the data with the difference.
The technical solutions of one or more embodiments of the present specification are described in detail below with reference to specific embodiments.
Referring to fig. 1, a method for checking consistency of data definitions according to an embodiment of the present specification includes the following steps:
step S101, after receiving a data definition consistency check request aiming at a data definition table of any service system, executing an associated script according to a pre-established field relation mapping table.
In this step, a data reference table is first established, where the data reference table includes all fields in the data table that need to be compared in the following steps, for example, the fields include: ID. ProductName, Type, etc. Each field has a corresponding actual meaning in a particular system, e.g., field ID represents a customer code, field ProductName represents a product name code, and field Type represents a product Type code.
Then, find out the data definition table in each system from the database, the data definition table includes the corresponding field of the data used in the system, and each field represents the corresponding actual meaning, for example, in the B system, the field in the data definition table includes: fields such as IdentityNO, ProductName, and Type, wherein the field IdentityNO represents a client code, the field PN represents a product name code, and the field Type represents a product name code; in the system C, the data definition table includes: NUM, ProductName, Type, etc., wherein, field NUM has represented customer code, field ProductName has represented product name code, and field Type has represented product name code.
In this embodiment, the establishing manner of the data reference table is not specifically limited, and in an implementation manner, the establishing manner may be manually completed. In addition, the data reference table and the data definition table are both in a table field form, and the number of fields included in the data reference table and the data definition table is not specifically limited, and may be four or may be in an infinite list.
Further, for the fields with the same meaning in each data definition table, a table field relation mapping table is established according to the corresponding relation of the meaning.
The data definition table found from each business system is analyzed, so that the fields with the same meaning among all business systems are analyzed, and the files with the actual meanings of the fields, such as design documents, code dictionary tables and the like, can be utilized for analysis in the process. For example, in the data definition table B of the B system, if the identyno represents the client code and the ID in the data reference table also represents the client code, the identyno and the ID are fields having the same meaning, and similarly, in the data definition table C of the C system, if NUM represents the client code, NUM, the identyno and the ID are fields having the same meaning.
In this embodiment, the file for 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.
And then, according to the corresponding relation between fields with the same meaning, establishing a table field relation mapping table with a mutual association relation for the fields in the data reference table and the data definition table in a database, wherein the association between the fields is expressed by using the right association of the statement. The RelationMap is expressed in the form of a field map, as shown in Table 1:
TABLE 1 relational mapping Table of Table fields in method embodiments
Table name 1 Table field 1 Association Table name 2 Table field 2
A ID right join B IdentityNO
A ID right join C NUM
Table name 1 is a data reference table, in this embodiment, table a, table name 2 is a data definition table in each service system, in this embodiment, table B and table C, a table field ID included in the data reference table is table field 1, and table field 2 is a field having the same meaning as the ID of table field 1 in table B and table C, and as can be seen from the above step, ID and IdentityNO and NUM are fields having the same meaning together; where fields with the same meaning are related by the sentence right join.
In this embodiment, the database used is not particularly limited, and may be an SQL database, an oracle database, or the like; moreover, the operation and connection mode of the database are not particularly limited, and the operation may be performed remotely by an electronic device connected to the database, or may be performed directly by an electronic device carrying the database itself.
As an optional embodiment, the association script is formed according to the mapping table. First, according to the mapping table, table 1, the following script is executed in the electronic device connected to the database:
table name 1, table name 2on table name 1, table field 1, table name 2, table field 2
Step S102, executing the associated script to dynamically generate a query statement, wherein the query statement specifically executes the comparison work of each data definition table and the data reference table to obtain the data difference between the data reference table and the data definition table.
The query statement of the table field relationship is generated by the associated script, and the generation process of the query statement is automatically generated, namely dynamically generated.
In this step, taking the mapping table of table 1 table fields as an example, in the query process of the database, the program will automatically generate the following relational query statements according to the script:
Select*from map.A right join B on A.ID=B.IdentityNO
that is, through the Select statement, a representing the data reference table is selected from the map representing the map, and is associated with B representing the data definition table in the service system on the right, and the associated fields are the ID representing the client code in the data reference table a and the IdentityNO representing the client code in the data definition table.
Taking the established data reference table as a standard, using the query script statement to compare with the data definition tables of each system, and listing and comparing all other business system data definition tables needing to be compared, and obtaining differences, for example, the table name and the field of the table C are automatically listed backwards in sequence and automatically generated, that is, the relation query statement is dynamically generated:
Select*from map.A right join C on A.ID=C.NUM
specifically, the program will execute: using the data in the field NUM in the data table C, comparing the data in the field ID in the data table A one by one, and checking whether the specific data of the field NUM, such as 01, 02 and 03, are already in the field ID; meanwhile, the data in the field NUM is checked to see whether the data is repeated with the data in the field ID, that is, whether the data has the same data.
As an alternative embodiment, referring to fig. 1, for the method steps in the foregoing embodiment, further comprising:
step S103, an automatic check key is established in the foreground to start the associated script; and based on the data difference compared by the query statement, adding or deleting corresponding data records in the data definition table by using insert or delete statement.
The automatic check key uses a Command statement to start comparison; and a complement data key is established in the foreground for executing addition of corresponding data.
In the present embodiment, for example: if the IdentityNO field in the data definition table B has data and the ID field in the data reference table A has no data, the data in the word IdentityNO field in the data definition table B is added into the ID field in the data reference table A by using an Insert statement:
Select B.on B.name from map.A right join B on A.ID=B.IdentityNO
Insert into A
alternatively, for example: the data of the NO field in the sales system has the same repeated data in the ID field in the data reference table A, and then the repeated data in the ID field in the data reference table A is deleted by using a Delete statement; deleting the repeated data in the ID field to obtain a data reference table A, wherein the data reference table A has the condition for executing the Insert statement, and then automatically patrolling to the Insert statement; that is, when the comparison is made with the IndentityNO field in the data definition table B, the data in the ID field in the data reference table a is missing, the above Insert statement is automatically executed as the end of the program script, and the comparison operation is no longer continued for the field.
It can be seen that, the method for checking data definition consistency in one or more embodiments of the present specification, based on the application of a database and the execution of a mapping script, comprehensively considers the difficulty of data management and integration among multiple systems, and the high cost brought by manual processing of business data in the prior art, the scheme for data definition consistency proposed by the present inventors realizes automatic data consistency checking, proposes a reasonable scheme, integrates difference data, and replaces a manual processing scheme, thereby effectively reducing the error rate of human brain analysis processing of inconsistent data, and while reducing labor cost, greatly improving the response speed for changing inconsistent data, and achieving the effect of being a long time.
It should be noted that the method of one or more embodiments of the present disclosure may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may perform only one or more steps of the method of one or more embodiments of the present disclosure, and the devices may interact with each other to complete the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, one or more embodiments of the present specification further provide a device for checking consistency of data definitions.
Referring to fig. 2, in conjunction with a specific example of a sales system and a reimbursement system in the insurance industry, the apparatus for checking data consistency includes:
the mapping module S201 is configured to execute the associated script according to a pre-established field relation mapping table after receiving a data definition consistency check request aiming at a data definition table of any service system; the field relation mapping table records the mapping relation between the field names of the fields with the same meaning in a pre-established data reference table and a data definition table of each service system; the data reference table includes: at least one field and its corresponding meaning;
a comparison module S202 configured to execute the association script to dynamically generate a query statement, where the query statement specifically executes a comparison operation between each data definition table and the data reference table to obtain a data difference between the data reference table and the data definition table;
a starting and executing module S203 configured to start the associated script through an automatic check key established in the foreground; and based on the data difference compared by the query statement, adding or deleting corresponding data records in the data definition table by using insert or delete statement.
As an optional embodiment, the mapping module S201 is specifically configured as an electronic device, which is connected to a database and can establish a data reference table, and the data reference table includes fields in all data tables that need to be compared in the following steps, for example, the fields include: ID. ProductName, BCode, HCode, etc. Each field has a corresponding actual meaning in the specific system: the field ID represents a customer code, the field ProductName represents a product name code, the field BCode represents a payment bank code, the field Hcode represents a medical institution code, and the like; and sets the data reference table to a.
Then, find out the data definition table in the sales system and the reimbursement system from the database, 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 the sales system, the fields in the data definition table include: IdentityNO, PN, BCode and the like, wherein the field IdentityNO represents a customer code, the field PN represents a product name code, and the field BCode represents a payment bank code; in the claim system, the data definition table includes: NUM, ProductName, HCode and other fields, wherein the field NUM represents a client code, the field ProductName represents a product name code, and the field HCode represents a medical institution code; the data definition table of the sales system is set as B, and the data definition table of the reimbursement system is set as C.
In this embodiment, the data reference table and the data definition table are both in a table field form, and the number of fields included in the data reference table and the data definition table is not specifically limited, and may be four, or may be an infinite list; the specific fields included in the data reference table are not particularly limited, and may be ID, ProductName, BCode, Hcode, or Type, Price, or the like, as needed.
As an alternative embodiment, fields with the same meaning in the data definition tables of the sales system and the reimbursement system are established, and a relational mapping table of the table fields is established according to the corresponding relation of the meanings.
Firstly, on the basis of the former module, the data definition tables found out from the two business systems are manually analyzed, the purpose is to analyze the fields with the same meaning among all the business systems, and the files with the actual meaning of the fields recorded in the process can be analyzed by utilizing design documents, code dictionary tables and the like. For example, through looking up a data code dictionary inside an insurance company, a field identyny no represents a client code and a field PN represents a product name code in a data definition table B of a sales system of the insurance company, and a field ID represents the client code and a field ProductName represents the product name code in a data reference table a established manually, the identyny no and the ID are fields with the same meaning, and the PN and the ProductName are fields with the same meaning; similarly, after looking up the data code dictionary inside the insurance company, the data definition table C of the insurance company reimbursement system finds that the field NUM represents the client code and the field ProductName represents the product name code, and then the IDs in NUM and a are fields with the same meaning, and the ProductName in C and a are fields with the same meaning.
In this embodiment, the file for 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.
Then, according to the corresponding relation between the fields with the same meaning, a table field relation mapping table with a mutual association relation 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 using the right association of the statement. And establishing a table field relation mapping table. The RelationMap is expressed in the form of a field map, as shown in Table 2:
TABLE 2 relational mapping Table of Table fields in device embodiments
Table name 1 Table field 1 Association 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
In this embodiment, table name 1 in table 2 is table a, table name 2 is a data definition table in two service systems, in this embodiment, table B and table C, table field IDs contained in the data reference table, ProducName, BCode and HCode are table field 1, and table field 2 is a field having the same meaning as the ID of table field 1 in table B and table C, and as can be seen from the above step, the ID in table field 1 and the IdentityNO and NUM in table field 2 are fields having the same meaning together; the ProducName in the table field 1 and the PN and ProducName in the table field 2 are fields with the same meaning together; the BCode in the table field 1 and the BCode in the table field 2 are fields with the same meaning together; HCode in table field 1 and HCode in table field 2 are fields with the same meaning together; where fields with the same meaning are all associated by the sentence right join.
In this embodiment, the database used is not particularly limited, and may be an SQL database, an oracle database, or the like; moreover, the operation and connection mode of the database are not particularly limited, and the operation may be performed remotely by an electronic device connected to the database, or may be performed directly by an electronic device carrying the database itself.
Further, in the environment of the SQL database, the associated script is executed according to the mapping table in the previous module, and the specific script is as follows:
select from map table name 1 associated table name 2on table name 1 table field 1 ═ table name 2 table field 2;
as an optional embodiment, the comparing module S202 is specifically configured to generate the query statement by the associated script, and the generating process should be automatically generated, that is, dynamically generated. In the query process of the database, the program automatically generates the following relational query statements according to the script:
Select*from map.A right join B on A.ID=B.IdentityNO
that is, through the Select statement, a representing the data reference table is selected from the map representing the relational mapping table and is associated with B representing the data definition table in the sales system on the right, and the associated fields are the ID representing the client code in the data reference table a and the IdentityNO representing the client code in the data definition table.
Further, the established data reference table is used as a standard, and the query script statement is compared with the data definition tables of all systems to obtain the difference of data definitions; and listing and comparing all other business system data definition tables needing to be compared, and obtaining differences, for example, in a claims system, the table name and the field of the data definition table C and other fields in the two system data definition tables are listed backwards automatically and sequentially and are automatically generated, namely, a relation query statement is dynamically generated:
Select*from map.A right join C on A.ID=C.NUM
Select*from map.A right join C on A.ProductName=B.PN
Select*from map.A right join C on A.ProductName=C.ProductName Select*from map.A right join C on A.BCode=B.BCode
Select*from map.A right join C on A.HCode=B.Hcode
in particular, the program will execute, for example: using the data in the field NUM in the data table C, comparing the data in the field ID in the data table A one by one, and checking whether the specific data of the field NUM, such as 01, 02 and 03, are already in the field ID; meanwhile, the data in the field NUM is checked to see whether the data is repeated with the data in the field ID, that is, whether the data has the same data.
As an alternative embodiment, the starting and executing module S203 is specifically configured to establish an automatic check key through a front segment, that is, a foreground position, of the programmable electronic device, where the automatic check key starts comparison using a Command statement; and a complete data key is established in the foreground for executing addition and deletion of corresponding data.
In the present embodiment, for example: the NO field in the sales system, with 10 customer codes, but NO data in the ID field in the data reference table a, adds the customer codes in the field NO in the data definition table B to the ID field in the data reference table a using an Insert statement:
Select B.on B.name from map.A right join B on A.ID=B.NO
Insert into A
alternatively, for example: the data of the NO field in the sales system has the same repeated data in the ID field in the data reference table A, and then the repeated data in the ID field in the data reference table A is deleted by using a Delete statement; deleting the repeated data in the ID field to obtain a data reference table A, wherein the data reference table A has the condition for executing the Insert statement, and then automatically patrolling to the Insert statement; that is, when the comparison is made with the IndentityNO field in the data definition table B, the data in the ID field in the data reference table a is missing, the above Insert statement is automatically executed as the end of the program script, and the comparison operation is no longer continued for the field.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the modules may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
The apparatus in the foregoing embodiment is used to implement the method for checking consistency of data definitions in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, one or more embodiments of the present specification further provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method for checking consistency of data definitions as described in any of the above-mentioned embodiments.
Fig. 3 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may 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 configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the method for checking consistency of data definitions in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-described embodiment methods, one or more embodiments of the present specification further provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of checking data definition consistency as described in any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the method for checking data definition consistency according to any of the foregoing embodiments, and have the beneficial effects of corresponding method embodiments, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the spirit of the present disclosure, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present description as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures, for simplicity of illustration and discussion, and so as not to obscure one or more embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the understanding of one or more embodiments of the present description, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the one or more embodiments of the present description are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that one or more embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
It is intended that the one or more embodiments of the present specification embrace all such alternatives, modifications and variations as fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of one or more embodiments of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method of checking data definition consistency, comprising:
after a data definition consistency check request aiming at any service system is received, executing an associated script according to a pre-established field relation mapping table; the field relation mapping table records the mapping relation between the field names of the fields with the same meaning in a pre-established data reference table and a data definition table of each service system; the data reference table includes: at least one field and its corresponding meaning;
based on the execution of the associated script, a query statement is dynamically generated, and the query statement specifically executes the comparison work of each data definition table and the data reference table to obtain the data difference between the data reference table and the data definition table.
2. The method of claim 1, wherein the method further comprises:
after a data completion request aiming at a data definition table of any task system is received, executing an associated script according to a pre-established field relation mapping table;
and establishing an automatic check key in the foreground for starting the associated script; and based on the data difference compared by the query statement, adding or deleting corresponding data records in the data definition table by using insert or delete statement.
3. The method according to claim 1 or 2, wherein the executing the associated script according to the pre-established field relation mapping table comprises:
according to the table name of the data definition table, finding out the mapping relation between the field names of the fields with the same meaning in the data reference table and the data definition table from the field relation mapping table;
executing the associated script according to the table name of the data reference table, the table name of the data definition table, the field name in the data reference table with the mapping relation and the field name in the data definition table; the association script is used for associating the field names in the data reference table with the mapping relation with the field names in the data definition table.
4. The method of claim 3, wherein the association script is: table name 1 is associated with table name 2on table name 1 table field 1 is table name 2 table field 2; wherein, the table name 1 is the table name of the data definition table; the table name 2 is the table name of the data definition table; the table field 1 and the table field 2 are field names in the data reference table and field names in the data definition table having the mapping relationship, respectively.
5. The method of claim 1, wherein adding or deleting a corresponding data record in the data definition table according to the data difference comprises:
adding data records which exist in the data reference table but do not exist in the data definition table by taking the data reference table as a reference;
or deleting data records which exist in the data definition table but do not exist in the data reference table in the data definition table by taking the data reference table as a reference.
6. The method of claim 1, wherein the field RelationMap is established by:
acquiring a data definition table of each service system to be compared;
respectively determining field names of fields with the same meaning in the data reference table and the data definition table and establishing a mapping relation between the field names and the fields; and adding the mapping relationship to the field relationship mapping table.
7. An apparatus for checking data definition consistency, comprising:
the mapping module is configured to execute the associated script according to a pre-established field relation mapping table after receiving a data definition consistency check request aiming at a data definition table of any service system; the field relation mapping table records the mapping relation between the field names of the fields with the same meaning in a pre-established data reference table and a data definition table of each service system; the data reference table includes: at least one field and its corresponding meaning;
the comparison module is configured to execute the associated script to dynamically generate a query statement, and the query statement specifically executes the comparison work between each data definition table and the data reference table to obtain the data difference between the data reference table and the data definition table;
the starting and executing module is configured to start the associated script through an automatic checking key established in a foreground; and based on the data difference compared by the query statement, adding or deleting corresponding data records in the data definition table by using insert or delete statement.
8. The apparatus for checking data definition consistency according to claim 7, comprising: the data definition table content comprises: the field, and the meaning of the field; the data reference table content comprises: the field, and the meaning of the field.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the program.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.
CN202011225616.0A 2020-11-05 2020-11-05 Method and device for checking data definition consistency and electronic equipment Pending CN112395850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011225616.0A CN112395850A (en) 2020-11-05 2020-11-05 Method and device for checking data definition consistency and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011225616.0A CN112395850A (en) 2020-11-05 2020-11-05 Method and device for checking data definition consistency and electronic equipment

Publications (1)

Publication Number Publication Date
CN112395850A true CN112395850A (en) 2021-02-23

Family

ID=74598199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011225616.0A Pending CN112395850A (en) 2020-11-05 2020-11-05 Method and device for checking data definition consistency and electronic equipment

Country Status (1)

Country Link
CN (1) CN112395850A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298769A (en) * 2014-10-29 2015-01-21 北京思特奇信息技术股份有限公司 System and method for synchronizing discrepant data of common domain between databases
CN109885614A (en) * 2019-01-04 2019-06-14 平安科技(深圳)有限公司 A kind of method and apparatus that data are synchronous
CN111708779A (en) * 2020-06-11 2020-09-25 中国建设银行股份有限公司 Data management method, system, management equipment and storage medium
CN111767350A (en) * 2020-06-30 2020-10-13 平安国际智慧城市科技股份有限公司 Data warehouse testing method and device, terminal equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298769A (en) * 2014-10-29 2015-01-21 北京思特奇信息技术股份有限公司 System and method for synchronizing discrepant data of common domain between databases
CN109885614A (en) * 2019-01-04 2019-06-14 平安科技(深圳)有限公司 A kind of method and apparatus that data are synchronous
CN111708779A (en) * 2020-06-11 2020-09-25 中国建设银行股份有限公司 Data management method, system, management equipment and storage medium
CN111767350A (en) * 2020-06-30 2020-10-13 平安国际智慧城市科技股份有限公司 Data warehouse testing method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
US9904694B2 (en) NoSQL relational database (RDB) data movement
US8219520B2 (en) Method and system for validating data
US9218379B2 (en) Method, apparatus, and computer-readable medium for efficiently performing operations on distinct data values
CN105493028A (en) Data consistency and rollback for cloud analytics
CN102236672A (en) Method and device for importing data
US9600559B2 (en) Data processing for database aggregation operation
CN111125266A (en) Data processing method, device, equipment and storage medium
US20240095256A1 (en) Method and system for persisting data
CN111046052B (en) Method, device and equipment for storing operation records in database
CN112328631A (en) Production fault analysis method and device, electronic equipment and storage medium
US20170116208A1 (en) Non-uniform multi-row text file loading
US20210124752A1 (en) System for Data Collection, Aggregation, Storage, Verification and Analytics with User Interface
CN112508720A (en) Insurance client identity attribute screening method and screening device and electronic equipment
CN113760891A (en) Data table generation method, device, equipment and storage medium
US9201937B2 (en) Rapid provisioning of information for business analytics
CN112395850A (en) Method and device for checking data definition consistency and electronic equipment
CN115114297A (en) Data lightweight storage and search method and device, electronic equipment and storage medium
CN114564501A (en) Database data storage and query methods, devices, equipment and medium
US11126604B2 (en) Aggregation apparatus, aggregation method, and storage medium
CN112288586A (en) Insurance industry data integration method based on HBase and related equipment
CN112380117A (en) Production method and device of software test basic case and electronic equipment
US20160042022A1 (en) Data coordination support apparatus and data coordination support method
JP2017010376A (en) Mart-less verification support system and mart-less verification support method
US20160162959A1 (en) Performance Optimization Utilizing Pre-Analysis of Condition Records
CN117827902A (en) Service data processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination