Data table creating method, device, equipment and storage medium

文档序号:191230 发布日期:2021-11-02 浏览:35次 中文

阅读说明:本技术 数据表的创建方法、装置、设备及存储介质 (Data table creating method, device, equipment and storage medium ) 是由 李立彪 王煜 焦江昆 于 2021-07-30 设计创作,主要内容包括:本申请提供一种数据表的创建方法、装置、设备及存储介质,其中,数据表的创建方法包括步骤:当接收到数据表的创建请求时,获取预先配置的数据表模型;根据用户针对所述数据表模型所选择的配置信息以及输入的表名主体,生成目标数据表的数据表名;获取针对所述目标数据表的填充信息;将所述填充信息输入至所述目标数据表的相应字段中。本申请能够创建规范统一的数据表,进而建立规范的数仓,并减少数仓开发人员之间的沟通成本,提高数仓开发人员开发效率。另一方面,本申请能够降低数仓维护成本和数据使用成本。(The application provides a method, a device, equipment and a storage medium for creating a data table, wherein the method for creating the data table comprises the following steps: when a data table creation request is received, a pre-configured data table model is obtained; generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body; acquiring filling information aiming at the target data table; and inputting the filling information into a corresponding field of the target data table. The method and the device can create the standard and uniform data table, further establish the standard number bins, reduce communication cost among the number bin developers, and improve development efficiency of the number bin developers. On the other hand, the method and the device can reduce the maintenance cost of the data warehouse and the use cost of the data.)

1. A method for creating a data table, the method comprising:

when a data table creation request is received, a pre-configured data table model is obtained;

generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

acquiring filling information aiming at the target data table;

and inputting the filling information into a corresponding field of the target data table.

2. The method of claim 1, wherein prior to said obtaining a preconfigured spreadsheet model, said method further comprises:

obtaining a plurality of themes and forming a theme library;

acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain the data table model.

3. The method of claim 2, wherein the obtaining the padding information for the target data table comprises:

matching a reference data table according to the subject of the target data table and/or the descriptor of the target data table;

analyzing the reference data table to obtain at least field information of the reference data table;

and taking the field information of the reference data table as the filling information.

4. The method of claim 1, wherein the obtaining the padding information for the target data table comprises:

acquiring database operation data input by a user;

and analyzing the database operation data to obtain the filling information.

5. The method of claim 1, wherein the obtaining the padding information for the target data table comprises:

acquiring a query condition input by a user;

and carrying out fuzzy search on a historical data table filling information base according to the query condition to obtain the filling information, wherein the historical data table filling information base is generated on the basis of field information stored when the historical data table is created.

6. An apparatus for creating a data table, the apparatus comprising:

the first acquisition module is used for acquiring a pre-configured data table model when a creation request of a data table is received;

the generating module is used for generating the data table name of the target data table according to the configuration information selected by the user aiming at the data table model and the input table name main body;

the second acquisition module is used for acquiring filling information aiming at the target data table;

and the filling module is used for inputting the filling information into the corresponding field of the target data table.

7. The apparatus of claim 6, wherein the apparatus further comprises:

the third acquisition module is used for acquiring a plurality of themes and forming a theme library;

the fourth acquisition module is used for acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and the hierarchical configuration module is used for combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain the data table model.

8. The apparatus of claim 6, wherein the second obtaining module comprises:

the matching submodule is used for matching and referencing the data table according to the theme of the target data table and/or the descriptor of the target data table;

the analysis submodule is used for analyzing the reference data table to at least obtain field information of the reference data table;

and the association submodule is used for taking the field information of the reference data table as the filling information.

9. A data table creation apparatus comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, perform a data table creation method according to any one of claims 1 to 5.

10. A storage medium characterized in that it stores a computer program which, when called, executes the method of creating a data table according to any one of claims 1 to 5.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for creating a data table.

Background

In the application of big data in the Internet industry at present, data modeling only bears a function of quickly building a table, does not provide support for a standard of building the table, and has the defects of high maintenance cost of a warehouse and high use cost of the data.

Disclosure of Invention

An object of the embodiments of the present application is to provide a method, an apparatus, a device, and a storage medium for creating a data table, so as to obtain a standard number of bins, reduce communication cost among developers of the number of bins, improve development efficiency of the developers of the number of bins, and reduce maintenance cost and data use cost of the number of bins.

To this end, a first aspect of the present application discloses a method for creating a data table, the method comprising:

when a data table creation request is received, a pre-configured data table model is obtained;

generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

acquiring filling information aiming at the target data table;

and inputting the filling information into a corresponding field of the target data table.

The method of the first aspect of the application can assist the warehouse developers to create the data sheet with unified naming specifications, so that the data sheet of the warehouse can be read and understood conveniently, one warehouse developer can understand and operate the data sheet created by other warehouse developers quickly, communication cost among a few warehouse developers is reduced, and development efficiency of the warehouse developers is improved, particularly, with explosive growth of big data, newly added data is countless every day, a warehouse team organizes the data, the frequency of creating or modifying the sheet is higher and higher, but the members of the warehouse teams are numerous, and the service is complicated, or with change of personnel, the warehouse developer A may not understand the data sheet developed before the warehouse developer B who has left off, or the newly entered warehouse developer C just enters into work and cannot understand the data sheet developed by the existing warehouse developers, the communication cost among the warehouse developers can be reduced, the development efficiency of the warehouse developers is improved, and the warehouse maintenance cost and the data use cost are reduced.

On the other hand, the target data table can be automatically filled according to the filling information by the method in the first aspect of the application, so that the development efficiency of the warehouse counter developers can be further improved.

In contrast, the existing industry solutions only provide a function of building a table quickly according to a model, and fail to solve the problem of table name specification, especially under the condition that a large number of data tables need to be built along with the change of services, because the table names are not specified, the communication efficiency between developers is caused, and on the other hand, because the prior art cannot realize automatic data table building, the efficiency of the developers is further reduced.

In the first aspect of the present application, as an optional implementation manner, before the obtaining the preconfigured data table model, the method further includes:

obtaining a plurality of themes and forming a theme library;

acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain the data table model.

In this alternative embodiment, a data table naming specification may be formed by combining the subject of the subject library with the descriptors according to the hierarchical configuration information.

In the first aspect of the present application, as an optional implementation manner, the obtaining of the padding information for the target data table includes:

matching a reference data table according to the subject of the target data table and/or the descriptor of the target data table;

analyzing the reference data table to obtain at least field information of the reference data table;

and taking the field information of the reference data table as the filling information.

According to the optional embodiment, the field information of the reference data table can be obtained by matching the descriptor of the target data table with the reference data table and analyzing the reference data table according to the theme of the target data table and/or the descriptor of the target data table, so that the field information of the reference data table can be used as filling information.

In the first aspect of the present application, as an optional implementation manner, the obtaining of the padding information for the target data table includes:

acquiring database operation data input by a user;

and analyzing the database operation data to obtain the filling information.

In the optional embodiment, the filling information can be obtained by acquiring the database operation data input by the user and then analyzing the database operation data.

In the first aspect of the present application, as an optional implementation manner, the obtaining of the padding information for the target data table includes:

acquiring a query condition input by a user;

and carrying out fuzzy search on a historical data table filling information base according to the query condition to obtain the filling information, wherein the historical data table filling information base is generated on the basis of field information stored when the historical data table is created.

In the optional embodiment, fuzzy search can be performed to obtain the filling information based on the filling information stored in the historical data bin during creation and the query condition input by the user. For example, the user enters "u" and after a fuzzy search, the field "user ID" is obtained.

A second aspect of the present application discloses an apparatus for creating a data table, the apparatus comprising:

the first acquisition module is used for acquiring a pre-configured data table model when a creation request of a data table is received;

the generating module is used for generating the data table name of the target data table according to the configuration information selected by the user aiming at the data table model and the input table name main body;

the second acquisition module is used for acquiring filling information aiming at the target data table;

and the filling module is used for inputting the filling information into the corresponding field of the target data table.

The device of the second aspect of the application can assist the warehouse developers to create the data sheet with unified naming specifications, so that the data sheet of the warehouse can be read and understood conveniently, and further one warehouse developer can rapidly understand and operate the data sheet created by other warehouse developers, communication cost among a few warehouse developers is reduced, development efficiency of the warehouse developers is improved, especially, with explosive growth of big data, newly added data is not sufficient every day, warehouse teams organize the data, frequency of building or modifying the sheet is higher and higher, but warehouse team members are numerous, service is complicated, or with change of personnel, the warehouse developer a may not understand the data sheet developed before the warehouse developer B who has left off duty, or the newly entered warehouse developer C just enters duty and cannot understand the data sheet developed by the existing warehouse developers, the communication cost among the warehouse developers can be reduced, the development efficiency of the warehouse developers is improved, and the warehouse maintenance cost and the data use cost are reduced.

On the other hand, the device of the second aspect of the application can also automatically fill the target number data table according to the filling information, so that the development efficiency of the warehouse counting developers can be further improved.

In contrast, the existing industry solutions only provide a function of building a table quickly according to a model, and fail to solve the problem of table name specification, especially under the condition that a large number of data tables need to be built along with the change of services, because the table names are not specified, the communication efficiency between developers is caused, and on the other hand, because the prior art cannot realize automatic data table building, the efficiency of the developers is further reduced.

In the second aspect of the present application, as an optional implementation, the apparatus further includes:

the third acquisition module is used for acquiring a plurality of themes and forming a theme library;

the fourth acquisition module is used for acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and the hierarchical configuration module is used for combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain the data table model.

In this alternative embodiment, a data table naming specification may be formed by combining the subject of the subject library with the descriptors according to the hierarchical configuration information.

In the second aspect of the present application, as an optional implementation manner, the second obtaining module includes:

the matching submodule is used for matching and referencing the data table according to the theme of the target data table and/or the descriptor of the target data table;

the analysis submodule is used for analyzing the reference data table to at least obtain field information of the reference data table;

and the association submodule is used for taking the field information of the reference data table as the filling information. According to the optional embodiment, the field information of the reference data table can be obtained by matching the descriptor of the target data table with the reference data table and analyzing the reference data table according to the theme of the target data table and/or the descriptor of the target data table, so that the field information of the reference data table can be used as filling information.

In a third aspect, the present application discloses a device for creating a data table, the device includes a memory and a processor, the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, perform the method for creating a data table disclosed in the first aspect of the present application.

The device of the third aspect of the present application can assist the warehouse developers to create a data sheet with unified naming specifications, so that the data sheet of the warehouse can be read and understood conveniently, so that one warehouse developer can quickly understand and operate the data sheet created by other warehouse developers, communication cost among a small number of warehouse developers is reduced, and development efficiency of the warehouse developers is improved, especially, as big data grows explosively, newly added data is not sufficient every day, warehouse teams organize the data, the frequency of creating or modifying the sheet is higher and higher, but warehouse team members are numerous, and the service is complicated, or as personnel change, the warehouse developer a may not understand the data sheet developed before the warehouse developer B who has left off duty, or the newly entered warehouse developer C just enters duty and cannot understand the data sheet developed by the existing warehouse developer, the communication cost among the warehouse developers can be reduced, the development efficiency of the warehouse developers is improved, and the warehouse maintenance cost and the data use cost are reduced. On the other hand, the device of the application can further improve the development efficiency of the multi-bin developers.

A fourth aspect of the present application discloses a storage medium storing a computer program that, when called, executes the method for creating a data table disclosed in the first aspect of the present application.

The storage medium of the fourth aspect of the present application can assist the warehouse developers to create a data sheet with unified naming specifications, so that the data sheet of the warehouse can be read and understood conveniently, and further, one warehouse developer can quickly understand and operate the data sheet created by other warehouse developers, communication costs among a small number of warehouse developers are reduced, and development efficiency of the warehouse developers is improved, especially, as big data grows explosively, newly added data is not sufficient every day, a warehouse team organizes the data, the frequency of creating or modifying the sheet is higher and higher, but the warehouse team members are numerous, and the business is complicated, or as people change, the warehouse developer a may not understand the data sheet developed before the warehouse developer B who has left off duty, or the newly entered warehouse developer C just enters duty and cannot understand the data sheet developed by the existing warehouse developer, the communication cost among the warehouse developers can be reduced, the development efficiency of the warehouse developers is improved, and the warehouse maintenance cost and the data use cost are reduced. On the other hand, the device of the application can further improve the development efficiency of the multi-bin developers.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.

FIG. 1 is a flow chart illustrating a method for creating a data table according to an embodiment of the present disclosure;

FIG. 2 is a schematic flow diagram of a prior art industry solution;

FIG. 3 is a schematic diagram of a framework design of a method for creating a data table according to an embodiment of the present application;

FIG. 4 is a flowchart illustrating a method for creating a data table according to a second embodiment of the present application;

FIG. 5 is a flowchart illustrating a method for creating a data table according to a third embodiment of the present application;

FIG. 6 is a flowchart illustrating a method for creating a data table according to a fourth embodiment of the present application;

fig. 7 is a schematic structural diagram of a data table creation apparatus disclosed in the fifth embodiment of the present application;

fig. 8 is a schematic structural diagram of a data table creating device disclosed in the sixth embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

Example one

Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for creating a data table according to an embodiment of the present application. As shown in fig. 1, a method for creating a data table according to an embodiment of the present application includes the following steps:

101. when a data table creation request is received, a pre-configured data table model is obtained;

102. generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

103. acquiring filling information aiming at a target data table;

104. and inputting the filling information into a corresponding field of the target data table.

In the embodiment of the present application, as an example, a user (developer) may click a data table creation button to trigger a data table creation event, where the data table creation event is detected by the terminal device and serves as a creation request of a target data table, and the user may select configuration information of a data table model after clicking the data creation button.

Further, the configuration information of the data table model includes a subject and a descriptor of the target data table, wherein the subject of the target data table is used for summarizing that the data in the target data table is any one of service data describing a client domain, an event domain and a financial domain, and for example, the subject of the target data table is used for describing station service domains such as a service line a and a service line B.

In the embodiment of the present application, when creating a data table, because words in the table name of a target data table are selected by a user based on a data table model, and the specification of words selected by the user is restricted by the data table model, then, through step 101 and step 104, it is able to assist several-bin developers to create a data table with unified specification, so that the data table can be read and understood conveniently, and further, one several-bin developer can quickly understand and operate the data tables created by other several-bin developers, reduce the communication cost among a few-bin developers, improve the development efficiency of the several-bin developers, especially, as the explosive growth of big data, the newly added data each day is not enough, several-bin teams organize the data, the frequency of creating or modifying the table is higher and higher, but many-bin team members have complicated services, or as the staff changes, under the situation that the multi-warehouse developer A may not understand the hierarchical table developed by the multi-warehouse developer B who has left the office, or under the situation that the multi-warehouse developer C who newly enters the office and cannot understand the existing hierarchical table developed by the multi-warehouse developer, the communication cost among the multi-warehouse developers can be reduced, the development efficiency of the multi-warehouse developers is improved, and the multi-warehouse maintenance cost and the data use cost are reduced.

On the other hand, the method in the embodiment of the application can automatically fill the target data table according to the filling information, so that the development efficiency of the warehouse developer can be further improved.

However, compared with the method of the embodiment of the present application, the existing industry solution (as shown in fig. 2) only provides a function of quickly building a table according to a model, and fails to solve the problem of table name specification, and particularly, when a large number of data tables need to be built along with the change of services, the communication efficiency between developers is caused due to the non-specification table names, and on the other hand, the efficiency of the developers is reduced because the existing technology cannot automatically build the data tables.

In the embodiment of the present application, a plurality of words may be used in the table name of the target data table, for example, the table name of the target data table may be "client _ fine" and be composed of characters "client", where the naming order between the plurality of words is also constrained by the data table model, so as to further specify the target data table.

In the embodiment of the present application, the padding information may include field names, field types, and field remarks, and may also include data table information other than the field names, the field types, and the field remarks.

In the embodiment of the application, during configuration, a user can select a topic and a descriptor in a data table model, input a table name main body, combine the topic, the descriptor and the table name main body through a JSON (JavaScript Object Notation, JSON) format, and further use the JSON array as input data during creation of a target data table, so as to create target data according to the input data.

In the embodiment of the present application, there are a plurality of combinations of topics and descriptors, where each combination of a topic and a descriptor corresponds to one scenario, for example, in a scenario a1, a topic B is fixedly associated with a descriptor C, or in a scenario a2, a topic B1 and a topic B2 are associated with descriptors, where a topic B2 is a sub-topic of a topic B1.

Further, in some embodiments, when the user selects a topic and a descriptor in the data table model, the method of the embodiments of the present application further comprises the steps of:

acquiring one of root Chinese and root description associated with the descriptors according to the descriptors;

and when the theme is combined with the descriptor and the table name main body, adding a word of one of root Chinese and root description and forming a JSON array.

In this embodiment of the present application, to obtain the data table model, before obtaining the preconfigured data table model, the method of this embodiment of the present application further includes the following steps:

obtaining a plurality of themes and forming a theme library;

acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain a data table model.

In this optional embodiment, further optionally, the topics are automatically obtained from the data in the enterprise information system after synthesis, classification and analysis, for example, by analyzing the business information in the enterprise, the business may be divided into 3 categories, and each category corresponds to one topic. Furthermore, in the theme library, two themes can have a hierarchical relationship, namely, a plurality of sub-themes are associated downwards in one large-class theme, so that the plurality of themes are associated in a directory tree mode, and when a user selects one large-class theme, the sub-themes under the large-class theme can be quickly selected, and the data table creating efficiency is improved.

In this optional embodiment, further optionally, the topic library has functions of adding, modifying, deleting, moving, and the like, for example, one topic in the topic library may be deleted, or a node position of the topic in the directory tree may be moved, so as to change the topic hierarchy relationship.

In this alternative embodiment, the dictionary includes descriptors of the problem to be solved by the data table, such as dt for daily partitioning, mt for monthly partitioning, di for daily increments, and hf for hourly totals for the partition field. On the other hand, the dictionary further comprises a root Chinese character, a root description, a creator, creation time and modification time, wherein the root Chinese character, the root description, the creator, the creation time and the modification time are associated with the root abbreviation, so that when a user creates the data table, the information related to the root abbreviation can be known. It should be noted that the root term is simply a descriptor for solving the problem in the data table.

In this optional implementation manner, further optionally, the method in this embodiment of the present application further includes the following steps:

receiving an editing request of a user for a dictionary;

and editing one of the root Chinese, the root description, the creator, the creation time, the modification time and the root abbreviation in the dictionary according to the editing request.

In the embodiment of the application, the dictionary also has an editable function, so that a user can update and maintain the dictionary conveniently and quickly.

In this optional implementation manner, further optionally, the method in this embodiment of the present application further includes the following steps:

receiving a deleting request of a user for the dictionary;

and deleting one of the root Chinese, the root description, the creator, the creation time, the modification time and the root abbreviation in the dictionary according to the editing request.

In the embodiment of the application, the dictionary also has an editable function, so that a user can update and maintain the dictionary conveniently and quickly.

In the embodiment of the present application, as shown in fig. 3, the method of the embodiment of the present application further includes the steps of: the target data table is stored in the model base, that is, as shown in fig. 3, the target data table is stored in the model base through table model management, so that the data table in the reference model base can be managed through the table model when the same data table needs to be created subsequently.

In this embodiment of the present application, optionally, in step 103: after the filling information for the target data table is acquired, the method of the embodiment of the application further includes the following steps:

and judging whether the same data table exists in the model base according to the subject, the descriptor and the table name main body, and if so, taking the same data table as a target data table.

In the embodiment of the application, by judging whether the same data table exists in the model base or not, the creation operation of the data table can be repeatedly executed on the premise that the same data table exists in the model base, so that the performance consumption caused by executing the database statement is reduced.

In this embodiment of the present application, optionally, in step 104: before the padding information is input into the corresponding field of the target data table, the method of the embodiment of the application further includes the following steps:

and judging whether the user inputs the filling information or not, and if so, filling the target data table according to the filling information input by the user.

In the embodiment of the application, the target data table can be filled preferentially according to the filling information manually input by the user by judging whether the user manually inputs the filling information. It should be noted that the filling information input by the user is different from the database operation data input by the user, wherein the filling information input by the user can obtain the filling information without being analyzed.

In the embodiment of the present application, in step 101: after the pre-configured spreadsheet model is obtained, step 102: before generating the data table name of the target data table according to the configuration information selected by the user for the data table model and the input table name main body, the method of the embodiment of the application further comprises the following steps:

and judging that the theme and the descriptors have an association relationship, and if the theme and the descriptors do not exist, generating a modification prompt to display the modification prompt so that the warehouse developer can reselect the theme or reselect the descriptors according to the prompt.

In the embodiment of the application, by judging the association relationship between the theme and the descriptor, the association degree between the theme and the descriptor can be further enhanced, so that the created naming of the target data table is more standard.

In the embodiment of the present application, in step 104: after the padding information is input into the corresponding field of the target data table, the method of the embodiment of the application may further include:

acquiring an operation authority character set by a user aiming at a target data table;

and associating the operation authority characters with the theme and the descriptor.

In the embodiment of the application, the operation authority characters set by the user for the target data table are obtained, so that the operation authority characters can be associated with the theme and the descriptor, other warehouse developers can quickly know the operation requirements of the target data table, and misoperation is avoided. Furthermore, the operation authority characters can be one or more than two of modification, addition, deletion and inquiry.

It should be noted that, in the embodiment of the present application, the execution subject corresponding to the method for creating a data table may be a mobile terminal or a desktop terminal, for example, the method for creating a data table in the embodiment of the present application may be executed by an apple mobile phone or a desktop computer. It should be further noted that the method for creating a data table in the embodiment of the present application may also be executed by other electronic devices with computing and communication functions, which is not described in detail in the embodiment of the present application.

Example two

Referring to fig. 4, fig. 4 is a flowchart illustrating a method for creating a data table according to an embodiment of the present application. As shown in fig. 4, the method for creating a data table according to the embodiment of the present application may include the steps of:

201. when a data table creation request is received, a pre-configured data table model is obtained;

202. generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

203. matching the reference data table according to the subject of the target data table and/or the descriptor of the target data table;

204. analyzing the reference data table to at least obtain field information of the reference data table;

205. taking the field information of the reference data table as filling information;

206. and inputting the filling information into a corresponding field of the target data table.

According to the optional embodiment, the reference data table can be matched according to the subject of the target data table and/or the descriptor of the target data table, and the reference data table is analyzed, so that the field information of the reference data table can be obtained, and the field information of the reference data table can be used as filling information. It should be noted that the schema information of the reference data table includes field information of the reference data table, and therefore, the field information of the reference data table can be obtained by analyzing the schema information of the reference data table.

It should be noted that, for the description of step 201, step 202, and step 206, refer to the detailed description of step 101, step 102, and step 104 in the first embodiment of the present application, which is not described herein again.

EXAMPLE III

Referring to fig. 5, fig. 5 is a flowchart illustrating a method for creating a data table according to an embodiment of the present application. As shown in fig. 5, a method for creating a data table according to an embodiment of the present application may include the steps of:

301. when a data table creation request is received, a pre-configured data table model is obtained;

302. generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

303. acquiring a query condition input by a user;

304. performing fuzzy search on a historical data table filling information base according to the query conditions to obtain filling information, wherein the historical data table filling information base is generated based on field information stored in the historical data table during creation;

305. and inputting the filling information into a corresponding field of the target data table.

The optional embodiment can perform fuzzy search to obtain the filling information based on the filling information stored in the historical data table during creation and the query condition input by the user.

It should be noted that, for the description of step 301, step 302, and step 305, refer to the detailed description of step 101, step 102, and step 104 in the first embodiment of the present application, which is not described herein again.

Example four

Referring to fig. 6, fig. 6 is a flowchart illustrating a method for creating a data table according to an embodiment of the present application. As shown in fig. 6, a method for creating a data table according to an embodiment of the present application may include the steps of:

401. when a data table creation request is received, a pre-configured data table model is obtained;

402. generating a data table name of a target data table according to configuration information selected by a user aiming at the data table model and an input table name main body;

403. acquiring database operation data input by a user;

404. analyzing the database operation data to obtain filling information;

405. and inputting the filling information into a corresponding field of the target data table.

In the optional embodiment, the filling information can be obtained by acquiring the database operation data input by the user and then analyzing the database operation data.

It should be noted that the database operation data input by the user is data in hql (hive sql) format, and the filling information can be obtained by analyzing the data.

It should be noted that for the description of step 401, step 402, and step 405, refer to the detailed description of step 101, step 102, and step 104 in the first embodiment of the present application, which is not described herein again.

EXAMPLE five

Referring to fig. 7, fig. 7 is a schematic structural diagram of a device for creating a data table according to an embodiment of the present application. As shown in fig. 7, the apparatus for creating a data table according to the embodiment of the present application includes the following functional modules:

a first obtaining module 501, configured to obtain a preconfigured data table model when a request for creating a data table is received;

a generating module 502, configured to generate a data table name of the target data table according to configuration information selected by a user for the data table model and an input table name body;

a second obtaining module 503, configured to obtain padding information for the target data table;

and a padding module 504, configured to input padding information into a corresponding field of the target data table.

In the embodiment of the present application, as an example, a user (developer) may click a data table creation button to trigger a data table creation event, where the data table creation event is detected by the terminal device and serves as a creation request of a target data table, and the user may select configuration information of a data table model after clicking the data creation button.

Further, the configuration information of the data table model includes a subject and a descriptor of the target data table, wherein the subject of the target data table is used for summarizing that the data in the target data table is any one of service data describing a client domain, an event domain and a financial domain, and for example, the subject of the target data table is used for describing station service domains such as a service line a and a service line B.

In the embodiment of the application, when the data table is created, because the words in the table name of the target data table are selected by the user based on the data table model, and the specification of the words selected by the user is restricted by the data table model, the data table can assist the multi-bin developers to create the data table with unified specification, and the data table can be read and understood conveniently, so that the multi-bin developers can quickly understand and operate the data tables created by other multi-bin developers, reduce the communication cost among a few of the multi-bin developers, and improve the development efficiency of the multi-bin developers, especially, as the explosive growth of big data, newly added data in each day is not sufficient, multi-bin teams organize the data, the frequency of creating or modifying the table is higher and higher, but the multi-bin team members are numerous, and the service is complicated, or the change along with the change of the personnel, under the condition that the layered list developed by the warehouse counter developer A before the warehouse counter developer B which leaves the office is not clearly understood or under the condition that the newly-entered warehouse counter developer C just enters the office and cannot understand the existing layered list developed by the warehouse counter developer, the communication cost among the warehouse counter developers can be reduced, the development efficiency of the warehouse counter developer is improved, and the maintenance cost and the data use cost of the warehouse counter are reduced.

On the other hand, the device in the embodiment of the application can also automatically fill the target data table according to the filling information, so that the development efficiency of the warehouse counter developers can be further improved.

However, compared with the method of the embodiment of the present application, the existing industry solution (as shown in fig. 2) only provides a function of quickly building a table according to a model, and fails to solve the problem of table name specification, and particularly, when a large number of data tables need to be built along with the change of services, the communication efficiency between developers is caused due to the non-specification table names, and on the other hand, the efficiency of the developers is reduced because the existing technology cannot automatically build the data tables.

In the embodiment of the present application, a plurality of words may be used in the table name of the target data table, for example, the table name of the target data table may be "client _ fine" and be composed of characters "client", where the naming order between the plurality of words is also constrained by the data table model, so as to further specify the target data table.

In the embodiment of the present application, the padding information may include field names, field types, and field remarks, and may also include data table information other than the field names, the field types, and the field remarks.

In the embodiment of the application, during configuration, a user can select a topic and a descriptor in a data table model, input a table name main body, combine the topic, the descriptor and the table name main body through a JSON (JavaScript Object Notation, JSON) format, and further use the JSON array as input data during creation of a target data table, so as to create target data according to the input data.

In the embodiment of the present application, there are a plurality of combinations of topics and descriptors, where each combination of a topic and a descriptor corresponds to one scenario, for example, in a scenario a1, a topic B is fixedly associated with a descriptor C, or in a scenario a2, a topic B1 and a topic B2 are associated with descriptors, where a topic B2 is a sub-topic of a topic B1.

In this embodiment of the present application, as an optional implementation manner, to obtain the data table model, the apparatus in this embodiment of the present application further includes:

the third acquisition module is used for acquiring a plurality of themes and forming a theme library;

the fourth acquisition module is used for acquiring a plurality of descriptors aiming at the problems solved by the data table and forming a dictionary;

and the hierarchical configuration module is used for combining at least one theme in the theme library with at least one descriptor in the dictionary according to preset hierarchical configuration information to obtain a data table model.

In this optional embodiment, further optionally, the topics are automatically obtained from the data in the enterprise information system after synthesis, classification and analysis, for example, by analyzing the business information in the enterprise, the business may be divided into 3 categories, and each category corresponds to one topic. Furthermore, in the theme library, two themes can have a hierarchical relationship, namely, a plurality of sub-themes are associated downwards in one large-class theme, so that the plurality of themes are associated in a directory tree mode, and when a user selects one large-class theme, the sub-themes under the large-class theme can be quickly selected, and the data table creating efficiency is improved.

In this optional embodiment, further optionally, the topic library has functions of adding, modifying, deleting, moving, and the like, for example, one topic in the topic library may be deleted, or a node position of the topic in the directory tree may be moved, so as to change the topic hierarchy relationship.

In this alternative embodiment, the dictionary includes descriptors of the problem to be solved by the data table, such as dt for daily partitioning, mt for monthly partitioning, di for daily increments, and hf for hourly totals for the partition field. On the other hand, the dictionary further comprises a root Chinese character, a root description, a creator, creation time and modification time, wherein the root Chinese character, the root description, the creator, the creation time and the modification time are associated with the root abbreviation, so that when a user creates the data table, the information related to the root abbreviation can be known. It should be noted that the root term is simply a descriptor for solving the problem in the data table.

In this embodiment of the present application, as an optional implementation manner, the second obtaining module 503 includes the following sub-functional modules:

the matching submodule is used for matching the reference data table according to the theme of the target data table and/or the descriptor of the target data table;

the first analysis submodule is used for analyzing the reference data table to at least obtain field information of the reference data table;

and the association submodule is used for using the field information of the reference data table as filling information.

According to the optional embodiment, the reference data table can be matched according to the subject of the target data table and/or the descriptor of the target data table, and the reference data table is analyzed, so that the field information of the reference data table can be obtained, and the field information of the reference data table can be used as filling information. It should be noted that the schema information of the reference data table includes field information of the reference data table, and therefore, the field information of the reference data table can be obtained by analyzing the schema information of the reference data table.

In this embodiment of the present application, as an optional implementation manner, the second obtaining module 503 includes the following sub-functional modules:

the first acquisition submodule is used for acquiring a query condition input by a user;

and the searching submodule is used for carrying out fuzzy search on the historical data table filling information base according to the query condition to obtain filling information, wherein the historical data table filling information base is generated on the basis of field information stored when the historical data table is created.

The optional implementation mode can perform fuzzy search to obtain the filling information based on the filling information stored in the historical data warehouse during the creation and the query condition input by the user.

In this embodiment of the present application, as an optional implementation manner, the second obtaining module 503 includes the following sub-functional modules:

the second acquisition submodule is used for acquiring database operation data input by a user;

and the second analysis submodule is used for analyzing the database operation data to obtain filling information.

In the optional embodiment, the filling information can be obtained by acquiring the database operation data input by the user and then analyzing the database operation data.

Further, in some implementations, the apparatus of the examples of this application further includes:

and the fifth acquisition module is used for acquiring one of root Chinese and root description associated with the descriptors according to the descriptors, wherein when the subject is combined with the descriptors and the table name main body, the words of one of the root Chinese and the root description are added to form a JSON array.

In this optional implementation manner, further optionally, the apparatus in this embodiment of the present application further includes the following functional modules:

the receiving module is used for receiving an editing request of a user for the dictionary;

and the modifying module is used for editing one of the root Chinese, the root description, the creator, the creation time, the modification time and the root abbreviation in the dictionary according to the editing request.

In the embodiment of the application, the dictionary also has an editable function, so that a user can update and maintain the dictionary conveniently and quickly.

In this optional implementation manner, further optionally, the receiving module is further configured to receive a deletion request of the user for the dictionary;

and the modification module is also used for deleting one of the root Chinese, the root description, the creator, the creation time, the modification time and the root abbreviation in the dictionary according to the editing request.

In the embodiment of the application, the dictionary also has an editable function, so that a user can update and maintain the dictionary conveniently and quickly.

In this embodiment, as shown in fig. 3, the apparatus in this embodiment of the present application includes a saving module, and the saving module is configured to store the target data table in the model library, that is, as shown in fig. 3, store the target data table in the model library through table model management, so that it is convenient to manage the number of bins in the reference model library through the table model when the same number of bins needs to be created subsequently.

In this embodiment of the present application, optionally, the apparatus in this embodiment of the present application further includes the following functional modules:

and the judging module is used for judging whether the same data table exists in the model base according to the theme, the descriptor and the table name main body, and if so, taking the same data table as a target data table.

In the embodiment of the application, by judging whether the same data table exists in the model base or not, the creation operation of the data table can be repeatedly executed on the premise that the same data table exists in the model base, so that the performance consumption caused by executing the database statement is reduced.

In this embodiment of the present application, optionally, the determining module of this embodiment of the present application is further configured to:

and judging whether the user inputs the filling information or not, and if so, filling the target data table according to the filling information input by the user.

In the embodiment of the application, the target data table can be filled preferentially according to the filling information manually input by the user by judging whether the user manually inputs the filling information. It should be noted that the filling information input by the user is different from the database operation data input by the user, wherein the filling information input by the user can obtain the filling information without being analyzed.

In this embodiment of the present application, the determining module of this embodiment of the present application is further configured to:

and judging that the theme and the descriptors have an association relationship, and if the theme and the descriptors do not exist, generating a modification prompt to display the modification prompt so that the warehouse developer can reselect the theme or reselect the descriptors according to the prompt.

In the embodiment of the application, by judging the association relationship between the theme and the descriptor, the association degree between the theme and the descriptor can be further enhanced, so that the created naming of the target data table is more standard.

In this embodiment, the apparatus in this embodiment may further include:

the sixth acquisition module is used for acquiring the operation authority characters set by the user aiming at the target data table;

and the association module is used for associating the operation authority characters with the theme and the description words.

In the embodiment of the application, the operation authority characters set by the user for the target data table are obtained, so that the operation authority characters can be associated with the theme and the descriptor, other warehouse developers can quickly know the operation requirements of the target data table, and misoperation is avoided. Furthermore, the operation authority characters can be one or more than two of modification, addition, deletion and inquiry.

It should be noted that, in the embodiment of the present application, the execution subject corresponding to the method for creating a data table may be a mobile terminal or a desktop terminal, for example, the method for creating a data table in the embodiment of the present application may be executed by an apple mobile phone or a desktop computer. It should be further noted that the method for creating a data table in the embodiment of the present application may also be executed by other electronic devices with computing and communication functions, which is not described in detail in the embodiment of the present application.

EXAMPLE six

Referring to fig. 8, fig. 8 is a schematic structural diagram of a data table creating device according to an embodiment of the present application. As shown in fig. 8, the apparatus for creating a data table according to the embodiment of the present application may include:

the device comprises a memory 601 and a processor 602, wherein computer readable instructions are stored in the memory 601, and when the computer readable instructions are executed by the processor 602, the method for creating the data table disclosed in the first to fourth embodiments of the present application is executed.

The data sheet creating device of the embodiment of the application can assist the warehouse developers to create a standard and unified data sheet by executing the data sheet creating method, so that the data sheet can be read and understood conveniently, one warehouse developer can rapidly understand and operate the data sheets created by other warehouse developers, communication cost among a small number of warehouse developers is reduced, development efficiency of the warehouse developers is improved, particularly, with explosive growth of big data, newly added data are not sufficient every day, a warehouse team organizes the data, the frequency of creating or modifying the sheet is higher and higher, but the warehouse team members are numerous, service is complicated and complicated, or with change of personnel, the warehouse developer A possibly has no understanding on a hierarchical sheet developed before the warehouse developer B who has left off duty, or the newly-entered multi-warehouse developer C can not understand the existing hierarchical table developed by multi-warehouse developers, so that the communication cost among the multi-warehouse developers can be reduced, the development efficiency of the multi-warehouse developers can be improved, and the maintenance cost and the data use cost of the multi-warehouse can be reduced.

On the other hand, the method in the embodiment of the application can automatically fill the target data table according to the filling information, so that the development efficiency of the warehouse developer can be further improved.

EXAMPLE seven

The embodiment of the application discloses a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is called, the method for creating the data table disclosed in the first to fourth embodiments of the application is executed.

The storage medium of the embodiment of the application can assist the warehouse developers to create a standard and unified data sheet by executing the data sheet creation method, so that the data sheet can be read and understood conveniently, and further one warehouse developer can quickly understand and operate the data sheet created by other warehouse developers, communication cost among a small number of warehouse developers is reduced, and development efficiency of the warehouse developers is improved Under the condition, the communication cost among a few warehouse developers can be reduced, the development efficiency of the warehouse developers is improved, and the warehouse maintenance cost and the data use cost are reduced.

On the other hand, the method in the embodiment of the application can automatically fill the target data table according to the filling information, so that the development efficiency of the warehouse developer can be further improved.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:报表生成方法、装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!