Table building method, system and electronic device

By using comparison rules in the table creation request to automatically correct the field definitions of the business table, the problem of inconsistent field definitions between the business table and the master data table is solved, the creation efficiency and accuracy are improved, and automatic field consistency verification is realized.

CN117632963BActive Publication Date: 2024-09-17DIGITAL YI TECH (BEIJING) CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311613020.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2024-09-17
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

The existing technology lacks effective means to ensure that the field definitions of the business table are exactly the same as the fields describing the same business object in the master data table, resulting in low efficiency of manual auditing and unguaranteed accuracy.

Method used

By including instructions and preset comparison rules in the table creation request, the format information of the business table is compared with the format information of the master data table, and the field definitions of the business table are automatically corrected to make them consistent with the master data table. This is completed by using the database kernel program. Automatic correction process.

Benefits of technology

It achieves maximum consistency between business table field definitions and master data tables, improves creation efficiency and accuracy, and avoids the inefficiency and inaccuracy of manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632963B
    Figure CN117632963B
Patent Text Reader

Abstract

The present invention provides a table building method, system and electronic device, the method comprising: obtaining a table building request; determining the first format information of a business table to be created according to the table building request, and obtaining the second format information of a main data table to be compared; the first format information and the second format information both include the format information of at least one field; comparing the first format information and the second format information according to a preset comparison rule, and when the format matching degree of the relevant field in the first format information and the relevant field in the second format information exceeds a preset threshold, replacing the format of the relevant field in the first format information according to the format of the matched field to obtain an updated first format information; and creating a business table based on the updated first format information. The present invention enables the database to automatically correct the table building statement to ensure that the field definition of the business table is as completely identical as possible with the field in the main data table that describes the same business object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of database and big data, and more specifically, relates to a table building method, system and electronic equipment. Background Art

[0002] Master data is an important foundation for enterprises to build business application systems, manage data assets, and connect business processes between different business systems. Master data consists of two parts: master data metamodel and business master data. The master data metamodel is used to define the fields of the master data table, and the business master data describes the specific values ​​of the master data. In principle, the business table must comply with the standards of the master data table, and the field definition of the business table should be as identical as possible to the field in the master data table that describes the same business object.

[0003] In the actual application process, the master data table metamodel is first defined, and then the business master data is filled into the master data table to complete the initialization of the master data table. Afterwards, in order to protect the business, when the business table needs to be created, the development engineer manually applies for the access rights of the master data through the approval flow, and then manually creates the business table in the database with reference to the master data table metamodel. Since the enterprise master data usually has many fields and a complex security management process, in actual engineering practice, a large number of field definitions and business data in the business table and the master data table are often decoupled, even if there is a mechanism for regular distribution of the master data table to the business table, it is of no avail. Therefore, it is necessary to correct the business data by regularly comparing and auditing the business data and the master data afterwards, but because the field definitions of the business table and the master data table are decoupled, the subsequent comparative audit is completely dependent on manual technical processing, and the efficiency of manual audit is low and the accuracy cannot be guaranteed.

[0004] In summary, there is currently no effective technical means to ensure that the field definition of the business table is as identical as possible to the field in the master data table that describes the same business object. Summary of the invention

[0005] In view of the defects of the prior art, the purpose of the present invention is to provide a table creation method, system and electronic device, aiming to solve the problem that the prior art has no effective means to ensure that the field definition of the business table is as identical as possible to the field describing the same business object in the main data table.

[0006] To achieve the above objectives, in a first aspect, the present invention provides a table building method, comprising:

[0007] Obtaining a table creation request; the table creation request carries a first instruction and a second instruction, the first instruction is used to indicate format information of a business table to be created, and the second instruction is used to instruct to compare format information of a preset field of the business table to be created with format information of a related master data table according to a preset comparison rule, and to update the format information of the business table to be created according to the comparison result;

[0008] Determine the first format information of the business table to be created according to the table creation request, and obtain the second format information of the master data table to be compared; the first format information and the second format information both include format information of at least one field;

[0009] The first format information and the second format information are compared according to the preset comparison rule, and when the matching degree between the format of the relevant field in the first format information and the format of the relevant field in the second format information exceeds a preset threshold, the format of the relevant field in the first format information is replaced according to the format of the matched field to obtain updated first format information, so that the format of the business table is consistent with the format of the master data table in the relevant fields;

[0010] A business table is created based on the updated first format information.

[0011] It should be noted that the present invention enables the database to automatically correct the format of the relevant fields indicated by the table creation statement when creating the table by indicating in the table creation request that the relevant fields in the table creation format be compared with the main data table, thereby ensuring that the fields of the business table are as completely identical as possible to the fields of the main data table describing the same business object. Since the above process is completed autonomously by the database and does not rely on the developer's ability at all, it can avoid the problems of low efficiency and lack of accuracy caused by subsequent manual audits.

[0012] Furthermore, the first instruction may be a conventional table creation statement, and the second instruction may be a conventional table creation statement with corresponding keywords added thereto to indicate the relevant information of the master data table and to call preset rules, so that the database can automatically correct the table creation statement, and then create a business table according to the correction result. The business table created by the method of the present invention does not require manual inspection, and the relevant fields of the business table can be set to be as consistent as possible with the master data table through preset rules.

[0013] It is understandable that the first format information and the second format information mentioned above can also be referred to as a meta-model of a data table, where the meta-model refers to the set and sum of format information of each column in the data table, wherein each column corresponds to a field.

[0014] The above preset threshold is set as required, for example, 80%, 90% or 95%, etc. Those skilled in the art can configure the relevant preset threshold according to actual needs. In addition, different thresholds can also be configured for different fields to adapt to different field matching situations.

[0015] In one embodiment, the table building method provided by the present invention can be applied to a database that supports structured query language (SQL), and the table building method of the present invention is implemented through SQL statements. For example, it can be used in a hybrid transactional and analytical processing (HTAP) database that supports SQL statements. Of course, it can be understood by those skilled in the art that the table building method provided by the present invention can also be applied to other databases that can build tables. Therefore, the present invention does not limit the specific database type.

[0016] In one example, the second instruction includes: information of the master data table to be compared.

[0017] In one example, the information of the master data table to be compared includes: information of the database where the master data table is located, connection information of the database where the master data table is located, and table name information of the master data table to be compared.

[0018] It can be understood that the connection information of the database where the main data table is located may include the user name and password of the database where the main data table is located.

[0019] It can be understood that the table name information of the master data tables to be compared can indicate: all master data tables or part of the master data tables. When indicating all master data tables, it can be indicated by the character "ALL".

[0020] In one example, the preset comparison rule includes: a field to be compared and a format matching condition of the field.

[0021] In one example, the first format information and the second format information include format information of a field corresponding to each column in the corresponding table; the format information of the field includes at least one of the following information: column name, column field type, column field length, and column name comment.

[0022] As can be seen from the above, the format information of a field may include at least one kind of information. When multiple kinds of information are included, a matching condition may be set for each kind of information, that is, the format matching condition of the above field may include at least one matching condition.

[0023] Furthermore, when the format information matching value of two fields needs to be calculated, the matching value of each type of information under the field can be calculated first, and then the matching values ​​of multiple types of information are weighted and summed to obtain the format information matching value of the two fields.

[0024] In one embodiment, the weight of each type of information may be set equally and then weighted summed.

[0025] The format matching condition of the field may include: at least one of the following conditions: semantic similarity exceeds a preset percentage, is greater than, is greater than or equal to, is less than, is less than or equal to, or is compatible.

[0026] For example, the matching condition of the column name or column name annotation may be that the semantic similarity exceeds a preset percentage. The matching condition of the column field type may be compatible. The matching condition of the column field length may be greater than or equal to. Those skilled in the art may specifically set the corresponding matching condition as needed, and the present invention does not impose any limitation on this.

[0027] In one example, when there are multiple master data tables to be compared, format information of all the master data tables is merged into the second format information.

[0028] In one embodiment, when there are two master data tables to be compared, if one master data table includes 4 columns and the other master data table includes 20 columns, and each column corresponds to a field, the second format information will include format information of 24 fields.

[0029] In one example, the format matching degree is the maximum value of the matching values ​​between the relevant field in the business table and the format information of each field in the second format information, and the field corresponding to the maximum matching value is the field that matches the relevant field.

[0030] It should be noted that the field that matches the field related to the business table is the field with the largest matching value in the second format information.

[0031] In one example, the preset comparison rule further includes: the preset threshold.

[0032] Specifically, the preset threshold value may not be set in the preset comparison rule, but may be flexibly set according to the needs of those skilled in the art.

[0033] In a second aspect, the present invention provides a table building system, comprising:

[0034] a request acquisition module, used for acquiring a table creation request; the table creation request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the business table to be created, and the second instruction is used for indicating that the format information of the preset fields of the business table to be created is compared with the format information of the relevant master data table according to a preset comparison rule, and the format information of the business table to be created is updated according to the comparison result;

[0035] a format information determination module, configured to determine first format information of a business table to be created according to the table creation request, and obtain second format information of a master data table to be compared; the first format information and the second format information both include format information of at least one field;

[0036] a format updating module, configured to compare the first format information with the second format information according to the preset comparison rule, and when the format of the relevant field in the first format information matches the format of the relevant field in the second format information by a degree exceeding a preset threshold, replace the format of the relevant field in the first format information with the format of the matched field, to obtain updated first format information, so that the format of the business table is consistent with the format of the master data table in the relevant fields;

[0037] The business table creation module is used to create a business table based on the updated first format information.

[0038] In a third aspect, the present invention provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory, wherein when the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect or any one example of the first aspect.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed on a processor, enables the processor to execute the method described in the first aspect or any one of the examples of the first aspect.

[0040] In a fifth aspect, the present invention provides a computer program product. When the computer program product runs on a processor, the processor executes the method described in the first aspect or any one example of the first aspect.

[0041] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0042] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:

[0043] The present invention provides a table building method, system and electronic device. By adding relevant instructions and preset comparison rules in a table building request, a database can automatically correct the table building statement of a business data table based on a master data table, so that the definition of the created business table can be consistent with the definition of the master data table to the greatest extent, and the whole process does not rely on the developer's understanding of the master data table. The table building method provided by the present invention has high briefing efficiency, and the matching accuracy of the created business table and the relevant fields of the master data table is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of a table building method provided by an embodiment of the present invention;

[0045] Figure 2 It is a flow chart of a method for creating a table based on SQL statements provided by an embodiment of the present invention;

[0046] Figure 3 It is a table building system architecture diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0048] The terms "first" and "second" in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order of objects. For example, a first instruction and a second instruction are used to distinguish different instructions rather than to describe a specific order of instructions.

[0049] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0050] In the description of the embodiments of the present invention, unless otherwise specified, “plurality” means two or more than two. For example, “plurality” means two or more than two master data tables.

[0051] Next, the technical solution provided in the embodiments of the present invention is introduced.

[0052] Figure 1 is a flow chart of a table building method provided by an embodiment of the present invention; Figure 1 As shown, the following steps are included:

[0053] S101, obtaining a table creation request; the table creation request carries a first instruction and a second instruction, the first instruction is used to indicate format information of a business table to be created, and the second instruction is used to instruct to compare format information of a preset field of the business table to be created with format information of a related master data table according to a preset comparison rule, and to update the format information of the business table to be created according to the comparison result;

[0054] S102, determining first format information of a business table to be created according to the table creation request, and acquiring second format information of a master data table to be compared; the first format information and the second format information both include format information of at least one field;

[0055] S103, comparing the first format information and the second format information according to the preset comparison rule, and when the matching degree between the format of the relevant field in the first format information and the format of the relevant field in the second format information exceeds a preset threshold, replacing the format of the relevant field in the first format information according to the format of the matched field, to obtain updated first format information, so that the format of the business table is consistent with the format of the master data table in the relevant fields;

[0056] S104: Create a business table based on the updated first format information.

[0057] Exemplarily, the second instruction includes: information of the master data table to be compared.

[0058] For example, the information of the master data table to be compared includes: information of the database where the master data table is located, connection information of the database where the master data table is located, and table name information of the master data table to be compared.

[0059] Exemplarily, the preset comparison rules include: fields to be compared and format matching conditions of the fields.

[0060] For example, the format matching degree is the maximum value of the matching values ​​between the relevant field in the business table and the format information of each field in the second format information, and the field corresponding to the maximum matching value is the field that matches the relevant field.

[0061] Exemplarily, the preset comparison rule also includes: the preset threshold.

[0062] Specifically, when there are multiple master data tables to be compared, format information of all the master data tables is merged into the second format information.

[0063] Furthermore, the first format information and the second format information include format information of a field corresponding to each column in the corresponding table; the format information of a field includes at least one of the following information: column name, column field type, column field length and column name comment.

[0064] In a specific embodiment, when the table creation method provided by the present invention is applied to an SQL database and implemented through SQL statements, the purpose of the present invention is to enable the database software engine to automatically correct the table creation SQL statements to ensure that the field definition of the business table is as identical as possible to the field in the main data table that describes the same business object. This process is completely completed by the database kernel program and does not depend on the developer's ability.

[0065] Figure 2 is a flow chart of a method for creating a table based on SQL statements provided by an embodiment of the present invention; Figure 2 As shown, the following steps are included:

[0066] Step 1: Extract the attribute information of each column of the master data table and encapsulate it into the master data table metamodel. The attribute information of a column includes but is not limited to: column name, column field type, business meaning represented by the column, column field type commonly used in the business system database for the business meaning, etc. Note: The metamodel belongs to the protection scope of the present invention, but the specific content in the model (the specific attribute list of the column) does not belong to the protection scope of the present invention.

[0067] Step 2: Create a mathematical model for comparing the business table fields with the master data metamodel. This model is used in the fourth step below to compare the specified business table field set with the specified master data metamodel field set, and generate a series of triples, each of which consists of a field in the business table, a field in the master data metamodel, and a replacement coefficient. Note: This mathematical model belongs to the protection scope of the present invention, but the specific calculation function and parameter values ​​of the model do not belong to the protection scope of the present invention.

[0068] It should be noted that the mathematical model here refers to the preset comparison rule mentioned above in the present invention.

[0069] Step 3: The developer inputs a table creation SQL statement in a grammatical format supported by the present invention into the SQL database. Based on the table creation syntax defined by standard SQL, the present invention adds a new keyword COMPARE...USING...WITH, which is used to declare a comparison with the main data table metamodel in the table creation SQL statement and call the above-mentioned mathematical model.

[0070] After receiving the table creation SQL statement, the database kernel program will parse the COMPARE keyword and the variables following the keyword in the table creation SQL statement to determine whether to compare with the main data meta-model and the scope of the main data meta-model to be compared.

[0071] In a possible embodiment, the syntax supported by the present invention is as follows:

[0072] CREATE TABLE<table_name>(

[0073] <column_name_1><data_type>( <size>),

[0074] <column_name_2><data_type>( <size>),

[0075] …

[0076] <column_name_n><data_type>( <size>),)

[0077] COMMENT ON COLUMN<column_name_1>IS‘<Comment on column 1>’,

[0078] COMMENT ON COLUMN<column_name_2>IS‘<Comment on column 2>’,

[0079] …

[0080] COMMENT ON COLUMN<column_name_n>IS‘<Comment on column n>’,

[0081] COMPARE ON<Host:Port DB_Name>USING<User_Name> <password>WITH <all> / <MD_Table_Name_1,MD_Table_Name_2,…,MD_Table_Name_n> .

[0082] In the above table creation SQL syntax CREATE TABLE, the statements above CPMARE ON…USING…WITH are all table creation syntaxes supported by conventional standard SQL, which respectively indicate the name of the business table to be created (table name), the name of each column (column_name_i), and the comment of each column (<column_name_i> IS'<column i comment>'), where 1≤i≤n; CPMARE ON...USING...WITH is a new keyword created by the present invention. When the keyword is used in the table creation SQL statement, the process described in the fourth step below is triggered.

[0083] Specifically, in the CPMARE ON…USING…WITH keywords:

[0084] <Host:Port DB_Name> It is the <host name:port database name> of the database where the main data table is located;

[0085] <User_Name> <password>It is the connection account username and password of the database where the main data table is located;

[0086] Parameters after WITH <all>or<MD_Table_Name_1,MD_Table_Name_2,…,MD_Table_Name_n> , choose one of the two. <all>Indicates comparison with all meta-models of the main data table;<MD_Table_Name_1,MD_Table_Name_2,…,MD_Table_Name_n> This means comparing with the metamodel of the specified master data table name.

[0087] It is understandable that if a developer wants to use the table creation method provided by the present invention to create a table, he only needs to add the keyword CPMARE ON…USING…WITH in the table creation statement.

[0088] Step 4: After receiving the table creation SQL statement using the keyword CPMAREON…USING…WITH in the step 3, the mathematical model described in the step 2 executes the following steps to complete the automatic correction of the table creation statement:

[0089] (1) Analyze the keyword COMPARE ON in the table creation statement<Host:Port DB_Name> USING<User_Name> <password>Get the host, port, database name, and user name and password required to connect to the database where the master data metamodel is located.

[0090] (2) Try to create a connection with the database where the main data metamodel is located. If the connection fails, this fourth step ends and the automatic correction of the table creation statement cannot be implemented; if the connection is successfully created, go to step (3).

[0091] (3) Analyze the keyword WITH in the table creation statement <all> / <MD_Table_Name_1,MD_Table_Name_2,…,MD_Table_Name_n> , get the table collection of the master data to be compared.

[0092] (4) For each master data table to be compared, extract the meta-model described in the first step above.

[0093] (5) Parse the SQL statement for creating a table and obtain the column information to be created, including but not limited to the column name<column_name_1> , Column field type<data_type> , column length( <size>), column comment <column comment>.

[0094] (6) The mathematical model automatically calculates the similarity between the column information and the metamodel extracted in the above step (4), and obtains a set of triples, each of which consists of a field in the business table, a field in the master data metamodel, and a replacement coefficient.

[0095] Step 5: Based on the triple set and the replacement coefficient, replace the columns that need to be corrected one by one with the columns in the master data table metamodel to obtain the automatically corrected table creation statement. The table created using this table creation statement can be guaranteed to be as consistent as possible with the master data metamodel.

[0096] The present invention proposes a method for automatically correcting table creation SQL based on the master data meta-model. The core of the method is built into the database kernel program. After the developer submits the business table creation SQL statement, the database kernel automatically corrects the table creation SQL statement according to the master data meta-model to achieve unified definition of the business table and the master data table on related fields.

[0097] The present invention realizes automatic correction of table creation statements of business data tables based on the master data meta-model, so that the definition of the business data table is consistent with the definition of the master data to the greatest extent possible, and the whole process does not rely on the developer's understanding of the master data table. In a general database, the use of the present invention to create a business table that meets the master data standard is compared with the currently commonly used manual reference to the master data table creation. From the perspective of efficiency, the efficiency is improved by dozens of times (seconds vs hours); from the perspective of accuracy, there is a significant improvement in theory, and in practice, there is an improvement of at least 3 times. HTAP databases support transactional data tables and analytical data tables coexisting in a database instance, and analytical data tables are strongly dependent on master data. In HTAP databases, the efficiency and accuracy of the present invention are better than those in general databases.

[0098] The method provided by the present invention has been used in related HTAP database products, and the mathematical model described in the above scheme is implemented. The mathematical model is used to calculate the similarity between the business table fields and the master data metamodel, and a comparative test is performed with the method of manually building tables with reference to the master data. In the scenario of 10 source data tables with a total of 269 fields, using a 4-core 8GB X86 server, the calculation of the former takes 2.3 seconds, and the latter takes 37 minutes. The accuracy of the former is 92%, and the accuracy of the latter is only 31%.

[0099] Figure 3 is a table building system architecture diagram provided by an embodiment of the present invention; Figure 3 As shown, including:

[0100] The request acquisition module 310 is used to acquire a table creation request; the table creation request carries a first instruction and a second instruction, the first instruction is used to indicate the format information of the business table to be created, and the second instruction is used to instruct to compare the format information of the preset fields of the business table to be created with the format information of the relevant master data table according to a preset comparison rule, and update the format information of the business table to be created according to the comparison result;

[0101] The format information determination module 320 is used to determine the first format information of the business table to be created according to the table creation request, and obtain the second format information of the master data table to be compared; the first format information and the second format information both include format information of at least one field;

[0102] The format updating module 330 is used to compare the first format information with the second format information according to the preset comparison rule, and when the format of the relevant field in the first format information matches the format of the relevant field in the second format information by more than a preset threshold, replace the format of the relevant field in the first format information with the format of the matched field to obtain updated first format information, so that the format of the business table is consistent with the format of the master data table in the relevant fields;

[0103] The service table creation module 340 is used to create a service table based on the updated first format information.

[0104] It should be understood that the above-mentioned system is used to execute the methods in the above-mentioned embodiments. The implementation principles and technical effects of the corresponding program modules in the system are similar to those described in the above-mentioned methods. The working process of the system can refer to the corresponding process in the above-mentioned method and will not be repeated here.

[0105] Based on the method in the above embodiment, an embodiment of the present invention provides an electronic device. The device may include: at least one memory for storing programs and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the above embodiment.

[0106] Based on the method in the above embodiment, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0107] Based on the method in the above embodiment, an embodiment of the present invention provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0108] It is understandable that the processor in the embodiment of the present invention may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0109] The method steps in the embodiments of the present invention can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0110] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0111] It should be understood that the various numerical numbers involved in the embodiments of the present invention are only used for the convenience of description and are not used to limit the scope of the embodiments of the present invention.

[0112] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.< / size> < / all> < / password> < / all> < / all> < / password> < / all> < / password> < / size> < / size> < / size>

Claims

1. A table creation method, It is characterized in that include: Get the table creation request; The table creation request carries a first instruction and a second instruction, wherein the first instruction is used to indicate format information of the business table to be created, and the second instruction is used to instruct to compare format information of a preset field of the business table to be created with format information of a related master data table according to a preset comparison rule, and to update the format information of the business table to be created according to the comparison result; Determine the first format information of the business table to be created according to the table creation request, and obtain the second format information of the master data table to be compared; The first format information and the second format information each include format information of at least one field; The first format information and the second format information are compared according to the preset comparison rule, and when the format matching degree between the format of the relevant field in the first format information and the format of the relevant field in the second format information exceeds a preset threshold, the format of the relevant field in the first format information is replaced according to the format of the matched field to obtain updated first format information, so that the format of the business table and the format of the main data table are consistent in the relevant fields; the format matching degree is the maximum value of the matching value between the relevant field in the business table and the format information of each field in the second format information, and the field corresponding to the maximum matching value is the field matching the relevant field; A business table is created based on the updated first format information.

2. The method according to claim 1, It is characterized in that The second instruction includes: information of the master data table to be compared.

3. The method according to claim 1, It is characterized in that The preset comparison rules include: the fields to be compared and the format matching conditions of the fields.

4. The method according to claim 1, It is characterized in that When there are multiple master data tables to be compared, format information of all the master data tables is merged into the second format information.

5. The method according to any one of claims 1 to 4, It is characterized in that The preset comparison rule also includes: the preset threshold.

6. The method according to claim 2, It is characterized in that The information of the master data table to be compared includes: information of the database where the master data table is located, connection information of the database where the master data table is located, and table name information of the master data table to be compared.

7. The method according to any one of claims 1 to 4, It is characterized in that The first format information and the second format information include format information of a field corresponding to each column in the corresponding table; the format information of a field includes at least one of the following information: column name, column field type, column field length, and column name comment.

8. A table building system, It is characterized in that include: Request acquisition module, used to obtain table creation requests; The table creation request carries a first instruction and a second instruction, wherein the first instruction is used to indicate format information of the business table to be created, and the second instruction is used to instruct to compare format information of a preset field of the business table to be created with format information of a related master data table according to a preset comparison rule, and to update the format information of the business table to be created according to the comparison result; A format information determination module, used to determine the first format information of the business table to be created according to the table creation request, and obtain the second format information of the master data table to be compared; The first format information and the second format information each include format information of at least one field; a format updating module, configured to compare the first format information and the second format information according to the preset comparison rule, and when the format matching degree between the format of the relevant field in the first format information and the format of the relevant field in the second format information exceeds a preset threshold, replace the format of the relevant field in the first format information according to the format of the matched field, so as to obtain updated first format information, so that the format of the business table and the format of the main data table are consistent in the relevant fields; the format matching degree is the maximum value of the matching value between the relevant field in the business table and the format information of each field in the second format information, and the field corresponding to the maximum matching value is the field matching the relevant field; The business table creation module is used to create a business table based on the updated first format information.

9. An electronic device, It is characterized in that include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data processing method, device and equipment

    CN111723161A

  • Method and device for creating database table of database and electronic equipment

    CN113220691A

  • Data import method and device, electronic equipment and storage medium

    CN114090671A

  • Information processing method and device and storage medium

    CN114201102A

  • Data synchronization method and device, equipment and storage medium

    CN116089535A