Data Development Method and System
By labeling the data warehouse metadata entity fields and user-selecting tags, the problem of high cost and low efficiency of downstream data development in data warehouses is solved, and fast and low-cost data development is achieved.
Patent Information
- Application Number
- CN202111193454.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-10-13
AI Technical Summary
The data development downstream of the data warehouse is high and the efficiency is low, resulting in huge investment in enterprises and long iteration cycles.
By marking preset rules on the metadata entity fields, a metadata pool with tags is generated. Users select tags based on data needs, and the background server searches and data model construction is generated to generate query results.
The labor and time cost of data development has been reduced and development efficiency has been improved. Data development has been improved from manual development at the heaven level to minute level processing.
Smart Images

Figure CN113934753B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data warehouses, and particularly to a data development method, system, electronic device, and computer-readable storage medium. Background Art
[0002] A data warehouse is a central repository of information. Generally, data is regularly introduced into the data warehouse from transaction systems, relational databases, and other sources through an extraction, transformation, loading (ETL) data cleaning process, and the data is archived and stored in an orderly manner in a data model according to subject areas and hierarchical structures. Business analysts, data engineers, data scientists, and decision-makers access the data model in the data warehouse through business intelligence (BI) tools, SQL clients, and other analysis applications for querying, analyzing, and other tasks.
[0003] In a data warehouse system, a data warehouse development team combs through the company's business to produce various tables to serve downstream data development, data analysis, algorithms, strategies, business development, products, operations, etc. Downstream users find the tables they need through various channels (consultation, documentation, systems, etc.) according to their needs or application scenarios, extract the fields they need from these tables, and construct SQL queries to complete data development.
[0004] However, in the above traditional method, the data warehouse can only serve downstream in the form of tables, resulting in high downstream development thresholds, large workloads, long cycles, and huge input costs for enterprises. Internet businesses have the characteristics of rapid iteration, with frequent business changes, and each requirement development, adjustment, and iteration will bring a large amount of development costs. Summary of the Invention
[0005] The main purpose of this application is to propose a data development method, system, electronic device, and computer-readable storage medium, aiming to solve the problems of high cost and low efficiency in downstream data development of data warehouses.
[0006] To achieve the above object, an embodiment of this application provides a data development method, which includes:
[0007] Mark the entity fields of the metadata according to preset rules to obtain a metadata pool with tags;
[0008] Receive the user's selection of the tags after determining the data entity object according to the data requirements;
[0009] Search in the metadata pool according to the selected tags to obtain tables that meet the requirements;
[0010] Construct a data model according to the user's selection of the tables;
[0011] Generate a query result according to the add-to-cart field by using the data model.
[0012] Optionally, the marking of the entity fields of the metadata according to a preset rule includes:
[0013] Sort out the entity objects involved in the business and enter them into the entity object list;
[0014] Preprocess each field of the metadata;
[0015] Match the preprocessed fields with the entity object list;
[0016] Mark the fields that match the entity objects and record the mapping labels.
[0017] Optionally, the selection of the labels by the user after determining the data entity object according to the data requirement includes:
[0018] Obtain the labels corresponding to the metadata pool and provide the labels to the user for selection;
[0019] Receive the user's selection of the labels for the entity object corresponding to the user's own data requirement;
[0020] Obtain a search label combination according to the selection.
[0021] Optionally, the construction of the data model includes performing multi-table joining and union processing according to the relationships between the entity fields in the selected tables.
[0022] Optionally, the construction of the data model includes:
[0023] For two directly related tables, perform a left join processing according to the intersection of the entity fields between the two tables;
[0024] For two tables without direct relationship, perform a union all processing.
[0025] Optionally, the generation of the query result according to the add-to-cart field by using the data model includes:
[0026] Provide the fields that can be added to the cart to the user according to the data model;
[0027] Receive the add-to-cart fields selected by the user;
[0028] Generate a corresponding SQL query according to the add-to-cart fields to obtain a query result.
[0029] Optionally, the method further includes:
[0030] The process of constructing the data model and generating query results is refined through a join loader, an aggregation loader, a table loader, a filtering loader, a query loader, and a union loader.
[0031] In addition, to achieve the above object, an embodiment of the present application further provides a data development system, and the system includes:
[0032] A marking module, configured to mark entity fields of metadata according to a preset rule to obtain a metadata pool with tags;
[0033] A receiving module, configured to receive the selection of the tags by a user after determining a data entity object according to data requirements;
[0034] A searching module, configured to search from the metadata pool according to the selected tags to obtain a table that meets the requirements;
[0035] A constructing module, configured to construct a data model according to the user's selection of the table;
[0036] A generating module, configured to generate a query result according to the additional purchase fields by using the data model.
[0037] To achieve the above object, an embodiment of the present application further provides an electronic device, and the electronic device includes: a memory, a processor, and a data development program stored on the memory and executable on the processor. When the data development program is executed by the processor, the data development method as described above is implemented.
[0038] To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium, and a data development program is stored on the computer-readable storage medium. When the data development program is executed by a processor, the data development method as described above is implemented.
[0039] The data development method, system, electronic device, and computer-readable storage medium proposed in the embodiments of the present application can solve problems such as high cost and low efficiency in data development downstream of the data warehouse, replace manual development with technology, and the user only needs to input corresponding selections according to data requirements, and the background server can automatically process the corresponding logic and give a query result data table. Using this method, data development is improved from daily manual development work to cart-style minute-level processing, greatly reducing the enterprise's labor cost and time cost. Description of the Drawings
[0040] Figure 1 An application environment architecture diagram for implementing various embodiments of the present application;
[0041] Figure 2 A flowchart of a data development method proposed in the first embodiment of the present application;
[0042] Figure 3 A schematic diagram for marking metadata entity fields in this application;
[0043] Figure 4 A schematic diagram of four tables selected by the user;
[0044] Figure 5 is Figure 4 A schematic diagram of the relationship composed of four tables in;
[0045] Figure 6 A schematic diagram of the hardware architecture of an electronic device proposed in the second embodiment of this application;
[0046] Figure 7 A schematic diagram of the modules of a data development system proposed in the third embodiment of this application. Detailed implementation manners
[0047] In order to make the purpose, technical solutions and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0048] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by this application.
[0049] Please refer to Figure 1 , Figure 1 An application environment architecture diagram for implementing various embodiments of this application. This application can be applied to an application environment including, but not limited to, a client 2, a server 4, and a network 6.
[0050] Among them, the client 2 is used to display the current interface to the user and receive user operations, such as operations for selecting labels and tables. The client 2 can be a terminal device such as a PC (Personal Computer), a mobile phone, a tablet computer, a portable computer, a wearable device, etc.
[0051] The server 4 is used to provide data and technical support for the client 2. For example, it marks the entity fields of the metadata according to preset rules to obtain a metadata pool with tags; receives the selection of the tags by the user after determining the data entity object according to the data requirement; searches the metadata pool according to the selected tags to obtain a table that meets the requirement; constructs a data model according to the user's selection of the table; and generates an SQL query according to the additional purchase fields by using the data model. The server 4 can be a computing device such as a rack server, a blade server, a tower server, or a cabinet server, and can be an independent server or a server cluster composed of multiple servers.
[0052] The network 6 can be a wireless or wired network such as an enterprise intranet (Intranet), the Internet, Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, or Wi-Fi. The server 4 and one or more of the clients 2 are communicatively connected through the network 6 for data transmission and interaction.
[0053] Embodiment 1
[0054] As Figure 2 shown, it is a flowchart of a data development method proposed in the first embodiment of this application. It can be understood that the flowchart in the embodiment of this method is not used to limit the order of execution steps. According to needs, some steps in this flowchart can also be added or deleted. The following takes the server 4 as the execution subject to illustrate this method.
[0055] This method includes the following steps:
[0056] S200, mark the entity fields of the metadata according to preset rules to obtain a metadata pool with tags.
[0057] Metadata is data that describes other data and contains descriptive information about data and information resources. A table is an object in a database used to store data. It is a structured collection of data, defined as a set of columns. Similar to a spreadsheet, data in a table is organized in a row and column format. Each column in a table is designed to store a certain type of information (such as a date, name, dollar amount, or number). A field, also known as a column, contains information on a particular topic. For example, in an "address book" database, "name" and "contact phone number" are attributes common to all rows in the table, so these columns are called the "name" field and the "contact phone number" field. An entity is an objectively existing and distinguishable object or thing in the real world. In the context of a database, an entity often refers to a collection of a certain type of thing, which can be a specific person, thing, or an abstract concept or relationship.
[0058] In a data warehouse system, the data warehouse development team produces various tables through sorting out the company's business to serve downstream data development, data analysis, algorithms, strategies, business development, products, operations, etc. Downstream users find the tables they need through various channels (consultation, documents, systems, etc.) according to their needs or application scenarios and extract the fields they need from these tables to construct SQL queries to complete data development. However, in this traditional method, the data warehouse can only serve downstream in the form of tables, with high downstream development thresholds, large workloads, long cycles, and huge input costs for enterprises. In this embodiment, manual development is replaced by a technical approach, reducing the labor cost and time cost of enterprises.
[0059] In this embodiment, first, mark the metadata entity fields.
[0060] Taking sales data as an example, the data contains three business entity objects: store, product, and buyer. Among them, store ID, product ID, and purchase user ID are the identity IDs of each entity object. Store name belongs to the attributes of the store, product name, price, and brand belong to the attributes of the product, and purchase user name and gender belong to the attributes of the purchase user. Also, sales method, quantity, total price, discount, and freight are attributed to the attributes of the combination of the three objects: store + product + purchase user. Therefore, finally, fields such as store ID, product ID, and purchase user ID need to be marked, and the corresponding tags are shopid, goodsid, and buymid respectively.
[0061] In the specific implementation process, first, sort out the entity objects involved in the entire business, such as pid, cid, shopid, goodsid, skuid, mid, etc., and enter them into the entity object list. When marking entity fields, first preprocess each field of the metadata (such as converting to lowercase, removing spaces in the field, etc.), and then match the preprocessed fields with the entity object list. For the fields that match the entity objects (entity fields), mark them (such as mark 1) and record the mapping labels. As Figure 3 shown, it is a schematic diagram for marking metadata entity fields.
[0062] The said labels will be provided to the user for selection according to data requirements during the subsequent user usage process.
[0063] S202, receive the user's selection of the said labels after determining the data entity object according to data requirements.
[0064] The background server obtains the labels corresponding to the metadata pool and provides them to the user for selection. When the user uses the metadata of the data warehouse for downstream data development, determines the data entity object according to his own data requirements, and then selects the said labels corresponding to these entity objects. The server receives the user's selection to obtain a search label combination.
[0065] Suppose the user needs the following data: product ID, product name, product brand, product category, user ID, user nickname, user gender, actual payment amount, payment quantity, refund amount, refund quantity. Then the labels corresponding to the product ID and user ID can be searched, that is, search goodsid mid.
[0066] The backend server can search the marked metadata according to the said search label combination.
[0067] S204, search from the metadata pool according to the selected labels to obtain a table that meets the requirements.
[0068] After obtaining the search tag combination according to the user's selection, search from the metadata pool according to this tag combination and retrieval rules. For example, for the above tag combination "goodsid mid", the retrieval rules can be: dimension tables (table names starting with "dim_") need to meet the condition that the mapped tag is "goodsid" or "mid" or "goodsid mid"; non-dimension tables (table names not starting with "dim_") need to meet the condition that the mapped tag contains "goodsid mid". Dimension tables can be regarded as windows for users to analyze data. Dimension tables contain the characteristics of the fact records in the fact data table. Some characteristics provide descriptive information, and some characteristics specify how to summarize the data in the fact data table to provide useful information for analysts. Dimension tables contain a hierarchical structure of characteristics that help summarize data. Dimension tables contain detailed information related to the specified attributes in the fact table, such as detailed product, customer attributes, storage information, etc.
[0069] After the retrieval is completed, the table that meets the requirements after the retrieval is obtained and then returned to the user.
[0070] S206. Construct a data model according to the user's selection of the table.
[0071] Based on the table that meets the requirements returned by the server, the user can further select the required tables from it. The back-end server constructs a data model according to the user's selection. The construction of the data model mainly includes performing operations such as join (multi-table join) and union (union) according to the relationships between the entity fields in the selected tables.
[0072] For example, after searching according to the above tag combination "goodsid mid" to obtain the table that meets the requirements, the user checks the order table, refund table, product information table, and user information table. The server loads the metadata information of these four tables. As Figure 4 shown, it is a schematic diagram of the above four tables.
[0073] As Figure 5 shown, it is a schematic diagram of the relationship composed of the above Figure 4 four tables. In Figure 5Among them, n:1 can be converted to left join (taking the left table as the main table, returning all rows of the left table. If there is no match in the right table, there will still be records in the left table, and the fields of the right table will be filled with null). The join condition is the entity intersection of the two tables. For example, for the order table and the user information table, the entity intersection is mid. According to the mapping relationship, the corresponding entity field in the order table is buy_mid, and the corresponding entity field in the user information table is mid. So the join condition is buy_mid = mid. It should be noted that when joining two or more tables, corresponding processing needs to be carried out according to their respective data types, that is, if the data types on both sides are inconsistent, conversion should be performed first. Among them, the order table and the refund table have no direct relationship. After the two tables are union all (performing a union operation on two result sets, including duplicate rows, without sorting), fields are supplemented.
[0074] S208, generating a query result according to the add-to-cart field using the data model.
[0075] After constructing the data model, the user can query the required data from the data model by means of add-to-cart fields. The back-end server provides the fields that can be added to the cart according to the data model, and the user adds the required fields to the cart according to their own needs. After the server receives the fields added to the cart by the user, it generates a corresponding SQL query according to the add-to-cart fields to obtain a query result (a data table).
[0076] For example, the user selects goods_id, buy_mid, payd_amt, payd_num from the order table, selects goods_id, mid, refund_amt, refund_num from the refund table, selects goodsname, brand_name, category_name from the product information table, and selects nickname, sex from the user table.
[0077] In addition, there are also various modules in the back-end server, such as join loader, aggregation loader, table loader, filtering loader, query loader, union loader, etc., which refine the process of constructing the data model and generating query results, such as table filtering, aggregation, data type loading, insertion, etc., to improve the details of the query.
[0078] The data development method proposed in this embodiment can solve problems such as high cost and low efficiency in data development downstream of the data warehouse, replacing manual development with technology. The user only needs to input corresponding selections according to data requirements, and the back-end server can automatically handle the corresponding logic and give the query result data table. Using this method, data development is improved from daily manual development work to minute-level processing like adding to the cart, greatly reducing the human cost and time cost of the enterprise.
[0079] Example 2
[0080] As Figure 6 shown, the figure is a schematic diagram of the hardware architecture of an electronic device 20 proposed in the second embodiment of the present application. In this embodiment, the electronic device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can communicate with each other through a system bus. It should be noted that Figure 6 only the electronic device 20 with components 21-23 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented. In this embodiment, the electronic device 20 may be the client 2.
[0081] The memory 21 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 21 may be an internal storage unit of the electronic device 20, such as the hard disk or memory of the electronic device 20. In other embodiments, the memory 21 may also be an external storage device of the electronic device 20, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 20. Of course, the memory 21 may also include both the internal storage unit and the external storage device of the electronic device 20. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed in the electronic device 20, such as the program code of the data development system 60. In addition, the memory 21 may also be used to temporarily store various data that have been output or will be output.
[0082] In some embodiments, the processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 22 is generally used to control the overall operation of the electronic device 20. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data, such as running the data development system 60, etc.
[0083] The network interface 23 may include a wireless network interface or a wired network interface, which is generally used to establish a communication connection between the electronic device 20 and other electronic devices.
[0084] Embodiment III
[0085] As Figure 7 shown, a module schematic diagram of a data development system 60 is proposed in the third embodiment of this application. The data development system 60 can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program modules referred to in the embodiments of this application refer to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment.
[0086] In this embodiment, the data development system 60 includes:
[0087] A marking module 600, configured to mark the entity fields of metadata according to preset rules to obtain a metadata pool with tags.
[0088] Metadata is data that describes data and contains descriptive information about data and information resources. A table is an object used to store data in a database and is a collection of structured data, defined as a collection of columns. Similar to a spreadsheet, data in a table is organized in a row and column format. Each column in a table is designed to store a certain type of information (such as a date, name, dollar amount, or number). A field, also known as a column, contains information on a certain topic. For example, in the "address book" database, "name" and "contact phone number" are attributes common to all rows in the table, so these columns are called the "name" field and the "contact phone number" field. An entity refers to an objectively existing and distinguishable object or thing in the real world. In terms of a database, an entity often refers to a collection of a certain type of thing, which can be a specific person, thing, or an abstract concept or relationship.
[0089] In this embodiment, first, a marking process is performed on the metadata entity fields.
[0090] Taking sales data as an example, the data contains three business entity objects: store, product, and buyer. Among them, store ID, product ID, and purchase user ID are the identity IDs of each entity object. Store name belongs to the attributes of the store, product name, price, and brand belong to the attributes of the product, and purchase user name and gender belong to the attributes of the purchase user. Also, sales method, quantity, total price, discount, and freight are attributed to the combined attributes of the three objects: store + product + purchase user. Therefore, finally, fields such as store ID, product ID, and purchase user ID need to be marked, and the corresponding tags are shopid, goodsid, and buymid respectively.
[0091] In the specific implementation process, first sort out the entity objects involved in the entire business, such as pid, cid, shopid, goodsid, skuid, mid, etc., and enter them into the entity object list. When marking entity fields, first preprocess each field of the metadata (such as converting to lowercase, removing spaces in the field, etc.), and then match the preprocessed fields with the entity object list. For the fields that match the entity objects (entity fields), mark them (such as mark 1) and record the mapping labels.
[0092] The said labels will be provided to the user for selection according to data requirements during the subsequent user usage process.
[0093] The receiving module 602 is used to receive the user's selection of the said labels after determining the data entity object according to data requirements.
[0094] The background server obtains the labels corresponding to the metadata pool and provides them to the user for selection. When the user uses the metadata of the data warehouse for downstream data development, determines the data entity object according to their own data requirements, and then selects the said labels corresponding to these entity objects. The server receives the user's selection to obtain the search label combination.
[0095] Suppose the user needs the following data: product ID, product name, product brand, product category, user ID, user nickname, user gender, actual payment amount, payment quantity, refund amount, refund quantity. Then the labels corresponding to the product ID and user ID can be searched, that is, search goodsid mid.
[0096] The backend server can search the marked metadata according to the said search label combination.
[0097] The search module 604 is used to search from the metadata pool according to the selected labels to obtain the tables that meet the requirements.
[0098] After obtaining the search tag combination according to the user's selection, search from the metadata pool according to the retrieval rules based on this tag combination. For example, for the above tag combination goodsid mid, the retrieval rules can be: dimension tables (table names starting with dim_) need to meet the condition: the mapped tag is goodsid or mid or goodsid mid; non-dimension tables (table names not starting with dim_) need to meet the condition: the mapped tag contains goodsid mid. Dimension tables can be regarded as windows for users to analyze data. Dimension tables contain the characteristics of the fact records in the fact data table. Some characteristics provide descriptive information, and some characteristics specify how to summarize the data in the fact data table to provide useful information for analysts. Dimension tables contain a hierarchical structure of characteristics that help summarize data. Dimension tables contain detailed information related to the specified attributes in the fact table, such as detailed product, customer attributes, storage information, etc.
[0099] After the retrieval is completed, the table that meets the requirements after the retrieval is obtained and then returned to the user.
[0100] The construction module 606 is used to construct a data model according to the user's selection of the table.
[0101] Based on the table that meets the requirements returned by the server, the user can further select the required tables from it. The backend server constructs a data model according to the user's selection. The construction of the data model mainly includes performing operations such as join (multi-table join) and union (union) according to the relationships between the entity fields in the selected tables.
[0102] For example, after searching according to the above tag combination goodsid mid to obtain the table that meets the requirements, the user checks the order table, refund table, product information table, and user information table. The server loads the metadata information of these four tables.
[0103] Among these four tables, for two tables with a direct relationship, perform a left join (using the left table as the main table, returning all rows of the left table. If there is no match in the right table, there will still be records in the left table, and the fields of the right table are filled with null). The join condition is the entity intersection of the two tables. For example, for the order table and the user information table, the entity intersection is mid. According to the mapping relationship, the corresponding entity field in the order table is buy_mid, and the corresponding entity field in the user information table is mid. So the join condition is buy_mid = mid. It should be noted that when performing a join on two or more tables, corresponding processing needs to be performed according to their respective data types, that is, if the data types on both sides are inconsistent, they need to be converted first. Among them, the order table and the refund table have no direct relationship. After the two tables are union all (performing a union operation on the two result sets, including duplicate rows, without sorting), fields are supplemented.
[0104] A generation module 608, configured to generate a query result according to the add-to-cart fields by using the data model.
[0105] After constructing the data model, the user can query the required data from the data model by means of add-to-cart fields. The back-end server provides the fields that can be added to the cart according to the data model, and the user adds the required fields to the cart according to his own needs. After the server receives the fields added to the cart by the user, it generates a corresponding SQL query according to the add-to-cart fields to obtain a query result (a data table).
[0106] For example, the user selects goods_id, buy_mid, payd_amt, payd_num from the order table, selects goods_id, mid, refund_amt, refund_num from the refund table, selects goodsname, brand_name, category_name from the product information table, and selects nickname, sex from the user table.
[0107] In addition, there are also various modules such as a join loader, an aggregation loader, a table loader, a filtering loader, a query loader, a union loader, etc. in the background server to refine the process of constructing the data model and generating the query result, such as filtering, aggregating, data type loading, inserting, etc. of the table, and improving the details of the query.
[0108] The data development system proposed in this embodiment can solve problems such as high cost and low efficiency in downstream data development of the data warehouse, replace manual development with technology, and the user only needs to input corresponding selections according to data requirements, and the system can automatically process the corresponding logic and give the query result data table. Using this method, data development is improved from daily manual development work to minute-level processing in the form of adding to the cart, greatly reducing the labor cost and time cost of the enterprise.
[0109] Embodiment 4
[0110] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium, where the computer-readable storage medium stores a data development program, and the data development program can be executed by at least one processor, so that the at least one processor executes the steps of the data development method as described above.
[0111] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element.
[0112] The serial numbers of the embodiments of the present application above are for description only and do not represent the superiority or inferiority of the embodiments.
[0113] Obviously, those skilled in the art should understand that the various modules or steps of the above embodiments of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0114] The above are only the preferred embodiments of the embodiments of the present application, and do not limit the patent scope of the embodiments of the present application. Any equivalent structural or equivalent process transformation made by using the specification and drawings of the embodiments of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the embodiments of the present application.
Claims
1. A data development method, characterized in that, the method includes: marking the entity fields of the metadata according to preset rules to obtain a metadata pool with tags; receiving the selection of the tags by the user after determining the data entity object according to the data requirements; searching from the metadata pool according to the selected tags to obtain a table that meets the requirements; constructing a data model according to the user's selection of the table; generating a query result according to the data model based on the additional purchase fields.
2. The data development method according to claim 1, characterized in that, the marking of the entity fields of the metadata according to preset rules includes: sorting out the entity objects involved in the business and entering them into the entity object list; preprocessing each field of the metadata; matching the preprocessed fields with the entity object list; marking the fields that match the entity objects and recording the mapping tags.
3. The data development method according to claim 1 or 2, characterized in that, the receiving the selection of the tags by the user after determining the data entity object according to the data requirements includes: obtaining the tags corresponding to the metadata pool and providing the tags to the user for selection; receiving the selection of the tags by the user according to the entity object corresponding to the user's own data requirements; obtaining a search tag combination according to the selection.
4. The data development method according to any one of claims 1 to 3, characterized in that, the constructing the data model includes performing multi-table connection and union processing according to the relationships between the entity fields in the selected tables.
5. The data development method according to claim 4, characterized in that, the constructing the data model includes: for two tables with a direct relationship, performing a left join process according to the intersection of the entity fields between the two tables; for two tables without a direct relationship, performing a union all process.
6. The data development method according to any one of claims 1 to 5, characterized in that, the generating the query result according to the data model based on the additional purchase fields includes: providing the fields that can be additionally purchased to the user according to the data model; receiving the additionally purchased fields selected by the user; generating a corresponding SQL query according to the additionally purchased fields to obtain a query result.
7. The data development method according to any one of claims 1 to 6, characterized in that, the method further includes: refining the process of constructing the data model and generating the query result through a join loader, an aggregation loader, a table loader, a filter loader, a query loader, and a union loader.
8. A data development system, characterized in that, the system includes: a marking module for marking the entity fields of the metadata according to preset rules to obtain a metadata pool with tags; a receiving module for receiving the selection of the tags by the user after determining the data entity object according to the data requirements; a searching module for searching from the metadata pool according to the selected tags to obtain a table that meets the requirements; a constructing module for constructing a data model according to the user's selection of the table; A generation module, configured to generate a query result according to the add-to-cart field by using the data model.
9. An electronic device, characterized in that the electronic device includes: a memory, a processor, and a data development program stored on the memory and executable on the processor, and when the data development program is executed by the processor, it implements the data development method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a data development program is stored on the computer-readable storage medium, and when the data development program is executed by a processor, it implements the data development method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data model construction method, device and apparatus and computer readable storage medium
CN110457288A
Construction method of data model and device and computer readable storage medium
CN111813770A