Data query method, device, cluster and readable storage medium

By obtaining the prompt information of the filter from the dimension table and converting the filter fields, the problem of low filter count efficiency caused by the large amount of data in a wide table is solved, and more efficient filter value and data query are achieved.

WO2025108191A1PCT designated stage expired Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/132363
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-21
Filing Date
2024-11-15
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, the large amount of data in a wide table leads to the low efficiency of the number of prompt information taken by the filter, which affects the efficiency of the user inputting the filter value.

Method used

By obtaining the prompt information of the filter from the dimension table, instead of obtaining it from the wide table, the filter fields are converted using the field mapping relationship of the dimension table and the wide table to improve the efficiency of the filter's value acquisition.

Benefits of technology

Improves the efficiency of filter value acquisition, reduces query time, and improves data access speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024132363_30052025_PF_FP_ABST
    Figure CN2024132363_30052025_PF_FP_ABST
Patent Text Reader

Abstract

A data query method, a device, a cluster and a readable storage medium, which relate to the technical field of computers. The method is applied to a data query system, and comprises: acquiring a query request, the query request comprising a filter field and a filter value, the filter field belonging to first attribute fields of a dimension table in a data source storage device comprised in the data query system, the filter field being used for instructing to obtain a value from the same field of the dimension table to use same as prompt information, and the filter value being selected from the prompt information; on the basis of a field mapping relationship between the dimension table and a wide table, determining a filter attribute field associated with the filter field, the data source storage device further storing the wide table, the wide table comprising a plurality of second attribute fields, the filter attribute field belonging to the second attribute fields of the wide table, and the field mapping relationship being used for recording a mapping relationship between the first attribute fields of the dimension table and the second attribute fields of the wide table; and, on the basis of the filter attribute field and the filter value, performing an operation of the query request.
Need to check novelty before this filing date? Find Prior Art

Description

Data query method, device, cluster and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 21, 2023, with application number 202311558003.2, and priority to the Chinese patent application entitled “Data query method, device, cluster and readable storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application provides a field of computer technology, and in particular, relates to a data query method, device, cluster, and readable storage medium. Background Art

[0003] A wide table is a data table structure designed to improve the efficiency of data query and analysis and simplify the data model. Compared to traditional narrow tables, wide tables can store related data together, reducing the number of join queries and increasing data access speed. To improve query efficiency, wide tables typically store some data redundantly within the table, avoiding frequent join queries and reducing query complexity. However, due to the high data redundancy in wide tables, more storage space is required. In general, wide tables are a data table structure that improves query efficiency and simplifies the data model at the expense of redundant data. They are widely used in fields such as big data analysis and data warehousing.

[0004] When querying a wide table, you need to enter a filter value in the filter. The filter then queries the wide table based on the entered filter value to obtain the query data. To facilitate user input of filter values, a prompt button (for example, a drop-down list button) is typically provided for the filter, allowing users to select the desired data from the prompt. Currently, the filter prompt indicates that data is retrieved from the wide table. However, wide tables can be very large, making data retrieval inefficient. Summary of the Invention

[0005] The present application provides a data query method, device, cluster and readable storage medium, which can obtain filter prompt information from a dimension table so that the user can select a filter value from the prompt information, thereby improving the efficiency of filter value acquisition.

[0006] In a first aspect, a data query method is provided, which is applied to a data query system. The data query system includes a data source storage device. The data source storage device includes a dimension table, a wide table, and a field mapping relationship between the dimension table and the wide table. The dimension table includes multiple first attribute fields. The wide table includes multiple second attribute fields. The field mapping relationship between the dimension table and the wide table is used to record the mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table. The data query system obtains a query request. The query request includes a filter field and a filter value. The filter field belongs to the first attribute field of the dimension table. The filter field is used to indicate that a value is obtained from the same field of the dimension table as prompt information. The filter value is selected from the prompt information. The data query system determines the filter attribute field associated with the filter field based on the field mapping relationship between the dimension table and the wide table. The filter attribute field belongs to the second attribute field of the wide table. The data query system performs the operation of the query request based on the filter attribute field and the filter value.

[0007] In the above solution, because the first attribute field can only be used to query dimension tables, and the second attribute field can only be used to query wide tables, the filter field belonging to the first attribute field is first used to obtain filter prompt information from the dimension table, allowing the user to select a filter value from the filter prompt information, thereby improving the efficiency of filter value selection. The filter field and filter value are then sent to the data query system, which converts the filter field belonging to the first attribute field into a filter attribute field belonging to the second attribute field. The wide table can then be queried using the filter attribute field belonging to the second attribute field and the filter value. Because wide tables store related data together, using wide tables can reduce the number of associated queries and improve data access speed.

[0008] In some possible designs, a field mapping relationship between the dimension table and the wide table can be generated by starting with the first attribute field of the dimension table and comparing it with each second attribute field of the wide table, respectively, until each first attribute field of the dimension table is traversed. Taking the first attribute field A of the dimension table and the second attribute field B of the wide table as examples, the first attribute field A of the dimension table and the second attribute field B of the wide table can be obtained. The first attribute field A and the second attribute field B are compared to obtain a comparison result. If the comparison result shows that the first attribute field A and the second attribute field B are identical or fuzzy matching, the mapping relationship between the first attribute field A and the second attribute field B is stored as the field mapping relationship between the dimension table and the wide table. Here, identical can mean that the characters in the first attribute field and the second attribute field are exactly the same, and fuzzy matching means that the characters in the first attribute field are highly similar or have the same meaning. The similarity can be calculated using cosine similarity, Hamming distance, etc. between the characters in the first attribute field and the second attribute field. The same meaning can be determined using knowledge graphs, artificial intelligence translation, etc.

[0009] In the above solution, the field mapping relationship between the dimension table and the wide table can be automatically generated, which improves the efficiency of establishing the field mapping relationship between the dimension table and the wide table compared to manually configuring the field mapping relationship between the dimension table and the wide table.

[0010] In some possible designs, the comparison results and fuzzy matching results of the characters of the first attribute field and the characters of the second attribute field are calculated respectively. Then, the comparison result is generated based on the character comparison result and the fuzzy matching result. Here, the characters of the first attribute field and the characters of the second attribute field can be compared to determine the character comparison result of the first attribute field and the second attribute field. Then, a regular expression can be generated based on the characters of the first attribute field, and the regular expression and the characters of the second attribute field can be compared based on the wildcard rule represented by the wildcard to generate the fuzzy matching result of the first attribute field and the second attribute field. Wherein, the regular expression includes one or more wildcards.

[0011] In some possible designs, the dimension table and the wide table meet a similarity condition. The similarity condition is that the number of first attribute fields in the dimension table is greater than a quantity threshold, and the ratio of the number of first attribute fields in the dimension table that are identical or fuzzy-matched with any field in the wide table to the number of first attribute fields in the dimension table is greater than a ratio threshold. The quantity threshold is an integer greater than zero, set based on experience. The ratio threshold is a real number greater than zero, set based on experience.

[0012] The above solution stipulates that the dimension table and the wide table are considered to meet the similarity condition only when the number of first attribute fields in the dimension table is greater than the quantity threshold. This avoids dimension tables with a relatively small number of first attribute fields from being mistakenly considered similar to the wide table. For example, if a dimension table has only two first attribute fields and one of its first attribute fields is the same as a second attribute field in the wide table, it will be mistakenly considered similar to the wide table.

[0013] In a second aspect, a data query method is provided. The method is applied to a data query system. The data query system includes a data source storage device. The data source storage device includes a dimension table, a wide table, and a field mapping relationship between the dimension table and the wide table. The dimension table includes multiple first attribute fields. The wide table includes multiple second attribute fields. The field mapping relationship between the dimension table and the wide table is used to record the mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table. The data query system determines a filter field associated with a filter attribute field based on the field mapping relationship between the dimension table and the wide table. The filter attribute field belongs to the second attribute field of the wide table. The filter field belongs to the first attribute field of the dimension table. Based on the filter field, the data query system obtains a value from the same field of the dimension table as prompt information, allowing a user to select a filter value from the prompt information. The data query system obtains a query request. The query request includes the filter attribute field and the filter value. The data query system performs the operation of the query request based on the filter attribute field and the filter value.

[0014] In some possible designs, a field mapping relationship between the dimension table and the wide table can be generated by starting with the first attribute field of the dimension table and comparing it with each second attribute field of the wide table, respectively, until each first attribute field of the dimension table is traversed. Taking the first attribute field A of the dimension table and the second attribute field B of the wide table as examples, the first attribute field A of the dimension table and the second attribute field B of the wide table can be obtained. The first attribute field A and the second attribute field B are compared to obtain a comparison result. If the comparison result shows that the first attribute field A and the second attribute field B are identical or fuzzy matching, the mapping relationship between the first attribute field A and the second attribute field B is stored as the field mapping relationship between the dimension table and the wide table. Here, identical can mean that the characters in the first attribute field and the second attribute field are exactly the same, and fuzzy matching means that the characters in the first attribute field are highly similar or have the same meaning. The similarity can be calculated using cosine similarity, Hamming distance, etc. between the characters in the first attribute field and the second attribute field. The same meaning can be determined using knowledge graphs, artificial intelligence translation, etc.

[0015] In some possible designs, the comparison results and fuzzy matching results of the characters of the first attribute field and the characters of the second attribute field are calculated respectively. Then, the comparison result is generated based on the character comparison result and the fuzzy matching result. Here, the characters of the first attribute field and the characters of the second attribute field can be compared to determine the character comparison result of the first attribute field and the second attribute field. Then, a regular expression can be generated based on the characters of the first attribute field, and the regular expression and the characters of the second attribute field can be compared based on the wildcard rule represented by the wildcard to generate the fuzzy matching result of the first attribute field and the second attribute field. Wherein, the regular expression includes one or more wildcards.

[0016] In some possible designs, the dimension table and the wide table meet a similarity condition. The similarity condition is that the number of first attribute fields in the dimension table is greater than a quantity threshold, and the ratio of the number of first attribute fields in the dimension table that are identical or fuzzy-matched with any field in the wide table to the number of first attribute fields in the dimension table is greater than a ratio threshold. The quantity threshold is an integer greater than zero, set based on experience. The ratio threshold is a real number greater than zero, set based on experience.

[0017] In a third aspect, a data query device is provided. The data query device is applied to the data query system. The data query system includes a data source storage device. The data source storage device includes a dimension table, a wide table, and a field mapping relationship between the dimension table and the wide table. The dimension table includes multiple first attribute fields. The wide table includes multiple second attribute fields. The field mapping relationship between the dimension table and the wide table is used to record the mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table. The data query device includes an acquisition unit, a determination unit, and a query unit. The acquisition unit is used to acquire a query request, the query request including a filter field and a filter value. The filter field belongs to the first attribute field of the dimension table in the data source storage device included in the data query system. The filter field indicates that a value is obtained from the same field of the dimension table as prompt information, and the filter value is selected from the prompt information. The determination unit is used to determine, based on the field mapping relationship between the dimension table and the wide table, a filter attribute field associated with the filter field, wherein the filter attribute field belongs to the second attribute field of the wide table. The query unit is used to execute the operation of the query request based on the filter attribute field and the filter value.

[0018] In a fourth aspect, a data query device is provided. The data query device is applied to the data query system. The data query system includes a data source storage device. The data source storage device includes a dimension table, a wide table, and a field mapping relationship between the dimension table and the wide table. The dimension table includes multiple first attribute fields. The wide table includes multiple second attribute fields. The field mapping relationship between the dimension table and the wide table records the mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table. The data query system determines a filter field associated with a filter attribute field based on the field mapping relationship between the dimension table and the wide table. The filter attribute field belongs to the second attribute field of the wide table. The filter field belongs to the first attribute field of the dimension table. Based on the filter field, the data query system obtains a value from the same field of the dimension table as prompt information, allowing a user to select a filter value from the prompt information. The data query device includes an acquisition unit and a query unit. The acquisition unit is configured to acquire a query request. The query request includes a filter attribute field and a filter value. The query unit is configured to execute the operation of the query request based on the filter attribute field and the filter value.

[0019] In a fifth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions in the memory to implement the method as described in any one of the first aspect, or to implement the method as described in any one of the second aspect.

[0020] In a sixth aspect, a computing cluster is provided, comprising multiple computing devices, each computing device comprising a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions in the memory to implement the method as described in any one of the first aspects, or to implement the method as described in any one of the second aspects.

[0021] In a seventh aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed by a computing device, implement the method as described in any one of the first aspect, or implement the method as described in any one of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of the structure of a data query system provided by the present application;

[0023] FIG2 is a schematic diagram of an attribute field association method provided by the present application;

[0024] FIG3 is a schematic diagram of various layers of a database provided by the present application;

[0025] FIG4 is a schematic diagram of a query interface provided by the present application;

[0026] FIG5 is a schematic diagram of a wide table configuration interface provided by the present application;

[0027] FIG6 is a method for establishing a field mapping relationship between a dimension table and a wide table provided by the present application;

[0028] FIG7 is a flow chart of a data query method provided by the present application;

[0029] FIG8 is a flow chart of a data query method provided by the present application;

[0030] FIG9 is a schematic structural diagram of a data query system provided by the present application;

[0031] FIG10 is a schematic diagram of the structure of a computing device provided by the present application. DETAILED DESCRIPTION

[0032] To address the issue of low filter data retrieval efficiency, this application provides a data query method in which the filter can retrieve values ​​from a dimension table as filter prompt information, rather than from a wide table. Because dimension tables contain much less data than wide tables, retrieval efficiency from dimension tables is higher than from wide tables, effectively improving filter value retrieval efficiency. The data query method provided by this application is described in detail below with reference to the accompanying drawings.

[0033] First, a structural diagram of a data query system provided by the present application is introduced with reference to Figure 1. As shown in the figure, the data query system in the present application includes: a data source storage device 110 and a client 120.

[0034] The data source storage device 110 can be a computing device, a computing device cluster, or a terminal device, where computing devices include bare metal servers (BMS), virtual machines, containers, or edge computing devices. A BMS refers to a general-purpose physical server, such as an ARM server or an X86 server. A virtual machine refers to a complete computer system with complete hardware system functions, running in a completely isolated environment, simulated by software. Any work that can be done on a physical computer can also be done on a virtual machine. When creating a virtual machine on a computing device, part of the physical machine's hard disk and memory capacity needs to be used as the virtual machine's hard disk and memory capacity. Each virtual machine has an independent basic input / output system (BIOS), hard disk, and operating system, and can be operated like a physical machine. A container is virtualization software that combines an application and all its dependencies into a single software package that is not restricted by the underlying host operating system. This eliminates the need to build a complex environment and simplifies the process from application development to deployment. Edge computing devices refer to devices that are closer to data sources and end users and have low latency and high bandwidth characteristics, such as smart routers and edge servers. The computing device cluster may include multiple computing devices as described above, such as a data center, which is not specifically limited in this application; the description of the terminal device can refer to the above content and will not be repeated here.

[0035] The data source storage device 110 can be used to store multiple dimension tables and wide tables of a database. For ease of understanding, the dimension tables and wide tables shown in FIG2 are used as examples for detailed description.

[0036] Dimension tables can include customer, product, and date dimensions. The customer dimension table includes basic customer information such as customer name, address, and type. The product dimension table includes basic product information such as product ID, name, category, and price. The date dimension table can include basic information such as year, month, quarter, and day of the week. For ease of description, the fields corresponding to the above basic information can also be referred to as first attribute fields. Dimension tables can be star dimension tables, snowflake dimension tables, and so on.

[0037] Wide tables include indicator fields and second attribute fields. Indicator fields can include things like order quantity and order amount, while second attribute fields include some or all of the first attribute fields in each dimension table. For example, the second attribute fields in a wide table can include customer name, customer address, customer type, product name, product category, product price, year, month, quarter, week, and so on. Therefore, the amount of data in a wide table will be larger than that in a dimension table. Wide tables can be flat wide tables, nested wide tables, tall wide tables, hybrid wide tables, and so on.

[0038] The above examples of dimension tables and wide tables illustrate only a small number of dimension tables, with only a small number of fields in each. Therefore, the data volume of the wide table is greater than or equal to the data volume of the dimension table. In actual applications, more dimension tables can be included, and the dimension tables can also be other dimension tables. The number of first attribute fields in the dimension tables and the number of second attribute fields in the wide tables can also be greater. The first attribute fields in the dimension tables and the second attribute fields in the wide tables can also be other fields. However, as the number of dimension tables increases, the number of first attribute fields in the dimension tables increases, the number of second attribute fields in the wide tables increases, and the number of indicator fields in the wide tables increases, the data volume of the wide tables will be far greater than the data volume of the dimension tables. In addition, the wide table can also include only multiple second attribute fields and no indicator fields, etc.

[0039] The second attribute fields of a wide table include some or all of the first attribute fields in each dimension table. This can be understood as follows: all second attribute fields in the wide table are derived from the first attribute fields of each dimension table, or some of the second attribute fields in the wide table are derived from the first attribute fields of each dimension table, while other second attribute fields in the wide table are not derived from the first attribute fields of each dimension table. However, not all second attribute fields in the wide table are not derived from the first attribute fields of each dimension table. Therefore, the number of second attribute fields in a wide table can be greater than the number of first attribute fields in each dimension table, or less than or equal to the number of first attribute fields in each dimension table. For example, suppose a wide table includes second attribute fields such as customer name, customer address, customer type, product name, product category, product price, year, month, quarter, week, and transaction location. The first attribute fields in the customer, product, and date dimension tables include customer name, customer address, customer type, product name, product category, product price, year, month, quarter, and week. Therefore, the second attribute field in the wide table has one more attribute field for transaction location than the first attribute fields in each dimension table. For another example, suppose a wide table includes second attribute fields such as customer name, product name, product category, product price, year, month, quarter, and week. However, the first attribute fields in the customer, product, and date dimension tables include customer name, customer address, customer type, product name, product category, product price, year, month, quarter, and week. Therefore, the second attribute fields in the wide table are less than the set of first attribute fields in each dimension table, minus the customer address and customer type fields. Furthermore, even if the number of second attribute fields in the wide table is less than or equal to the set of first attribute fields in each dimension table, some second attribute fields in the wide table may not correspond to first attribute fields in multiple dimension tables. For example, suppose a wide table includes second attribute fields such as customer name, product name, product category, product price, year, month, quarter, week, and transaction location. The first attribute fields in the customer, product, and date dimension tables include customer name, address, type, product name, category, price, year, month, quarter, and week. Therefore, the second attribute field in the wide table is one less than the first attribute fields in each dimension table. However, the second attribute field in the wide table, "Transaction Location," does not correspond to any field in the first attribute field combinations in these dimension tables.

[0040] Because the second attribute fields of a wide table include some or all of the first attribute fields in each dimension table, some of the second attribute fields in the wide table are mapped to some fields in the dimension table. For example, the second attribute fields Year, Month, Quarter, and Week in a wide table are mapped to the first attribute fields Year, Month, Quarter, and Week in the Date dimension table, respectively. Similarly, the second attribute fields Product Name, Product Category, and Product Price in a wide table are mapped to the first attribute fields Product Name, Product Category, and Product Price in the Product dimension table, respectively.

[0041] Whether it's the second attribute field in a wide table or the first attribute field in a dimension table, each attribute field can have multiple values. For example, the first attribute field "Product Price" in the product dimension table can have values ​​of 1000, 2000, 1500, 1200, and so on. The second attribute field "Product Price" in the wide table can have values ​​of 1000, 2000, 1500, 1200, and so on.

[0042] The client 120 is used to implement human-computer interaction and can be deployed on a terminal device or computing device. The terminal device includes a personal computer, a smart phone, a wearable device, a handheld processing device, a tablet computer, a mobile notebook, an augmented reality (AR) device, a virtual reality (VR) device, an integrated handheld device, a wearable device, an in-vehicle device, an intelligent conference device, an intelligent advertising device, a smart home appliance, etc. The smart home appliance can be a sweeping robot, a mopping robot, etc., which is not specifically limited here.

[0043] In a specific implementation, the client 120 can be a software or application running on a terminal device or computing device controlled by the user, such as a personal computer (PC) client, a web client accessed based on a browser, an application (APP) client running on a mobile terminal, or a console of a cloud platform. This application does not make any specific limitations.

[0044] Optionally, client 120 can be a software tool or application for interacting with and managing a database. The client provides a user interface and functionality, enabling users to perform database operations, such as data modeling and data querying. The client can include a management client and a consumer client, wherein the management client and the consumer client can be two different clients or integrated into a single client. The management client can be used by database administrators, who can perform data modeling, etc. The consumer client can be used by database users, who can perform data querying, etc. For simplicity, the following description uses the management client and the consumer client as two clients as examples.

[0045] Optionally, the client 120 may also be a plug-in or function in a database client for implementing data query management, such as a data query function module in a database client. The above examples are for illustration only and are not specifically limited in this application.

[0046] Optionally, client 120 may also be a client of a cloud platform, such as a console of the cloud platform, specifically a console based on the World Wide Web (web) or an application programming interface (API), which is not specifically limited in this application. The console may provide users with cloud services for data query, and users may obtain access to the data query system provided in this application by purchasing cloud services.

[0047] The data source storage device 110 and the client 120 can be distributed on the same device or on different devices. When the data source storage device 110 and the client 120 are distributed on the same device, the data source storage device 110 and the client 120 can both be installed on a server. When the data source storage device 110 and the client 120 are distributed on different devices, the client 120 can be installed on a terminal device, such as a mobile phone, tablet, laptop, desktop computer, etc., and the data source storage device 110 can be installed on a server. When the management client and the consumer client are two different clients, the management client and the consumer client can be installed on different terminal devices respectively.

[0048] The following first describes how a user queries data on the data source storage device 110 through a consumer client, wherein a user refers to an entity that uses the data query service, and may also be referred to as a consumer.

[0049] The consumer client can display the query interface 123 shown in Figure 3. The query interface 123 typically includes a filter area 121 and a display area 122. The filter area includes one or more filters. Filters are used to quickly locate specific data within a large amount of data for further analysis and display. Filters include a filter attribute field and a filter value. The filter attribute field must be the second attribute field in the wide table so that it can be applied to queries within the wide table. The filter value can be a numeric range, text content, a predefined category or label, and so on. By combining the filter attribute field and filter value, the desired data can be retrieved from the wide table. For example, if the filter attribute field is year and the filter value is 2003, then data with a value of 2003 in the attribute field of the second attribute field "year" can be retrieved from the wide table. For another example, if the filter field is customer name and the filter value is Company A, then, through matching or fuzzy matching, data with a value of Company A in the attribute field of the second attribute field "Customer Name" can be filtered from the wide table. Multiple filters can be used simultaneously. For example, if Filter 1 filters on the "Year" attribute field with a filter value of 2021, and Filter 2 filters on the "Customer Name" attribute field with a filter value of Company A, then applying Filter 1 and Filter 2 simultaneously will filter out data from the wide table where the "Year" attribute field has a median value of 2021 and where the "Customer Name" attribute field has a median value of Company A or includes Company A. To enhance the user experience, filters can display tooltips. For example, default values ​​or user-friendly labels can be set to help users understand and select filter values. Alternatively, visual filters can be provided, such as drop-down buttons, sliders, or calendar selectors. These components can more intuitively display available filter values ​​and facilitate user selection. For example, a drop-down button can contain unique values ​​from the wide table's "Year" attribute field. The display area is typically used to display query data obtained after applying filters to a wide table.

[0050] Filters are often used frequently, so their prompts often need to be updated frequently. However, because the filter attribute field is the second attribute field of the wide table, searching for prompt information based on the filter attribute field only retrieves the value of the second attribute field from the wide table. However, wide tables are often very large, making this process extremely time-consuming and significantly affecting efficiency.

[0051] To implement the use of values ​​from dimension tables as filter prompts, database improvements are required during both the modeling and consumption phases. As shown in Figure 4, the database can be divided into a data source, a semantic model layer, and a consumption layer. The data source is used to store and manage wide and dimension tables. The semantic model layer is used to build semantic models based on the wide and dimension tables. The consumption layer provides an interface for users to access wide and dimension tables through the semantic model. Therefore, the modeling phase involves the data source and semantic model layer, while the consumption phase involves the data source, semantic model layer, and consumption layer.

[0052] In the process of establishing a semantic model, in addition to configuring the association between wide tables and dimension tables as in the existing technology (this is the same as the existing technology, so it is not described in detail here), it is also necessary to establish a field mapping relationship and schema configuration between the dimension table and the wide table.

[0053] The process of establishing a field mapping relationship between a dimension table and a wide table involves the management client obtaining a user-entered similarity condition between the wide table and the dimension table. The similarity condition is: if the number of first attribute fields in a dimension table exceeds a quantity threshold, and the proportion of first attribute fields in the dimension table that are identical or fuzzy-matched to the second attribute field in the wide table exceeds a proportion threshold, then the dimension table is considered similar to the wide table. Both the quantity threshold and the proportion threshold can be set based on historical expert experience. The quantity threshold and the proportion threshold cannot be set too high, as this may result in finding no or only a few dimension tables that are similar to the wide table. However, they cannot be set too low, as this may result in dimension tables that should not be considered similar to the wide table being considered similar. Therefore, in practical applications, the quantity threshold and the proportion threshold can be set based on a combination of hit rate and accuracy. In a specific embodiment, the quantity threshold can be set to 5, and the proportion threshold can be set to 80%. When users enter similarity conditions between wide and dimension tables through the management client, they can enter conditions using text boxes, checkboxes, radio buttons, menus, and drop-down buttons displayed in the condition input interface. Alternatively, they can switch the management client to command-line mode and enter conditions through the command line. Here, the first attribute field of the dimension table and the second attribute field of the wide table are identical if the characters in the two attribute fields are identical. For example, the characters in the first attribute field "Year" in the dimension table and the second attribute field "Year" in the wide table are identical. A character-by-character comparison can determine whether the two are identical. A fuzzy match between the first attribute field of the dimension table and the second attribute field of the wide table means that the characters in the two attribute fields are different but similar or have the same meaning. For example, if the first attribute field of the dimension table is "Year" and the second attribute field of the wide table is "Year," the two attribute fields are different but similar. In this case, the Hamming distance or Euclidean distance between the first attribute field "year" and the second attribute field "year" of the wide table can be calculated, and the Hamming distance and Euclidean distance can be used to determine that the first attribute field "year" and the second attribute field "year" of the wide table are similar. Alternatively, the first attribute field of the dimension table is "year" and the second attribute field of the wide table is "year". In this case, the two attribute fields are different, but their meanings are the same. In this case, the knowledge graph can be used to determine that the first attribute field of the dimension table is "year" and the second attribute field of the wide table is "year".

[0054] After receiving the similarity conditions entered by the user, the management client transmits the similarity conditions to the data source storage device. If the similarity conditions are pre-stored in the data source storage device (the storage process is similar to that described above), there is no need to obtain the user-entered similarity conditions through the management client. Instead, the similarity conditions stored in the data source storage device can be directly obtained. The data source storage device obtains the wide table and multiple dimension tables stored on the hard disk and, based on the similarity conditions, selects a dimension table from the multiple dimension tables that meets the similarity conditions as the target dimension table. Specifically, the data source storage device obtains the wide table and the first dimension table and calculates whether the wide table and the first dimension table meet the similarity conditions. If the similarity conditions are met, the first dimension table is selected as the target dimension table. If the similarity conditions are not met, the first dimension table is considered not the target dimension table. The data source storage device then obtains the wide table and the second dimension table, and so on, until the data source storage device determines whether the last dimension table is the target dimension table. Alternatively, the data source storage device can select a dimension table from the multiple dimension tables that meets the similarity conditions as the candidate dimension table based on the similarity conditions. Then, the similarity between the candidate dimension table and the wide table is calculated separately. The similarity between the candidate dimension table and the wide table can be measured by the ratio of the first attribute field in the first attribute field of the candidate dimension table that is identical or fuzzy-matched to the second attribute field of the wide table to all the first attribute fields in the dimension table. The larger the ratio, the higher the similarity between the candidate dimension table and the wide table, and the smaller the ratio, the lower the similarity between the candidate dimension table and the wide table. After calculating the similarity between each candidate dimension table and the wide table, the candidate dimension tables can be sorted according to the size of the similarity. For example, the one with the highest similarity can be ranked first, and the one with the lowest similarity can be ranked last. Then, the first few candidate dimension tables with the highest similarity are selected as the target dimension tables. For example, assuming the wide table includes year, month, quarter, week, product name, product category, and product price, the first attribute field of the order dimension table includes year, month, order batch number, and order source, and the first attribute field of the date dimension table includes year, month, quarter, and week. Both the order dimension table and the date dimension table meet similarity conditions. In this case, the first attribute field of the date dimension table and the second attribute field of the wide table have a larger proportion of attribute fields that are identical or fuzzy matching with the first attribute field of the date dimension table, while the first attribute field of the order dimension table and the second attribute field of the wide table have a smaller proportion of attribute fields that are identical or fuzzy matching with the first attribute field of the order dimension table. Therefore, the date dimension table can be selected as the target dimension table, while the order dimension table cannot be selected as the target dimension table.

[0055] After the data source storage device determines the target dimension table, it starts from the first first attribute field of the target dimension table and compares the first attribute field of the target dimension table with the first second attribute field of the wide table to determine whether the two are the same. If they are the same, the first attribute field is considered to be the first recommended attribute field and the second attribute field is considered to be the second recommended attribute field. If they are not the same, no processing is performed. Then, the first attribute field of the target dimension table is compared with the second second attribute field of the wide table to determine whether the two are the same. And so on, until the comparison of the first attribute field of the target dimension table and the second second attribute field of the wide table is completed. Then, the data source storage device compares the second first attribute field of the target dimension table with the first second attribute field of the wide table to determine whether the two are the same. And so on, until the comparison between the last first attribute field of the target dimension table and the last second attribute field of the wide table is completed. Continuing with the example shown in Figure 2,

[0056] The first attribute field "Product Name" in the product dimension table is the same as the second attribute field "Product Name" in the wide table. Therefore, the first attribute field "Product Name" is the first recommended attribute field, and the second attribute field "Product Name" is the second recommended attribute field.

[0057] The first attribute field "Product Category" in the product dimension table and the second attribute field "Product Category" in the wide table are the same. Therefore, the first attribute field "Product Category" is the first recommended attribute field, and the second attribute field "Product Category" is the second recommended attribute field.

[0058] The first attribute field "Product Price" in the product dimension table and the second attribute field "Product Price" in the wide table are the same. Therefore, the first attribute field "Product Price" is the first recommended attribute field, and the second attribute field "Product Price" is the second recommended attribute field.

[0059] The first attribute field "Year" in the date dimension table and the second attribute field "Year" in the wide table are the same. Therefore, the first attribute field "Year" is the first recommended attribute field, and the second attribute field "Year" is the second recommended attribute field.

[0060] The first attribute field "Month" in the date dimension table and the second attribute field "Month" in the wide table are the same. Therefore, the first attribute field "Month" is the first recommended attribute field, and the second attribute field "Month" is the second recommended attribute field.

[0061] The first attribute field "Quarter" in the date dimension table and the second attribute field "Quarter" in the wide table are the same. Therefore, the first attribute field "Quarter" is the first recommended attribute field, and the second attribute field "Quarter" is the second recommended attribute field.

[0062] The first attribute field "Week" in the date dimension table and the second attribute field "Week" in the wide table are the same, so the first attribute field "Week" is the first recommended attribute field, and the second attribute field "Week" is the second recommended attribute field.

[0063] The data source storage device sends the first recommended attribute field and the second recommended attribute field to the management client. The management client displays the first recommended attribute field and the second recommended attribute field and the corresponding relationship between them through the wide table configuration interface. As shown in Figure 5, two columns of text boxes can be displayed on the width configuration interface, wherein the first column of text boxes includes 7 text boxes, which are respectively used to display the 7 second recommended attribute fields of the wide table, "Product Name", "Product Category", "Product Price", "Year", "Month", "Quarter" and "Week". The second column of text boxes includes 7 text boxes, which are respectively used to display the 7 first recommended attribute fields of the target dimension table, "Product Name", "Product Category", "Product Price", "Year", "Month", "Quarter" and "Week".

[0064] In the first text box, "=" indicates the corresponding relationship between the second recommended attribute field "Product Name" and the first recommended attribute field "Product Name";

[0065] In the second row of text boxes, "=" is used to indicate the mapping relationship between the first attribute field "product category" and the second attribute field "product category";

[0066] In the third text box, “=” is used to indicate the mapping relationship between the second recommended attribute field “product price” and the first recommended attribute field “product price”;

[0067] In the fourth line, “=” is used to indicate the mapping relationship between the second recommended attribute field “year” and the first recommended attribute field “year”;

[0068] In the fifth text box, “=” is used to indicate the mapping relationship between the second recommended attribute field “month” and the first recommended attribute field “month”;

[0069] In the sixth row, “=” indicates the mapping relationship between the second recommended attribute field “quarter” and the first recommended attribute field “quarter”;

[0070] In the seventh text box, “=” is used to indicate the mapping relationship between the second recommended attribute field “week” and the first recommended attribute field “week”.

[0071] The user can view the first recommended attribute field and the second recommended attribute field and the mapping relationship between them in the wide table configuration interface. If the data query system display content is determined by the maintenance personnel to have no problem with the mapping relationship between the first recommended attribute field and the second recommended attribute field, then the user can click the confirmation button in the wide table configuration interface. Then, the management client can store the mapping relationship between the first recommended attribute field and the second recommended attribute field as the field mapping relationship between the dimension table and the wide table. If the data query system display content is determined by the maintenance personnel to have no problem with the mapping relationship between the first recommended attribute field and the second recommended attribute field, the database administrator is allowed to modify it through the wide table configuration interface, and the data query system can store the modified mapping relationship. For example, there is a delete button on the right side of each row of text boxes on the wide table configuration interface. When the delete button is clicked, the text box of that row and the first recommended attribute field and the second recommended attribute field of that row of text boxes can be deleted. The database administrator can also modify the first recommended attribute field and the second recommended attribute field in the text box. After the modification is completed, the user can click the Confirm button in the wide table configuration interface, so that the management client will save the first recommended attribute field and the second recommended attribute field and the mapping relationship between them as the mapping relationship between the dimension table and the wide table. The above example only uses deleting the entire line of text box and modifying the content of the file box as an example to illustrate some modification methods. In actual applications, more modification methods can be provided. For example, the first recommended attribute field of the entire target dimension table and the second recommended attribute field in the corresponding wide table can be deleted, etc. In addition, if the user believes that the first recommended attribute field and the second recommended attribute field are not appropriate, they can cancel them by clicking the Cancel button in the wide table configuration interface.

[0072] The process of establishing a mode configuration is as follows: On the wide table configuration interface, you can display radio buttons for No Acceleration, One-Way Acceleration, and Two-Way Acceleration. Selecting the No Acceleration radio button uses the No Acceleration mode, and filter values ​​are still retrieved from the wide table. Selecting the One-Way Acceleration radio button uses the One-Way Acceleration mode, while selecting the Two-Way Acceleration radio button uses the Two-Way Acceleration mode. In both the One-Way and Two-Way Acceleration modes, filter values ​​are retrieved from the dimension table. The differences between One-Way and Two-Way Acceleration are described in detail below.

[0073] After the management client saves the mapping configuration, it sends the mapping and schema configuration to the data source storage device. The data source storage device saves the field mapping relationships between the dimension tables and wide tables, as well as the schema configuration, in the semantic model. This completes the modeling phase.

[0074] During the consumption phase, the data query system determines the schema configuration through interaction with the user. Specifically, after the user logs in to the consumer client, the client sends a login message to the data source storage device. Upon receiving the login message, the data source storage device sends the name of the semantic model in the database to the consumer client. The consumer client displays the name of the semantic model to the user. If the user selects the semantic model, the consumer client sends the name of the semantic model to the data source storage device. The data source storage device then retrieves the schema configuration from the semantic model.

[0075] If the mode is configured as a one-way acceleration mode, the data source storage device will obtain all or part of the first attribute fields of the dimension table, and send all or part of the first attribute fields to the consumer client. The consumer client can display the received first attribute fields of the dimension table in various visual ways, including but not limited to drop-down buttons, check boxes, lists, etc. When the data source storage device sends all the first attribute fields of the dimension table to the consumer client, the "available" first attribute fields can be displayed in an enabled manner, and the "unavailable" first attribute fields can be displayed in a non-enabled manner. Here, the "available" first attribute field is a first attribute field that has established a mapping relationship with the second attribute field in the wide table, and the "unavailable" first attribute field is a first attribute field that has not established a mapping relationship with the second attribute field in the wide table.

[0076] The consumer client obtains the filter field input by the user, wherein the filter field is one or more first attribute fields selected from multiple first attribute fields of the dimension table displayed by the consumer client. When the consumer client obtains that the user has selected a filter field, a filter is generated; when the consumer client obtains that the user has selected multiple filter fields, multiple filters are generated. If the consumer client obtains that the user has deleted the corresponding filter field after selecting the filter field, the consumer client will also delete the corresponding filter. After the consumer client obtains the user's input to add a new filter field, the filter corresponding to the filter field will be added. When the data source storage device sends all the first attribute fields of the dimension table to the consumer client, if the consumer client obtains that the user has clicked on the first attribute field displayed in a non-enabled mode, no filter will be generated. If the consumer client obtains that the user has clicked on the first attribute field displayed in an enabled mode, the corresponding filter will be generated.

[0077] After the data query system obtains the selection results of the filter field, the consumer client can display the query interface shown in Figure 3. Each filter field corresponds to a filter in the filter area. The consumer client sends the selected filter field to the data source storage device. The data source storage device traverses each dimension table to find the first attribute field that is the same as the filter field in the dimension table. Then, the data source storage device reads out the non-repeating unique value of the first attribute field found, and then sends all the non-repeating values ​​of the first attribute field found to the consumer client and displays them as prompt information for the corresponding filter. Because the values ​​of the filter field are sometimes repeated, at this time, only the unique value needs to be taken as the prompt information, and the repeated values ​​do not need to be used as prompt information. Even if all the values ​​in the prompt field are the same, only one unique value needs to be taken, and other repeated values ​​do not need to be used as prompt information. Continuing with the example shown in Figure 2, when the filter fields include "Product Category" and "Year", the corresponding values ​​for "Product Category" are "Home Appliances", "Communications", "Home Appliances" and "Home Appliances"; the corresponding values ​​for "Year" are "2021", "2021", "2021", and "2021", so the only values ​​corresponding to "Product Category" are "Home Appliances" and "Communications", and the only value corresponding to "Year" is "2021".

[0078] The consumer client obtains the filter value entered by the user, wherein the filter value can be selected by the user from the prompt information displayed on the query interface. For example, the filter value "home appliances" is selected from the prompt information "home appliances" and "communications" of the filter corresponding to the "product category" filter field, and the filter value "2021" is selected from the prompt information "2021" of the filter corresponding to the "year" filter field. Then, the consumer client sends a query request containing the filter field and the filter value to the data source storage device. For example, the consumer client sends a query request containing the filter field "product category" and the corresponding filter value "home appliances", the filter field "year" and the corresponding filter value "2021" to the data source storage device.

[0079] Because the filter field of the first attribute field of a dimension table can only be used for searches within the dimension table, not within the wide table, the data source storage device, after receiving the filter field and filter value, searches the field mapping relationship between the dimension table and the wide table for the filter field of the first attribute field of the dimension table and converts it into the second attribute field of the wide table to serve as the filter attribute field. The data source storage device then combines the filter attribute field and the filter value to obtain the filter condition. The data source storage device uses the filter condition to filter the wide table and obtain filtered data.

[0080] If the mode is configured as a bidirectional acceleration mode, the data source storage device will obtain all or part of the second attribute fields of the wide table, and send all or part of the second attribute fields to the consumer client. The consumer client can display the second attribute fields of the received wide table in various visual ways, including but not limited to drop-down buttons, check boxes, lists, etc. When the data source storage device sends all the second attribute fields of the wide table to the consumer client, the "available" second attribute fields can be displayed in an enabled manner, and the "unavailable" second attribute fields can be displayed in a non-enabled manner. Here, the "available" second attribute field is a second attribute field that has established a mapping relationship with the first attribute field in the dimension table, and the "unavailable" second attribute field is a second attribute field that has not established a mapping relationship with the first attribute field in the dimension table.

[0081] The consumer client obtains the filter attribute field input by the user, wherein the filter attribute field is one or more second attribute fields selected from multiple second attribute fields of the wide table displayed by the consumer client. When the consumer client obtains that the user has selected a filter attribute field, a filter is generated; when the consumer client obtains that the user has selected multiple filter attribute fields, multiple filters are generated. If the consumer client obtains that the user has deleted the corresponding filter field after selecting the filter field, the consumer client will also delete the corresponding filter. After obtaining the user's input to add a new filter field, the consumer client will add the filter corresponding to the filter field. When the data source storage device sends all the first attribute fields of the dimension table to the consumer client, if the consumer client obtains that the user has clicked on the first attribute field displayed in a non-enabled mode, no filter will be generated. If the consumer client obtains that the user has clicked on the first attribute field displayed in an enabled mode, the corresponding filter will be generated.

[0082] After selecting the filter attribute fields, the consumer client will display the query interface shown in Figure 3. Each filter attribute field corresponds to a filter in the filter area. The consumer client sends the selected filter attribute fields to the data source storage device. The data source storage device maps the filter attribute fields of the second attribute field of the wide table to the filter fields of the first attribute field of the dimension table based on the mapping configuration. The data source storage device then traverses each dimension table to find the first attribute field that matches the filter field. The data source storage device then reads the unique, non-repeating values ​​of the first attribute field found and sends all the unique, non-repeating values ​​of the first attribute field found to the consumer client, displaying them as the corresponding filter prompts. The filter values ​​can be selected from the prompts displayed in the query interface. For example, the filter value "home appliances" is selected from the filter prompts "home appliances" and "communications" for the "product category" filter field, and the filter value "2021" is selected from the filter prompt "2021" for the "year" filter field. The consumer client then sends a query request containing the filter attribute fields and filter values ​​to the data source storage device. For example, a consumer client sends the filter attribute field "Product Category" and its corresponding filter value "Home Appliances," and the filter attribute field "Year" and its corresponding filter value "2021" to the data source storage device. The data source storage device combines the filter attribute field and the filter value to generate the filter condition. The data source storage device then uses the filter condition to filter the wide table and obtain the filtered data.

[0083] Even for the same wide table and dimension table, one or more of the association, mapping, and schema configurations between the wide and dimension tables can differ under different semantic models. Different businesses can use different semantic models. For example, under semantic model 1, bidirectional acceleration mode can be used, while under semantic model 2, unidirectional acceleration mode can be used. Users can select the appropriate semantic model based on their needs.

[0084] As mentioned earlier, dimension tables are much smaller than wide tables. Therefore, obtaining filter prompts from dimension tables is much more efficient than obtaining filter prompts from wide tables. When using one-way acceleration mode, users will be aware of both wide and dimension tables, requiring a good understanding of these two aspects. Therefore, one-way acceleration mode is suitable for users with a good understanding of database underlying principles. In the two-way acceleration model, users will only be aware of wide tables, not dimension tables, making it suitable for users who lack a basic understanding of database underlying principles, such as accountants.

[0085] See Figure 6, which shows a method for establishing a field mapping relationship between a dimension table and a wide table provided by the present application. The method for establishing a field mapping relationship between a dimension table and a wide table provided by the present application can be completed in the modeling stage.

[0086] S101: A client sends a modeling request to a data source storage device. Correspondingly, the data source storage device receives the modeling request sent by the client.

[0087] In some possible embodiments, a modeling request is used to establish a data model. The purpose of data modeling is to transform complex business requirements into an easy-to-manage and easy-to-use database system, thereby improving data quality and efficiency and supporting business development and innovation. During the data model establishment process, field mappings between dimension tables and wide tables can be established. Because a data model typically includes a physical layer, a logical layer, and a presentation layer, the field mappings between dimension tables and wide tables can be set at either the physical or logical layer. To facilitate understanding of the data model, the field mappings between dimension tables and wide tables can be set at the logical layer, which also facilitates design and modification of the data model. To optimize performance and improve data access efficiency, the field mappings between dimension tables and wide tables can also be set at the physical layer. Placing the mappings at the physical layer also allows for closer alignment with actual data storage and operations. Of course, the field mappings between dimension tables and wide tables can also be set as a separate mapping relationship establishment module. In this case, only the wide table identifier and the dimension table identifier need to be input to obtain the field mappings between the wide table and the dimension table, thereby increasing the reuse rate of the mapping relationship establishment module. Data models can be created using data modeling tools, such as those developed by various companies. Data modeling tools typically have the ability to create data at both the logical and physical layers. Therefore, data modeling tools are used to implement field mapping relationships between dimension tables and wide tables at the logical layer, or between dimension tables and wide tables at the physical layer.

[0088] S102: The data source storage device selects the same or matching first recommended attribute field and second recommended attribute field from the dimension table and the wide table according to the modeling request.

[0089] In some possible embodiments, after receiving the modeling request, the logical layer will be created first, and then the physical layer will be created. When creating the logical layer, the processing logic for the wide table and the dimension table can be determined first, for example, inserting, deleting, updating or querying the wide table or the dimension table, or, when the wide table and the dimension table have the same attribute field (for example, the time dimension table has the first attribute field of "year", and the wide table also has the second attribute field of "year"), choose the wide table or the dimension table for access operations, etc., and then encapsulate these operations into objects. Among them, the object can be a data access object, a data transmission object, etc. Therefore, if the field mapping relationship between the dimension table and the wide table is set at the logical layer, then the following operations are added when building the logical layer; if the field mapping relationship between the dimension table and the wide table is set at the physical layer, then the logical layer can be built first, and then the following operations are added when building the physical layer:

[0090] The data source storage device obtains similarity conditions between the wide table and the dimension table. The similarity conditions between the wide table and the dimension table can be pre-set based on experience, user-entered, or modified by the user. The data source storage device then compares the dimension table and the wide table based on the similarity conditions to determine whether they are similar. If the dimension table and the wide table are similar, the first first attribute field is obtained from the dimension table and the first second attribute field is obtained from the wide table. The characters in the first first attribute field are compared with the characters in the first second attribute field. If they are identical or fuzzy matches, the first first attribute field of the dimension table and the second second attribute field of the wide table are set as the first recommended attribute field and the second recommended attribute field, respectively. The second second attribute field of the wide table is then obtained and matched with the first second attribute field of the dimension table and the second second attribute field of the wide table. If they are not identical or fuzzy matches, the first first attribute field of the dimension table and the first second attribute field of the wide table are not processed, and the second second attribute field of the wide table is directly obtained and matched with the first second attribute field of the dimension table and the second second attribute field of the wide table. And so on, until the second attribute field of the wide table and the first attribute field of the dimension table are traversed respectively. Here, fuzzy matching can be implemented by using specific functions, regular expressions, knowledge graphs, etc. Among them, the specific function can be the similarity (LIKE) function in the SQL language. Regular expressions are composed of ordinary characters (such as letters, numbers, symbols) and wildcards (for example: ".", "*", "+"). Among them, each wildcard represents a wildcard rule. For example, "." means matching any single character. "*" means matching zero or more of the preceding characters. "+" means matching one or more of the preceding characters. In addition, fuzzy matching can also be implemented through knowledge graphs, etc. After processing the above steps, the data source storage device will obtain one or more groups of identical or matching first recommended attribute fields and second recommended attribute fields.

[0091] S103: The data source storage device sends the first recommended attribute field and the second recommended attribute field to the client. Correspondingly, the client receives the first recommended attribute field and the second recommended attribute field sent by the data source storage device.

[0092] In some possible embodiments, the first recommended attribute field and the second recommended attribute field may be applied directly, or may be applied only after user consent or modification. If the first recommended attribute field and the second recommended attribute field are applied directly, then they only need to be provided to the user in a viewable form, such as a prompt box. If the first recommended attribute field and the second recommended attribute field are applied only after user consent or modification, then they need to be provided to the user in an editable form, such as a text box.

[0093] S104: The client sends the mode configuration selected by the user to the data source storage device. Correspondingly, the data source storage device receives the mode configuration sent by the client.

[0094] In some possible embodiments, mode configurations include non-acceleration mode, one-way acceleration mode, and two-way acceleration mode. Regardless of whether non-acceleration mode, one-way acceleration mode, or two-way acceleration mode is used, the data model remains the same. Mode configurations only affect whether and when field mappings between dimension tables and wide tables are used in the subsequent consumption phase. Therefore, mode configurations can also be set during the consumption phase.

[0095] See Figure 7, which is a flow chart of a data query method provided by the present application. The data query method of the present application is implemented in a one-way acceleration mode during the consumption phase. As shown in Figure 7, the data query method of the present application includes:

[0096] S201: The client sends a request for obtaining a value to the data source storage device. Correspondingly, the data source storage device receives the request for obtaining a value from the client.

[0097] In some possible embodiments, a value request includes a filter field. The filter field can be selected by the user from the first attribute field of a dimension table displayed on the client. Therefore, the filter field belongs to the first attribute field and can be directly used to query the dimension table. In a specific embodiment, using Structured Query Language (SQL) as an example, the parameters of the value request may include a SELECT clause and a FROM clause. The SELECT clause specifies the fields to be searched, such as year, product name, or customer name, and can be populated with the filter field. The FROM clause specifies the table from which data is to be retrieved, and can be populated with the dimension table. The number of filter fields can be one or more. When there are multiple filter fields, the multiple filter fields can belong to the same dimension table. For example, if the filter fields include "year" and "month" belonging to the time dimension table, the value request may include a SQL statement with the SELECT clause populated with the filter field "year" and the filter field "month" and the FROM clause populated with the "time dimension table," thereby querying the data source storage device. The above example is explained using one SQL statement as an example. In actual applications, it can also be completed through two SQL statements in the value request or even by sending two value requests. There is no specific limitation here. When there are multiple filter fields, the multiple filter fields can belong to different dimension tables. Taking the filter fields including "year" belonging to the time dimension table and "product category" belonging to the product dimension table as an example, the value request can include two SQL statements at this time. The select clause of the first SQL statement is filled with the filter field "year" and the from clause is filled with "time dimension table". The select clause of the second SQL statement is filled with the filter field "product category" and the from clause is filled with "product dimension table". Then, a query can be made to the data source storage device. For example:

[0098] The first SQL statement could be:

[0099] SELECT filter field "year",

[0100] FROM time dimension table.

[0101] The second SQL statement could be:

[0102] SELECT filter field "Product Category",

[0103] FROM product dimension table.

[0104] The above example uses two SQL statements as an example for illustration. In actual applications, this can also be completed in one SQL statement, or even by sending two value-getting requests. This is not specifically limited here.

[0105] S202: The data source storage device obtains a value from the dimension table according to the value request and obtains prompt information.

[0106] In some possible embodiments, the data source storage device retrieves from the dimension table according to the value request and obtains multiple data values ​​of the filter field as prompt information. Continuing with SQL as an example, the data source storage device will check the correctness of the syntax and semantics of the SQL statement. If the syntax and semantics of the SQL statement are correct, a query operation will be performed in the dimension table, starting from the first first attribute field of the dimension table and comparing it with the filter field. If the characters of the two are not the same or are not fuzzy matched, the next first attribute field will be searched until the first attribute field that is the same as the filter field is found. Then, the unique value of the first attribute field (for example, a column of the dimension table) is extracted as prompt information. When there are multiple filter fields and multiple filter fields belong to the same dimension table, the first first attribute field of the dimension table will be compared with the first filter field. If the characters of the two are not the same or are not fuzzy matched, the next first attribute field will be searched until the first attribute field that is the same as the first filter field is found. Next, the first attribute field in the dimension table is compared with the second filter field. If the characters in the two fields are different or cannot be fuzzily matched, the search continues with the next first attribute field until a first attribute field that matches the second filter field is found. This process continues until all filter fields have been searched. If there are multiple filter fields belonging to different dimension tables, the search is performed on each filter field in the corresponding dimension table.

[0107] S203: The data source storage device sends the prompt information to the client. Correspondingly, the client receives the prompt information sent by the data source storage device.

[0108] S204: The client displays prompt information on the filter.

[0109] In some possible embodiments, the prompt information may include the value of one filter field, or may include the values ​​of multiple filter fields. When there are multiple filter fields, the values ​​of these filter fields can be displayed separately on their corresponding filters. For example, when the filter fields include "year" and "product category", the only value of the filter field "year" is "2021", and the only value of the filter field "product category" is "home appliances" and "communications". Then, "2021" can be displayed as the prompt information of the filter corresponding to "year" in the drop-down button of the filter, and "home appliances" and "communications" can be displayed as the prompt information of the filter corresponding to "product category" in the drop-down button of the filter.

[0110] S205: The client sends a query request to the data source storage device. Correspondingly, the data source storage device receives the query request sent by the client.

[0111] In some possible embodiments, a query request includes filter fields and filter values. Furthermore, the query request may include other parameters, such as a table identifier. The filter value can be selected by the user from prompts. Taking SQL as an example, a query request may include a select clause, a from clause, and a while clause. The select clause specifies the fields to be retrieved, such as year, product name, customer name, etc. The from clause specifies the table from which data is to be retrieved, and the where clause specifies the matching conditions. Therefore, the filter fields can be entered into the select clause, the wide table into the from clause, and the filter values ​​into the when clause. A query request may include the filter fields and filter values ​​for a single filter, or the filter fields and filter values ​​for multiple filters. When there are multiple filter fields, whether they belong to the same dimension table or to multiple different dimension tables, the query request can include a single SQL statement. The select clause of this SQL statement contains the multiple filter fields, the from clause contains the wide table, and the where clause contains the filter values ​​for each filter field. Here, although the filter fields may belong to different dimension tables, because the query is ultimately performed from the wide table, the same SQL statement can be used. For example, the SQL statement:

[0112] SELECT filter field "year", filter field "product category",

[0113] FROM wide table,

[0114] WHERE "Year" = 2021, "Product Category" = "Home Appliances" && "Communications".

[0115] In the next step, the filter fields of each dimension table are converted into filter attribute fields belonging to the wide table. Similarly, the above example uses a single SQL statement as an example. In actual applications, this can also be completed in multiple SQL statements or even by sending multiple query requests. This is not a specific limitation here.

[0116] S206: The data source storage device determines the filter attribute field associated with the filter field according to the field mapping relationship between the dimension table and the wide table.

[0117] In some possible embodiments, because the filter field in the query request is the first attribute field of the dimension table, it needs to be converted into the second attribute field of the wide table. Continuing with SQL as an example, the select clause of the query request is one or more filter fields, and the from clause is filled with the wide table. When the clause is a filter value, however, the filter field in the select clause is the first attribute field of the dimension table, and the wide table cannot be queried at all. Therefore, it is necessary to determine the filter attribute field associated with the filter field based on the field mapping relationship between the dimension table and the wide table. Specifically, first compare the filter field with the first first attribute field of the dimension table in the field mapping relationship between the dimension table and the wide table. If the two are the same, the first second attribute field of the wide table corresponding to the first first attribute field of the dimension table is determined as the filter attribute field. If the two are not the same, obtain the next first attribute field of the dimension table, and so on, until the same first attribute field is found or until the last first attribute field of the dimension table. Then, use the filter attribute field to replace the filter field in the select clause of the query request to obtain an SQL statement. For example, the SQL statement:

[0118] SELECT filter attribute field "year", filter attribute field "product category",

[0119] FROM wide table WHERE "year" = 2021,

[0120] "Product Category" = "Home Appliances" && "Communications".

[0121] S207: The data source storage device performs a query operation on the wide table according to the filter attribute field and the filter value.

[0122] In some possible embodiments, the data source storage device can use query statements to perform query operations on wide tables. Taking the SQL language as an example, the data source storage device can perform syntax parsing, semantic analysis, and query optimization on SQL statements. The data source storage device breaks down the SQL statement into multiple tokens, such as keywords, identifiers, and operators. Keywords can include SELECT, FROM, and WHERE. Keywords are generally case-insensitive, so uppercase and lowercase have the same meaning in SQL. Identifiers can be user-defined object names, such as wide table and dimension table names, and attribute field names. Operators can include greater than, less than, or equal to. The data source storage device then checks the token combination according to SQL syntax rules to ensure the correct structure of the statement; checks the existence and validity of the wide tables, dimension tables, and attribute fields in the SQL statement; and checks whether the user has the corresponding permissions for the queried wide tables, dimension tables, and attribute fields. If these checks pass, the data source storage device can execute the query operation on the wide table to obtain the queried data.

[0123] See Figure 8, which is a flow chart of a data query method provided by the present application. The data query method of the present application is implemented in a one-way acceleration mode during the consumption phase. The value request of the data query method shown in Figure 7 carries a filter field belonging to the first attribute field of the dimension table. Therefore, it can be applied to the dimension table for value acquisition. However, the query request also carries a filter field belonging to the first attribute field of the dimension table. Therefore, it cannot be directly applied to the wide table for data query. Instead, it is necessary to use the field mapping relationship between the dimension table and the wide table to convert the filter field into the filter attribute field before the query can be performed. However, the value request of the data query method shown in Figure 8 carries a second attribute field belonging to the wide table. Therefore, it cannot be directly applied to the dimension table for value acquisition. Instead, it is necessary to use the field mapping relationship between the dimension table and the wide table to convert the filter attribute field into the filter field before the value can be acquired. However, the query request also carries the second attribute field belonging to the wide table. Therefore, it can be directly applied to the wide table for data query. As shown in Figure 8, the data query method of the present application includes:

[0124] S301: The client sends a request for obtaining a value to the data source storage device. Correspondingly, the data source storage device receives the request for obtaining a value from the client.

[0125] In some possible embodiments, a value request includes a filter attribute field. The filter attribute field can be selected by the user from the second attribute field of a wide table displayed on the client. Therefore, the filter attribute field is a second attribute field and cannot be directly used to query a dimension table. In a specific embodiment, using SQL as an example, the filter attribute field can be entered in the select clause, and the dimension table can be entered in the from clause. The number of filter attribute fields can be one or more. When there are multiple filter attribute fields, the filter fields corresponding to the multiple filter attribute fields can belong to the same dimension table. For example, if the filter attribute fields include "year" and "month" belonging to a wide table, the value request can include a single SQL statement. The select clause of this SQL statement enters the filter attribute fields "year" and "month," and the from clause enters the "time dimension table." The above example uses a single SQL statement as an example. In actual applications, this can also be accomplished using two SQL statements in the value request, or even by sending two value requests. This is not specifically limited here. When there are multiple filter fields, the filter fields corresponding to the multiple filter attribute fields can belong to different dimension tables. For example, if the filter fields include "Year" and "Product Category" in a wide table, the value request can include two SQL statements. The select clause of the first SQL statement is filled with the filter attribute field "Year", and the from clause is filled with the "Time Dimension Table". The select clause of the second SQL statement is filled with the filter attribute field "Product Category", and the from clause is filled with the "Product Dimension Table". For example,

[0126] The first SQL statement could be:

[0127] SELECT filter attribute field "year",

[0128] FROM time dimension table.

[0129] The second SQL statement could be:

[0130] SELECT filter attribute field "Product Category",

[0131] FROM product dimension table.

[0132] The above example uses two SQL statements as an example for illustration. In actual applications, this can also be completed in one SQL statement, or even by sending two value-getting requests. This is not specifically limited here.

[0133] S302: The data source storage device determines the filter field associated with the filter attribute field according to the field mapping relationship between the dimension table and the wide table.

[0134] In some possible embodiments, because the filter attribute field in the value request is the second attribute field of the wide table and cannot be used to query the dimension table, it needs to be converted into the first attribute field of the dimension table. Continuing with SQL as an example, the select clause of the value request is one or more filter attribute fields, and the from clause is the dimension table. However, the filter attribute field in the select clause is the second attribute field of the wide table, and it is impossible to query the dimension table at all. Therefore, it is necessary to determine the filter field associated with the filter attribute field based on the field mapping relationship between the dimension table and the wide table, and then use the filter field to replace the filter attribute field in the select clause of the query request to obtain an SQL statement. For example, the SQL statement:

[0135] SELECT filter field "year", filter field "product category",

[0136] FROM wide table WHERE "year" = 2021,

[0137] "Product Category" = "Home Appliances" && "Communications".

[0138] S303: The data source storage device obtains a value from the dimension table according to the filter attribute field to obtain prompt information.

[0139] In some possible embodiments, the data source storage device searches from the dimension table and obtains multiple values ​​of the filter field as prompt information. Continuing with SQL as an example, the data source storage device will check the correctness of the syntax and semantics of the SQL statement. If the syntax and semantics of the SQL statement are correct, a query operation is performed in the dimension table, that is, starting from the first first attribute field of the dimension table and comparing it with the filter field. If the characters of the two are different or cannot be fuzzy matched, the next first attribute field is searched until the first attribute field that is the same as the filter field is found. Then, the unique value of the first attribute field (for example, a column of the dimension table) is extracted as prompt information. When there are multiple filter fields and multiple filter fields belong to the same dimension table, the first first attribute field of the dimension table is compared with the first filter field. If the characters of the two are different or cannot be fuzzy matched, the next first attribute field is searched until the first attribute field that is the same as the first filter field is found. Next, the first attribute field in the dimension table is compared with the second filter field. If the characters in the two fields are different or cannot be fuzzily matched, the search continues with the next first attribute field until a first attribute field that matches the second filter field is found. This process continues until all filter fields have been searched. If there are multiple filter fields belonging to different dimension tables, the search is performed on each filter field in the corresponding dimension table.

[0140] S304: The data source storage device sends the prompt information to the client. Correspondingly, the client receives the prompt information sent by the data source storage device.

[0141] S305: The client displays prompt information on the filter.

[0142] In some possible embodiments, the prompt information may include the value of one filter field, or may include the values ​​of multiple filter fields. When there are multiple filter fields, the values ​​of these filter fields can be displayed separately on their corresponding filters. For example, when the filter fields include "year" and "product category", the only value of the filter field "year" is "2021", and the only value of the filter field "product category" is "home appliances" and "communications". Then, "2021" can be displayed as the prompt information of the filter corresponding to "year" in the drop-down button of the filter, and "home appliances" and "communications" can be displayed as the prompt information of the filter corresponding to "product category" in the drop-down button of the filter.

[0143] S306: The client sends a query request to the data source storage device. Correspondingly, the data source storage device receives the query request sent by the client.

[0144] In some possible embodiments, the query request includes a filter attribute field and a filter value. In addition, the query request may also include other parameters, such as the identifier of the data table, etc. The filter value may be selected by the user from the prompt information. Taking SQL as an example, the query request may include a select clause, a from clause, and a when clause, wherein the select clause is used to specify the field to be retrieved, such as year, product name, customer name, etc. The from clause is used to specify the table from which data is to be retrieved, and the when clause is used to specify the matching conditions. Therefore, the filter attribute field can be filled in the select clause, the wide table can be filled in the from clause, and the filter value can be filled in the when clause. The query request may include the filter attribute field and filter value of one filter, or the filter attribute field and filter value of multiple filters. When the number of filter attribute fields is multiple, the query request may include only one SQL statement, the select clause of the SQL statement is filled with multiple filter attribute fields, the from clause is filled with "wide table", and the when clause is filled with the filter values ​​of each filter attribute field. For example, the SQL statement:

[0145] SELECT filter attribute field "year", filter field "product category",

[0146] FROM wide table WHERE "year" = 2021,

[0147] "Product Category" = "Home Appliances" && "Communications".

[0148] Similarly, the above example is explained using one SQL statement as an example. In actual applications, it can also be completed in multiple SQL statements, or even by sending multiple query requests. There is no specific limitation here.

[0149] S307: The data source storage device performs a query operation on the wide table according to the filter attribute field and the filter value.

[0150] In some possible embodiments, the data source storage device can use query statements to perform query operations on wide tables. Taking the SQL language as an example, the data source storage device can perform syntax parsing, semantic analysis, and query optimization on SQL statements. The data source storage device breaks down the SQL statement into multiple tokens, such as keywords, identifiers, and operators. Keywords can include SELECT, FROM, and WHERE. Keywords are generally case-insensitive, so uppercase and lowercase have the same meaning in SQL. Identifiers can be user-defined object names, such as wide table and dimension table names, and attribute field names. Operators can include greater than, less than, or equal to. The data source storage device then checks the token combination according to SQL syntax rules to ensure the correct structure of the statement; checks the existence and validity of the wide tables, dimension tables, and attribute fields in the SQL statement; and checks whether the user has the corresponding permissions for the queried wide tables, dimension tables, and attribute fields. If these checks pass, the data source storage device can execute the query operation on the wide table to obtain the queried data.

[0151] The data query method provided by the present application is described in detail above with reference to FIG. 1 to FIG. 8 . Next, the data query system and computing device provided by the present application are further described with reference to FIG. 9 and FIG. 10 .

[0152] 9, which is a schematic diagram of the structure of a data query system provided by the present application. As shown in FIG9, the data query system of the present application includes: a client 210 and a data source storage device 220. The following will focus on the data source storage device 220 for a detailed introduction.

[0153] The data source storage device 220 includes an acquisition unit 221, a determination unit 222, and an execution unit 223, wherein:

[0154] An acquisition unit 221 is used to acquire a query request, wherein the query request includes a filter field and a filter value, the filter field belongs to the first attribute field of a dimension table in a data source storage device included in the data query system, the filter field is used to indicate that a value is obtained from the same field of the dimension table as prompt information, and the filter value is selected from the prompt information.

[0155] A determination unit 222 is used to determine the filter attribute field associated with the filter field based on the field mapping relationship between the dimension table and the wide table, wherein the data source storage device also stores a wide table, the wide table includes multiple second attribute fields, the filter attribute field belongs to the second attribute field of the wide table, and the field mapping relationship is used to record the mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table.

[0156] The execution unit 223 is configured to execute the operation of the query request according to the filter attribute field and the filter value.

[0157] The acquisition unit 221, determination unit 222, and execution unit 223 can all be implemented in software or hardware. For example, the implementation of the determination unit 222 will be described below using the determination unit 222 as an example. Similarly, the implementation of the acquisition unit 221 and execution unit 223 can refer to the implementation of the determination unit 222.

[0158] As an example of a software functional unit, the module can include code running on a computing instance. The computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance can be one or more. For example, the determination unit 222 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region can include multiple AZs.

[0159] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0160] As an example of a hardware functional unit, the determination unit 222 may include at least one computing device, such as a server. Alternatively, the module A may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0161] The multiple computing devices included in the determination unit 222 can be distributed in the same region or in different regions. The multiple computing devices included in the determination unit 222 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the determination unit 222 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0162] It is worth noting that the determination unit 222 can be used to execute any step in the method for establishing the field mapping relationship shown in Figure 6 and the data query method shown in Figures 7 and 8. Similarly, the acquisition unit 221 and the execution unit 223 can be used to execute any step in the method for establishing the field mapping relationship shown in Figure 6 and the data query method shown in Figures 7 and 8. The steps that the acquisition unit 221, the determination unit 222 and the execution unit 223 are responsible for implementing can be specified as needed.

[0163] Referring to Figure 10 , Figure 10 is a schematic diagram of the structure of a computing device provided in this application. The computing device 300 may be the data query system described above. Furthermore, the computing device 300 includes a processor 301, a storage unit 302, a storage medium 303, and a communication interface 304. The processor 301, storage unit 302, storage medium 303, and communication interface 304 communicate via a bus 305, and may also communicate via other means such as wireless transmission.

[0164] Processor 301 is composed of multiple general-purpose processors, such as CPUs. The hardware chip is an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof. Processor 301 executes various types of digital storage instructions, such as software or firmware programs stored in storage unit 302, which enables computing device 300 to provide a wide variety of services.

[0165] In a specific implementation, as an embodiment, the processor 301 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG10 .

[0166] In a specific implementation, as an embodiment, computing device 300 also includes multiple processors, such as processor 301 and processor 306 shown in FIG10 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here refers to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0167] The storage unit 302 is used to store program code and is controlled by the processor 301 to execute the processing steps of the data query method in any of the embodiments of Figures 1 to 8. The program code includes one or more software units. The one or more software units are the acquisition unit, determination unit, and execution unit in the embodiment of Figure 9, wherein the acquisition unit is used to obtain the value request, query request, etc. input by the user sent by the client, and can be specifically used to implement S201, 205 and their optional steps in the embodiment of Figure 7, as well as S301, S305 and their optional steps in the embodiment of Figure 8. The determination unit is used to implement the conversion between the filter field and the filter attribute field, and is specifically used to implement S206 in the embodiment of Figure 7 and S302 and their optional steps in the embodiment of Figure 8. The execution unit is used to query the database, and is specifically used to implement S202 and S207 in the embodiment of Figure 7 and their optional steps, and S302 and S307 in the embodiment of Figure 8.

[0168] The storage unit 302 includes a read-only memory and a random access memory, and provides instructions and data to the processor 301. The storage unit 302 also includes a non-volatile random access memory. The storage unit 302 is a volatile memory or a non-volatile memory, or includes both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronized dynamic random access memory (SLDRAM), and direct RAM bus RAM (DR RAM). A hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc., and a hard disk can be a hard disk drive (HDD), a solid state drive (SSD), a mechanical hard disk (HDD), etc., which is not specifically limited in this application.

[0169] The storage medium 303 is a carrier for storing data, such as a hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state disk (SSD), a mechanical hard disk (HDD), etc., and this application does not make specific limitations.

[0170] The communication interface 304 is a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other servers or units.

[0171] Bus 305 is a Peripheral Component Interconnect Express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (UBus or UB), a compute express link (CXL), or a cache coherent interconnect for accelerators (CCIX). Bus 305 is divided into an address bus, a data bus, and a control bus.

[0172] In addition to the data bus, the bus 305 also includes a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus 305 in the figure.

[0173] It should be noted that FIG10 is only one possible implementation of the present application. In actual applications, the computing device 300 may also include more or fewer components, which is not limited here. For matters not shown or described in the embodiments of the present application, please refer to the relevant descriptions in the embodiments of FIG1 to FIG9 above, and will not be repeated here.

[0174] The present application also provides a computing device cluster, which may be the business management system described above, and includes at least one computing device 300. The storage unit 302 in one or more computing devices 300 in the computing device cluster may store the same or different instructions for executing the business management method.

[0175] The present application also provides a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can be executed on a computing device or stored in any available medium. When the computer program product is executed on at least one computing device, the at least one computing device executes the service management method.

[0176] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the service management method.

[0177] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. A computer program product includes multiple computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0178] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent repairs or replacements within the technical scope disclosed in the present invention, and such repairs or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A data query method, characterized in that: The method is applied to a data query system, and the method comprises: Obtaining a query request, the query request including a filter field and a filter value, the filter field belonging to a first attribute field of a dimension table in a data source storage device included in the data query system, the filter field being used to indicate obtaining a value from the same field of the dimension table as prompt information, and the filter value being selected from the prompt information; Determining a filter attribute field associated with the filter field according to a field mapping relationship between a dimension table and a wide table, wherein the data source storage device further stores a wide table, the wide table includes a plurality of second attribute fields, the filter attribute field belongs to the second attribute field of the wide table, and the field mapping relationship is used to record a mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table; The operation of the query request is performed according to the filter attribute field and the filter value.

2. The method according to claim 1, characterized in that Before determining the screening attribute field associated with the screening field according to the field mapping relationship between the dimension table and the wide table, the method further includes: Respectively obtain the first attribute field in the dimension table and the second attribute field in the wide table; Comparing the first attribute field and the second attribute field to obtain a comparison result; When the first attribute field and the second attribute field are identical or fuzzy matched, a mapping relationship between the first attribute field and the second attribute field is determined according to the comparison as a field mapping relationship between the dimension table and the wide table.

3. The method according to claim 2, characterized in that Comparing the first attribute field and the second attribute field to obtain a comparison result includes: Compare the characters of the first attribute field with the characters of the second attribute field to determine a character comparison result of the first attribute field and the second attribute field; Generate a regular expression according to the characters of the first attribute field, wherein the regular expression includes one or more wildcards; Comparing the regular expression with characters of the second attribute field according to the wildcard rule represented by the wildcard, and generating a fuzzy matching result of the first attribute field and the second attribute field; The comparison result is generated according to the character comparison result and the fuzzy matching result.

4. The method according to any one of claims 1 to 3, characterized in that: The dimension table and the wide table satisfy a similarity condition, wherein the similarity condition is that the number of first attribute fields of the dimension table is greater than a quantity threshold, and the ratio of the number of first attribute fields in the dimension table that are identical or fuzzy matched with any field in the wide table to the number of first attribute fields in the dimension table is greater than a ratio threshold, wherein the quantity threshold is an integer greater than zero set based on experience, and the ratio threshold is a real number greater than zero set based on experience.

5. A data query method, characterized in that: The method is applied to a data query system, and the method comprises: Obtaining a query request, the query request including a filter attribute field and a filter value, the filter attribute field belonging to a second attribute field of a wide table in a data source storage device included in a data query system, the data source storage device also including a dimension table, the dimension table including a plurality of first attribute fields, the filter value being selected from values ​​obtained from a first attribute field in the dimension table that is the same as the filter field, the filter field being a field associated with the filter attribute field determined according to a field mapping relationship between the dimension table and the wide table, the field mapping relationship being used to record a mapping relationship between the first attribute field of the dimension table and the second attribute field of the wide table; The operation of the query request is performed according to the filter attribute field and the filter value.

6. The method according to claim 5, characterized in that The method further comprises: Respectively obtain the first attribute field in the dimension table and the second attribute field in the wide table; Comparing the first attribute field and the second attribute field to obtain a comparison result; When the first attribute field and the second attribute field are identical or fuzzy matched, a mapping relationship between the first attribute field and the second attribute field is determined according to the comparison as a field mapping relationship between the dimension table and the wide table.

7. The method according to claim 6, characterized in that Comparing the first attribute field and the second attribute field to obtain a comparison result includes: Compare the characters of the first attribute field with the characters of the second attribute field to determine a character comparison result of the first attribute field and the second attribute field; Generate a regular expression according to the characters of the first attribute field, wherein the regular expression includes one or more wildcards; Comparing the regular expression with the characters of the second attribute field according to the wildcard rule represented by the wildcard, and generating a fuzzy matching result of the first attribute field and the second attribute field; The comparison result is generated according to the character comparison result and the fuzzy matching result.

8. The method according to any one of claims 5 to 7, characterized in that: The dimension table and the wide table satisfy a similarity condition, wherein the similarity condition is that the number of first attribute fields of the dimension table is greater than a quantity threshold, and the ratio of the number of first attribute fields in the dimension table that are identical or fuzzy matched with any field in the wide table to the number of first attribute fields in the dimension table is greater than a ratio threshold, wherein the quantity threshold is an integer greater than zero set based on experience, and the ratio threshold is a real number greater than zero set based on experience.

9. A data query device, characterized in that: The method comprises a unit for implementing the steps in the method according to any one of claims 1 to 4, or comprises a unit for implementing the steps in the method according to any one of claims 5 to 8.

10. A computing device, characterized in that The method comprises a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions in the memory to implement the method according to any one of claims 1 to 4, or implements the method according to any one of claims 5 to 8.

11. A computing cluster, characterized in that: The method comprises a plurality of computing devices, each of which comprises a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions in the memory to implement the method according to any one of claims 1 to 4, or implements the method according to any one of claims 5 to 8.

12. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed by a computing device, implement the method according to any one of claims 1 to 4, or implement the method according to any one of claims 5 to 8.

Citation Information

Patent Citations

  • Ad hoc query method and device based on big data

    CN110489441A

  • Data query method and device, equipment and storage medium

    CN115033575A

  • Wide table optimization method and device, electronic equipment and computer readable storage medium

    CN115062023A

  • Data Processing Method, Apparatus, and System

    US20200327107A1