A database processing, data query method and device

By converting the first data warehouse table into the second data warehouse table, the problem of the business data stored in the sub-store sub-table needs to be scanned in full table when changing search keywords, efficient data processing and querying are achieved, and system performance is improved.

CN114238345BActive Publication Date: 2025-04-29ADVANCED NEW TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210112334.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-05-26
Publication Date
2025-04-29
Estimated Expiration
2037-05-26

AI Technical Summary

Technical Problem

In the prior art, the service data stored in the sub-database sub-tables need to be scanned in full table when changing search keywords, resulting in high resource consumption of the database system, reduced data processing efficiency, long query time, and reduced database performance.

Method used

By determining that the first data warehouse table takes the first data item as the split unit, and converts the first data warehouse table into the second data warehouse table according to the second data item, the second data warehouse table takes the second data item as the split unit, ensuring the integrity of the business data and the efficiency of data processing.

Benefits of technology

It realizes the acquisition of the second data warehouse table in a short time. No matter which data item is queried, it not only ensures the integrity of the business data, but also improves the efficiency of data processing, shortens the query time, and improves the performance of the entire system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238345B_ABST
    Figure CN114238345B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for processing and querying data in a database, including: for business data stored in sub-libraries and sub-tables, it can be determined that a first data warehouse table is obtained by splitting with a first data item as a splitting unit; and according to the second data item contained in the first data warehouse table, the first data warehouse table is converted into a second data warehouse table obtained by splitting with the second data item as a splitting unit, and the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. In this way, it can be ensured that the second data warehouse table is obtained in a short time, that is, no matter which data item is queried for the corresponding business data, the technical solution provided by the embodiment of the present application can be used to ensure the integrity of the business data and the efficiency of data processing, shorten the query time, and improve the performance of the entire system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology and distributed storage fields, and in particular to a database processing, data query method and device. Background Art

[0002] With the development of e-commerce technology, a large amount of business data is generated through the Internet. In the face of this large amount of business data, it is proposed to use the method of sub-library and sub-table to store these business data in a relational database.

[0003] The so-called database and table sharding refers to splitting the received business data based on a certain data attribute of the business data, and storing the split business data in different data tables. These tables have the same table structure but different table names.

[0004] For example, the business data can be split according to the data attribute of user ID, and the business data containing user ID 1 is stored in data table 1; the business data containing user ID 2 is stored in data table 2; ...; the business data containing user ID n is stored in data table n. In this way, the business data is divided into n parts and stored in different data tables. These data tables have different table names but the same table structure, and the user ID can be used as the index keyword of these tables.

[0005] That is to say, after storing in the manner described above, if the data attribute is used as a search keyword, it is possible to quickly determine in which data table or tables the business data corresponding to the search keyword is located, thereby effectively improving the efficiency of data query.

[0006] However, research has found that for the business data stored in the above data table, once the search keywords are changed, the above data table needs to be scanned in its entirety, which will consume the system resources of the database and reduce the data processing efficiency of the database. At the same time, due to the large amount of data, the entire query time is relatively long, which reduces the performance of the database. Summary of the invention

[0007] In view of this, an embodiment of the present application provides a database processing, data query method and device, which are used to solve the problem of reduced database data processing efficiency existing in the prior art.

[0008] The present application embodiment adopts the following technical solutions:

[0009] The present application provides a method for processing a database, including:

[0010] Determine a first data warehouse table, where the first data warehouse table is obtained by splitting the first data item as a unit, and the first data warehouse table contains the second data item;

[0011] According to the second data item, the first data warehouse table is converted into a second data warehouse table, the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table, and the second data warehouse table is obtained by splitting the second data item as a unit.

[0012] The present application also provides a data query method, including:

[0013] receiving a query request, wherein the query request includes an attribute value of a second data item;

[0014] According to the table structure of the logical table containing the second data item, the business data satisfying the attribute value of the second data item is queried from the second data warehouse table.

[0015] The present application also provides a data query method, including:

[0016] receiving a query request, wherein the query request includes an attribute value of a second data item;

[0017] Determine, according to a mapping relationship between the second data item and the first data item contained in the logic table, an attribute value of the first data item that satisfies the attribute value of the second data item;

[0018] According to the attribute value of the first data item, business data satisfying the attribute value of the second data item is queried from the first data warehouse table.

[0019] The present application also provides a database processing device, including:

[0020] A determining unit determines a first data warehouse table, wherein the first data warehouse table is obtained by splitting the first data item as a unit, and the first data warehouse table contains the second data item;

[0021] The processing unit converts the first data warehouse table into a second data warehouse table according to the second data item. The business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. The second data warehouse table is obtained by splitting the second data item as a unit.

[0022] The present application also provides a data query device, including:

[0023] A receiving unit, receiving a query request, wherein the query request includes an attribute value of a second data item;

[0024] A query unit queries the business data satisfying the attribute value of the second data item from the second data warehouse table according to the table structure of the logical table containing the second data item.

[0025] The present application also provides a data query device, including:

[0026] A receiving unit, receiving a query request, wherein the query request includes an attribute value of a second data item;

[0027] a determining unit, which determines an attribute value of the first data item that satisfies an attribute value of the second data item according to a mapping relationship between the second data item and the first data item included in the logic table;

[0028] A query unit is configured to query the business data satisfying the attribute value of the second data item from the first data warehouse table according to the attribute value of the first data item.

[0029] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0030] Through the technical solution provided by the embodiment of the present application, for the business data stored in the sub-libraries and sub-tables, it can be determined that the first data warehouse table is obtained by splitting with the first data item as the splitting unit; and according to the second data item contained in the first data warehouse table, the first data warehouse table is converted into a second data warehouse table obtained by splitting with the second data item as the splitting unit, and the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. In this way, it can be guaranteed that the second data warehouse table is obtained in a short time, that is, no matter which data item corresponds to the business data to be queried, the technical solution provided by the embodiment of the present application can be used to ensure the integrity of the business data and the efficiency of data processing, shorten the query time, and improve the performance of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0032] Figure 1 A flowchart of a database processing method provided in an embodiment of the present application;

[0033] Figure 2 A flowchart of a data query method provided in an embodiment of the present application;

[0034] Figure 3 A flowchart of a data query method provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the structure of a database processing device provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of the structure of a data query device provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of the structure of a data query device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to achieve the purpose of the present application, the embodiment of the present application provides a database processing method, a data query method and a device. For business data stored in sub-libraries and sub-tables, it can be determined that a first data warehouse table is obtained by splitting with a first data item as a splitting unit; and according to the second data item contained in the first data warehouse table, the first data warehouse table is converted into a second data warehouse table obtained by splitting with the second data item as a splitting unit, and the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. In this way, it can be ensured that the second data warehouse table is obtained in a short time, that is, no matter which data item corresponds to the business data to be queried, the technical solution provided by the embodiment of the present application can not only ensure the integrity of the business data, but also ensure the efficiency of data processing, shorten the query time, and improve the performance of the entire system.

[0039] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0040] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0041] Figure 1 A flowchart of a method for processing a database provided in an embodiment of the present application is provided. The method may be as follows.

[0042] Step 101: Determine a first data warehouse table, where the first data warehouse table is obtained by splitting a first data item as a unit, and the first data warehouse table contains a second data item.

[0043] In the embodiment of the present application, in the data warehouse system, for a large amount of received business data, the received business data can be split according to a preset splitting principle and stored in different data tables respectively. The preset splitting principle here can be understood as which data item is used as a splitting unit for splitting.

[0044] Assume that in the embodiment of the present application, a large amount of received business data is split with the first data item (for example, user identification) as the splitting unit, and the split business data is stored in different data tables. Then, data table 1 corresponding to user identification 1, data table 2 corresponding to user identification 2, ..., data table n corresponding to user identification n are obtained. In these n data tables, the table structure used is the same.

[0045] In this way, when the business data is subsequently obtained, the name of the data table storing the business data can be determined according to the user identifier in the business data, and the business data can be stored in the data table corresponding to the name.

[0046] Take one of the data tables as an example. As shown in Table 1, data table 1 is obtained by splitting the user ID as the unit:

[0047] Table 1

[0048] User ID Equipment identification Business Logo Trading Hours Transaction amount 1 00000 01 T1 100 1 00000 02 T2 50 1 00001 01 T3 10 1 00010 03 T4 40

[0049] As can be seen from Table 1, each piece of business data contains multiple data items.

[0050] In order to facilitate subsequent query of business data in n data tables, the obtained n data tables may be synchronized to a first data warehouse table, which contains all business data in the n data tables.

[0051] It should be noted that in an embodiment of the present application, a logical table corresponding to the first data item (the logical table may be referred to as the first logical table) may be created, in which the table structure of the corresponding sub-tables and the search keyword (i.e., the first data item) may be included; a first data warehouse table corresponding to the first logical table may also be created. The first data warehouse table stores business data according to the table structure included in the first logical table. At the beginning of the creation of the first data warehouse table, there is a lot of business data that needs to be synchronized, but after the synchronization of the existing data is completed, an incremental synchronization method is adopted, that is, only the newly added data in each data sub-table is synchronized each time, which effectively improves the data synchronization efficiency.

[0052] Step 102: According to the second data item, convert the first data warehouse table into a second data warehouse table, the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table, and the second data warehouse table is obtained by splitting the second data item as a unit.

[0053] In an embodiment of the present application, since the first data warehouse table stores data according to the table structure contained in the first logical table, the principle of splitting the business data in the first data warehouse table is adjusted while ensuring that data is not lost. The business data in the first data warehouse table can be split according to the second data item as the splitting unit, and a data storage structure for the second data item is generated. Then, according to the data storage structure, the business data in the first data warehouse table is stored in the second data warehouse table.

[0054] Preferably, the method further comprises:

[0055] Based on the second data warehouse table, a logical table containing the second data item is created (the logical table here can be referred to as the second logical table), and the logical table contains the table structure of the sub-table corresponding to the second data warehouse table, and the table structure contains the mapping relationship between the second data item and the first data item.

[0056] Still taking the content shown in the above Table 1 as an example, assuming that the second data item is a merchant identifier, the obtained second data warehouse table is shown in Table 2:

[0057] Table 2

[0058] Business Logo Equipment identification User ID Trading Hours Transaction amount 01 00000 1 T1 100 01 00001 1 T3 10 02 00000 1 T2 30 03 00010 1 T4 40

[0059] Preferably, the method further comprises:

[0060] According to the table structure contained in the logic table, the business data in the second data warehouse table is synchronized to each sub-table corresponding to the second data item.

[0061] For the business data stored in Table 2, the first two (i.e., business data with merchant ID 01) can be synchronized to the same data table 1; the business data with merchant ID 02 is synchronized to another data table 2; and the business data with merchant ID 03 is synchronized to another data table 3.

[0062] Preferably, the method further comprises:

[0063] The obtained logic table is imported into an online relational database.

[0064] In this way, the relational database includes not only the first logic table (the logic table uses the first data item as the search keyword), but also the second logic table (the logic table uses the second data item as the search keyword, and the logic table also includes the mapping relationship between the second data item and the first data item). It can be seen that the scheme described in the embodiment of the present application can be adopted to obtain logic tables for different data items, and the mapping relationship between the data item and the first data item can be determined in the logic table. No matter which data item is subsequently received as the query request, the associated business data can be determined with the help of the mapping relationship, which effectively improves the query efficiency of the business data.

[0065] After the first data warehouse table is converted to the second data warehouse table, if the business data in the first data warehouse table changes, the business data in the second data warehouse table is processed synchronously.

[0066] For example: when business data is added or deleted in the first data warehouse table, not only the data items in the first logical table need to be added or deleted, but also the business data in the second data warehouse table need to be added or deleted synchronously. In this way, the data items in the second logical table can be added or deleted synchronously, effectively ensuring that the data in the second logical table is consistent with the data in the original table.

[0067] Through the technical solution provided by the embodiment of the present application, for the business data stored in the sub-libraries and sub-tables, it can be determined that the first data warehouse table is obtained by splitting with the first data item as the splitting unit; and according to the second data item contained in the first data warehouse table, the first data warehouse table is converted into a second data warehouse table obtained by splitting with the second data item as the splitting unit, and the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. In this way, it can be guaranteed that the second data warehouse table is obtained in a short time, that is, no matter which data item corresponds to the business data to be queried, the technical solution provided by the embodiment of the present application can be used to ensure the integrity of the business data and the efficiency of data processing, shorten the query time, and improve the performance of the entire system.

[0068] Figure 2 A flow chart of a data query method provided in an embodiment of the present application is shown below.

[0069] Step 201: Receive a query request, wherein the query request includes an attribute value of a second data item.

[0070] Step 202: According to the table structure of the logical table containing the second data item, query the business data that meets the attribute value of the second data item from the second data warehouse table.

[0071] In an embodiment of the present application, since the second data warehouse table is obtained through conversion in the above embodiment, and the second data warehouse table contains all business data, when a query request is received, according to the table structure of the second logical table, the attribute value of the second data item is used as the query condition, and the business data that meets the attribute value of the second data item is queried from the second data warehouse table.

[0072] However, in the data warehouse system, all business data is stored in the first data warehouse table and the second data warehouse table. If different data warehouse tables are converted according to the number of data items, it will lead to a waste of storage resources in the data warehouse system. Figure 2 The data query method shown in is not a preferred implementation.

[0073] Figure 3 A flow chart of a data query method provided in an embodiment of the present application is shown below.

[0074] Step 301: Receive a query request, wherein the query request includes an attribute value of a second data item.

[0075] In an embodiment of the present application, a query request is received. Since the query request contains the attribute value of the second data item, according to the prior art, it is necessary to traverse all the data in the first data warehouse table, so the query efficiency is relatively low and the system resource consumption is relatively large. According to the technical solution provided in the embodiment of the present application, the second logical table can be obtained according to the technical solution recorded above. The mapping relationship between the first data item and the second data item is stored in the second logical table.

[0076] Step 302: Determine the attribute value of the first data item that satisfies the attribute value of the second data item according to the mapping relationship between the second data item and the first data item contained in the logic table.

[0077] In an embodiment of the present application, since the second logical table is imported into a relational database after being obtained, when a query request is received, if the query request only includes the attribute value of the second data item, the attribute value of the first data item that satisfies the attribute value of the second data item can be determined based on the mapping relationship between the second data item and the first data item contained in the second logical table.

[0078] Step 303: According to the attribute value of the first data item, query the first data warehouse table for business data that meets the attribute value of the second data item.

[0079] In the embodiment of the present application, once the attribute value of the first data item is determined, the business data satisfying the attribute value of the first data item can be queried from the first data warehouse table, or the business data can be obtained from each data sub-table corresponding to the attribute value of the first data item.

[0080] Assuming that the attribute value of the second data item included in the query request is the merchant ID 01 in Table 2, then according to the mapping relationship between the merchant ID 01 and the user ID stored in the second logical table, it can be determined that the user ID corresponding to the merchant ID 01 is 1, then the business data that meets the merchant ID 01 is found from the data table corresponding to the user ID 1.

[0081] Figure 4 A schematic diagram of a database processing device provided in an embodiment of the present application. The prime number database processing device includes: a determination unit 401 and a processing unit 402, wherein:

[0082] A determining unit 401 determines a first data warehouse table, wherein the first data warehouse table is obtained by using a first data item as a split unit, and the first data warehouse table includes a second data item;

[0083] Processing unit 402 converts the first data warehouse table into a second data warehouse table according to the second data item. The business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. The second data warehouse table is obtained by splitting the second data item as a unit.

[0084] In another embodiment of the present application, the processing device further includes: a creating unit 403, wherein:

[0085] The creation unit 403 creates a logical table including the second data item according to the second data warehouse table, wherein the logical table includes a table structure of a sub-table corresponding to the second data warehouse table, and the table structure includes a mapping relationship between the second data item and the first data item.

[0086] In another embodiment of the present application, the processing device further includes: a synchronization unit 404, wherein:

[0087] The synchronization unit 404 synchronizes the business data in the second data warehouse table to each sub-table corresponding to the second data item according to the table structure included in the logical table.

[0088] In another embodiment of the present application, the processing device further includes: an import unit 405, wherein:

[0089] The importing unit 405 imports the obtained logic table into an online relational database.

[0090] In another embodiment of the present application, after converting the first data warehouse table into the second data warehouse table, the processing unit 402 synchronously processes the business data in the second data warehouse table if the business data in the first data warehouse table changes.

[0091] It should be noted that the database processing device provided in the embodiment of the present application can be implemented by software or hardware, which is not specifically limited here. The processing device provided in the embodiment of the present application can determine the first data warehouse table obtained by splitting the first data item as a splitting unit for the business data stored in the sub-library and sub-table; and according to the second data item contained in the first data warehouse table, the first data warehouse table is converted into a second data warehouse table obtained by splitting the second data item as a splitting unit, and the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table. In this way, it can be ensured that the second data warehouse table is obtained in a short time, that is, no matter which data item corresponds to the business data to be queried, the technical solution provided in the embodiment of the present application can be adopted to ensure the integrity of the business data and the efficiency of data processing, shorten the query time, and improve the performance of the entire system.

[0092] Figure 5 The data query device provided in the embodiment of the present application is a schematic diagram of the structure of the data query device. The data query device includes: a receiving unit 501 and a query unit 502, wherein:

[0093] A receiving unit 501 receives a query request, wherein the query request includes an attribute value of a second data item;

[0094] The query unit 502 queries the second data warehouse table for business data that satisfies the attribute value of the second data item according to the table structure of the logical table containing the second data item.

[0095] It should be noted that the data query device provided in the embodiment of the present application can be implemented by software or hardware, and no specific limitation is made here.

[0096] Figure 6 The data query device provided in the embodiment of the present application is a schematic diagram of the structure of the data query device. The data query device includes: a receiving unit 601, a determining unit 602 and a query unit 603, wherein:

[0097] A receiving unit, receiving a query request, wherein the query request includes an attribute value of a second data item;

[0098] a determining unit, which determines an attribute value of the first data item that satisfies an attribute value of the second data item according to a mapping relationship between the second data item and the first data item included in the logic table;

[0099] A query unit is configured to query the business data satisfying the attribute value of the second data item from the first data warehouse table according to the attribute value of the first data item.

[0100] It should be noted that the data query device provided in the embodiment of the present application can be implemented by software or hardware, and no specific limitation is made here.

[0101] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0102] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0103] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0104] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0105] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0109] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0110] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0111] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0112] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0113] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0114] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0115] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for processing a database, comprising: Determine a first data warehouse table, where the first data warehouse table is obtained by splitting the received business data using the first data item as a splitting unit, and the first data warehouse table includes the second data item; According to the second data item, the first data warehouse table is converted into a second data warehouse table, the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table, and the second data warehouse table is obtained by splitting the first data warehouse table with the second data item as a splitting unit; the first data item and the second data item are different splitting units, and there is a mapping relationship between the first data item and the second data item for querying the business data; the mapping relationship is used to determine the attribute value of the first data item that satisfies the attribute value of the second data item, and the attribute value of the first data item is used to query the business data that satisfies the attribute value of the second data item from the first data warehouse table.

2. The database processing method according to claim 1, further comprising: According to the second data warehouse table, a logical table including the second data item is created, wherein the logical table includes a table structure of a sub-table corresponding to the second data warehouse table, and the table structure includes a mapping relationship between the second data item and the first data item.

3. The database processing method according to claim 2, further comprising: According to the table structure contained in the logic table, the business data in the second data warehouse table is synchronized to each sub-table corresponding to the second data item.

4. The method for processing a database according to claim 2, further comprising: The obtained logic table is imported into an online relational database.

5. The database processing method according to claim 1, after converting the first data warehouse table into the second data warehouse table, the method further comprises: If the business data in the first data warehouse table changes, the business data in the second data warehouse table is processed synchronously.

6. A data query method, comprising: receiving a query request, wherein the query request includes an attribute value of a second data item; According to the table structure of the logical table containing the second data item, business data that meets the attribute value of the second data item is queried from the second data warehouse table; the second data warehouse table is obtained by splitting the first data warehouse table with the second data item as a splitting unit, and the first data warehouse table is obtained by splitting the received business data with the first data item as a splitting unit, the first data item and the second data item are different splitting units, and there is a mapping relationship between the first data item and the second data item for querying the business data; the mapping relationship is used to determine the attribute value of the first data item that meets the attribute value of the second data item, and the attribute value of the first data item is used to query the business data that meets the attribute value of the second data item from the first data warehouse table.

7. A data query method, comprising: receiving a query request, wherein the query request includes an attribute value of a second data item; Determine, according to a mapping relationship between the second data item and the first data item contained in the logic table, an attribute value of the first data item that satisfies the attribute value of the second data item; According to the attribute value of the first data item, querying the first data warehouse table for business data that satisfies the attribute value of the second data item; The querying, from the first data warehouse table, business data satisfying the attribute value of the second data item according to the attribute value of the first data item specifically includes: According to the attribute value of the first data item, business data satisfying the attribute value of the second data item is acquired from the data sub-table corresponding to the attribute value of the first data item.

8. A database processing device, comprising: A determining unit determines a first data warehouse table, wherein the first data warehouse table is obtained by splitting the received business data using the first data item as a splitting unit, and the first data warehouse table includes the second data item; A processing unit converts the first data warehouse table into a second data warehouse table according to the second data item, the business data stored in the second data warehouse table is the same as the business data stored in the first data warehouse table, and the second data warehouse table is obtained by splitting the first data warehouse table with the second data item as a splitting unit; the first data item and the second data item are different splitting units, and there is a mapping relationship between the first data item and the second data item for querying the business data; the mapping relationship is used to determine the attribute value of the first data item that satisfies the attribute value of the second data item, and the attribute value of the first data item is used to query the business data that satisfies the attribute value of the second data item from the first data warehouse table.

9. The database processing device according to claim 8, further comprising: Create a cell where: The creation unit creates a logical table including the second data item based on the second data warehouse table, wherein the logical table includes a table structure of a sub-table corresponding to the second data warehouse table, and the table structure includes a mapping relationship between the second data item and the first data item.

10. The database processing device according to claim 9, further comprising: Synchronous unit, where: The synchronization unit synchronizes the business data in the second data warehouse table to each sub-table corresponding to the second data item according to the table structure contained in the logical table.

11. The database processing device according to claim 9, further comprising: Import a unit where: The importing unit imports the obtained logic table into an online relational database.

12. The database processing device according to claim 8, After converting the first data warehouse table into the second data warehouse table, the processing unit synchronously processes the business data in the second data warehouse table if the business data in the first data warehouse table changes.

13. A data query device, comprising: A receiving unit, receiving a query request, wherein the query request includes an attribute value of a second data item; A query unit, which queries business data that meets the attribute value of the second data item from the second data warehouse table according to the table structure of the logical table containing the second data item; the second data warehouse table is obtained by splitting the first data warehouse table with the second data item as the splitting unit, and the first data warehouse table is obtained by splitting the received business data with the first data item as the splitting unit, the first data item and the second data item are different splitting units, and there is a mapping relationship between the first data item and the second data item for querying the business data; the mapping relationship is used to determine the attribute value of the first data item that meets the attribute value of the second data item, and the attribute value of the first data item is used to query business data that meets the attribute value of the second data item from the first data warehouse table.

14. A data query device, comprising: A receiving unit, receiving a query request, wherein the query request includes an attribute value of a second data item; a determining unit, which determines an attribute value of the first data item that satisfies an attribute value of the second data item according to a mapping relationship between the second data item and the first data item included in the logic table; A query unit, which queries the first data warehouse table for business data that satisfies the attribute value of the second data item according to the attribute value of the first data item; The querying, from the first data warehouse table, business data satisfying the attribute value of the second data item according to the attribute value of the first data item specifically includes: According to the attribute value of the first data item, business data satisfying the attribute value of the second data item is acquired from the data sub-table corresponding to the attribute value of the first data item.

Citation Information

Patent Citations

  • Splitting and inquiring method and system of database relational table

    CN102999526A

  • Data query method and system

    CN103577590A

  • A database processing and data query method and device

    CN108959330B