A service data query method and device, a storage medium, and an electronic device
By splitting and mapping the business data of leasing companies, distributed storage and querying were achieved, solving the problem of low query efficiency in traditional leasing company business data management and improving decision-making speed and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2026-03-20
AI Technical Summary
In the traditional leasing company's business data management process, the centralized management and querying of massive amounts of data is slow and inefficient, resulting in slow decision-making response speed, high labor input of IT personnel, and difficulty in producing effective results.
Data is extracted from pre-acquired source data tables, a mapping relationship between business tables and dimension tables is constructed, business tables are split into sub-business tables and stored, and the mapping relationship and sub-business tables are queried based on user query requests, thus realizing distributed storage and query.
It improved data query efficiency, saved costs, reduced repetitive work for IT staff, and increased decision-making response speed.
Smart Images

Figure CN116662422B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of smart healthcare, artificial intelligence, and financial technology, and in particular to a business data query method, apparatus, storage medium, and electronic device. Background Technology
[0002] Traditional leasing companies have lengthy business processes, which can generally be summarized as pre-approval, risk control, lease initiation, and post-lease. Data is usually scattered across the databases of various departments, resulting in a single dimension of analysis. However, company management and decision-makers prefer to examine business metrics from different perspectives. If centralized storage and management are implemented, the massive amount of data, coupled with related calculations and queries, will lead to slow data retrieval and complex logical relationships. IT personnel will invest a lot of repetitive work, and the generation of data results will be slow, which will slow down the decision-makers' response speed and the establishment of solutions. Ultimately, under the trend of digital transformation, maintaining data assets is difficult, human resources are invested, and it is difficult to produce effective results to promote business development. Summary of the Invention
[0003] In view of this, the present invention provides a business data query method, apparatus, storage medium and electronic device, the main purpose of which is to solve the problem of slow and inefficient centralized management and query of massive data.
[0004] To address the aforementioned problems, this application provides a business data query method, including:
[0005] Data is extracted from the pre-acquired source data tables to obtain the business tables corresponding to each business node of the business process and the dimension tables corresponding to each business process.
[0006] Construct a mapping relationship between each field of each business table and each topic keyword of each dimension table;
[0007] Each business table is split into several sub-business tables corresponding to each business table, and each sub-business table is stored separately.
[0008] Based on the user's query request, the query results are obtained by querying the mapping relationships and sub-business tables.
[0009] Optionally, before performing data extraction based on the pre-acquired source data tables, the method further includes:
[0010] The initial data from each business department's database is extracted using a pre-set data extraction tool;
[0011] The format of each of the initial data is converted to obtain the converted data in the target format;
[0012] Load each of the conversion data to a target data warehouse to obtain each of the source data table data corresponding to each of the business departments.
[0013] Optionally, the method further comprises: constructing each of the metadata tables, specifically comprising:
[0014] Obtain object and data description information from each of the source data tables, each of the business tables and each of the dimension tables, wherein the object comprises each of the field information, each of the source data table information, each of the business table information and each of the dimension table information.
[0015] If the metadata table does not exist the data item of the object, add the data item in the metadata table, and record the object and the data description information through the data item;
[0016] If the metadata table exists the data item of the object, add the data description information in the data item to obtain each of the metadata tables.
[0017] Optionally, before querying each of the mapping relationships and each of the sub-business tables based on the query request of the user, the method further comprises:
[0018] Generate the query request of the target user in response to each of the to-be-queried field information selected by the target user through the visual interface.
[0019] Optionally, the splitting processing of each of the business tables to generate a plurality of sub-business tables corresponding to each of the business tables, and storing each of the sub-business tables, specifically comprises:
[0020] Split each of the business tables according to a preset row number threshold to generate a plurality of sub-business tables corresponding to each of the business tables;
[0021] Store each of the sub-business tables in each of the preset storage areas.
[0022] Optionally, the querying of each of the mapping relationships and each of the sub-business tables based on the query request of the user to obtain the query result, specifically comprises:
[0023] Query each of the mapping relationships in the metadata table based on each of the query field information carried by the query request to obtain each of the target mapping relationships corresponding to each of the query fields;
[0024] Query each of the sub-business tables of each of the preset storage areas based on each of the target mapping relationships to obtain the query result.
[0025] Optionally, the method further comprises:
[0026] Display the relevancy and the usage rate of each of the to-be-queried fields on the visual interface.
[0027] To solve the above problems, the application provides a business data query device, comprising:
[0028] A data extraction module is configured to extract data based on the pre-acquired source data tables, and obtain business tables corresponding to each business node of a business process and dimension tables corresponding to the business process;
[0029] A construction module is configured to construct a mapping relationship between each field of each business table and each theme keyword of each dimension table;
[0030] A splitting module is configured to split each business table to generate a plurality of sub-business tables corresponding to each business table, and store each sub-business table separately;
[0031] A query module is configured to query each mapping relationship and each sub-business table based on a query request of a user, and obtain a query result.
[0032] To solve the above problems, the application provides a storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the business data query method.
[0033] To solve the above problems, the application provides an electronic device, which at least comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the business data query method when executing the computer program on the memory.
[0034] The application extracts data based on the pre-acquired source data tables, obtains business tables corresponding to each business theme of a business process and dimension tables corresponding to the business process, constructs a mapping relationship between each field of each business table and each theme keyword of each dimension table, splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, stores each sub-business table separately, and queries each mapping relationship and each sub-business table based on a query request of a user to obtain a query result. The application reorganizes and divides business theme domains for the paradigm data produced by the scattered business system databases, concentrates the data into a data warehouse for hierarchical management, improves query efficiency, and saves costs.
[0035] The above description is only a summary of the technical scheme of the application, in order to more clearly understand the technical means of the application, the specific embodiments of the application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS
[0036] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading and understanding the following detailed description of the preferred embodiments. The following detailed description is included to provide a complete and enabling disclosure of the preferred embodiments. The detailed description includes specific details for the purpose of providing a thorough understanding of the preferred embodiments. However, it will be apparent to those of ordinary skill in the art that the preferred embodiments can be practiced without these specific details.
[0037] Figure 1 A flow diagram of a method for querying service data is shown;
[0038] Figure 2 A flow diagram of another method for querying service data is shown;
[0039] Figure 3 A block diagram of a device for querying service data is shown. DETAILED DESCRIPTION
[0040] Various aspects of the application are described in terms of sequences of actions to be performed by, and results to be produced by, the various components of the application. These disclosed actions and results can not encompass all actions and results that are possible. Some actions or results can not be required. These actions and results have been provided so as to give a thorough description of the application, and fully disclose what is wanted to support the claims.
[0041] It is understood that various modifications can be made to the embodiments disclosed herein. Therefore, the description should not be considered to be limiting, but merely illustrative. Further modifications that can not be explicitly described herein will nonetheless become apparent to those of ordinary skill in the art in view of this disclosure.
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with the general description of the application given above, and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0043] These and other features, aspects, and advantages of the present application will become evident to those of ordinary skill in the art from the following description, which takes in conjunction with the
[0044] It is also to be understood that even though a number of specific embodiments of the present application have been described herein, these are not the only possible embodiments that can be constructed within the scope of the present application.
[0045] The above and other aspects, features, and advantages of the present application will become apparent to those of ordinary skill in the art upon examination of the following detailed description, taken in conjunction with the accompanying drawings.
[0046] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0047] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0048] This application provides a method for querying business data, such as... Figure 1 As shown, it includes:
[0049] Step S101: Extract data based on the pre-acquired source data tables to obtain the business tables corresponding to each business node of the business process and the dimension tables corresponding to each business process.
[0050] In the specific implementation process of this step, departments are set up in the leasing company, such as: risk control department, retail department, financial department, etc. For the business process of the leasing company, each department will store the data generated by the company's business process in the database corresponding to each department. Each initial data of the database of each business department is obtained by using the ETL (Extract-Transform-Load, referred to as ETL) tool. The format of each said initial data is converted to obtain each converted data in the target format. Each said conversion data is loaded into the target data warehouse to obtain each said source data table data corresponding to each said business department. Data extraction is performed on each said source data table data to obtain each business table corresponding to each business theme of the business process and each dimension table corresponding to the business process. The business theme corresponds to each process node of the business process, such as: pre-audit, risk control, lease and post-lease business themes. For each business theme, the source data table is extracted based on the fields corresponding to each business theme to obtain each business table corresponding to each said business theme. The dimension table fields involved in the business process are extracted to obtain each dimension table corresponding to the business process. For example, in the vehicle leasing business process, the passenger car channel dimension table, the commercial vehicle channel dimension table, and the passenger car product dimension table can be divided into first-level theme dimension tables. Under the first-level theme dimension table, a second-level theme dimension table can also be established, for example, under the passenger car channel dimension table, the first-level theme keywords are: channel ID, second-level ID, and channel name. A second-level theme dimension table is established under the second-level ID theme keyword. The theme keywords of the second-level theme dimension table can be: channel agent, agent age, etc. The fields in each business table are associated by the common dimension table in this application, and finally the user can obtain the final query result by selecting the to-be-queried field to associate the field information in each business table and dimension table.
[0051] Step S102: constructing a mapping relationship between each field of each said business table and each theme keyword of each said dimension table;
[0052] In the specific implementation process of this step, the fields in each business table and the theme keywords of the dimension table are matched and processed to establish a mapping relationship between each field of each said business table and each theme keyword of each said dimension table. The mapping relationship includes: the mapping relationship between each first field in the business data table and the first theme keyword in the dimension table, and the mapping relationship between each second field in the business data table and the second theme keyword in the dimension table. By establishing each mapping relationship, each business table is associated through the first theme keyword and the second theme keyword in the common dimension table, which lays a foundation for subsequent data query through the to-be-queried field.
[0053] Step S103: split each service table, generate a plurality of sub-service tables corresponding to each service table, and store each sub-service table respectively;
[0054] In the specific implementation process of this step, the data volume of the service table is very large, so the service table needs to be split and stored in different servers. Distributed multiple copies are stored, which solves the problem of low query efficiency caused by the traditional method of calculating the association of all data into one node, and solves the problem of large memory and hard disk capacity cost of the traditional server. When the traditional server is in a downtime state, business queries cannot be performed, and business data queries need to be maintained after the server is maintained. In this scheme, even if an individual sub-service table is stored in a server that has failed, the user can select the field information to be queried to query the mapping relationship and query the data corresponding to the field information to be queried in other sub-tables. Through distributed storage and distributed query, the query efficiency is improved.
[0055] Step S104: query each mapping relationship and each sub-service table based on the user's query request to obtain the query result.
[0056] In the specific implementation process of this step, first, in response to each field information to be queried selected by the target user through the visual interface, a query request of the target user is generated. Then, each target mapping relationship corresponding to each query field is obtained by querying each mapping relationship based on each query field information carried by the query request; finally, each sub-service table in each preset storage area is queried based on each target mapping relationship to obtain the query result. Specifically, in combination with the specific application scenario of the user, when the user logs in to the visual interface, the ID of the user is obtained, and the user selects each query field information according to the business theme of the query. When the user selects the query field as: channel, product, whether passed, and credit rating field, first, according to the channel ID, product ID, customer ID, and whether passed field, the query field of the customer corresponds to the business table under the pre-audit business theme; through the customer ID, product ID, and credit rating field, the query field of the customer involves the business table under the risk control business theme. Then, according to the query field, the target mapping relationship corresponding to each query field is obtained by querying each mapping relationship, and finally, the data corresponding to the query field is obtained by querying each sub-service table based on each mapping relationship.
[0057] The application obtains each business table corresponding to each business theme of a business process and each dimension table corresponding to the business process by performing data extraction based on each source data table obtained in advance; constructs a mapping relationship between each field of each business table and each theme keyword of each dimension table; splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, and stores each sub-business table; and queries each mapping relationship and each sub-business table based on a user's query request to obtain a query result. The application reorganizes and divides business theme domains for paradigm data produced by a scattered business system database, concentrates the data into a data warehouse for hierarchical management, improves query efficiency, and saves costs.
[0058] Another embodiment of the application provides another business data query method, as shown in Figure 2 The method comprises the following steps:
[0059] Step S201: obtaining each source data table of each business department;
[0060] In the specific implementation process, each department of a leasing enterprise is set, for example, a risk control department, a retail department, a financial department, etc. For the business process of the leasing enterprise, each department stores data generated in the company business process in the database corresponding to each department. The application extracts business data in the database corresponding to each department by using an ETL tool to obtain each initial data of each department database. The format of each initial data is converted to obtain each conversion data in a target format. Each conversion data is loaded into a target data warehouse to obtain each source data table corresponding to each business department. This lays a foundation for subsequent extraction of a dimension table corresponding to a business process and each business table corresponding to each business theme of the business process.
[0061] Step S202: performing data extraction based on each source data table obtained in advance to obtain each business table corresponding to each business theme of a business process and each dimension table corresponding to the business process;
[0062] In the specific implementation process of the step, data extraction is performed on the data of each source data table to obtain each business table corresponding to each business theme of the business process and each dimension table corresponding to the business process. The business theme corresponds to each process node of the business process, such as the business themes of pre-audit, risk control, lease start, and post-lease. For each business theme, data extraction is performed on the data of the source data table based on the fields corresponding to each business theme to obtain each business table corresponding to each business theme. Data extraction is performed according to the dimension table fields involved in the business process to obtain each dimension table corresponding to the business process. The application establishes an association relationship between the common dimension table and each business table, which facilitates subsequent data searching. For example, in the vehicle leasing business process, first-level theme dimension tables such as a passenger vehicle channel dimension table, a commercial vehicle channel dimension table, and a passenger vehicle product dimension table can be divided; second-level theme dimension tables can also be established under the first-level theme dimension table, for example, the first-level theme keywords under the passenger vehicle channel dimension table are channel ID, second-level ID, and channel name, and a second-level theme dimension table is established under the second-level ID theme keyword, and the theme keywords of the second-level theme dimension table can be channel agent and agent age. The application associates the fields in each business table through the common dimension table, and finally enables a user to obtain the final query result by associating the field information in each business table and the dimension table through the selected to-be-queried field.
[0063] Step S203: constructing a metadata table based on each source data table, each business table, and each dimension table;
[0064] In the specific implementation process of the step, object and data description information are obtained from each source data table, each business table, and each dimension table, the object including each field information, each source data table information, each business table information, and each dimension table information; if the metadata table does not have a data item of the object, a data item is added in the metadata table, and the object and the data description information are recorded through the data item; if the metadata table has a data item of the object, the data description information is added in the data item. The metadata table includes the object and the description information, including each field and the description information of each field, including each business table and the description information of each business table, and including each dimension table and the description information of each dimension table. The metadata table lays a foundation for subsequent searching of each sub-business table data based on the metadata table.
[0065] Step S204: constructing a mapping relationship between each field of each business table and each theme keyword of each dimension table;
[0066] The fields in each business table are matched with the subject keywords of the dimension table in the specific implementation process, and the mapping relationship between each field of each business table and each subject keyword of each dimension table is established. The mapping relationship includes the mapping relationship between each first field in the business data table and the first subject keyword in the dimension table, and the mapping relationship between each second field in the business data table and the second subject keyword in the dimension table. By establishing each mapping relationship, each business table is associated through the first subject keyword and the second subject keyword in the common dimension table, which lays a foundation for subsequent data query through the to-be-queried field.
[0067] Step S205: The target business table is split to generate a plurality of sub-business tables corresponding to the target business table, and each of the sub-business tables is stored;
[0068] In the specific implementation process, the data volume of the business table is very large, so the business table needs to be split and stored in different servers in a distributed multi-copy manner, which solves the problem of low query efficiency caused by the traditional method of calculating the association relationship by integrating all data into one node, and solves the problem of large memory and hard disk capacity cost of the traditional server. The target business table is split according to a preset row threshold to generate a plurality of sub-business tables corresponding to the target business table; each of the sub-data tables is stored in each preset storage area. For example, the preset row threshold is 1 million rows of data. When the target business table has 8 million rows, the target business table is split into 8 sub-tables each having 1 million rows of data, and the 8 sub-tables are stored in 8 preset storage servers. The preset row threshold can be set according to actual needs. When the traditional server is in a down state, business query cannot be performed, and business data query needs to be performed after the server is maintained. In this scheme, even if the server where an individual sub-business table is stored fails, the corresponding data of the to-be-queried field information can be queried from other sub-tables after the mapping relationship is queried according to the to-be-queried field information selected by the user. Through distributed storage and distributed query, the query efficiency is improved.
[0069] Step S206: In response to each to-be-queried field information selected by the target user through the visual interface, a query request of the target user is generated;
[0070] In the specific implementation process of this step, the user selects the fields to be queried in the visual interface, and generates a query request corresponding to each of the fields to be queried based on the field selection result. At the same time, the relevance and usage rate of each field to be queried are displayed on the visual interface. The similarity of all user-defined fields to be queried is displayed, and the next field that may be selected is intelligently recommended when the user selects the field to be queried. The data blood relationship of each field to be queried is automatically generated on the visual interface. By analyzing the user group-defined field set to be queried, the similarity is analyzed, the generation of useless data is reduced, and the manpower investment is reduced. Data blood relationship can also be made to facilitate IT personnel to locate data.
[0071] Step S207: Based on each query field information carried by the query request, each target mapping relationship corresponding to each query field in the metadata table is obtained.
[0072] In the specific implementation process of this step, first, each target business table and each target dimension table corresponding to each query field information in the metadata table are determined according to each query field information. Based on the user identifier information, the target mapping relationship corresponding to the user identifier information in each target business table and each target dimension table is obtained, and the position information of the sub-business table where the data queried by the target user is located is determined based on the target mapping relationship.
[0073] Step S208: Based on each target mapping relationship, each sub-business table in each preset storage area is queried to obtain a query result.
[0074] In the specific implementation process of this step, the position information of each sub-business table where the data queried by the target user is located is determined based on the target mapping relationship, and is converted into a SQL query statement to query each sub-business table to obtain a query result.
[0075] The application obtains each business table corresponding to each business theme of a business process and each dimension table corresponding to the business process by performing data extraction based on pre-acquired data of each source data table; constructs each metadata table based on each source data table data, each business table and each dimension table; constructs a mapping relationship between each field of each business table and each theme keyword of each dimension table based on each metadata table; splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, and stores each sub-business table; distributed storage can improve the calculation speed of query and improve the query efficiency; in response to each to-be-queried field information selected by a target user through a visual interface, a query request of the target user is generated; each mapping relationship in each metadata table is queried based on each query field information carried by the query request to obtain each target mapping relationship corresponding to each query field; each sub-business table of each preset storage area is queried based on each target mapping relationship to obtain a query result. The business data query method can improve the query efficiency.
[0076] Another embodiment of the application provides a business query device, as shown in the accompanying drawings, comprising: Figure 3
[0077] The data extraction module 1 is configured to perform data extraction based on pre-acquired data of each source data table to obtain each business table corresponding to each business node of a business process and each dimension table corresponding to the business process.
[0078] The construction module 2 is configured to construct a mapping relationship between each field of each business table and each theme keyword of each dimension table.
[0079] The splitting module 3 is configured to split each business table to generate a plurality of sub-business tables corresponding to each business table, and store each sub-business table.
[0080] The query module 4 is configured to query each mapping relationship and each sub-business table based on a query request of a user to obtain a query result.
[0081] In the specific implementation process, the business query device further comprises a source data table acquisition module, which is specifically configured to extract each initial data of each business department database by using a preset data extraction tool; convert the format of each initial data to obtain each converted data in a target format; load each converted data to a target data warehouse to obtain each source data table corresponding to each business department.
[0082] In the implementation process, the business query device further comprises a metadata table construction module, which is specifically configured to: obtain objects and data description information from each of the source data tables, each of the business tables, and each of the dimension tables, wherein the objects comprise each of the field information, each of the source data table information, each of the business table information, and each of the dimension table information; if a data item of the object does not exist in the metadata table, adding the data item in the metadata table, and recording the object and the data description information through the data item; if the data item of the object exists in the metadata table, adding the data description information in the data item, and obtaining each of the metadata tables.
[0083] In the implementation process, the business query device further comprises a generation module, which is specifically configured to: in response to each of the to-be-queried field information selected by the target user through the visual interface, generating a query request of the target user.
[0084] In the implementation process, the splitting module 3 is specifically configured to: split each of the business tables according to a preset row number threshold, to generate a plurality of sub-business tables corresponding to each of the business tables; and store each of the sub-business tables in each of the preset storage areas.
[0085] In the implementation process, the query module 4 is specifically configured to: based on each of the query field information carried by the query request, query each of the mapping relationships in the metadata table, to obtain each of the target mapping relationships corresponding to each of the query fields; and based on each of the target mapping relationships, query each of the sub-business tables in each of the preset storage areas, to obtain a query result.
[0086] In the implementation process, the business query device further comprises a display module, which is specifically configured to: display the relevancy and the usage rate of each of the to-be-queried fields on the visual interface.
[0087] The application obtains each of the business tables corresponding to each of the business themes of the business process and each of the dimension tables corresponding to the business process by performing data extraction based on each of the source data table data obtained in advance; constructs a mapping relationship between each of the fields of each of the business tables and each of the theme keywords of each of the dimension tables; splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, and stores each of the sub-business tables; and queries each of the mapping relationships and each of the sub-business tables based on a query request of a user, to obtain a query result. The application reorganizes and divides the business theme domain of the paradigm data produced by the scattered business system database, concentrates the data into the data warehouse for hierarchical management, improves the query efficiency, and saves the cost.
[0088] Another embodiment of the application provides a storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following method steps:
[0089] Step one, based on the pre-acquired each source data table, data extraction is carried out, and each business table corresponding to each business node of the business process and each dimension table corresponding to the business process are obtained;
[0090] Step two, the mapping relationship between each field of each business table and each theme keyword of each dimension table is constructed;
[0091] Step three, each business table is split to generate a plurality of sub-business tables corresponding to each business table, and each sub-business table is stored respectively;
[0092] Step four, based on the query request of the user, each mapping relationship and each sub-business table are queried to obtain a query result.
[0093] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0095] The specific implementation process of the method steps can refer to the embodiments of the business data query method described above, and will not be repeated here.
[0096] The application obtains each business table corresponding to each business theme of a business process and each dimension table corresponding to the business process by extracting data based on pre-acquired source data table data; constructs a mapping relationship between each field of each business table and each theme keyword of each dimension table; splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, and stores each sub-business table; and queries each mapping relationship and each sub-business table based on a user's query request to obtain a query result. The application reorganizes and divides business theme domains for paradigm data produced by scattered business system databases, concentrates into a data warehouse for hierarchical management, improves query efficiency and saves costs.
[0097] Another embodiment of the application provides an electronic device, which can be a server. The electronic device includes a processor, a memory, a network interface and a database connected by a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the electronic device is configured to communicate with an external client through a network connection. The electronic device program is executed by the processor to implement the functions or steps of the business data query method on the server side.
[0098] In one embodiment, an electronic device is provided, which can be a client. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected by a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the electronic device is configured to communicate with an external server through a network connection. The electronic device program is executed by the processor to implement the functions or steps of the business data query method on the client side.
[0099] Another embodiment of the application provides an electronic device, which includes at least a memory and a processor. The memory stores a computer program. The processor implements the following method steps when executing the computer program on the memory:
[0100] Step one, based on the pre-acquired each source data table, data extraction is performed to obtain each business table corresponding to each business node of the business process and each dimension table corresponding to the business process;
[0101] Step two, mapping relationships between each field of each business table and each subject keyword of each dimension table are constructed;
[0102] Step three, each business table is split to generate a plurality of sub-business tables corresponding to each business table, and each sub-business table is stored respectively;
[0103] Step four, based on the query request of the user, each mapping relationship and each sub-business table are queried to obtain a query result.
[0104] The specific implementation process of the above method steps can be referred to the embodiments of any business data query method described above, and will not be repeated here.
[0105] The present application extracts data based on the pre-acquired each source data table to obtain each business table corresponding to each business subject of the business process and each dimension table corresponding to the business process; constructs mapping relationships between each field of each business table and each subject keyword of each dimension table; splits a target business table to generate a plurality of sub-business tables corresponding to the target business table, and stores each sub-business table respectively; based on the query request of the user, each mapping relationship and each sub-business table are queried to obtain a query result. The present application reorganizes the paradigm data produced by the scattered business system database according to the business subject domain, concentrates the data into the data warehouse for hierarchical management, improves the query efficiency and saves the cost.
[0106] The above embodiments are only exemplary embodiments of the present application, and are not used to limit the present application, the protection scope of the present application is defined by the claims. Those skilled in the art can make various modifications or equivalent replacements to the present application within the spirit and protection scope of the present application, and such modifications or equivalent replacements are also regarded as falling within the protection scope of the present application.
Claims
1. A business data query method, characterized in that, include: Data is extracted from the pre-acquired source data tables to obtain the business tables corresponding to each business node of the business process and the dimension tables corresponding to each business process. Construct a mapping relationship between each field of each business table and each topic keyword of each dimension table; Each business table is split into several sub-business tables corresponding to each business table, and each sub-business table is stored separately. Based on the user's query request, query each of the aforementioned mapping relationships and each of the aforementioned sub-business tables to obtain the query results; The step of splitting each business table to generate several sub-business tables corresponding to each business table, and storing each of the sub-business tables separately, specifically includes: Each business table is split according to a preset row count threshold, generating several sub-business tables corresponding to each business table. Each of the aforementioned sub-business tables is stored in a separate preset storage area; The process of querying the mapping relationships and sub-business tables based on user query requests to obtain query results specifically includes: Based on the query field information carried in the query request, query the mapping relationships in the metadata table to obtain the target mapping relationships corresponding to each query field; Based on the target mapping relationship, query the sub-business tables of each preset storage area to obtain the query results; The step of querying the metadata table for each mapping relationship based on the query field information carried in the query request to obtain each target mapping relationship corresponding to each query field specifically includes: Based on the information of each query field, determine the target business tables and target dimension tables in the metadata table that correspond to each query field information. Based on the user identification information, obtain the target mapping relationship in each target business table and target dimension table that corresponds to the user identification information.
2. The method as described in claim 1, characterized in that, Before performing data extraction based on the pre-acquired source data tables, the method further includes: The initial data from each business department's database is extracted using a pre-set data extraction tool; The format of each of the initial data is converted to obtain the converted data in the target format; The transformed data is loaded into the target data warehouse to obtain the source data tables corresponding to each of the business departments.
3. The method as described in claim 1, characterized in that, The method further includes: constructing each metadata table, specifically including: Obtain object and data description information from each of the source data tables, business tables, and dimension tables. The object includes information about each field, each source data table, each business table, and each dimension table. If the metadata table does not contain a data item for the object, then add a data item to the metadata table and record the object and the data description information through the data item; If the metadata table contains data items for the object, the data description information is added to the data items to obtain each metadata table.
4. The method as described in claim 1, characterized in that, Before querying the mapping relationships and sub-business tables based on the user's query request, the method further includes: In response to the target user's selection of various fields to be queried through the visual interface, a query request for the target user is generated.
5. The method as described in claim 4, characterized in that, The method further includes: The relevance and usage rate of each field to be queried are displayed on the visualization interface.
6. A business data query device, used to implement any one of the business data query methods as described in claims 1 to 5, characterized in that, include: Data extraction module: used to extract data based on pre-acquired source data tables to obtain business tables corresponding to each business node of the business process and dimension tables corresponding to the business process. The construction module is used to construct the mapping relationship between each field of each business table and each topic keyword of each dimension table. Splitting module: Used to split each business table, generate several sub-business tables corresponding to each business table, and store each sub-business table separately; Query module: Used to query the mapping relationships and sub-business tables based on the user's query request, and obtain the query results.
7. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the business data query method according to any one of claims 1-5.
8. An electronic device, characterized in that, It includes at least a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program in the memory, implements the steps of the business data query method according to any one of claims 1-5.
Citation Information
Patent Citations
Data table inquiry method, device, compute device and storage medium
CN109254966A