CN111190860A - Database configuration method and device - Google Patents
Database configuration method and device Download PDFInfo
- Publication number
- CN111190860A CN111190860A CN201911425895.2A CN201911425895A CN111190860A CN 111190860 A CN111190860 A CN 111190860A CN 201911425895 A CN201911425895 A CN 201911425895A CN 111190860 A CN111190860 A CN 111190860A
- Authority
- CN
- China
- Prior art keywords
- matching
- matching result
- field
- column
- weighted
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/116—Details of conversion of file system types or formats
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a configuration method of a database, and particularly discloses a method for acquiring the corresponding relation between a new system database table column and an old system database table column; acquiring a column in a report interface; preprocessing the name of the column in the report interface; matching the preprocessed field name with the field of the old system database table through a direct matching algorithm, a fuzzy matching algorithm and a weighted matching algorithm to obtain a direct matching result, a fuzzy matching result and a weighted matching result; acquiring a conversion relation between formats defined by the new system database table column and the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result; and generating a configuration file according to the conversion relation so as to configure the database.
Description
Technical Field
The present application relates to the field of database technologies, and in particular, to a method and an apparatus for configuring a database.
Background
When a new system needs to configure the database of the peripheral subsystem, a configuration file needs to be generated according to the format defined by the field of the database table of the new system, and the parameter information in the configuration file generation program is based on the format defined by the field of the database table of the old system. In the traditional method, a worker combines the corresponding relation between the names of the new system database table column and the old system database table column, and then adjusts the parameter information in the program for generating the configuration file according to the corresponding relation and the report interface, and when the number of the report columns is large, the traditional method is adopted, all the parameter information needs to be adjusted, the adjustment process is complex, and the efficiency of generating the configuration file is low.
Disclosure of Invention
In order to solve the technical problem, the application provides a method and a device for configuring a database, so that the generation efficiency of configuration files is improved.
The embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for configuring a database, where the method includes:
acquiring the corresponding relation between the new system database table column and the old system database table column; acquiring a column in a report interface;
preprocessing the name of the column in the report interface;
matching the preprocessed field name with the field of the old system database table through a direct matching algorithm to obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result;
acquiring a conversion relation between a new system and a format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result;
and generating a configuration file according to the conversion relation so as to configure the database.
Optionally, the generating a configuration file according to the conversion relationship includes:
and generating configuration parameters according to the conversion relation, importing the configuration parameters into a new system through a database SQL statement, and generating a configuration file based on a database table field of the new system.
Optionally, the conversion relationship includes any one or a combination of a plurality of subscripts, data names, data lengths, data formats, field lengths, functions, and constant identifiers of each report.
Optionally, the preprocessing the name of the field in the report interface includes:
and deleting the prefix and/or the suffix of the field name in the report interface.
Optionally, the method further includes:
and sending the matching result of which the similarity does not exceed the threshold in the weighted matching result obtained by the weighted matching algorithm to a background so as to facilitate a worker to confirm whether the matching result is correct or not.
In a second aspect, an embodiment of the present application provides an apparatus for configuring a database, where the apparatus includes: the device comprises an acquisition module, a matching module and a configuration module;
the acquisition module is used for acquiring the corresponding relation between the new system database table column and the old system database table column; acquiring a column in a report interface;
the matching module is used for matching the preprocessed field name with the field of the old system database table through a direct matching algorithm to obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result; acquiring a conversion relation between the new system and a format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result; preprocessing a field name in a report interface before matching;
and the configuration module is used for generating a configuration file according to the conversion relation so as to configure the database.
Optionally, the configuration module is further configured to generate configuration parameters according to the conversion relationship, import the configuration parameters into a new system through a database SQL statement, and generate a configuration file based on a database table field of the new system.
Optionally, the conversion relationship includes any one or a combination of a plurality of subscripts, data names, data lengths, data formats, field lengths, functions, and constant identifiers of each report.
Optionally, the matching module is further configured to delete a prefix and/or a suffix of a field name in the report interface.
Optionally, the apparatus further comprises a communication module;
and the communication module is used for sending the matching result of which the similarity does not exceed the threshold in the weighted matching result obtained by the weighted matching algorithm to a background so as to facilitate the staff to confirm whether the matching result is correct.
According to the technical scheme, the embodiment of the application has the following advantages:
according to the corresponding relation between the new system database table column and the old system database table column and the column in the report interface, quickly determining a matching result through a direct matching algorithm, a fuzzy matching algorithm and a weighted matching algorithm, and acquiring a conversion relation between the new system database table and a format defined by the report interface column according to the matching result; according to the conversion relation, the configuration file is generated quickly, the time for generating the configuration file is shortened, the efficiency for generating the configuration file is improved, and the accuracy of the configuration file is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a database configuration method of the present application;
fig. 2 is a schematic diagram of a database configuration apparatus according to the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
The method comprises the following steps:
referring to fig. 1, fig. 1 is a flowchart of a database configuration method of the present application, and a database configuration method disclosed in this embodiment includes:
step 101: acquiring the corresponding relation between the new system database table column and the old system database table column; and acquiring a column in the report interface.
As an implementation manner, the corresponding relationship in this embodiment may be configured in advance, or may be stored in the new system in advance; the column in the report interface can be a column in a report interface document; acquiring the corresponding relation between the new system database table column and the old system database table column; the process of acquiring the field in the report interface may be input through an external device, or may be pre-stored in the server.
It should be noted that the field of the new system database table may be a BANK _ NO field in the BGL _ normal _ inter table in the new system, the field of the old system database table may be a SOC _ NO field in the NRAT table in the old system, and the field in the report interface may be a NART _ SOC _ NO in the NART table in the report interface document.
Step 102: and preprocessing the name of the column in the report interface.
As an implementation mode, the prefix and/or the suffix of the field name in the report interface are deleted, and data cleaning operations such as invalid characters such as blank spaces, semicolons and the like in the field name are removed.
It should be noted that, as can be seen from step 101, the only difference between the SOC _ NO field in the NRAT table in the old system and the field name of the NART _ SOC _ NO in the NART table in the report interface document is that there is one more front axle such as "NART" in the NART table in the report interface document, and after the front axle such as "NART" is deleted, "SOC _ NO" can be obtained, so as to facilitate subsequent matching.
Step 103: and matching the preprocessed field name with the field of the old system database table through a matching algorithm to obtain a matching result, and obtaining a conversion relation between the format defined by the new system and the report interface field according to the matching result.
As an implementation mode, matching the preprocessed field name with the field of the old system database table through a direct matching algorithm to obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result; and acquiring a conversion relation between a new system and the format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result.
In one embodiment, the matching results with the similarity not exceeding the threshold in the weighted matching results obtained by the weighted matching algorithm are sent to a background, so that a worker can confirm whether the matching results are correct or not.
The implementation threshold may be 80% or 50%, and may be set by those skilled in the art according to actual needs.
It should be noted that, as can be seen from step 102, the "NART _ SOC _ NO" becomes "SOC _ NO" after the prefix is removed, and the SOC _ NO field in the NRAT table in the old system may be matched with the NART _ SOC _ NO in the NART table in the report interface document by using a direct matching algorithm to obtain a matching result; according to the matching result and the SOC _ NO field of the old system table NRAT corresponding to the BANK _ NO field in the BGL _ NOSTRO _ INTEREST table in the report interface document, the relation between the BANK _ NO field in the BGL _ NOSTRO _ INTEREST table in the new system and the NART _ SOC _ NO in the NART table in the report interface document can be obtained.
Step 104: and generating a configuration file according to the conversion relation so as to configure the database.
As an implementation manner, configuration parameters are generated according to the conversion relationship, the configuration parameters are imported into a new system through a database SQL statement, and a configuration file is generated based on a database table field of the new system.
It should be noted that the configuration file may be used to configure a database of the peripheral subsystem.
It should be noted that the conversion relationship may include any one or a combination of a subscript, a data name, a data length, a data format, a field length, a function, and a constant identifier of each report, for example: if the data length of NART _ SOC _ NO of the NRAT table in the report interface document is 4 bits, and the BANK _ NO field in the BGL _ NOSTRO _ INTEREST table is only 3 bits, the method can convert the BANK _ NO in the 3-bit BGL _ NOSTRO _ INTEREST table into 4 bits (for example, 109 is converted into 0109).
The method embodiment of the application has the following beneficial effects:
according to the corresponding relation between the new system database table column and the old system database table column and the column in the report interface, quickly determining a matching result through a direct matching algorithm, a fuzzy matching algorithm and a weighted matching algorithm, and acquiring a conversion relation between the new system and a format defined by the report interface column according to the matching result; according to the conversion relation, the configuration file is generated quickly, the time for generating the configuration file is shortened, the efficiency for generating the configuration file is improved, and the accuracy of the configuration file is ensured.
The embodiment of the device is as follows:
referring to fig. 2, fig. 2 is a schematic diagram of a database configuration device according to the present application, and the database configuration device disclosed in the present embodiment includes: an acquisition module 201, a matching module 202 and a configuration module 203; the acquiring module 201 is configured to acquire a correspondence between a new system database table field and an old system database table field; acquiring a column in a report interface; the matching module 202 is configured to match the field name after the preprocessing with the field of the old system database table through a direct matching algorithm, and obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result; acquiring a conversion relation between the new system and a format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result; preprocessing a field name in a report interface before matching; the configuration module 203 is configured to generate a configuration file according to the conversion relationship, so as to configure the database.
The device embodiment of the application has the following beneficial effects:
the acquisition module 201 acquires the corresponding relationship between the new system database table field and the old system database table field and the field in the report interface, quickly determines a matching result by using the matching module 202 through a direct matching algorithm, a fuzzy matching algorithm and a weighted matching algorithm, and acquires the conversion relationship between the formats defined by the new system and the report interface field according to the matching result; the configuration module 203 generates the configuration file rapidly according to the conversion relationship, so that the time for generating the configuration file is shortened, the efficiency for generating the configuration file is improved, and the accuracy of the configuration file is ensured.
It should be noted that the embodiments of the apparatus of the present application are described simply, and the apparatus of the present application can be obtained according to the method of the present application.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A method for configuring a database, comprising:
acquiring the corresponding relation between the new system database table column and the old system database table column; acquiring a column in a report interface;
preprocessing the name of the column in the report interface;
matching the preprocessed field name with the field of the old system database table through a direct matching algorithm to obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result;
acquiring a conversion relation between a new system and a format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result;
and generating a configuration file according to the conversion relation so as to configure the database.
2. The method of claim 1, wherein generating a configuration file according to the transformation relationship comprises:
and generating configuration parameters according to the conversion relation, importing the configuration parameters into a new system through a database SQL statement, and generating a configuration file based on a database table field of the new system.
3. The method according to claim 2, wherein the conversion relationship comprises a combination of any one or more of subscript, data name, data length, data format, field length, function, and constant id of each report.
4. The method of claim 1, wherein preprocessing the name of the field in the report interface comprises:
and deleting the prefix and/or the suffix of the field name in the report interface.
5. The method of claim 1, further comprising:
and sending the matching result of which the similarity does not exceed the threshold in the weighted matching result obtained by the weighted matching algorithm to a background so as to facilitate a worker to confirm whether the matching result is correct or not.
6. A method for configuring a database, comprising: the device comprises an acquisition module, a matching module and a configuration module;
the acquisition module is used for acquiring the corresponding relation between the new system database table column and the old system database table column; acquiring a column in a report interface;
the matching module is used for matching the preprocessed field name with the field of the old system database table through a direct matching algorithm to obtain a direct matching result; matching the field names which are not successfully matched through the direct matching algorithm through a fuzzy matching algorithm to obtain a fuzzy matching result; matching the field names which are not successfully matched by adopting the direct matching algorithm and the fuzzy matching algorithm through a weighted matching algorithm to obtain a weighted matching result; acquiring a conversion relation between the new system and a format defined by the report interface column according to the direct matching result, the fuzzy matching result and the weighted matching result; preprocessing a field name in a report interface before matching;
and the configuration module is used for generating a configuration file according to the conversion relation so as to configure the database.
7. The apparatus of claim 6, wherein the configuration module is further configured to generate configuration parameters according to the transformation relationship, import the configuration parameters into a new system through a database SQL statement, and generate a configuration file based on a database table field of the new system.
8. The apparatus according to claim 7, wherein the conversion relationship comprises a combination of any one or more of subscript, data name, data length, data format, field length, function, and constant id of each report.
9. The apparatus of claim 6, wherein the matching module is further configured to delete prefixes and/or suffixes of field names in the report interface.
10. The apparatus of claim 6, further comprising a communication module;
and the communication module is used for sending the matching result of which the similarity does not exceed the threshold in the weighted matching result obtained by the weighted matching algorithm to a background so as to facilitate the staff to confirm whether the matching result is correct.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911425895.2A CN111190860B (en) | 2019-12-31 | 2019-12-31 | Configuration method and device of database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911425895.2A CN111190860B (en) | 2019-12-31 | 2019-12-31 | Configuration method and device of database |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111190860A true CN111190860A (en) | 2020-05-22 |
CN111190860B CN111190860B (en) | 2023-04-25 |
Family
ID=70708120
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911425895.2A Active CN111190860B (en) | 2019-12-31 | 2019-12-31 | Configuration method and device of database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111190860B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113128188A (en) * | 2021-04-29 | 2021-07-16 | 北京开科唯识技术股份有限公司 | Bank payroll generation method, device and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1035483A2 (en) * | 1999-03-12 | 2000-09-13 | Crosskeys Systems Corporation | Database storage manager utility |
US20040064487A1 (en) * | 2002-10-01 | 2004-04-01 | Nguyen Liem M. | Method and apparatus to migrate a database |
US20120271827A1 (en) * | 2007-12-31 | 2012-10-25 | Merz Christopher J | Methods and systems for implementing approximate string matching within a database |
CN103177119A (en) * | 2013-04-09 | 2013-06-26 | 上海华力微电子有限公司 | Data type automatic conversion system and method based on database |
CN106055652A (en) * | 2016-06-01 | 2016-10-26 | 兰雨晴 | Method and system for database matching based on patterns and examples |
US20170235781A1 (en) * | 2016-02-16 | 2017-08-17 | TmaxData Co., Ltd. | Method, server and computer program stored in computer readable medium for managing log data in database |
-
2019
- 2019-12-31 CN CN201911425895.2A patent/CN111190860B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1035483A2 (en) * | 1999-03-12 | 2000-09-13 | Crosskeys Systems Corporation | Database storage manager utility |
US20040064487A1 (en) * | 2002-10-01 | 2004-04-01 | Nguyen Liem M. | Method and apparatus to migrate a database |
US20120271827A1 (en) * | 2007-12-31 | 2012-10-25 | Merz Christopher J | Methods and systems for implementing approximate string matching within a database |
CN103177119A (en) * | 2013-04-09 | 2013-06-26 | 上海华力微电子有限公司 | Data type automatic conversion system and method based on database |
US20170235781A1 (en) * | 2016-02-16 | 2017-08-17 | TmaxData Co., Ltd. | Method, server and computer program stored in computer readable medium for managing log data in database |
CN106055652A (en) * | 2016-06-01 | 2016-10-26 | 兰雨晴 | Method and system for database matching based on patterns and examples |
Non-Patent Citations (2)
Title |
---|
张业明 等: "关系数据库的SQL模糊扩展及模糊数据存储" * |
阙舒 等: "基于模糊匹配的数据库模式测试方法" * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113128188A (en) * | 2021-04-29 | 2021-07-16 | 北京开科唯识技术股份有限公司 | Bank payroll generation method, device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN111190860B (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106484421B (en) | A kind of method and system quickly generating api interface | |
CN111325626B (en) | Account checking data pushing method and device | |
US20050027731A1 (en) | Compression dictionaries | |
US8812441B2 (en) | Migration apparatus which convert database of mainframe system into database of open system and method for thereof | |
CN111767704B (en) | Excel form template generation method and device | |
US20110238683A1 (en) | System and method for sparql-query processing using the parametrized-sparql-query in based dbms | |
CN112671950B (en) | Domain name processing method and device based on block chain, electronic equipment and storage medium | |
CN1996878A (en) | A method for information conversion of the simple object access protocol service management interface | |
CN104767839A (en) | IP positioning method and device | |
WO2014040488A1 (en) | Method and device for guaranteeing consistency of planning data | |
CN111190860B (en) | Configuration method and device of database | |
CN104317601A (en) | Method and system for developing file interfaces | |
CN114793250B (en) | Configurable CAN data analysis method | |
CN101540110A (en) | Method for matching and processing traffic information under multi-version traffic position references and device | |
CN104717082A (en) | Service model adaptation method and system | |
CN1567829A (en) | General purpose data file conversion method | |
JP2014229275A (en) | Query answering device and method | |
CN106878431B (en) | Method and device for converting node communication message format in distributed system | |
CN106934045B (en) | System and method for migration evaluation of database | |
CN112468480B (en) | Data association method, device, equipment and computer storage medium | |
US20050271282A1 (en) | Method of encoding and decoding character trains | |
CN101382891A (en) | Statistical method and apparatus for constructing log output every day | |
CN110414062B (en) | Method and device for acquiring design drawing and computer readable storage medium | |
CN113536767A (en) | Data processing method, device, equipment, medium and computer program product | |
CN111339107A (en) | Comparison source data synchronization method and device, electronic 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |