CN117632963A - Method and system for building table and electronic equipment - Google Patents

Method and system for building table and electronic equipment Download PDF

Info

Publication number
CN117632963A
CN117632963A CN202311613020.1A CN202311613020A CN117632963A CN 117632963 A CN117632963 A CN 117632963A CN 202311613020 A CN202311613020 A CN 202311613020A CN 117632963 A CN117632963 A CN 117632963A
Authority
CN
China
Prior art keywords
format information
format
field
information
main data
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
Application number
CN202311613020.1A
Other languages
Chinese (zh)
Other versions
CN117632963B (en
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.)
Shuyi Technology Beijing Co ltd Wuhan Branch
Shuyi Technology Beijing Co ltd
Original Assignee
Shuyi Technology Beijing Co ltd Wuhan Branch
Shuyi Technology Beijing Co ltd
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 Shuyi Technology Beijing Co ltd Wuhan Branch, Shuyi Technology Beijing Co ltd filed Critical Shuyi Technology Beijing Co ltd Wuhan Branch
Priority to CN202311613020.1A priority Critical patent/CN117632963B/en
Publication of CN117632963A publication Critical patent/CN117632963A/en
Application granted granted Critical
Publication of CN117632963B publication Critical patent/CN117632963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a system and electronic equipment for building a table, wherein the method comprises the following steps: acquiring a list building request; determining first format information of a service table to be created according to the table creation request, and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field; comparing the first format information with the second format information according to a preset comparison rule, and replacing the format of the relevant field in the first format information according to the format of the matched field when the matching degree of 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 value to obtain updated first format information; a business table is created based on the updated first format information. The invention can enable the database to automatically correct the statement of the table establishment so as to ensure that the field definition of the service table is identical with the field describing the same service object in the main data table as far as possible.

Description

Method and system for building table and electronic equipment
Technical Field
The invention belongs to the field of databases and big data, and particularly relates to a method, a system and electronic equipment for building a table.
Background
The main data is an important basis for an enterprise to build business application systems, manage data assets and open business processes among different business systems. The main data comprises a main data meta-model and business main data. The main data meta-model is used for defining the fields of the main data table, and the business main data describes the specific numerical value of the main data. In principle, the service table complies with the standard of the main data table, and the field definition of the service table should be identical as far as possible to the field describing the same service object in the main data table.
In the actual application process, a main data table element model is defined firstly, then service main data is filled in the main data table, and the initialization of the main data table is completed. Then, in order to guarantee the service, when the service table needs to be created, a development engineer manually applies for the access right to the main data by examining and approving the stream, and then manually creates the service table in the database by referring to the main data table element model. Because enterprise main data is usually provided with a plurality of fields and has a complex safety management flow, in actual engineering practice, a large number of field definitions and service data of the service table and the main data table are always in an unhooked state, and even if a mechanism for regularly distributing the main data table to the service table exists, the enterprise main data table is not helpful. Therefore, the business data is corrected by comparing the auditing business data with the main data regularly after the fact, but also because the field definitions of the business table and the main data table are unhooked, the comparison auditing after the fact is completely dependent on manual technology for processing, the efficiency of manual auditing is low, and the accuracy rate cannot be guaranteed.
In summary, there is no effective technical means to ensure that the field definition of the service table is identical to the field describing the same service object in the main data table as far as possible.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a method, a system and electronic equipment for building a table, and aims to solve the problem that no effective means exists in the prior art to ensure that field definition of a service table is identical to fields describing the same service object in a main data table as far as possible.
In order to achieve the above object, in a first aspect, the present invention provides a method for building a table, including:
acquiring a list building request; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
determining first format information of a service table to be created according to the table creation request, and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
comparing the first format information with the second format information according to the preset comparison rule, and when the matching degree of the format of the related field in the first format information and the format of the related field in the second format information exceeds a preset threshold, replacing the format of the related field in the first format information according to the matched format of the field to obtain updated first format information, so that the format of the service table is consistent with the format of the main data table on the related field;
a business table is created based on the updated first format information.
It should be noted that, the invention makes the database automatically correct the related field format indicated by the list establishment sentence when the database establishes the list by comparing the related field in the list establishment format with the main data list in the list establishment request, and ensures that the field of the service list is identical to the field of the main data list describing the same service object as far as possible. The process is completed independently by the database, so that the method is completely independent of the capability of a developer, and the problems of low efficiency and incapability of guaranteeing the accuracy caused by post manual inspection can be avoided.
Further, the first instruction may be a conventional table-building statement, and the second instruction may be to add a corresponding keyword based on the conventional table-building statement, so as to indicate related information of the main data table and call a preset rule, so that the database can automatically correct the table-building statement, and then create the service table according to the correction result. The service table created by the method does not need to be checked manually, and the related fields of the service table can be set to be consistent with the main data table as far as possible through preset rules.
It is understood that the first format information and the second format information may also be referred to as: the meta-model of the data table refers to the sum of the format information of the individual columns in the data table. Wherein each column corresponds to a field.
Wherein the preset threshold is set according to needs, for example: 80%, 90% or 95%, etc., and those skilled in the art can configure the relevant preset threshold values according to actual needs. In addition, different thresholds can be configured for different fields so as to adapt to different field matching situations.
In one embodiment, the method for building a table provided by the invention can be applied to a database supporting structured query language (Structured Query Language, SQL), and the method for building a table provided by the invention is realized through SQL language. For example, it may be used in a transaction and analysis hybrid computing (Hybrid Transactional and Analytical Processing, HTAP) type database that supports SQL statements. Of course, it will be understood by those skilled in the art that the method for creating a table provided by the present invention is also applicable to other databases capable of creating a table, and thus, the present invention is not limited to any specific database type.
In one example, the second instructions include: information of the main data table to be compared.
In one example, the information of the main data table to be compared includes: the information of the database where the main data table is located, the connection information of the database where the main data table is located, and the table name information of the main data table to be compared.
It will be appreciated that the connection information of the database in which the master data table is located may include a user name and a password of the database in which the master data table is located.
It will be appreciated that the table name information of the main data table to be compared may indicate: ALL or part of the master data tables, when indicated, may be indicated by the character "ALL".
In one example, the preset contrast rule includes: the fields to be compared and the format of the fields match the condition.
In one example, the first format information and the second format information include format information of a field corresponding to each column in the table; the format information of the one field includes at least one of column name, column field type, column field length, and column name annotation.
As can be seen from the above, the format information of one field may include at least one information, and when a plurality of information are included, each information may set a matching condition, i.e., the format matching condition of the above field may include at least one matching condition.
Further, when the matching values of the format information of the two fields need to be calculated, the matching value of each information under the fields can be calculated first, and then the matching values of the various information are weighted and summed to obtain the matching values of the format information of the two fields.
In one embodiment, the weights for each type of information may be averaged and then weighted summed.
The format matching condition of the field may include: the semantic similarity exceeds at least one of a certain preset percentage, greater than or equal to, less than or equal to, or compatible with, and the like.
For example, the matching condition of the column names or column name annotations may be that the semantic similarity exceeds a preset certain percentage. The matching condition of the column field type may be compatible. The matching condition of the column field length may be equal to or greater. The corresponding matching conditions can be specifically set by those skilled in the art as required, and the invention is not limited in any way.
In one example, when the main data table to be compared includes a plurality of, format information of all the main data tables is combined into the second format information.
In one embodiment, when the main data table to be compared includes 2, if one main data table includes 4 columns and the other main data table includes 20 columns, each column corresponding to one field, the second format information will include format information of 24 fields.
In one example, the format matching degree is a maximum value of a matching value of the relevant field in the service table and each field format information in the second format information, and a field corresponding to the maximum value of the matching value is a field matched with the relevant field.
The field matching the relevant field of the service table is the field with the largest matching value in the second format information.
In one example, the preset contrast rule further includes: the preset threshold value.
Specifically, the preset threshold may not be set in a preset contrast rule, and may be set flexibly according to the needs of those skilled in the art.
In a second aspect, the present invention provides a system for building a table, comprising:
the request acquisition module is used for acquiring a list building request; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
the format information determining module is used for determining first format information of a service table to be created according to the table creation request and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
the format updating module is used for comparing the first format information with the second format information according to the preset comparison rule, and replacing the format of the relevant field in the first format information according to the format of the matched field when the matching degree of 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 value, so that updated first format information is obtained, and the format of the service table is consistent with the format of the main data table on the relevant field;
and the service table creation module is used for creating a service table based on the updated first format information.
In a third aspect, the present invention provides an electronic device comprising: at least one memory for storing a program; at least one processor for executing a memory-stored program, the processor being for performing the method described in the first aspect or any one of the examples of the first aspect when the memory-stored program is executed.
In a fourth aspect, the present invention provides a computer readable storage medium storing a computer program which, when run on a processor, causes the processor to perform the method described in the first aspect or any one of the examples of the first aspect.
In a fifth aspect, the invention provides a computer program product which, when run on a processor, causes the processor to perform the method described in the first aspect or any of the examples of the first aspect.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:
the invention provides a method, a system and electronic equipment for building a table, which realize that a database can automatically correct a table building statement of a service data table based on a main data table by adding related instructions and preset comparison rules in a table building request, so that the definition of the created service table can accord with the definition of the main data table to the maximum extent, and the whole process does not depend on the knowledge of a developer on the main data table. The method for building the table provided by the invention has high presentation efficiency, and the matching accuracy of the created service table and the relevant fields of the main data table is high.
Drawings
FIG. 1 is a flowchart of a method for building a table according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for building a table based on SQL statements provided by an embodiment of the invention;
fig. 3 is a schematic diagram of a system architecture for building a table according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The terms first and second and the like in the description and in the claims, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order of the objects. For example, a first instruction and a second instruction, etc., are used to distinguish between different instructions and are not used to describe a particular order of instructions.
In embodiments of the invention, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present invention, unless otherwise indicated, the meaning of "plurality" means two or more, for example, a plurality of main data tables means two or more main data tables, and the like.
Next, the technical scheme provided in the embodiment of the present invention is described.
FIG. 1 is a flowchart of a method for building a table according to an embodiment of the present invention; as shown in fig. 1, the method comprises the following steps:
s101, acquiring a list building request; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
s102, determining first format information of a service table to be created according to the table creation request, and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
s103, comparing the first format information with the second format information according to the preset comparison rule, and when the format matching degree of the related fields in the first format information and the related fields in the second format information exceeds a preset threshold, replacing the format of the related fields in the first format information according to the matched fields to obtain updated first format information, so that the format of the service table is consistent with the format of the main data table on the related fields;
s104, creating a service table based on the updated first format information.
Illustratively, the second instructions include: information of the main data table to be compared.
For example, the information of the main data table to be compared includes: the information of the database where the main data table is located, the connection information of the database where the main data table is located, and the table name information of the main data table to be compared.
Illustratively, the preset contrast rule includes: the fields to be compared and the format of the fields match the condition.
For example, the format matching degree is the maximum value of the matching value of the relevant field in the service table and each field format information in the second format information, and the field corresponding to the maximum value of the matching value is the field matched with the relevant field.
Illustratively, the preset contrast rule further includes: the preset threshold value.
Specifically, when the main data table to be compared includes a plurality of, format information of all the main data tables is merged into the second format information.
Further, the first format information and the second format information comprise format information of a field corresponding to each column in the corresponding table; the format information of the one field includes at least one of column name, column field type, column field length, and column name annotation.
In a specific embodiment, when the method for building the table provided by the invention is applied to the SQL database and implemented by SQL statements, the purpose of the invention is to enable a database software engine to have the function of automatically correcting the SQL statements for building the table, so as to ensure that the field definition of a service table is identical to the field describing the same service object in a main data table as far as possible, and the process is completely completed by a database kernel program and does not depend on the capability of a developer.
FIG. 2 is a flow chart of a method for building a table based on SQL statements provided by an embodiment of the invention; as shown in fig. 2, the method comprises the following steps:
the first step: extracting attribute information of each column of the main data table, and packaging the attribute information into a main data table element model. Attribute information for 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 business systems databases for that business meaning, and the like. Note that: meta-models fall within the scope of the invention, but the specific content (list of specific properties of a column) in the model does not fall within the scope of the invention.
And a second step of: a mathematical model is created for comparing the business table fields with the master data meta-model. The model is used for comparing the designated set of business table fields with the designated set of fields of the master data meta-model in the fourth step described below and generating a series of triples, each triplet consisting of one field in the business table, one field in the master data meta-model, and a replacement coefficient. Note that: the mathematical model belongs to the protection scope of the invention, but the specific calculation function and parameter value of the model do not belong to the protection scope of the invention.
It should be noted that, the mathematical model herein refers to the preset contrast rule mentioned in the foregoing description of the present invention.
And a third step of: the developer inputs the table-building SQL statement in the grammar format supported by the invention into the SQL database, and on the basis of the table-building grammar defined by the standard SQL, the invention adds a new keyword COMPARE … USING … WITH for declaring the comparison WITH the main data table element model in the table-building SQL statement and calling the mathematical model.
After receiving the table-building SQL statement, the database kernel program analyzes the COMPARE keyword and the variables behind the keyword in the table-building SQL statement to determine whether to COMPARE with the main data meta-model and the range of the compared main data meta-model.
In one possible embodiment, the syntax supported by the present invention is as follows:
CREATE TABLE<table_name>(
<column_name_1><data_type>(<size>),
<column_name_2><data_type>(<size>),
<column_name_n><data_type>(<size>),)
COMMENT ON COLUMN < column_name_1> is '< column 1 note >',
COMMENT ON COLUMN < column_name_2> is '< column 2 note >',
COMMENT ON COLUMN < column_name_n > IS '< column n note >',
COMPARE ON<Host:Port DB_Name>USING<User_Name><Password>WITH<ALL>/<MD_Table_Name_1,MD_Table_Name_2,…,MD_Table_Name_n>。
in the above TABLE-building SQL grammar CREATE TABLE, the statement above CPMARE ON … USING … WITH IS a TABLE-building grammar supported by conventional standard SQL, and indicates the name (TABLE name) of the service TABLE to be created, the name (column_name_i) of each column and the comment of each column (wherein, 1.ltoreq.i.ltoreq.n; CPMARE ON … USING … WITH is a new key created by the present invention, which when used in building a table SQL statement triggers the process described in the fourth step below.
Specifically, in the CPMARE ON … USING … WITH keyword:
< Host: port DB_Name > is the < hostname of the database where the master data table is located: port database name >;
the < user_name > < Password > is a connection account User Name and a Password of a database where the main data table is located;
the parameters < ALL > or < md_table_name_1, md_table_name_2, …, md_table_name_n > after the wit are one of the two. < ALL > represents a comparison with ALL metamodels of the master data table; < md_table_name_1, md_table_name_2, …, md_table_name_n > then represents comparison with the meta-model specifying the primary data Table Name.
It can be understood that, in order to build a table by USING the method provided by the invention, a developer only needs to add a keyword CPMARE ON … USING … WITH into a build sentence.
Fourth step: the mathematical model in the second step executes the following steps after receiving the statement of the table building SQL USING the keyword CPMARE ON … USING … WITH in the third step, and completes the automatic correction of the statement of the table building:
(1) And analyzing the key word COMPARE ON < Host > of the list-establishing sentence, wherein Port DB_Name > USING < user_Name > < Password > to obtain a Host, a Port, a database Name and a User Name and a Password required by connecting the database where the main data meta-model is located.
(2) Attempting to establish connection with a database where the main data element model is located, and if the connection fails, ending the fourth step, and failing to implement automatic correction of the table establishment sentence; if the connection is created successfully, step (3) is entered.
(3) And analyzing the keywords of the list establishment sentence WITH < ALL >/< MD_Table_Name_1, MD_Table_Name_2, … and MD_Table_Name_n >, and obtaining a list set of main data to be compared.
(4) For each main data table to be compared, the meta-model described in the first step is extracted.
(5) The build table SQL statement is parsed to obtain column information to be created, including, but not limited to, column name < column_name_1>, column field type < data_type >, column length (< size >), column annotation < column annotation >.
(6) And (3) automatically calculating the similarity between the column information and the meta-model extracted in the step (4) by using the mathematical model to obtain a triplet set, wherein each triplet consists of one field in the service table, one field in the main data meta-model and a replacement coefficient.
Fifth step: and according to the triplet set, combining with the replacement coefficient, replacing columns in the main data primitive model one by one to obtain a table building statement after automatic correction. The table created by using the table-building sentence can ensure the consistency with the main data element model as much as possible.
The invention provides a method for automatically correcting and building a table SQL (structured query language) based on a main data element model, wherein the core of the method is built in a database kernel program, and after a developer submits and submits a business table SQL statement, the database kernel automatically corrects the table SQL statement according to the main data element model so as to realize unified definition of the business table and the main data table on related fields.
The invention realizes the automatic correction of the statement of the business data table based on the main data element model, so that the definition of the business data table accords with the definition of the main data to the maximum extent, and the whole process does not depend on the knowledge of a developer on the main data table. In a general database, the invention is used for creating a business table which accords with the main data standard, and compared with the existing manual reference main data table construction, the efficiency is improved by tens of times (seconds vs. hours); from the perspective of accuracy, there is obvious promotion in theory, on the practical operation, has more than 3 times promotion. HTAP-type databases support transactional and analytical data tables and exist in one database instance, with analytical data tables being strongly dependent on the main data. In HTAP type databases, the efficiency and accuracy of using the present invention is better than in general purpose databases.
The method provided by the invention has been used in related HTAP type database products, realizes the mathematical model described in the scheme, calculates the similarity between the business table field and the main data element model by using the mathematical model, and performs comparison test with the mode of manually referring to the main data to build the table. In a 10 source data table total 269 fields scenario, a 4-core 8GB X86 server was used, the former taking 2.3 seconds for computation, the latter taking 37 minutes, the former being 92% accurate, the latter being only 31% accurate.
FIG. 3 is a diagram of a system architecture for building a table according to an embodiment of the present invention; as shown in fig. 3, includes:
a request acquisition module 310, configured to acquire a request for building a table; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
the format information determining module 320 is configured to determine first format information of a service table to be created according to the table creation request, and obtain second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
the format updating module 330 is configured to compare the first format information with the second format information according to the preset comparison rule, and replace the format of the relevant field in the first format information according to the format of the matched field when the matching degree of 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, so as to obtain updated first format information, so that the format of the service table is consistent with the format of the main data table on the relevant field;
the service table creating module 340 is configured to create a service table based on the updated first format information.
It should be understood that, the system is used to execute the method in the foregoing embodiment, and corresponding program modules in the system implement principles and technical effects similar to those described in the foregoing method, and the working process of the system may refer to the corresponding process in the foregoing method, which is not repeated herein.
Based on the method in the above embodiment, the embodiment of the invention provides an electronic device. The apparatus may include: at least one memory for storing programs and at least one processor for executing the programs stored by the memory. Wherein the processor is adapted to perform the method described in the above embodiments when the program stored in the memory is executed.
Based on the method in the above embodiment, the embodiment of the present invention provides a computer-readable storage medium storing a computer program, which when executed on a processor, causes the processor to perform the method in the above embodiment.
Based on the method in the above embodiments, an embodiment of the present invention provides a computer program product, which when run on a processor causes the processor to perform the method in the above embodiments.
It is to be appreciated that the processor in embodiments of the invention may be a central processing unit (centralprocessing unit, CPU), other general purpose processor, digital signal processor (digital signalprocessor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor.
The steps of the method in the embodiment of the present invention may be implemented by hardware, or may be implemented by executing software instructions by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access memory (random access memory, RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable PROM (EPROM), electrically erasable programmable EPROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present invention are merely for ease of description and are not intended to limit the scope of the embodiments of the present invention.
It will be readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method of building a table, comprising:
acquiring a list building request; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
determining first format information of a service table to be created according to the table creation request, and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
comparing the first format information with the second format information according to the preset comparison rule, and when the matching degree of the format of the related field in the first format information and the format of the related field in the second format information exceeds a preset threshold, replacing the format of the related field in the first format information according to the matched format of the field to obtain updated first format information, so that the format of the service table is consistent with the format of the main data table on the related field;
a business table is created based on the updated first format information.
2. The method of claim 1, wherein the second instructions comprise: information of the main data table to be compared.
3. The method of claim 1, wherein the preset contrast rule comprises: the fields to be compared and the format of the fields match the condition.
4. The method according to claim 1, wherein when the master data table to be compared includes a plurality of master data tables, format information of all the master data tables is combined into the second format information.
5. The method according to any one of claims 1 to 4, wherein the format matching degree is a maximum value of a matching value of a relevant field in the service table and each field format information in the second format information, and a field corresponding to the maximum value of the matching value is a field matching the relevant field.
6. The method of any one of claims 1 to 4, wherein the preset contrast rule further comprises: the preset threshold value.
7. The method of claim 2, wherein the information of the master data table to be compared comprises: the information of the database where the main data table is located, the connection information of the database where the main data table is located, and the table name information of the main data table to be compared.
8. The method of any one of claims 1 to 4, wherein the first format information and the second format information include format information corresponding to one field corresponding to each column in the table; the format information of the one field includes at least one of column name, column field type, column field length, and column name annotation.
9. A meter-building system, comprising:
the request acquisition module is used for acquiring a list building request; the table establishment request carries a first instruction and a second instruction, the first instruction is used for indicating the format information of the service table to be established, the second instruction is used for indicating that the format information of the preset field of the service table to be established is compared with the format information of the related main data table according to a preset comparison rule, and the format information of the service table to be established is updated according to a comparison result;
the format information determining module is used for determining first format information of a service table to be created according to the table creation request and acquiring second format information of a main data table to be compared; the first format information and the second format information each include format information of at least one field;
the format updating module is used for comparing the first format information with the second format information according to the preset comparison rule, and replacing the format of the relevant field in the first format information according to the format of the matched field when the matching degree of 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 value, so that updated first format information is obtained, and the format of the service table is consistent with the format of the main data table on the relevant field;
and the service table creation module is used for creating a service table based on the updated first format information.
10. An electronic device, comprising:
at least one memory for storing a program;
at least one processor for executing the memory-stored program, which processor is adapted to perform the method of any of claims 1-8 when the memory-stored program is executed.
CN202311613020.1A 2023-11-29 2023-11-29 Method and system for building table and electronic equipment Active CN117632963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311613020.1A CN117632963B (en) 2023-11-29 2023-11-29 Method and system for building table and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311613020.1A CN117632963B (en) 2023-11-29 2023-11-29 Method and system for building table and electronic equipment

Publications (2)

Publication Number Publication Date
CN117632963A true CN117632963A (en) 2024-03-01
CN117632963B CN117632963B (en) 2024-09-17

Family

ID=90029932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311613020.1A Active CN117632963B (en) 2023-11-29 2023-11-29 Method and system for building table and electronic equipment

Country Status (1)

Country Link
CN (1) CN117632963B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2012145068A (en) * 2012-10-22 2014-04-27 Закрытое акционерное общество Научно-производственное предприятие "Реляционные экспертные системы" METHOD FOR UPDATING STRUCTURED DATA IN THE SYSTEM OF MANAGEMENT OF RELATIVE DATABASES
WO2016150296A1 (en) * 2015-03-23 2016-09-29 华为技术有限公司 Method and device for sending and receiving flow specification rule
US9569626B1 (en) * 2015-04-10 2017-02-14 Dell Software Inc. Systems and methods of reporting content-exposure events
CN111723161A (en) * 2019-03-20 2020-09-29 阿里巴巴集团控股有限公司 Data processing method, device and equipment
CN113220691A (en) * 2021-05-31 2021-08-06 北京互金新融科技有限公司 Database table creating method and device for database table, and electronic equipment
CN114090671A (en) * 2021-11-23 2022-02-25 深圳市元征科技股份有限公司 Data import method and device, electronic equipment and storage medium
CN114201102A (en) * 2021-11-30 2022-03-18 斑马网络技术有限公司 Information processing method, device and storage medium
US20220197914A1 (en) * 2020-12-17 2022-06-23 International Business Machines Corporation Ranking datasets based on data attributes
CN116089535A (en) * 2023-02-15 2023-05-09 平安科技(深圳)有限公司 Data synchronization method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2012145068A (en) * 2012-10-22 2014-04-27 Закрытое акционерное общество Научно-производственное предприятие "Реляционные экспертные системы" METHOD FOR UPDATING STRUCTURED DATA IN THE SYSTEM OF MANAGEMENT OF RELATIVE DATABASES
WO2016150296A1 (en) * 2015-03-23 2016-09-29 华为技术有限公司 Method and device for sending and receiving flow specification rule
US9569626B1 (en) * 2015-04-10 2017-02-14 Dell Software Inc. Systems and methods of reporting content-exposure events
CN111723161A (en) * 2019-03-20 2020-09-29 阿里巴巴集团控股有限公司 Data processing method, device and equipment
US20220197914A1 (en) * 2020-12-17 2022-06-23 International Business Machines Corporation Ranking datasets based on data attributes
CN113220691A (en) * 2021-05-31 2021-08-06 北京互金新融科技有限公司 Database table creating method and device for database table, and electronic equipment
CN114090671A (en) * 2021-11-23 2022-02-25 深圳市元征科技股份有限公司 Data import method and device, electronic equipment and storage medium
CN114201102A (en) * 2021-11-30 2022-03-18 斑马网络技术有限公司 Information processing method, device and storage medium
CN116089535A (en) * 2023-02-15 2023-05-09 平安科技(深圳)有限公司 Data synchronization method, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李国红: "利用PHP+MySQL实现通用信息系统的建库建表功能", 电脑编程技巧与维护, no. 18, 18 September 2017 (2017-09-18) *
白玉杰等: "通用录入表的设计与实现", 科技资讯, no. 11, 13 April 2016 (2016-04-13) *
闫冬等: "火力发电企业燃料信息报表自定义系统", 电力信息与通信技术, no. 04, 15 April 2017 (2017-04-15) *

Also Published As

Publication number Publication date
CN117632963B (en) 2024-09-17

Similar Documents

Publication Publication Date Title
CN111522816B (en) Data processing method, device, terminal and medium based on database engine
CN110908997B (en) Data blood relationship construction method and device, server and readable storage medium
CN110795455B (en) Dependency analysis method, electronic device, computer apparatus, and readable storage medium
US10983789B2 (en) Systems and methods for automating and monitoring software development operations
CN111949541A (en) Multi-source database statement checking method and device
US11599539B2 (en) Column lineage and metadata propagation
US8417690B2 (en) Automatically avoiding unconstrained cartesian product joins
CN111767340B (en) Data processing method, device, electronic equipment and medium
CN108647300B (en) Database access intermediate system, method, device and storage medium
CN110543356A (en) abnormal task detection method, device and equipment and computer storage medium
CN107766353B (en) Method and device for migrating statistical information of database
CN112650526B (en) Method, device, electronic equipment and medium for detecting version consistency
US10339035B2 (en) Test DB data generation apparatus
CN112035508A (en) SQL (structured query language) -based online metadata analysis method, system and equipment
CN111143390A (en) Method and device for updating metadata
US9367307B2 (en) Staged points-to analysis for large code bases
CN109101541B (en) Newly added index management method, device and computer readable storage medium
WO2022198835A1 (en) Method and apparatus for testing electronic map, and electronic device and storage medium
CN117971860A (en) Method and device for generating SQL (structured query language) sentences based on large language model and terminal equipment
CN116166718B (en) Data blood margin acquisition method and device
CN110580170B (en) Method and device for identifying software performance risk
CN117632963B (en) Method and system for building table and electronic equipment
CN115545006B (en) Rule script generation method, device, computer equipment and medium
CN111221846B (en) Automatic translation method and device for SQL sentences
CN117573199B (en) Model difference comparison analysis method, device, equipment and 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