A column information dynamic expansion query method, device, equipment and medium

By automatically establishing relationships between query datasets through business fields and dynamically constructing a field tree, the complexity and inconvenience of query analysis solutions in existing technologies are resolved, enabling user-friendly selection of query columns.

CN115577012BActive Publication Date: 2026-01-23INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211307884.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-01-23
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

Existing query analysis solutions suffer from problems when dynamically expanding queries, such as complex dataset relationships, lack of support for multiple relationships, and numerous and inconvenient datasets defined within the system.

Method used

By using business fields as links, the system automatically establishes relationships between query datasets, dynamically constructs field trees, and simplifies column selection for users.

Benefits of technology

It improves the convenience for users when selecting query columns, reduces the workload of relationship modeling, and supports multiple relationship scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115577012B_ABST
    Figure CN115577012B_ABST
Patent Text Reader

Abstract

The application discloses a column information dynamic expansion query method and device, equipment and medium, the method comprises the following steps: defining business entities and business fields according to business field information and business entity information; determining a first association relationship between each query data set and the business field, and a second association relationship between the business entity and the business field; determining a third association relationship between each query data set according to the first association relationship and the second association relationship; receiving a query field from a user and determining a main query data set of a target query task according to the query field; determining an associated query data set of the main query data set according to the third association relationship; and determining target column information according to the main query data set, the associated query data set and the query field. The process of association relationship modeling in the prior art is omitted. The convenience of the user in selecting the query column is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data query, specifically to a method, apparatus, device, and medium for dynamically expanding query of column information. Background Technology

[0002] Currently, two common query analysis solutions exist. One approach involves first creating a query dataset and then defining queries based on it. The data columns are defined within the query dataset. To add new dimension tables or new columns to existing dimension tables in a query, the query dataset must be modified. Conversely, if relationships are established beforehand, more columns need to be selected when defining queries, and these additional tables may impact performance. The other approach supports defining relationships outside the dataset. When defining queries, columns from different datasets can be selected, and the data is dynamically organized based on the selected columns and their relationships with the datasets. This solution addresses some of the problems of the previous approach but has drawbacks: to automatically identify relationships, only one relationship can be defined between datasets, and it doesn't support scenarios with multiple relationships between datasets. Furthermore, the system has numerous defined datasets, making selection inconvenient when defining queries. Summary of the Invention

[0003] To address the aforementioned problems, this application proposes a method, apparatus, device, and medium for dynamically expanding column information queries, including:

[0004] Based on business field information and business entity information, define business entities and business fields; determine a first association relationship between each query dataset and the business field, and a second association relationship between the business entity and the business field; determine a third association relationship between each query dataset based on the first association relationship and the second association relationship; receive query fields from users, and determine the main query dataset for the target query task based on the query fields; determine the associated query datasets of the main query dataset based on the third association relationship; determine target column information based on the main query dataset, the associated query datasets, and the query fields.

[0005] In one example, defining business entities and business fields based on business field information and business entity information specifically includes: modeling business entities based on the business field information; storing the modeled business entities in a preset database; defining business fields based on the business field information; and storing the business fields in the preset database.

[0006] In one example, before determining the first association between each query dataset and the business field, the method further includes: obtaining dataset information pre-stored in a preset database; establishing a query dataset model based on the dataset information; and storing the query dataset in the preset database.

[0007] In one example, before receiving the query field from the user, the method further includes: obtaining field information corresponding to the business field; generating alternative query fields based on the field information; and sending the alternative query fields to the user.

[0008] In one example, generating candidate query fields based on the field information specifically includes: determining the business level of the business field based on the field information and the business attributes corresponding to the business field; generating candidate query fields based on the business level and the first association relationship; the candidate query fields include multiple fields, and each field corresponds to at least one query dataset.

[0009] In one example, determining the target column information based on the main query dataset, the associated query dataset, and the query field specifically includes: determining the final query field based on the query field, the main query dataset, and the associated query dataset; generating a BQL query statement corresponding to the final query field; and querying the query dataset using the query statement.

[0010] In one example, after determining the target column information based on the main query dataset, the associated query dataset, and the query field, the method further includes: rendering the target column information to generate query results; and sending the query results to the user.

[0011] This application also provides a dynamic expansion query device for column information, characterized in that it includes: a business field definition module, which defines business entities and business fields based on business field information and business entity information; a first association relationship determination module, which determines a first association relationship between each query dataset and the business field, and a second association relationship between the business entity and the business field; a second association relationship determination module, which determines a third association relationship between each query dataset based on the first association relationship and the second association relationship; a main query dataset determination module, which receives query fields from users and determines the main query dataset for the target query task based on the query fields; an associated query dataset determination module, which determines the associated query dataset of the main query dataset based on the third association relationship; and a target column information determination module, which determines target column information based on the main query dataset, the associated query dataset, and the query fields.

[0012] This application also provides a column information dynamic expansion query device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform: defining business entities and business fields based on business field information and business entity information; determining a first association relationship between each query dataset and the business field, and a second association relationship between the business entity and the business field; determining a third association relationship between the query datasets based on the first association relationship and the second association relationship; receiving query fields from a user, and determining a main query dataset for a target query task based on the query fields; determining associated query datasets of the main query dataset based on the third association relationship; and determining target column information based on the main query dataset, the associated query datasets, and the query fields.

[0013] This application also provides a non-volatile computer storage medium storing computer-executable instructions, the computer-executable instructions being configured to: define business entities and business fields based on business field information and business entity information; determine a first association relationship between each query dataset and the business fields, and a second association relationship between the business entities and the business fields; determine a third association relationship between the query datasets based on the first association relationship and the second association relationship; receive query fields from a user, and determine the main query dataset for a target query task based on the query fields; determine the associated query datasets of the main query dataset based on the third association relationship; and determine target column information based on the main query dataset, the associated query datasets, and the query fields.

[0014] The method proposed in this application can automatically establish relationships between query datasets based on business fields, thus eliminating the need for relationship modeling in existing technologies. Furthermore, regarding the user's selection of query columns, a field tree is dynamically constructed based on the relationships between query datasets established using business fields, thereby improving the convenience for users when selecting query columns. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0016] Figure 1 This is a schematic diagram of a method for dynamically expanding and querying column information in an embodiment of this application;

[0017] Figure 2 This is a schematic diagram of the structure of a dynamic expansion query device for column information in an embodiment of this application.

[0018] Figure 3 This is a schematic diagram of the structure of a dynamic expansion query device for column information in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0021] Figure 1 This is a flowchart illustrating a method for dynamically expanding and querying column information according to one or more embodiments of this specification. This process can be executed by a computing device in the relevant field, and certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.

[0022] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.

[0023] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.

[0024] like Figure 1 As shown in the figure, this application embodiment provides a method for dynamically expanding and querying column information, including:

[0025] S101: Define business entities and business fields based on business field information and business entity information.

[0026] To address the issues of complex, ever-changing, and cumbersome definitions of relationships between query datasets, this application uses business fields as the link to automatically establish a network of relationships between datasets. Therefore, the first step is to define business entities and business fields based on business field information and business entity information.

[0027] In one embodiment, when defining business entities and business fields based on business field information and business entity information, it is first necessary to model the business entity based on the business field information and store the modeled business entity in a preset database. Then, business fields are defined based on the business field information and stored in the preset database.

[0028] The aforementioned business field information and business entity information can be pre-stored in the storage device of the computer device. When it is necessary to define a business entity and a business field, the computer device can select the business field information and business entity information from the storage device. Of course, the computer device can also obtain the business field information and business entity information from other external devices. For example, the business field information and business entity information can be stored in the cloud. When it is necessary to define a business entity and a business field, the computer device can obtain the business field information and business entity information from the cloud. This embodiment does not limit the method of obtaining the business field information and business entity information.

[0029] It should be noted that the "business entity" here refers to the concept of a business entity, which also includes the query dataset corresponding to that business entity. A business field is a business abstraction of a field; for fields in an entity class (such as organization identifier, material identifier, asset identifier, etc.), the corresponding query dataset can be specified.

[0030] In one embodiment, it is also necessary to predetermine the query dataset. First, the dataset information pre-stored in a preset database needs to be obtained, and a query dataset model is established based on the dataset information. Finally, the query dataset is stored in the preset database.

[0031] S102: Determine the first association between each query dataset and the business field, and the second association between the business entity and the business field.

[0032] After defining the business entities and business fields, since there may be overlaps or even the same business attributes among the business entities, business fields, and various query datasets, the first association between each query dataset and the business fields, as well as the second association between the business entities and the business fields, can be determined.

[0033] S103: Determine the third association relationship between the query datasets based on the first association relationship and the second association relationship.

[0034] By understanding the first association between each query dataset and the business field, and the second association between the business entity and the business field, we can obtain the third association between each query dataset.

[0035] S104: Receive query fields from the user and determine the main query dataset for the target query task based on the query fields.

[0036] To address the issue of personalized configuration of query column information for users, this invention provides query field management during runtime for end users. Users can set different query fields, which refer to the user-sent commands for querying column information and reflect the user's query needs. Different display columns can be configured for each query field. Furthermore, to simplify query column selection, each query field corresponds to a main query dataset.

[0037] In one embodiment, before receiving the query fields from the user, alternative query fields can be generated based on the field information corresponding to the defined business fields, and these alternative query fields can be sent to the user. This allows the user to perform queries based on the field information in the alternative schemes, where each field information corresponds to a query dataset.

[0038] Furthermore, when generating candidate query fields based on field information, it is first necessary to determine the business level of the business field based on the field information and the corresponding business attributes. Then, candidate query fields are generated based on the business level and the primary association. For example, business fields may include fields such as business department and office. From the perspective of business logic in business modeling, the office and the business department have a hierarchical relationship.

[0039] S105: Determine the associated query dataset of the main query dataset based on the third association relationship.

[0040] The dataset columns are displayed in a tree structure. Columns identifying related entities through business fields can be expanded by double-clicking to reveal the columns of their respective related entities. This layered nesting allows users to select the appropriate columns based on their needs. Because the tree is dynamically constructed, changes to the entity structure do not require modification of the query dataset that references it, significantly reducing the workload of secondary development and implementation.

[0041] S106: Determine the target column information based on the main query dataset, the associated query dataset, and the query fields.

[0042] Based on the main query dataset, the associated query datasets of the main query dataset, and the query fields provided by the user, the target column information that the user wants to query can be determined.

[0043] In one embodiment, when determining the target column information based on the main query dataset, the associated query dataset, and the query fields, the final query fields are first determined based on the query fields, the main query dataset, and the associated query dataset. This means that at runtime, query field management is provided for end-users, allowing users to set different query fields and configure different display columns. To simplify query column selection, each query corresponds to a main query dataset, and the dataset's columns are displayed in a tree structure. Columns of associated entities identified by business fields can be expanded by double-clicking. Through this nested approach, users can select appropriate columns according to their needs. The final query fields are then determined based on the user's query fields and the associated entity columns expanded by double-clicking. Finally, a BQL query statement corresponding to the final query fields is generated, and the query dataset is queried using this statement.

[0044] To solve the backend query problem with dynamically configured columns, a business query language engine can be used to dynamically generate BQL statements based on the query fields, and call the BQL engine to query data. Using BQL can mask database differences, adapt to multiple databases, and support extensions to adapt to even more databases.

[0045] In one embodiment, after determining the target column information based on the main query dataset, the associated query dataset, and the query fields, the target column information can be rendered to generate query results, which are then sent to the user.

[0046] In one embodiment, before retrieving the user's query fields, the server can first retrieve the user's ideal query fields and their corresponding field attributes. This means that if the user cannot find the desired field in the business field list, they can additionally input the desired term and its meaning. Then, based on the field attributes, the server determines the similarity level between each business field and the ideal query field. Based on the similarity level, it determines the similar business fields to the ideal query field and sends these similar business fields and their corresponding field attributes to the user, receiving the user's field selection result. That is, after sending the similar business fields to the user, the server checks if they match the user's desired query. If the selected business field is not found in the results, the server records the ideal query field and notifies the developers to generate the business field based on its field attributes.

[0047] like Figure 2 As shown in the figure, this application embodiment also provides a column information dynamic expansion query device, including:

[0048] The business field definition module 201 defines business entities and business fields based on business field information and business entity information.

[0049] The first association determination module 202 determines the first association between each query dataset and the business field, and the second association between the business entity and the business field.

[0050] The second association determination module 203 determines the third association between the query datasets based on the first association and the second association.

[0051] The main query dataset determination module 204 receives query fields from the user and determines the main query dataset for the target query task based on the query fields.

[0052] The associated query dataset determination module 205 determines the associated query dataset of the main query dataset based on the third association relationship.

[0053] The target column information determination module 206 determines the target column information based on the main query dataset, the associated query dataset, and the query field.

[0054] like Figure 3 As shown in the embodiment of this application, a column information dynamic expansion query device is also provided, including:

[0055] At least one processor; and,

[0056] A memory communicatively connected to the at least one processor; wherein,

[0057] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0058] Based on business field information and business entity information, define business entities and business fields; determine a first association relationship between each query dataset and the business field, and a second association relationship between the business entity and the business field; determine a third association relationship between each query dataset based on the first association relationship and the second association relationship; receive query fields from users, and determine the main query dataset for the target query task based on the query fields; determine the associated query datasets of the main query dataset based on the third association relationship; determine target column information based on the main query dataset, the associated query datasets, and the query fields.

[0059] This application embodiment also provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0060] Based on business field information and business entity information, define business entities and business fields; determine a first association relationship between each query dataset and the business field, and a second association relationship between the business entity and the business field; determine a third association relationship between each query dataset based on the first association relationship and the second association relationship; receive query fields from users, and determine the main query dataset for the target query task based on the query fields; determine the associated query datasets of the main query dataset based on the third association relationship; determine target column information based on the main query dataset, the associated query datasets, and the query fields.

[0061] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0062] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0063] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0064] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

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

[0068] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

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

[0070] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0071] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for dynamically expanding and querying column information, characterized in that, include: Define business entities and business fields based on business field information and business entity information; Determine the first association between each query dataset and the business field, and the second association between the business entity and the business field; Based on the first association relationship and the second association relationship, a third association relationship is determined among the query datasets; Receive query fields from the user and determine the main query dataset for the target query task based on the query fields; Based on the third association relationship, determine the associated query dataset of the main query dataset; Based on the main query dataset, the associated query dataset, and the query fields, determine the target column information; Before receiving the query fields from the user, the method further includes: Obtain the field information corresponding to the business field; Based on the field information, generate alternative query fields; Send the alternative query fields to the user; The step of generating alternative query fields based on the field information specifically includes: Based on the field information and the corresponding business attributes of the business field, determine the business level of the business field; Based on the business level and the first association relationship, generate alternative query fields; The alternative query fields include multiple fields, and each field corresponds to at least one query dataset; Before receiving the query fields from the user, the method further includes: receiving an ideal query field provided by the user and the field attributes corresponding to the ideal query field, wherein the ideal query field contains the words the user wants to query and the meaning of the words; determining the similarity level between each business field and the ideal query field based on the field attributes; determining similar business fields of the ideal query field based on the similarity level; and sending the similar business fields and the field attributes corresponding to the similar business fields to the user to receive the field selection results from the user.

2. The method according to claim 1, characterized in that, The step of defining business entities and business fields based on business field information and business entity information specifically includes: Based on the aforementioned business field information, perform business entity modeling; Store the modeled business entities in a pre-defined database; Define business fields based on the aforementioned business field information; The business fields are stored in the preset database.

3. The method according to claim 1, characterized in that, Before determining the first association between each query dataset and the business field, the method further includes: Retrieve dataset information pre-stored in a preset database; Based on the dataset information, a query dataset model is established; The query dataset is stored in the preset database.

4. The method according to claim 1, characterized in that, The step of determining the target column information based on the main query dataset, the related query dataset, and the query fields specifically includes: The final query field is determined based on the query field, the main query dataset, and the related query dataset; Generate the BQL query statement corresponding to the final query field; The query statement is used to query the dataset.

5. The method according to claim 1, characterized in that, After determining the target column information based on the main query dataset, the related query dataset, and the query field, the method further includes: The target column information is rendered to generate query results; The query results are sent to the user.

6. A dynamic expansion query device for column information, characterized in that, include: The business field definition module defines business entities and business fields based on business field information and business entity information; The first association determination module determines the first association between each query dataset and the business field, and the second association between the business entity and the business field; The second association determination module determines a third association between the query datasets based on the first association and the second association. The main query dataset determination module receives query fields from the user and determines the main query dataset for the target query task based on the query fields. The related query dataset determination module determines the related query dataset of the main query dataset based on the third association relationship; The target column information determination module determines the target column information based on the main query dataset, the associated query dataset, and the query field. Before receiving the query fields from the user, the method further includes: Obtain the field information corresponding to the business field; Based on the field information, generate alternative query fields; Send the alternative query fields to the user; The step of generating alternative query fields based on the field information specifically includes: Based on the field information and the corresponding business attributes of the business field, determine the business level of the business field; Based on the business level and the first association relationship, generate alternative query fields; The alternative query fields include multiple fields, and each field corresponds to at least one query dataset; Before receiving the query fields from the user, the method further includes: receiving an ideal query field provided by the user and the field attributes corresponding to the ideal query field, wherein the ideal query field contains the words the user wants to query and the meaning of the words; determining the similarity level between each business field and the ideal query field based on the field attributes; determining similar business fields of the ideal query field based on the similarity level; and sending the similar business fields and the field attributes corresponding to the similar business fields to the user to receive the field selection results from the user.

7. A dynamic expansion query device for column information, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the method as claimed in any one of claims 1-5.

8. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are configured to perform the steps of the method as claimed in any one of claims 1-5.

Citation Information

Patent Citations

  • User-defined report design method, electronic device, storage medium and system

    CN109766338A

  • Penetration query method and system, storage medium and equipment

    CN114661837A