Data query methods, devices and servers

By receiving query requests and matching target topic types, field pools, condition pools and source tables, and generating and executing query statements, the problems of user operation difficulty and low query efficiency in the existing technology are solved, and efficient and convenient data query is achieved.

CN113032420BActive Publication Date: 2025-02-18CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110442077.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-02-18
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

The existing data query methods are difficult to operate by users and have low query efficiency, which cannot effectively simplify user operations and improve query efficiency.

Method used

By receiving query requests, determine the target topic type, match the target field pool, condition pool and source table, generate target query statements, and query operations for the target source table to obtain target data.

Benefits of technology

It simplifies user operations, reduces user operation difficulty, improves query efficiency, enables users to efficiently and conveniently query and obtain target data that meets specific requirements, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113032420B_ABST
    Figure CN113032420B_ABST
Patent Text Reader

Abstract

This specification provides a data query method, device and server. Based on the big data technology involved in this method, the target subject type is first determined according to the query subject carried in the received query request; then, according to the target subject type, a matching target field pool and target condition pool are determined from multiple preset field pools and multiple preset condition pools; and, a matching target source table is also determined from multiple preset source tables; further, according to the target field pool and target condition pool, the target field and the target data value related to the target field are obtained; then, according to the above target subject type, target field and target data value, the corresponding target query statement is automatically spliced ​​and generated; and then, the above target query statement can be used to perform data query operations only on the target source table in the preset source table, thereby simplifying user operations, efficiently querying and obtaining target data that meets the specific requirements of users, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification belongs to the field of big data technology, and in particular, relates to a data query method, device and server. Background Art

[0002] In some business data processing scenarios, based on specific business processing requirements, users (eg, salespersons, etc.) often need to perform query operations on a large number of source tables to obtain relevant data.

[0003] Based on the existing data query methods, users are often required to write specific query statements themselves to perform specific query operations. When performing specific query operations, they also need to use the above query statements to search and query a large number of source tables before they can finally find the data that needs to be queried.

[0004] It can be seen that when the existing data query methods are implemented, there are often technical problems such as high difficulty in user operation and low query efficiency.

[0005] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0006] This specification provides a data query method, device and server to simplify user operations, efficiently query and obtain target data that meets the user's specific requirements, and improve the user's usage experience.

[0007] This specification provides a data query method, including:

[0008] Receiving a query request; wherein the query request at least carries a query subject;

[0009] According to the query subject, determining a matching target subject type from a plurality of preset subject types;

[0010] According to the target subject type, a matching target field pool and a target condition pool are determined from a plurality of preset field pools and a plurality of preset condition pools; and a matching target source table is determined from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type;

[0011] According to the target field pool and the target condition pool, a target field and a target data value related to the target field are acquired;

[0012] Generate a target query statement according to the target subject type, target field, target data value, and preset splicing rules;

[0013] According to the target query statement, the target source table is queried to obtain target data.

[0014] In some embodiments, the preset field pool includes: a preset category attribute field pool, and / or a preset numerical attribute field pool.

[0015] In some embodiments, the attribute fields related to the target subject type include: category attribute fields related to the target subject type, and / or numerical attribute fields related to the target subject type.

[0016] In some embodiments, acquiring a target field according to the target field pool and the target condition pool includes:

[0017] According to the target field pool and the target condition pool, a corresponding selection interface is configured; wherein the selection interface includes a plurality of fields to be selected;

[0018] Displaying the selection interface to the user;

[0019] Receiving and determining the candidate field selected by the user according to the selection operation of the user on the selection interface; and determining the candidate field selected by the user as the target field.

[0020] In some embodiments, the target field pool and the target condition pool also store association relationships between fields respectively;

[0021] Correspondingly, according to the target field pool and the target condition pool, a corresponding selection interface is configured, including:

[0022] Filter out the first-level attribute fields from the target field pool;

[0023] According to the association relationship between the fields, the second-level attribute fields are screened out from the target field pool, and the associated candidate relationship fields are screened out from the target condition pool;

[0024] According to a preset configuration rule, the selection interface is configured using the first-level attribute field, the second-level attribute field and the to-be-selected relationship field.

[0025] In some embodiments, acquiring a target field according to the target field pool and the target condition pool further includes:

[0026] Display the text input interface to the user;

[0027] Receiving text data related to data query input by a user through the text input interface;

[0028] Performing word segmentation processing on the text data to obtain a custom text field;

[0029] Through semantic matching, a field whose semantic similarity to the custom text field is higher than a preset similarity threshold is screened out from the target field pool and / or the target condition pool as the target field.

[0030] In some embodiments, obtaining a target data value associated with a target field includes:

[0031] According to the target field, a data value setting interface for the target field is generated;

[0032] Displaying the data value setting interface to the user;

[0033] The target data value associated with the target field is obtained through the data value setting interface.

[0034] In some embodiments, before receiving the query request, the method further includes:

[0035] Obtaining historical query records; wherein the historical query records contain multiple historical query statements;

[0036] Dividing the plurality of historical query statements into a plurality of data groups; wherein each of the plurality of data groups corresponds to a preset topic type;

[0037] According to the historical query statements contained in the data group, a preset field pool and a preset condition pool corresponding to the preset subject type are constructed.

[0038] In some embodiments, based on the historical query statements contained in the data group, a preset field pool and a preset condition pool corresponding to the preset subject type are constructed, including:

[0039] Construct the preset field pool and preset condition pool corresponding to the current topic type in the following way:

[0040] Determine, from the plurality of data groups, a data group corresponding to the current subject type as the current data group;

[0041] Extracting categorical attribute fields, numerical attribute fields, and relational fields from historical query statements contained in the current data group;

[0042] Count the usage frequency of each categorical attribute field, the usage frequency of each numerical attribute field, and the usage frequency of each relationship field;

[0043] Filter out multiple category attribute fields whose usage frequencies meet the requirements, and build a preset category attribute field pool corresponding to the current subject type; filter out multiple numeric attribute fields whose usage frequencies meet the requirements, and build a preset numeric attribute field pool corresponding to the current subject type; filter out multiple relationship fields whose usage frequencies meet the requirements, and build a preset condition pool corresponding to the current subject type.

[0044] In some embodiments, after dividing the plurality of historical query statements into a plurality of data groups, the method further includes:

[0045] According to the historical query records, determining a preset source table that has been historically queried by the historical query statements in each data group;

[0046] According to the preset source tables that have been historically queried by the historical query statements in the respective data groups, a matching relationship between the preset subject type and the preset source table is established.

[0047] In some embodiments, the preset theme type includes at least one of the following: customer theme, account theme, contract theme, product theme.

[0048] In some embodiments, after acquiring target data by querying the target source table according to the target query statement, the method further includes:

[0049] The target data is displayed to the user.

[0050] This specification also provides a data query device, including:

[0051] A receiving module, configured to receive a query request, wherein the query request at least carries a query subject;

[0052] A first determination module, configured to determine a matching target topic type from a plurality of preset topic types according to the query topic;

[0053] The second determination module is used to determine a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools according to the target subject type; and to determine a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type;

[0054] A first acquisition module, configured to acquire a target field and a target data value related to the target field according to the target field pool and the target condition pool;

[0055] A generation module, used to generate a target query statement according to the target subject type, target field, target data value, and preset splicing rules;

[0056] The second acquisition module is used to acquire target data by querying the target source table according to the target query statement.

[0057] The present specification also provides a server, including a processor and a memory for storing processor executable instructions, wherein the processor implements the following steps when executing the instructions: receiving a query request; wherein the query request carries at least a query subject; according to the query subject, determining a matching target subject type from a plurality of preset subject types; according to the target subject type, determining a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools; and determining a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type; according to the target field pool and the target condition pool, obtaining a target field and a target data value related to the target field; generating a target query statement according to the target subject type, the target field, the target data value, and a preset splicing rule; and according to the target query statement, obtaining the target data by querying the target source table.

[0058] The present specification also provides a computer-readable storage medium having computer instructions stored thereon, which implement the following steps when executed: receiving a query request; wherein the query request carries at least a query subject; determining a matching target subject type from a plurality of preset subject types based on the query subject; determining a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools based on the target subject type; and determining a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type; obtaining a target field and a target data value related to the target field based on the target field pool and the target condition pool; generating a target query statement based on the target subject type, the target field, the target data value, and a preset concatenation rule; and obtaining target data by querying the target source table based on the target query statement.

[0059] The data query method, device and server provided in this specification can first obtain and build preset field pools and preset condition pools corresponding to multiple preset subject types according to historical query records before implementation, and establish a matching relationship between the preset subject type and the preset source table; in specific implementation, the matching target subject type can be determined according to the query subject carried in the received query request; then, according to the target subject type, a matching target field pool and target condition pool can be determined from multiple preset field pools and multiple preset condition pools; and a target source table matching the target subject type can be determined from multiple preset source tables; further, the target field and the target data value related to the target field can be obtained according to the target field pool and the target condition pool; and the corresponding target query statement can be automatically spliced ​​and generated according to the above target subject type, target field and target data value; and then, according to the above target query statement, only the target source table in the preset source table can be queried to obtain the target data to be queried. Thereby, user operations can be effectively simplified and the user's operation difficulty can be reduced; users can efficiently and conveniently query and obtain target data that meets their requirements, thereby improving the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0061] Figure 1 It is a schematic diagram of an embodiment of the structural composition of a system using the data query method provided in the embodiments of this specification;

[0062] Figure 2 is a flowchart of a data query method provided by an embodiment of this specification;

[0063] Figure 3 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;

[0064] Figure 4 It is a schematic diagram of the structure of a data query device provided by an embodiment of this specification;

[0065] Figure 5 It is a schematic diagram of an embodiment of applying the data query method provided by the embodiments of this specification in a scenario example;

[0066] Figure 6 It is a schematic diagram of an embodiment of applying the data query method provided by the embodiments of this specification in a scenario example;

[0067] Figure 7 It is a schematic diagram of an embodiment of applying the data query method provided by the embodiments of this specification in a scenario example. DETAILED DESCRIPTION

[0068] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0069] Considering that the existing data query methods often require users to write specific query statements themselves, the requirements for users are high and the user operation is difficult; and the existing data query methods also require all source tables to be searched and queried in sequence according to the above query statements, which makes the query process relatively time-consuming and the query efficiency relatively low. The above problems are more obvious when the amount of source table data involved is large.

[0070] In order to address the root cause of the above-mentioned problems, this specification considers that before the specific implementation, it is possible to pre-acquire and configure corresponding preset field pools and preset condition pools for multiple different preset subject types based on historical query records; wherein the preset field pool stores attribute fields related to the corresponding preset subject type, and the preset condition pool stores relationship fields related to the corresponding preset subject type. In specific implementation, the target subject type can be first determined according to the query subject carried in the query request initiated by the user; then, according to the target subject type, a matching target field pool and a target condition pool can be determined from multiple preset field pools and multiple preset condition pools; at the same time, according to the target subject type, a matching target source table can be determined from multiple preset source tables; further, according to the target field pool and the target condition pool, the corresponding target field and the target data value related to the target field can be obtained; and according to the above-mentioned target subject type, target field and target data value, the corresponding target query statement can be automatically generated; and then, according to the above-mentioned target query statement, only the target source table in the preset source table can be targeted for data query, thereby simplifying user operations, enabling users to conveniently and efficiently query and obtain target data that meets specific requirements, thereby improving user experience.

[0071] The present specification provides a data query method, which can be applied to a system including a server and a terminal device. Figure 1 The above terminal device and the server can be connected via wired or wireless means to perform specific data interaction.

[0072] In this embodiment, the server may specifically include a background server applied to a business data processing platform side that can realize functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device with data calculation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.

[0073] In this embodiment, the terminal device may specifically include a front-end electronic device applied to the user side and capable of realizing functions such as data collection and data transmission. Specifically, the terminal device may be, for example, a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the terminal device may also be a software application that can be run in the above electronic devices. For example, it may be an application program running on a desktop computer, etc.

[0074] In this embodiment, the server is also connected to multiple preset source tables.

[0075] Before specific implementation, the server may obtain historical query records; wherein the historical query records include multiple historical query statements.

[0076] Next, the server may divide the above-mentioned multiple historical query statements into multiple data groups; wherein each data group corresponds to a preset topic type.

[0077] Furthermore, the server can construct preset field pools and preset condition pools corresponding to each preset subject type according to the historical query statements contained in each data group. The preset field pool stores attribute fields related to the corresponding preset subject type, and the preset condition pool stores relationship fields related to the corresponding preset subject type.

[0078] At the same time, the server can also determine the preset source tables that have been historically queried by the historical query statements contained in each data group according to the historical query records, so as to establish a matching relationship between the preset subject type and the preset source table.

[0079] In specific implementation, when a user wants to query a specific data in a specific source table, the user does not need to have complex professional programming knowledge, but only needs to perform simple operations on the terminal device to generate a query request that at least carries the query subject; and send the query request to the server.

[0080] Correspondingly, the server receives the query request and responds to the query request by determining a preset topic type that matches the query topic from a plurality of preset topic types as the target topic type.

[0081] Next, the server can determine, based on the target subject type, a preset field pool and a preset condition pool that match the target subject type from multiple preset field pools and multiple preset condition pools as the target field pool and target condition pool; at the same time, based on the matching relationship between the preset subject type and the preset source table, the server can determine, from multiple preset source tables, a preset source table that matches the target subject type as the target source table.

[0082] Furthermore, the server may obtain corresponding target fields and target data values ​​related to the target fields by interacting with the user accordingly based on the target field pool and the target condition pool.

[0083] Furthermore, the server can automatically generate a target query statement through splicing and combination based on the target subject type, target field, and target data value based on preset splicing rules.

[0084] Then, the server may perform a query operation on only the target source table in the preset source table according to the target query statement to obtain the corresponding target data; and feed back the queried target data to the terminal device.

[0085] Correspondingly, the terminal device receives the target data and displays the target data to the user.

[0086] Through the above-mentioned embodiments, user operations can be effectively simplified and corresponding target query statements can be automatically generated; at the same time, when performing specific queries based on the target query statements, there is no need to perform a unified query on all source tables without distinction, but only a targeted query on the target source tables that match the target subject type, thereby effectively reducing the amount of data processing in the query process, shortening the query time, improving the overall query efficiency, and efficiently and conveniently querying the target data that meets the specific requirements.

[0087] See also Figure 2 As shown, the embodiment of this specification provides a data query method. Among them, the method is specifically applied to the server side. When implemented specifically, the method may include the following contents.

[0088] S201: Receive a query request; wherein the query request at least carries a query subject.

[0089] In some embodiments, the user does not need to have professional programming knowledge, and can first follow the guidance, combine his or her specific query needs, perform relatively simple setting operations on the terminal device, and use non-programming languages ​​such as natural language to set a specific query subject; and instruct the terminal device to generate a corresponding query request through operation. Among them, the above query request can at least carry the query subject set by the user.

[0090] Furthermore, the terminal device may respond to the user operation and send the query request to the server via wired or wireless means. Correspondingly, the server receives the query request.

[0091] S202: According to the query topic, a matching target topic type is determined from a plurality of preset topic types.

[0092] In some embodiments, the server may first perform data analysis on the query request to extract the query subject carried in the query request. Then, through semantic matching, a preset topic type that is semantically similar to the query subject is determined from multiple preset topic types as the target topic type. The preset topic type may be obtained in advance based on historical query records. The method for determining the preset topic type will be described later.

[0093] In some embodiments, corresponding to different application scenarios, the preset topic types may include a variety of different topic types. The following is a specific description using only a banking business data processing scenario as an example.

[0094] In some embodiments, the preset subject types may specifically include at least one of the following: customer subject, account subject, contract subject, product subject, etc. Of course, it should be noted that the preset subject types listed above are only a schematic illustration. In specific implementation, according to specific circumstances and processing requirements, for banking business data processing scenarios, the preset subject types may further include: employee subject, data statistics subject, risk prediction subject, etc. This specification does not limit this.

[0095] S203: According to the target subject type, determine a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools; and determine a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type.

[0096] In some embodiments, the preset field pool and the preset condition pool correspond to a preset subject type respectively. Specifically, each preset field pool may store a plurality of attribute fields related to the corresponding preset subject type, and each preset condition pool may store a plurality of relationship fields related to the corresponding preset subject type. Among them, the preset field pool and the preset condition pool may be obtained in advance based on historical query records. The method for determining the preset field pool and the preset condition pool will be explained separately later.

[0097] Specifically, the above relationship fields may include one or more of the following fields: and, and, or; greater than, equal to, less than, greater than or equal to, less than or equal to, etc. Of course, the relationship fields listed above are only a schematic illustration. In specific implementation, other types of relationship fields may also be included according to specific application scenarios and processing requirements. This specification does not limit this.

[0098] The above-mentioned preset source table can be obtained by summarizing the business data held by the server or the data in the connected database. Each preset source table can record a large amount of data information. Corresponding to different application scenarios, the above-mentioned preset source table can include multiple different types of data tables.

[0099] Specifically, taking the banking business data processing scenario as an example, the above-mentioned preset source tables may include a customer's basic information table, a customer's label information table, a customer's benefit information table, a customer's product information table, and the like. Among them, the above-mentioned customer's basic information table may specifically record data information such as the gender, birthday, address, and telephone number of each customer. The above-mentioned customer's label information table may specifically record data information such as potential customer labels, private banking customer labels, and large-amount consumer customer labels of each customer. The above-mentioned customer's benefit information table may specifically record data information such as the customer's comprehensive contribution, the customer's product coverage, and the customer's comprehensive points. The above-mentioned customer's product information table may specifically record the product number of the fund product held by the customer, the transaction record of the fund product held by the customer, the monthly balance data of the product held by the customer, and the like. Of course, the above-mentioned preset source tables listed are only a schematic illustration. In specific implementation, according to specific circumstances and processing requirements, the above-mentioned preset source tables may also include data tables of other types and contents. This specification does not limit this.

[0100] In some embodiments, the server may retrieve multiple preset field pools and multiple preset condition pools, find a preset field pool that matches the target subject type as the target field pool, and find a preset condition pool that matches the target subject type as the target condition pool.

[0101] The target field pool may store a plurality of attribute fields related to the target subject type, and the target condition pool may store a plurality of relationship fields related to the target subject type.

[0102] At the same time, the server can also search multiple preset source tables based on the matching relationship between the preset subject type and the preset source table, and find the preset source table that matches the target subject type as the target source table. The target source table is likely to record the data information that the user wants to query.

[0103] In this way, the subsequent server can only perform targeted query operations on the target source table, without having to perform query operations on all preset source tables without distinction as in the existing method, thereby effectively reducing the amount of data processing involved in the subsequent query process and shortening the query time.

[0104] In some embodiments, the above-mentioned preset field pool may further include: a preset category attribute field pool, and / or a preset numerical attribute field pool.

[0105] The above-mentioned preset category attribute field pool may specifically store category attribute fields described by text data, for example, the customer's gender, the customer's address, the customer's occupation, and the like.

[0106] The preset numerical attribute field pool may specifically store numerical attribute fields described using numerical data, for example, the customer's comprehensive points, the customer's fund balance, the customer's monthly income, and the like.

[0107] Correspondingly, the attribute fields related to the target subject type may specifically include: category attribute fields related to the target subject type, and / or numerical attribute fields related to the target subject type.

[0108] S204: Acquire a target field and a target data value related to the target field according to the target field pool and the target condition pool.

[0109] In some embodiments, the target field may be specifically understood as a field used to describe a user's specific query requirements. Specifically, for example, the target field may be a field used to describe data to be queried, or a field used to describe a specific query method.

[0110] The target data value may be understood as a parameter value for limiting the specific content of the target field. Specifically, for example, the target data value may be the specific number of the data to be queried indicated by the user: NO.01212, or the query range set by the user: [50, 55].

[0111] In some embodiments, during specific implementation, the server may interact with the user based on the above-mentioned determined target field pool and target condition pool to determine and obtain the target field indicated by the user, as well as the target data value related to the target field.

[0112] In some embodiments, the above-mentioned acquisition of the target field according to the target field pool and the target condition pool may include the following contents during specific implementation:

[0113] S1: configuring a corresponding selection interface according to the target field pool and the target condition pool; wherein the selection interface includes a plurality of fields to be selected;

[0114] S2: Displaying the selection interface to the user;

[0115] S3: receiving and determining the candidate field selected by the user according to the selection operation of the user on the selection interface; and determining the candidate field selected by the user as the target field.

[0116] In this embodiment, during specific implementation, the server may first use the fields stored in the target field pool and the target condition pool as candidate fields and configure the corresponding selection boundaries.

[0117] The selection interface is then displayed to the user via the terminal device. For example, a plurality of candidate fields for the user to select may be displayed to the user via a drop-down box or the like.

[0118] Then, the field to be selected selected by the user can be received and determined according to the selection operation of the user in the above selection interface as the target field.

[0119] In some embodiments, for more complex application scenarios, the target field pool and the target condition pool may also store associations between fields, wherein the associations between the fields may specifically be hierarchical relationships between different fields, type relationships between different fields, or causal relationships between different fields.

[0120] Correspondingly, the above-mentioned configuration of the corresponding selection interface according to the target field pool and the target condition pool may include: firstly filtering out the first-level attribute fields from the target field pool; then, based on the association relationship between the fields, filtering out the second-level attribute fields from the target field pool, and filtering out the associated relationship fields to be selected from the target condition pool; and then, according to the preset configuration rules, configuring the selection interface using the first-level attribute fields, the second-level attribute fields and the relationship fields to be selected.

[0121] Specifically, for example, the first-level attribute fields may include two fields: "province" and "municipality". Correspondingly, the second-level attribute fields may include "city", etc. The above-mentioned candidate relationship field may specifically be a field used to describe the parallel relationship between the two first-level attribute fields during query: "and", etc.

[0122] The selection interface generated and displayed to the user in this way is more user-friendly, and the logic of the displayed candidate fields is clearer and easier to understand for the user, so that the user can more efficiently and simply perform corresponding operations in the above selection interface and select the candidate fields as the target fields.

[0123] In some embodiments, for more complex application scenarios, after determining the second-level attribute fields in the above manner, the third-level attribute fields and the corresponding relationship fields to be selected can be further determined based on the second-level attribute fields according to the association relationship between the fields. Similarly, the fourth-level attribute fields and the corresponding relationship fields to be selected can also be determined. Then, according to the association relationship between different fields, the above multiple different fields can be combined to generate a more complex selection interface with more information, but the user can still understand and process it more easily.

[0124] In some embodiments, the above method of acquiring the target field according to the target field pool and the target condition pool may further include the following contents during specific implementation:

[0125] S1: Display the text input interface to the user;

[0126] S2: receiving text data related to data query input by the user through the text input interface;

[0127] S3: Perform word segmentation processing on the text data to obtain a custom text field;

[0128] S4: Through semantic matching, a field whose semantic similarity to the custom text field is higher than a preset similarity threshold is selected from the target field pool and / or the target condition pool as the target field.

[0129] In this embodiment, a field closest to the custom text field obtained based on the user's text data can be automatically found from the fields stored in the target field pool and / or the target condition pool through semantic matching as the target field.

[0130] Through the above embodiments, users can be supported to describe their query requirements more freely in the form of customized text data according to specific circumstances.

[0131] In some embodiments, the above-mentioned acquisition of the target data value related to the target field may include the following contents during specific implementation:

[0132] S1: generating a data value setting interface for the target field according to the target field;

[0133] S2: Displaying the data value setting interface to the user;

[0134] S3: Obtain a target data value related to a target field through the data value setting interface.

[0135] In this embodiment, after determining the target field, the server may further detect whether the user needs to set a relevant target data value. When it is determined that the user needs to set a target data value related to the target field, a data value setting interface for guiding the user to set the relevant target data value may be generated according to the target field. The specific data value set by the user may then be received as the target data value through the data value setting interface.

[0136] For example, when the target field is determined to be "province", a data value setting interface "__ Province" containing the following data can be configured, and the data value setting interface can be displayed to the user through the terminal device. The user can enter the data value "Jiangsu" at "__" in the data value setting interface. Correspondingly, the server can collect the above data value as the target data value related to the target field "province" through the above data value setting interface.

[0137] In some embodiments, the server may also generate a data value setting interface including multiple data values ​​to be selected, and display the interface to the user. In this way, the user can select a data value that meets the requirements from the multiple data values ​​to be selected. Accordingly, the server may determine the data value selected by the user in the above data value setting interface as the target data value.

[0138] S205: Generate a target query statement according to the target subject type, target field, target data value, and preset concatenation rules.

[0139] In some embodiments, the above-mentioned preset splicing rule can be specifically understood as a template rule based on a programming language. Specifically, it can be a template rule based on SQL. Among them, SQL (Structured Query Language) can be specifically understood as a database query and programming language used to access data and query, update and manage relational database systems.

[0140] In some embodiments, correspondingly, the target query statement may specifically be a SQL-based underlying query statement.

[0141] In some embodiments, during specific implementation, the server may splice and assemble the acquired target subject type, target field, and target data value based on the above preset splicing rules to generate an underlying query statement that meets the user's query requirements as the target query statement. In this way, the user can obtain an underlying query statement that meets the specific query requirements without having professional programming knowledge.

[0142] S206: According to the target query statement, query the target source table to obtain target data.

[0143] In some embodiments, when performing data query, the server can, based on the above-mentioned target query statement, only query the target source table among multiple preset source tables, without querying all the preset source tables, so that the data required by the user can be queried more efficiently as the target data.

[0144] In some embodiments, after acquiring the target data by querying the target source table according to the target query statement, the method, when implemented specifically, may further include: displaying the target data to a user.

[0145] In this embodiment, specifically, the server may send the queried target data to a terminal device deployed at the user layer, and then the target data may be displayed to the user through the terminal device.

[0146] Furthermore, the server may also receive user feedback information regarding the displayed target data through the terminal device, and perform other related queries based on the feedback information and the currently queried target data, thereby satisfying the user's more diverse query needs.

[0147] In some embodiments, before specific implementation, the server may also obtain and utilize historical query records to pre-determine multiple preset subject types, preset field pools and preset condition pools corresponding to the multiple preset subject types, and the matching relationship between the preset subject types and the preset source tables.

[0148] In some embodiments, before receiving the query request, the method may further include the following when implemented:

[0149] S1: Obtain historical query records; wherein the historical query records contain multiple historical query statements;

[0150] S2: Divide the plurality of historical query statements into a plurality of data groups; wherein each of the plurality of data groups corresponds to a preset topic type;

[0151] S3: Based on the historical query statements contained in the data group, a preset field pool and a preset condition pool corresponding to the preset subject type are constructed.

[0152] In some embodiments, the server may obtain the above historical query records by collecting multiple historical query statements that have appeared in history, as well as preset source tables queried based on the above multiple historical query statements and the data results obtained by the query.

[0153] In some embodiments, the server may cluster multiple historical query statements in the historical query records to obtain multiple clusters. Each cluster corresponds to a topic type, and the topic type corresponding to each cluster may be determined as a preset topic type. At the same time, the multiple historical query statements contained in each cluster may be divided into a data group. Thus, multiple data groups corresponding to a preset topic type may be obtained.

[0154] In some embodiments, the above-mentioned construction of a preset field pool and a preset condition pool corresponding to a preset subject type based on historical query statements contained in the data group may include the following contents during specific implementation: constructing a preset field pool and a preset condition pool corresponding to the current subject type in the following manner: determining a data group corresponding to the current subject type from multiple data groups as the current data group; extracting category attribute fields, numerical attribute fields, and relationship fields from historical query statements contained in the current data group; counting the usage frequency of each category attribute field, the usage frequency of each numerical attribute field, and the usage frequency of each relationship field; screening out multiple category attribute fields whose usage frequency meets the requirements, and constructing a preset category attribute field pool corresponding to the current subject type; screening out multiple numerical attribute fields whose usage frequency meets the requirements, and constructing a preset numerical attribute field pool corresponding to the current subject type; screening out multiple relationship fields whose usage frequency meets the requirements, and constructing a preset condition pool corresponding to the current subject type.

[0155] Among them, the multiple category attribute fields whose usage frequencies meet the requirements can specifically be a preset number (for example, 20) of category attribute fields with the highest usage frequencies among the category attribute fields corresponding to the current topic type. Similarly, the multiple numerical attribute fields whose usage frequencies meet the requirements can specifically be a preset number of numerical attribute fields with the highest usage frequencies among the numerical attribute fields corresponding to the current topic type. The multiple relationship fields whose usage frequencies meet the requirements can specifically be a preset number of relationship fields with the highest usage frequencies among the relationship fields corresponding to the current topic type.

[0156] Through the above method, a preset field pool and a preset condition pool corresponding to each preset subject type can be constructed respectively.

[0157] In some embodiments, after the multiple historical query statements are divided into multiple data groups, the method may further include: determining the preset source tables that have been historically queried by the historical query statements in each data group according to the historical query records; and establishing a matching relationship between the preset subject type and the preset source table according to the preset source tables that have been historically queried by the historical query statements in each data group. Thus, based on the historical query records, the preset source tables that may be involved in the query and are related to each preset subject type (i.e., the preset source tables that match the preset subject type) can be pre-determined. In this way, when performing subsequent specific data queries, only the part of the preset source tables that may be involved can be queried according to the subject type, without the need to query all the preset source tables. Thus, the amount of data processing in the data query process can be effectively reduced, and the query time can be shortened.

[0158] In some embodiments, the server may also collect user feedback information on the displayed target data through the terminal device. Further, the server may summarize the feedback information collected in a preset time period (e.g., one week) at intervals, and adjust and update the preset subject type, the preset field pool and the preset condition pool corresponding to the preset subject type, and the matching relationship between the preset subject type and the preset source table according to the feedback information of the time period, so as to continuously improve the data query accuracy and query efficiency.

[0159] As can be seen from the above, the data query method provided by the embodiment of this specification, based on this method, before specific implementation, can obtain and build preset field pools and preset condition pools corresponding to multiple preset subject types according to historical query records, and establish a matching relationship between the preset subject type and the preset source table; in specific implementation, can first determine the matching target subject type according to the query subject carried in the received query request; then, according to the target subject type, from multiple preset field pools and multiple preset condition pools, determine the matching target field pool and target condition pool; and, also from multiple preset source tables, determine the target source table matching the target subject type; further, can obtain the target field according to the target field pool and the target condition pool, and the target data value related to the target field; and according to the above target subject type, target field, target data value, automatically generate the corresponding target query statement; and then, according to the above target query statement, only the target source table in the preset source table can be queried for data to obtain the target data to be queried. Thereby, user operations can be effectively simplified and the user's operation difficulty can be reduced; so that users can efficiently and conveniently query and obtain target data that meets the requirements, and improve the user's experience.

[0160] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions, and the processor can perform the following steps according to the instructions when it is implemented: receiving a query request; wherein the query request carries at least a query subject; according to the query subject, determining a matching target subject type from multiple preset subject types; according to the target subject type, determining a matching target field pool and a target condition pool from multiple preset field pools and multiple preset condition pools; and determining a matching target source table from multiple preset source tables; wherein the target field pool stores multiple attribute fields related to the target subject type, and the target condition pool stores multiple relationship fields related to the target subject type; according to the target field pool and the target condition pool, obtaining a target field and a target data value related to the target field; generating a target query statement according to the target subject type, the target field, the target data value, and the preset splicing rule; according to the target query statement, obtaining the target data by querying the target source table.

[0161] In order to complete the above instructions more accurately, refer to Figure 3 As shown, the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 301, a processor 302 and a memory 303, and the above structures are connected through internal cables so that each structure can perform specific data interaction.

[0162] The network communication port 301 may be specifically used to receive a query request; wherein the query request at least carries a query subject.

[0163] The processor 302 can be specifically used to determine a matching target subject type from multiple preset subject types according to the query subject; determine a matching target field pool and a target condition pool from multiple preset field pools and multiple preset condition pools according to the target subject type; and determine a matching target source table from multiple preset source tables; wherein the target field pool stores multiple attribute fields related to the target subject type, and the target condition pool stores multiple relationship fields related to the target subject type; obtain the target field and the target data value related to the target field according to the target field pool and the target condition pool; generate a target query statement according to the target subject type, the target field, the target data value, and the preset splicing rule; and obtain the target data by querying the target source table according to the target query statement.

[0164] The memory 303 may be specifically used to store corresponding instruction programs.

[0165] In this embodiment, the network communication port 301 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0166] In this embodiment, the processor 302 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.

[0167] In this embodiment, the memory 303 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function but no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0168] The embodiment of the present specification also provides a computer storage medium based on the above-mentioned data query method, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following are implemented: receiving a query request; wherein the query request carries at least a query subject; according to the query subject, determining a matching target subject type from a plurality of preset subject types; according to the target subject type, determining a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools; and determining a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type; according to the target field pool and the target condition pool, obtaining a target field and a target data value related to the target field; generating a target query statement according to the target subject type, the target field, the target data value, and a preset splicing rule; and according to the target query statement, obtaining the target data by querying the target source table.

[0169] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.

[0170] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementations and will not be described in detail here.

[0171] See also Figure 4 As shown, at the software level, the embodiment of this specification also provides a data query device, which may specifically include the following structural modules:

[0172] The receiving module 401 may be specifically configured to receive a query request, wherein the query request at least carries a query subject;

[0173] The first determination module 402 may be specifically configured to determine a matching target topic type from a plurality of preset topic types according to the query topic;

[0174] The second determination module 403 may be specifically used to determine, according to the target subject type, a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools; and to determine a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type;

[0175] A first acquisition module 404 may be specifically configured to acquire a target field and a target data value related to the target field according to the target field pool and the target condition pool;

[0176] The generation module 405 may be specifically used to generate a target query statement according to the target subject type, target field, target data value, and a preset splicing rule;

[0177] The second acquisition module 406 may be specifically configured to acquire target data by querying the target source table according to the target query statement.

[0178] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0179] It can be seen from the above that the data query device provided in the embodiments of this specification can simplify user operations, efficiently query and obtain target data that meets the specific requirements of users, and improve the user experience.

[0180] In a specific scenario example, the above data query method provided in this specification can be applied to implement data query based on configurable fields and conditions. The specific implementation process can be carried out with reference to the following content.

[0181] In this scenario example, the traditional data query method is flexible under the influence of variable factors such as data source tables, fields, and query conditions, but it also has high requirements on user skills and creates a certain threshold for daily data queries. Based on this method, by slightly reducing the query flexibility and using thematic field and condition collection (for example, a preset field pool and a preset condition pool that match the target subject type), a basket of matching solutions is formed, giving users the ability to perform limited free queries within the query subject domain, thereby lowering the threshold for data queries and improving the convenience of data use.

[0182] Before specific implementation, the query subject (eg, a preset subject type), the field pool, and the calculation condition pool (eg, a preset field pool and a preset condition pool) may be constructed in the following manner.

[0183] When constructing a query subject, in a specific application scenario (for example, a business data processing scenario of a bank), the source database table is relatively clear, and the relationship between database tables can be determined by technical personnel. In this scenario example, the query subject can be set in advance (for example, the preset subject type is determined); at the same time, the relationship between the database tables is logically configured (for example, a matching relationship between the preset subject type and the preset source table is established), and the business definition is performed to bind the relationship between the business field and the database field, and a business-oriented data query subject is generated, with a unified underlying conversion engine to support the conversion structure of business logic and data query SQL statements.

[0184] Furthermore, in the above query topics, some technically specific fields, such as MD5 verification code, record hash value, etc., can be avoided, and only fields with clear business meanings can be opened to users.

[0185] When constructing the field pool and calculation condition pool, some business fields from the relevant source table can be used as common query elements, for example, fields that are frequently used in a query subject domain (for example, attribute fields).

[0186] In this scenario example, from the perspective of business users, these commonly used query elements can be organized into a field pool. Among them, the field pool can specifically store text that can be understood by the business, such as account number, deposit balance, etc. Further, the fields in the field pool can also be distinguished between dimensions (for example, category attribute fields) and metrics (for example, numerical attribute fields). Then, an optional condition pool (for example, a preset category field pool) can be configured for the dimension field to support users to flexibly filter dimension information, for example, the account nature provides a drop-down optional option, the date range is configured for the date of birth, and the organization provides an organization tree visualization selection. Configure a computable condition pool (for example, a preset numerical field pool) for the metric field to support numerical comparison calculations. In this way, a simple, easy-to-use and flexible data query model can be provided for each topic for users.

[0187] In this scenario example, when performing the above configuration, it is also possible to support users to perform personalized configuration of query subjects and related data according to business requirements of different scenarios.

[0188] Specifically, users can use source tables (for example, preset source tables) in a personalized way according to business needs, establish field pools, and enrich the content of field pools as needed; and keep the condition pools basically stable. Among them, common dimensions (for example, topics) can include: customers, accounts, contracts, products, employees, etc. Take the data query of the customer dimension as an example. You can refer to the contents shown in Tables 1 and 2 to build the field pool and calculation condition pool shown below.

[0189] Table 1 Customer dimension scenario field pool

[0190]

[0191] Table 2 Customer dimension scenario condition pool

[0192]

[0193] In specific implementation, users can customize query statements more easily and efficiently according to specific query requirements, based on the above query subjects, field pools and calculation condition pools, so as to obtain the required data (recorded as target data) through query.

[0194] In this scenario example, based on the above structure, users can select indicators that need to be used as query conditions from the field pool according to business needs under query topics in different scenarios; select conditions from the condition pool to automatically generate corresponding query statements. For details, please refer to Figure 5 , Figure 6 shown.

[0195] First, you can determine the relationship between the conditions by selecting fields such as "or" and "and" (e.g., relationship fields) in the combination type displayed in the condition area (e.g., selection interface) to correspond to "and", "or", etc. in the SQL statement, and confirm the selection by clicking "Add combination" in the interface.

[0196] At the same time, you can also select the corresponding field (as the attribute field) in the interface. Specifically, after selecting the field in the field area, enter the field value in the condition area, including the selected attribute, or the entered value range (for example, the target data value), and confirm the selection by clicking "Add Condition" in the interface.

[0197] In this scenario example, the user can also select nodes in the expression area at any time to supplement the conditions. This also includes the supplement of the relationship between the high-level representation of the low-level conditions. Figure 7 shown.

[0198] In specific implementation, users can select fields to be displayed in the results from the field pool as needed. Correspondingly, the underlying query engine flexibly generates query SQL statements (for example, target query statements) based on the selection of the user's field pool and the configuration of the condition pool. This allows for performance optimization in the query engine without the need for business users to be familiar with database operation skills, facilitating user operations and improving the user experience when querying data.

[0199] Through the above scenario examples, a method can be formed to realize data query by configuring fields and conditions. By building field pools and condition pools, and using the fixed fields and conditions in the above field pools and condition pools to assemble query statements, the technical threshold for data query can be lowered, allowing users to realize flexible and changeable data query more efficiently and effectively according to different application scenarios.

[0200] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.

[0201] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

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

[0203] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0204] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0205] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A data query method, characterized in that: include: Receiving a query request; wherein the query request at least carries a query subject; According to the query subject, determining a matching target subject type from a plurality of preset subject types; According to the target subject type, a matching target field pool and a target condition pool are determined from a plurality of preset field pools and a plurality of preset condition pools; and a matching target source table is determined from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type; According to the target field pool and the target condition pool, a target field and a target data value related to the target field are acquired; Generate a target query statement according to the target subject type, target field, target data value, and preset splicing rules; According to the target query statement, query the target source table to obtain target data; Wherein, obtaining the target field according to the target field pool and the target condition pool includes: configuring a corresponding selection interface according to the target field pool and the target condition pool; wherein the selection interface includes a plurality of fields to be selected; displaying the selection interface to the user; receiving and determining the field to be selected selected by the user according to the selection operation of the user on the selection interface; and determining the field to be selected selected by the user as the target field; The corresponding selection interface is configured according to the target field pool and the target condition pool, including: filtering out first-level attribute fields from the target field pool; filtering out second-level attribute fields from the target field pool according to the association relationship between the fields, and filtering out associated candidate relationship fields from the target condition pool; configuring the selection interface according to preset configuration rules using the first-level attribute fields, the second-level attribute fields and the candidate relationship fields.

2. The method according to claim 1, characterized in that The preset field pool includes: a preset category attribute field pool, and / or a preset numerical attribute field pool.

3. The method according to claim 2, characterized in that The attribute fields related to the target subject type include: category attribute fields related to the target subject type, and / or numerical attribute fields related to the target subject type.

4. The method according to claim 1, characterized in that The target field pool and the target condition pool also store association relationships between fields respectively; Correspondingly, according to the target field pool and the target condition pool, a corresponding selection interface is configured, including: Filter out the first-level attribute fields from the target field pool; According to the association relationship between the fields, the second-level attribute fields are screened out from the target field pool, and the associated candidate relationship fields are screened out from the target condition pool; According to a preset configuration rule, the selection interface is configured using the first-level attribute field, the second-level attribute field and the to-be-selected relationship field.

5. The method according to claim 1, characterized in that Acquiring a target field according to the target field pool and the target condition pool also includes: Display the text input interface to the user; Receiving text data related to data query input by a user through the text input interface; Performing word segmentation processing on the text data to obtain a custom text field; Through semantic matching, a field whose semantic similarity to the custom text field is higher than a preset similarity threshold is screened out from the target field pool and / or the target condition pool as the target field.

6. The method according to claim 1, characterized in that Get the target data value related to the target field, including: According to the target field, a data value setting interface for the target field is generated; Displaying the data value setting interface to the user; The target data value associated with the target field is obtained through the data value setting interface.

7. The method according to claim 2, characterized in that Before receiving the query request, the method further includes: Obtaining historical query records; wherein the historical query records contain multiple historical query statements; Dividing the plurality of historical query statements into a plurality of data groups; wherein each of the plurality of data groups corresponds to a preset topic type; According to the historical query statements contained in the data group, a preset field pool and a preset condition pool corresponding to the preset subject type are constructed.

8. The method according to claim 7, characterized in that According to the historical query statements contained in the data group, a preset field pool and a preset condition pool corresponding to the preset subject type are constructed, including: Construct the preset field pool and preset condition pool corresponding to the current topic type in the following way: Determine, from the plurality of data groups, a data group corresponding to the current subject type as the current data group; Extracting categorical attribute fields, numerical attribute fields, and relational fields from historical query statements contained in the current data group; Count the usage frequency of each categorical attribute field, the usage frequency of each numerical attribute field, and the usage frequency of each relationship field; Filter out multiple category attribute fields whose usage frequencies meet the requirements, and build a preset category attribute field pool corresponding to the current subject type; filter out multiple numeric attribute fields whose usage frequencies meet the requirements, and build a preset numeric attribute field pool corresponding to the current subject type; filter out multiple relationship fields whose usage frequencies meet the requirements, and build a preset condition pool corresponding to the current subject type.

9. The method according to claim 7, characterized in that: After dividing the plurality of historical query statements into a plurality of data groups, the method further includes: According to the historical query records, determining a preset source table that has been historically queried by the historical query statements in each data group; According to the preset source tables that have been historically queried by the historical query statements in the respective data groups, a matching relationship between the preset subject type and the preset source table is established.

10. The method according to claim 1, characterized in that The preset topic types include at least one of the following: customer topic, account topic, contract topic, product topic.

11. The method according to claim 1, characterized in that: After acquiring target data by querying the target source table according to the target query statement, the method further includes: The target data is displayed to the user.

12. A data query device, characterized in that: include: A receiving module, configured to receive a query request, wherein the query request at least carries a query subject; A first determination module, configured to determine a matching target topic type from a plurality of preset topic types according to the query topic; The second determination module is used to determine a matching target field pool and a target condition pool from a plurality of preset field pools and a plurality of preset condition pools according to the target subject type; and to determine a matching target source table from a plurality of preset source tables; wherein the target field pool stores a plurality of attribute fields related to the target subject type, and the target condition pool stores a plurality of relationship fields related to the target subject type; A first acquisition module, configured to acquire a target field and a target data value related to the target field according to the target field pool and the target condition pool; A generation module, used to generate a target query statement according to the target subject type, target field, target data value, and preset splicing rules; A second acquisition module is used to acquire target data by querying the target source table according to the target query statement; The first acquisition module is specifically used to: configure a corresponding selection interface according to the target field pool and the target condition pool; wherein the selection interface includes a plurality of fields to be selected; display the selection interface to the user; receive and determine the field to be selected selected by the user according to the user's selection operation on the selection interface; and determine the field to be selected selected by the user as the target field; The first acquisition module is also specifically used to: filter out first-level attribute fields from the target field pool; filter out second-level attribute fields from the target field pool based on the association relationship between the fields, and filter out associated candidate relationship fields from the target condition pool; configure the selection interface according to preset configuration rules using the first-level attribute fields, the second-level attribute fields and the candidate relationship fields.

13. A server, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 11 when executing the instructions.

14. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Ad hoc query method and device based on big data

    CN110489441A

  • Method and system for realizing dynamic column display and multi-condition and multi-latitude dynamic query

    CN112434100A