WO2021184572A1 - 查询方法、装置、计算机设备和存储介质 - Google Patents

查询方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021184572A1
WO2021184572A1 PCT/CN2020/098680 CN2020098680W WO2021184572A1 WO 2021184572 A1 WO2021184572 A1 WO 2021184572A1 CN 2020098680 W CN2020098680 W CN 2020098680W WO 2021184572 A1 WO2021184572 A1 WO 2021184572A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
sub
unit
field
target
Prior art date
Application number
PCT/CN2020/098680
Other languages
English (en)
French (fr)
Inventor
潘江红
Original Assignee
平安国际智慧城市科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安国际智慧城市科技股份有限公司 filed Critical 平安国际智慧城市科技股份有限公司
Publication of WO2021184572A1 publication Critical patent/WO2021184572A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24532Query optimisation of parallel queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Definitions

  • This application relates to the field of computer technology, in particular to a query method, device, computer equipment and storage medium.
  • Data to query The scalability of this method is not strong, and the key value of the query conditions cannot be dynamically expanded, so the query conditions cannot be combined according to the user's ideas. If the query conditions are too limited, it will not be flexible and convenient for users to query. It is particularly important to provide a query method that supports dynamic expansion of query conditions and is user-friendly.
  • a query method, device, computer equipment, and storage medium are provided.
  • a query method includes:
  • the query expression is parsed, and the query expression is divided according to the connectors in the query expression to obtain corresponding basic query units.
  • the basic query units include conditional sentences and field sentences, and obtain the corresponding basic query units.
  • Configuration information, the basic query units of the same configuration information are formed into sub-query units according to the order of the basic query units, and the configuration information is used to determine the target query mode corresponding to the sub-query unit, and query according to the target query mode corresponding to the sub-query unit Obtaining a sub-query result corresponding to the sub-query unit;
  • each sub-query unit is a combined query result, combining the sub-query results to obtain the target query result corresponding to the query string;
  • the sub-query unit When the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit has a corresponding first-type sub-query unit
  • the second query result is to update the query database corresponding to the first type of sub-query unit through the second query result, and retrieve the target query result corresponding to the query string according to the updated query database.
  • a query device includes:
  • the sub-query result determination module is used to parse the query expression, divide the query expression according to the connector in the query expression to obtain corresponding basic query units, and the basic query units include conditional sentences and field sentences,
  • the configuration information corresponding to the basic query unit is obtained, and basic query units with the same configuration information are formed into sub-query units according to the order of the basic query units.
  • the configuration information is used to determine the target query mode corresponding to the sub-query unit. Query the target query mode corresponding to the query unit to obtain the sub-query result corresponding to the sub-query unit;
  • the first target query result determination module is configured to combine the sub-query results to obtain the target query result corresponding to the query string when the sub-query result corresponding to each sub-query unit is a combined query result;
  • the second target query result determination module is configured to: when the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first type sub-query unit and a second type sub-query unit, the The second type of sub-query unit has a corresponding second query result, the query database corresponding to the first type of sub-query unit is updated through the second query result, and the target query result corresponding to the query string is retrieved according to the updated query database.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • the query expression is parsed, and the query expression is divided according to the connectors in the query expression to obtain corresponding basic query units.
  • the basic query units include conditional sentences and field sentences, and obtain the corresponding basic query units.
  • Configuration information, the basic query units of the same configuration information are formed into sub-query units according to the order of the basic query units, and the configuration information is used to determine the target query mode corresponding to the sub-query unit, and query according to the target query mode corresponding to the sub-query unit Obtaining a sub-query result corresponding to the sub-query unit;
  • each sub-query unit is a combined query result, combining the sub-query results to obtain the target query result corresponding to the query string;
  • the sub-query unit When the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit has a corresponding first-type sub-query unit
  • the second query result is to update the query database corresponding to the first type of sub-query unit through the second query result, and retrieve the target query result corresponding to the query string according to the updated query database.
  • One or more computer-readable storage media storing computer-readable instructions.
  • the one or more processors perform the following steps:
  • the query expression is parsed, and the query expression is divided according to the connectors in the query expression to obtain corresponding basic query units.
  • the basic query units include conditional sentences and field sentences, and obtain the corresponding basic query units.
  • Configuration information, the basic query units of the same configuration information are formed into sub-query units according to the order of the basic query units, and the configuration information is used to determine the target query mode corresponding to the sub-query unit, and query according to the target query mode corresponding to the sub-query unit Obtaining a sub-query result corresponding to the sub-query unit;
  • each sub-query unit is a combined query result, combining the sub-query results to obtain the target query result corresponding to the query string;
  • the sub-query unit When the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit has a corresponding first-type sub-query unit
  • the second query result is to update the query database corresponding to the first type of sub-query unit through the second query result, and retrieve the target query result corresponding to the query string according to the updated query database.
  • Fig. 1 is an application environment diagram of a query method according to one or more embodiments
  • FIG. 2 is a schematic flowchart of a query method according to one or more embodiments
  • Fig. 3 is a structural block diagram of a query device according to one or more embodiments.
  • Figure 4 is a diagram of the internal structure of a computer device according to one or more embodiments.
  • Fig. 5 is a diagram of the internal structure of a computer device in another embodiment.
  • Fig. 1 is a diagram of an application environment in which a query method runs in an embodiment.
  • the application environment includes a terminal 110 and a server 120.
  • the terminal and the server communicate through the network.
  • the communication network may be a wireless or wired communication network, such as an IP network, a cellular mobile communication network, etc., where the number of terminals and servers is not limited.
  • the terminal 110 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • the query method can be applied to the terminal or the server. When applied to a server, the terminal can receive the input query string, and send a query request carrying the query string to the server, and the server determines the corresponding target query result according to the query string.
  • a query method is provided. Taking the method applied to the terminal 110 or the server 120 in FIG. 1 as an example for description, the method includes the following steps:
  • Step 210 Obtain a query string, where the query string includes a self-defined query expression.
  • the query string is used to describe the query conditions and can be customized according to the content of the query.
  • the query string includes a self-defined query expression, so that the user can flexibly combine query conditions.
  • a self-defined query expression For example: "Male [gender] AND Hunan [address] OR liver cancer [electronic medical record]", where spaces are used to separate conditions and connectors.
  • the data on the left of the square brackets is the query condition statement, and the data in the square brackets need to be queried
  • the fields of AND and OR are the connectors between the conditions.
  • Customized query expressions can be parsed by special analysis tools. All query conditions and query fields are independently controlled by the user and can be freely combined, which greatly improves Improve the flexibility of query.
  • the query string can be received through a unified input portal, and the field of the query string can be customized according to the content of the query.
  • the field statement can include the name of the disease, the name of the drug, etc.
  • the field sentence may include the name of the movie, the name of the song, and so on.
  • field sentences can include road section names, place names, and so on.
  • the query page includes field prompt information
  • the field prompt information includes candidate query fields, so that the user can select the target query field from the candidate query field, determine the target query field, determine the corresponding query condition statement, and form a customized query Query expression.
  • Step 220 Parse the query expression, divide the query expression according to the connectors in the query expression to obtain corresponding basic query units, the basic query units including conditional statements and field statements, and obtain configuration information corresponding to the basic query units.
  • the basic query units with the same configuration information are formed into sub-query units according to the order of the basic query units, the configuration information is used to determine the target query mode corresponding to the sub-query unit, and the sub-query is obtained by querying according to the target query mode corresponding to the sub-query unit The result of the sub-query corresponding to the unit.
  • the basic query unit includes field statements. Different types of field statements can be configured in advance.
  • the configuration information is used to determine the target query mode.
  • the target query mode includes querying data sources, querying data tables, querying databases, etc. Fields with accurate information such as gender and name configure the first type of database. Since disease types may have multiple different similar names in different countries and regions, the second type of database is configured for disease type fields. Different query data tables can also be configured for different fields, and the matching relationship between the pre-stored field name and the query data table identifier, the query data source identifier, and the query database identifier.
  • the basic query units can be combined according to the matching relationship.
  • the basic query units with the same configuration can be combined according to the configuration of the basic query units.
  • pay attention to the order of the basic query units that is, the basic query units that appear consecutively and have the same target query mode.
  • Combining to form a sub-query unit if the first basic query unit and the second basic query unit are adjacent basic query units and have the same query database, then the first basic query unit and the second basic query unit form the first sub-query Query unit.
  • the queries of multiple basic query units are converted into sub-queries.
  • the unit performs a query, which improves the query efficiency.
  • Step 230 When the sub-query result corresponding to each sub-query unit is a combined query result, combine the sub-query results to obtain the target query result corresponding to the query string.
  • each sub-query result can be processed through a custom algorithm to obtain the target query result corresponding to the query string.
  • the processing method is not limited.
  • the sub-query result corresponding to each sub-query unit is a combined query result, the sub-query results are directly combined to obtain the target query result corresponding to the query string.
  • Step 240 When the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit exists Corresponding to the second query result, the query database corresponding to the first type of sub-query unit is updated through the second query result, and the target query result corresponding to the query string is retrieved according to the updated query database.
  • the quadratic query result indicates that the corresponding target query result needs to be queried again according to the sub-query result, and the query database corresponding to the first-type sub-query unit is updated through the second query result.
  • the update operation can be customized, including modification, writing Enter, etc., query the query string in the query database corresponding to the updated first type sub-query unit to obtain the target query result corresponding to the query string.
  • the query string includes a custom query expression
  • the query expression is parsed, and the query expression is divided according to the connector in the query expression to obtain the corresponding basic query unit
  • the basic query unit includes conditional sentences and field sentences, obtains the configuration information corresponding to the basic query unit, forms the basic query units with the same configuration information into sub-query units according to the order of the basic query units, and the configuration information is used to determine the corresponding sub-query unit
  • the target query mode is to obtain the sub-query result corresponding to the sub-query unit according to the target query mode corresponding to the sub-query unit; when the sub-query result corresponding to each sub-query unit is a combined query result, the sub-query results are combined to obtain the query
  • the target query method obtains the sub-query results corresponding to each sub-query sheet, and then integrates the target query results. It only needs to modify the configuration data, thereby modifying the configuration information corresponding to the basic query unit.
  • the purpose of modifying the query structure can be achieved, which is flexible, convenient and improved. Improve the scalability and convenience of query.
  • the method further includes: detecting the query string, and when there is an error in the query string, performing repair to obtain the repaired query string, and the repair includes at least one of the following methods Species: When the query string has an error field, get the current conditional statement corresponding to the error field, delete the error field statement and the current condition statement corresponding to the error field; when the query string has redundant fields, perform the field statement corresponding to the redundant field Delete; when there is a syntax error in the query string, correct the wrong syntax connector.
  • the error field refers to a field that does not exist in the query database.
  • the similar field corresponding to the current field is obtained, and when the similar field is in When it does not exist in the query database, it is determined that the current field is an error field.
  • similar fields are corrected for the fields input by the user independently, which improves the flexibility of retrieval.
  • the error field statement corresponding to the error field and the current condition statement need to be deleted because the matching result cannot be obtained by the query.
  • the unknown field may be a type of error field. Redundant fields refer to extra fields in the query string.
  • conditional statement corresponds to multiple field statements, you don't know which field the conditional statement corresponds to, and you need to delete the extra fields. For example, male [gender]30[age][amount], and one of [age][amount] needs to be deleted. When deleting, you can delete the field that is far away from the conditional sentence or match the redundant field with the context field, and the match is successful The reservation, the unsuccessful deletion. If the context field is an entertainment field, and the extra field is a medical field, the matching is obviously unsuccessful. Grammatical errors include missing the associated word AND ⁇ OR, such as male [gender]30[age], or multiple AND ⁇ OR directly connected, such as male [gender]AND OR AND30[age] and other connector usage errors.
  • the fault tolerance of the query is improved.
  • step 220 includes: when the target query mode corresponding to the first type sub-query unit is a precise query, determining that the target query database corresponding to the first type sub-query unit is a relational database, and when the second type sub-query unit
  • the target query database corresponding to the second-type sub-query unit is determined to be a search-type database, and the corresponding second query result is obtained by querying the search-type database according to the second-type sub-query unit.
  • the relational database query is relatively fixed, which is suitable for fixed queries such as name and mobile phone number, such as ORCLE database, and search database is used for fuzzy query, similar to Baidu search, such as SOLR database.
  • search database is used for fuzzy query, similar to Baidu search, such as SOLR database.
  • it is suitable for querying in a relational database, and when configured as a fuzzy query, it is suitable for querying in a retrieval database to obtain the second query result.
  • male [gender] AND Hunan [address] OR liver cancer [electronic medical record] can be configured as ‘liver cancer [electronic medical record]’ to query in the SOLR database, and other conditions to query in ORACLE.
  • Step 240 includes: writing the second query result into the relational database corresponding to the first type of sub-query unit, combining the sub-query units to form a complete query unit, and querying the relational database according to the complete query unit to obtain the target query result.
  • the second query result is written into the relational database.
  • the second query result obtained from the query in the SOLR database can be converted into data identifiable by the ORACLE database and written into the ORACLE database, and then male [gender] AND Hunan [address] ]OR Liver Cancer [Electronic Medical Record] complete string, use ORACLE to query to get the target query result.
  • the query expression can be parsed to disassemble the data into various sub-query units, and then query the data in different types of databases according to the configuration, and finally integrate the queried data together to configure different fields.
  • the database improves the accuracy of the query and can perform the query adaptively.
  • the method further includes: obtaining a newly added data table, and comparing the original candidate fields in the query database with the fields in the newly added data table. When there is a new field in the newly added data table, the newly added data table will be added. The field is used as a newly-added candidate field, matching the corresponding configuration information for the newly-added candidate field.
  • the original candidate field may be the initial default candidate field of the database, or may be a historical candidate field. Because different user data is different, the initial default candidate field may not meet the field requirements in the user’s data.
  • the new data table contains a field that does not exist in the original candidate field of the query database, the new field needs to be added Added as a new candidate field. And match the corresponding configuration information for the newly added candidate field, the configuration information includes query mode, query database, etc. Therefore, in the subsequent query, the newly added field is queried by a target query method that matches the configuration information.
  • Candidate fields can be displayed on the query page as field prompt information, which is convenient for users to select target query fields from the candidate fields.
  • the corresponding configuration information is matched for the newly added candidate field, so that the query database is continuously expanded, and the query optional fields are continuously increased.
  • comparing the original candidate field of the query database with the field in the newly added data table includes: when there is a newly added field in the newly added data table, calculating the similarity between the newly added field and each original candidate field , Obtain the target original candidate field whose similarity with the newly added field exceeds a preset threshold, establish an association relationship between the newly added field and the target original candidate field, and use the configuration information corresponding to the target original candidate field as the configuration information corresponding to the newly added field.
  • the original candidate field whose similarity exceeds the preset threshold is used as the target original candidate field, and only It is necessary to establish an association relationship between the newly added field and the target original candidate field.
  • the similar fields can be obtained according to the association relationship, so as to determine the target query method for the current field according to the configuration information of the similar field, and then The query obtains the corresponding query result.
  • steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a query device including: an acquisition module 310, a sub-query result determination module 320, a first target query result determination module 330, and a second target query result determination module 340 ,in:
  • the obtaining module 310 is configured to obtain a query string, and the query string includes a self-defined query expression.
  • the sub-query result determining module 320 is used to parse the query expression, and divide the query expression according to the connector in the query expression to obtain corresponding basic query units.
  • the basic query units include conditional sentences and field sentences to obtain According to the configuration information corresponding to the basic query unit, the basic query units with the same configuration information are formed into sub-query units according to the order of the basic query units.
  • the configuration information is used to determine the target query mode corresponding to the sub-query unit, and according to the target corresponding to the sub-query unit The query method obtains the sub-query result corresponding to the sub-query unit.
  • the first target query result determination module 330 is configured to combine the sub-query results to obtain the target query result corresponding to the query string when the sub-query result corresponding to each sub-query unit is a combined query result.
  • the second target query result determining module 340 is configured to, when the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first type sub-query unit and a second type sub-query unit, and the second type The sub-query unit has a corresponding second query result, the query database corresponding to the first type of sub-query unit is updated through the second query result, and the target query result corresponding to the query string is retrieved according to the updated query database.
  • the device further includes:
  • the processing module 350 is configured to detect the query string, and when there is an error in the query string, perform repair to obtain the repaired query string.
  • the repair includes at least one of the following methods: when the query string has an error field, Get the current conditional statement corresponding to the error field, delete the error field statement corresponding to the error field and the current condition statement; when the query string has redundant fields, delete the field statement corresponding to the redundant field; when the query string has a syntax error, Correct the wrong grammatical connector.
  • the sub-query result determining module 320 is further configured to determine that the target query database corresponding to the first-type sub-query unit is a relational database when the target query mode corresponding to the first-type sub-query unit is a precise query.
  • the target query mode corresponding to the second-type sub-query unit is a fuzzy query
  • the target query database corresponding to the second-type sub-query unit is determined to be a retrieval database, and the corresponding query is obtained in the retrieval database according to the second-type sub-query unit The second query result.
  • the second target query result determination module 340 is further configured to write the second query result into the relational database corresponding to the first type of sub-query unit, combine the sub-query units to form a complete query unit, and according to the complete query unit in the relational database The query obtains the target query result.
  • the device further includes:
  • the newly added field module 360 is used to obtain the newly added data table, and compare the original candidate fields in the query database with the fields in the newly added data table. When there are new fields in the newly added data table, the newly added fields will be regarded as new The addition of candidate fields is to match the corresponding configuration information for the newly added candidate fields.
  • the newly added field module 360 is also used to calculate the similarity between the newly added field and each original candidate field when there is a newly added field in the newly added data table, and obtain that the similarity with the newly added field exceeds the preset value.
  • Set the threshold of the target original candidate field establish the association relationship between the newly added field and the target original candidate field, and use the configuration information corresponding to the target original candidate field as the configuration information corresponding to the newly added field.
  • Each module in the above query device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a terminal.
  • the internal structure diagram of the computer device may be as shown in FIG. 4.
  • the computer device includes a processor, a memory, a network interface, an input Device and display screen.
  • the memory includes a storage medium and an internal memory.
  • the storage medium of the computer device stores an operating system, and may also store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a query method.
  • the internal memory may also store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor can execute the data processing method.
  • the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen. It can be an external keyboard, touchpad, or mouse.
  • the storage medium may be non-volatile or volatile.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 5.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a storage medium and an internal memory.
  • the storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the storage medium.
  • the database of the computer equipment is used to store data tables.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to implement a query method.
  • FIG. 4 and FIG. 5 are only block diagrams of part of the structure related to the solution of the present application, and do not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the computer device may include more or fewer components than shown in the figures, or combine certain components, or have a different component arrangement.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors perform the following steps: obtaining a query string,
  • the query string includes a self-defined query expression;
  • the query expression is parsed, and the query expression is divided according to the connector in the query expression to obtain corresponding basic query units.
  • the basic query units include conditional statements and field statements , Acquire the configuration information corresponding to the basic query unit, form the basic query units with the same configuration information into sub-query units according to the order of the basic query units, and the configuration information is used to determine the target query mode corresponding to the sub-query unit, according to the sub-query
  • the target query mode query corresponding to the unit obtains the sub-query result corresponding to the sub-query unit; when the sub-query result corresponding to each sub-query unit is a combined query result, the sub-query results are combined to obtain the target query result corresponding to the query string; And when the sub-query result corresponding to each sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit has a corresponding second For the query result, the query database corresponding to the first type of sub-query unit is updated through the second query result
  • the processor further implements the following steps when executing the computer-readable instructions: detecting the query string, and when there is an error in the query string, performing repairs to obtain the repaired query string.
  • the repair includes the following methods: At least one of: when the query string has an error field, get the current conditional statement corresponding to the error field, delete the error field statement and the current conditional statement corresponding to the error field; when the query string has redundant fields, set the redundant field corresponding to the The field statement is deleted; and when there is a syntax error in the query string, the wrong syntax connector is corrected.
  • the processor further implements the following steps when executing the computer-readable instructions: when the target query mode corresponding to the first type sub-query unit is a precise query, determining that the target query database corresponding to the first type sub-query unit is For relational databases, when the target query mode corresponding to the second-type sub-query unit is a fuzzy query, the target query database corresponding to the second-type sub-query unit is determined to be a search-type database, and the second-type sub-query unit is in the search-type database The query obtains the corresponding second query result. Write the second query result into the relational database corresponding to the first type of sub-query unit, combine the sub-query units to form a complete query unit, and query the relational database according to the complete query unit to obtain the target query result.
  • the processor further implements the following steps when executing the computer-readable instructions: acquiring a newly added data table, and comparing the original candidate fields of the query database with the fields in the newly added data table, when the newly added data When there is a new field in the table, the new field is used as a new candidate field to match the corresponding configuration information for the new candidate field.
  • the processor further implements the following steps when executing the computer-readable instructions: when there is a new field in the new data table, calculate the similarity between the new field and each original candidate field; and obtain and add For target original candidate fields whose field similarity exceeds a preset threshold, an association relationship between the newly added field and the target original candidate field is established, and the configuration information corresponding to the target original candidate field is used as the configuration information corresponding to the newly added field.
  • One or more computer-readable storage media storing computer-readable instructions.
  • one or more processors When the computer-readable instructions are executed by one or more processors, one or more processors are caused to perform the following steps: obtain query string, query string Including self-defined query expressions; parse the query expressions, divide the query expressions according to the connectors in the query expressions to obtain corresponding basic query units, the basic query units include conditional statements and field statements, and obtain the basic According to the configuration information corresponding to the query unit, basic query units with the same configuration information are formed into sub-query units according to the order of the basic query units.
  • the configuration information is used to determine the target query mode corresponding to the sub-query unit, and according to the target query corresponding to the sub-query unit
  • the sub-query result corresponding to the sub-query unit is obtained by way of query; when the sub-query result corresponding to each sub-query unit is a combined query result, the sub-query results are combined to obtain the target query result corresponding to the query string; and when each When the sub-query result corresponding to the sub-query unit is a quadratic query result, the sub-query unit includes a first-type sub-query unit and a second-type sub-query unit, and the second-type sub-query unit has a corresponding second query result,
  • the query database corresponding to the first type of sub-query unit is updated through the second query result, and the target query result corresponding to the query string is retrieved according to the updated query database.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the query string is detected, and when there is an error in the query string, repair is performed to obtain the repaired query string, and the repair includes the following methods At least one of: when the query string has an error field, obtain the current conditional statement corresponding to the error field, delete the error field statement and the current condition statement corresponding to the error field; and when the query string has redundant fields, replace the redundant fields The corresponding field statement is deleted; when there is a syntax error in the query string, the wrong syntax connector is corrected.
  • the following steps are further implemented: when the target query mode corresponding to the first type sub-query unit is a precise query, determine the target query database corresponding to the first type sub-query unit It is a relational database.
  • the target query mode corresponding to the second-type sub-query unit is fuzzy query, the target query database corresponding to the second-type sub-query unit is determined to be a search-type database. In the query, the corresponding second query result is obtained.
  • Write the second query result into the relational database corresponding to the first type of sub-query unit combine the sub-query units to form a complete query unit, and query the relational database according to the complete query unit to obtain the target query result.
  • the following steps are also implemented: obtain a newly added data table, compare the original candidate fields of the query database with the fields in the newly added data table, and when the new data table is newly added When there is a new field in the data table, the new field is used as a new candidate field to match the corresponding configuration information for the new candidate field.
  • the following steps are also implemented: when there is a new field in the newly added data table, calculate the similarity between the new field and each original candidate field; and obtain and new The target original candidate field whose similarity of the added field exceeds a preset threshold is established, the association relationship between the new field and the target original candidate field is established, and the configuration information corresponding to the target original candidate field is used as the configuration information corresponding to the new field.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种查询方法、装置、设备和存储介质,涉及大数据的数据库,该方法包括:获取查询字符串,包括自定义的查询表达式;解析查询表达式,根据连接符将查询表达式进行分割得到对应的包括条件语句和字段语句的基本查询单元,获取对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,配置信息用于确定子查询单元对应的目标查询方式,根据查询目标查询方式得到对应的子查询结果;当为组合型查询结果时,将各个子查询结果组合得到目标查询结果;当为二次型查询结果时,第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到目标查询结果。

Description

查询方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2020年03月20日提交中国专利局,申请号为202010199245.7,申请名称为“查询方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种查询方法、装置、计算机设备和存储介质。
背景技术
目前,查询功能的应用非常广泛,能够使用户方便快捷地找到自己想要的数据,所以大部分软件存在查询功能。
随着数据规模增大,发明人意识到,查询功能都有其共同的局限性,就是在查询条件上,都是先固定好查询字段或者是查询的全局字段,然后使用键值对对应的关系数据去查询。此方式的扩展性不强,不能够很好地动态扩展查询条件的键值,所以不能完全按照用户的想法去组合查询条件。若查询条件局限性大,则不能灵活的方便用户查询,提供一种支持动态扩展查询条件,且方便用户使用的查询方法尤为重要。
发明内容
根据本申请公开的各种实施例,提供一种查询方法、装置、计算机设备和存储介质。
一种查询方法,所述方法包括:
获取查询字符串,所述查询字符串包括自定义的查询表达式;
解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结 果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
一种查询装置,所述装置包括:
获取模块,用于获取查询字符串,所述查询字符串包括自定义的查询表达式;
子查询结果确定模块,用于解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
第一目标查询结果确定模块,用于当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
第二目标查询结果确定模块,用于当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取查询字符串,所述查询字符串包括自定义的查询表达式;
解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取查询字符串,所述查询字符串包括自定义的查询表达式;
解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中查询方法的应用环境图;
图2为根据一个或多个实施例中查询方法的流程示意图;
图3为根据一个或多个实施例中查询装置的结构框图;
图4为根据一个或多个实施例中计算机设备的内部结构图;
图5为另一个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的查询方法,可以应用于如图1所示的应用环境中。图1为一个实施例中查询方法运行的应用环境图。如图1所示,该应用环境包括终端110、服务器120。终端、服务器之间通过网络进行通信,通信网络可以是无线或者有线通信网络,例如IP网络、蜂窝移动通信网络等,其中终端和服务器的个数不限。
终端110可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携 式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。查询方法可以应用于终端也可以应用于服务器。当应用于服务器时,可以由终端接收输入的查询字符串,将携带查询字符串的查询请求发送至服务器,服务器根据查询字符串确定对应的目标查询结果。终端或服务器上可以存在多个不同类型的查询数据库供不同配置信息的基本查询单元进行查询。
在其中一个实施例中,如图2所示,提供了一种查询方法,以该方法应用于图1中的终端110或服务器120为例进行说明,包括以下步骤:
步骤210,获取查询字符串,查询字符串包括自定义的查询表达式。
查询字符串用于描述查询条件,可根据查询的内容自定义。
具体地,查询字符串包括自定义的查询表达式,从而用户可以很灵活的组合查询条件。例如:“男[性别]AND湖南[地址]OR肝癌[电子病历]”,其中,以空格作为条件和连接符的分割,中括号左边的数据是查询条件语句,中括号里面的数据是需要查询的字段,AND和OR是各条件之间的连接符,可通过专门的解析工具对自定义的查询表达式进行解析,所有的查询条件和查询字段都由用户自主控制,自由组合,极大地提高了查询的灵活性。
可通过统一的输入入口接收查询字符串,查询字符串的字段可根据查询的内容自定义,如对于医药数据的查询,字段语句可包括病种名称、药品名称等。对于多媒体数据的查询,字段语句可包括电影名称、歌曲名称等。对于交通信息的查询,字段语句可包括路段名称,地名等。当查询方法应用于终端时,通过查询界面接收查询字符串,当查询方法应用于服务器时,可接收终端发送的查询请求,查询请求中包括查询字符串。
在其中一个实施例中,在查询页面包括字段提示信息,字段提示信息包括候选查询字段,便于用户从候选查询字段选择目标查询字段,确定目标查询字段确定对应的查询条件语句,从而组成自定义的查询表达式。
步骤220,解析查询表达式,根据查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果。
具体地,解析查询表达式时可自定义解析算法,如从左向右依次解析,识别分割符,得到各个基本查询单元,基本查询单元包括字段语句,可预先对不同类型的字段语句配置不同类型的配置信息,配置信息用于确定目标查询方式,目标查询方式包括查询数据源、查询数据表、查询数据库等。如性别,名字这种具有准确信息的字段配置第一类型数据库,病种由于在不同的国家和地区可能具有多个不同的相似的名称,所以对于病种字段则配置第二类型数据库。还可对不同的字段配置不同的查询数据表,预存字段名称与查询数据表标识、查询数据源标识、查询数据库标识的匹配关系。
从而根据匹配关系将基本查询单元进行组合,可根据基本查询单元的配置,具有相 同配置的基本查询单元,组合时注意各个基本查询单元的顺序,即连续出现且具有相同目标查询方式的基本查询单元组合形成一个子查询单元,如第一基本查询单元和第二基本查询单元是相邻的基本查询单元,且具有相同的查询数据库,则第一基本查询单元和第二基本查询单元形成第一子查询单元。
通过将相同配置信息的基本查询单元形成子查询单元,由于子查询单元具有相同的目标查询方式,如相同的查询数据库,相同的查询方式,从而将多个基本查询单元的查询转换为通过子查询单元进行一次查询,提高了查询效率。
步骤230,当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到查询字符串对应的目标查询结果。
具体地,当子查询单元包括多个时,对应多个子查询结果,可通过自定义的算法对各个子查询结果进行处理得到查询字符串对应的目标查询结果。处理的方式不限定,当各个子查询单元对应的子查询结果为组合型查询结果时,直接将各个子查询结果进行组合得到查询字符串对应的目标查询结果。
步骤240,当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到查询字符串对应的目标查询结果。
具体地,二次型查询结果表示需要根据子查询结果再次查询确定对应的目标查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,更新操作可自定义,包括修改,写入等,将查询字符串在更新后的第一类型子查询单元对应的查询数据库中进行查询得到查询字符串对应的目标查询结果。
本实施例中,通过获取查询字符串,查询字符串包括自定义的查询表达式,解析查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,配置信息用于确定子查询单元对应的目标查询方式,根据子查询单元对应的目标查询方式得到子查询单元对应的子查询结果;当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到查询字符串对应的目标查询结果,通过自定义的查询表达式查询条件和查询字段都由用户自主控制,自由组合,支持查询数据的动态扩展,且通过配置信息将各个基本查询单元形成对应的子查询单元,不同的子查询单元具有不同的目标查询方式,通过目标查询方式得到各个子查询单对应的子查询结果,再整合得到目标查询结果,只需要修改配置数据,从而修改基本查询单元对应的配置信息, 就能达到修改查询结构的目的,灵活方便,提高了查询的可扩展性和便利性。
在其中一个实施例中,获取查询字符串之后,方法还包括:对查询字符串进行检测,当查询字符串存在错误时,进行修复得到修复后的查询字符串,修复包括以下方式中的至少一种:当查询字符串存在错误字段时,获取错误字段对应的当前条件语句,删除错误字段对应的错误字段语句和当前条件语句;当查询字符串存在多余字段时,将多余字段对应的字段语句进行删除;当查询字符串存在语法错误时,将错误的语法连接符进行修正。
具体地,错误字段是指在查询数据库中不存在的字段,在其中一个实施例中,当字段语句对应的当前字段在查询数据库中不存在时,获取当前字段对应的相似字段,当相似字段在查询数据库中不存在时,判定当前字段为错误字段。从而对用户自主输入的字段进行相似字段的修正,提高了检索的灵活性。当存在错误字段时,由于无法查询得到匹配的结果,则需要将错误字段对应的错误字段语句和当前条件语句进行删除。其中,未知字段可以为错误字段的一种。多余字段是指查询字符串中多出的字段,如一个条件语句对应多个字段语句,则不知条件语句具体对应哪个字段,需要将多出的字段进行删除。如男[性别]30[年龄][金额],其中[年龄][金额]中需要删除一个,删除时可将与条件语句距离较远的字段删除或将多余字段与上下文字段进行匹配,匹配成功的保留,不成功的删除。如上下文字段为娱乐类字段,多余字段为医学类字段,则明显匹配不成功。语法错误包括少写了关联词AND\OR,如男[性别]30[年龄],或者多个AND\OR直接相连如男[性别]AND OR AND30[年龄]等连接符使用错误。
本实施例中,通过对查询字符串进行检测修复,提高了查询的容错能力。
在其中一个实施例中,步骤220包括:当第一类型子查询单元对应的目标查询方式为精准查询时,确定第一类型子查询单元对应的目标查询数据库为关系型数据库,当第二类型子查询单元对应的目标查询方式为模糊查询时,确定第二类型子查询单元对应的目标查询数据库为检索型数据库,根据第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果。
具体地,关系型数据库查询比较固定,适用于姓名手机号等固定查询,如ORCLE数据库,检索型数据库用于模糊查询,类似于百度搜索,如SOLR数据库。当配置为精准查询方式时,适合在关系型数据库中进行查询,当配置为模糊查询时,适合在检索型数据库中进行查询,得到第二查询结果。如男[性别]AND湖南[地址]OR肝癌[电子病历]可配置为‘肝癌[电子病历]’去SOLR数据库查询,其余条件去ORACLE中查询。
步骤240包括:将第二查询结果写入第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据完整查询单元在关系型数据库中查询得到目标查询结果。
具体地,将第二查询结果写入关系型数据库,如可以将SOLR数据库中查询得到的第二查询结果转换为ORACLE数据库可识别的数据写入ORACLE数据库,再用男[性别]AND湖南[地址]OR肝癌[电子病历]完整的字符串,用ORACLE方式去查询得到目标查 询结果。
本实施例中,查询表达式能够通过解析,把数据拆解成各种子查询单元,然后根据配置到不同类型的数据库中查询数据,最后把查询的数据整合在一起,将不同的字段配置不同的数据库,提高了查询的准确度,能自适应地进行查询。
在其中一个实施例中,方法还包括:获取新增数据表,将查询数据库的原始候选字段与新增数据表中的字段进行对比,当新增数据表中存在新增字段时,将新增字段作为新增候选字段,为新增候选字段匹配对应的配置信息。
具体地,原始候选字段可以为数据库的初始默认候选字段,也可以为历史候选字段。因为不同的用户数据不同,初始默认候选字段可能无法满足用户的数据中的字段要求,则当用户的新增数据表中存在查询数据库的原始候选字段中不存在的字段时,需要将新增字段添加为新增候选字段。并为新增候选字段匹配对应的配置信息,配置信息包括查询方式,查询数据库等。从而在后续查询时,对于新增字段采用与配置信息匹配的目标查询方式进行查询。候选字段可显示在查询页面中作为字段提示信息,便于用户从候选字段选择目标查询字段。
本实施例中,当存在新增字段时,为新增候选字段匹配对应的配置信息,使得查询数据库不断的扩展,查询的可选字段不断地增加。
在其中一个实施例中,将查询数据库的原始候选字段与新增数据表中的字段进行对比包括:当新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度,获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为新增字段对应的配置信息。
具体地,当新增字段与原始候选字段的相似度超过预设阈值时,说明新增字段与原始候选字段为近义词,则将相似度超过预设阈值的原始候选字段作为目标原始候选字段,只需建立新增字段与目标原始候选字段的关联关系,后续在查询时,查询一个当前字段时可根据关联关系获取与其相似的字段,从而根据相似字段的配置信息为当前字段确定目标查询方式,进而查询得到对应的查询结果。通过相似字段的匹配,减少了无意义的新增字段,提高了查询的配置效率。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图3所示,提供了一种查询装置,包括:获取模块310、子 查询结果确定模块320、第一目标查询结果确定模块330,第二目标查询结果确定模块340,其中:
获取模块310,用于获取查询字符串,查询字符串包括自定义的查询表达式。
子查询结果确定模块320,用于解析查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据子查询单元对应的目标查询方式得到子查询单元对应的子查询结果。
第一目标查询结果确定模块330,用于当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到查询字符串对应的目标查询结果。
第二目标查询结果确定模块340,用于当各个子查询单元对应的子查询结果为二次型查询结果时,子查询单元包括第一类型子查询单元和第二类型子查询单元,第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
在其中一个实施例中,装置还包括:
处理模块350,用于对查询字符串进行检测,当查询字符串存在错误时,进行修复得到修复后的查询字符串,修复包括以下方式中的至少一种:当查询字符串存在错误字段时,获取错误字段对应的当前条件语句,删除错误字段对应的错误字段语句和当前条件语句;当查询字符串存在多余字段时,将多余字段对应的字段语句进行删除;当查询字符串存在语法错误时,将错误的语法连接符进行修正。
在其中一个实施例中,子查询结果确定模块320还用于当第一类型子查询单元对应的目标查询方式为精准查询时,确定第一类型子查询单元对应的目标查询数据库为关系型数据库,当第二类型子查询单元对应的目标查询方式为模糊查询时,确定第二类型子查询单元对应的目标查询数据库为检索型数据库,根据第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果。
第二目标查询结果确定模块340还用于将第二查询结果写入第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据完整查询单元在关系型数据库中查询得到目标查询结果。
在其中一个实施例中,装置还包括:
新增字段模块360,用于获取新增数据表,将查询数据库的原始候选字段与新增数据表中的字段进行对比,当新增数据表中存在新增字段时,将新增字段作为新增候选字段,为新增候选字段匹配对应的配置信息。
在其中一个实施例中,新增字段模块360还用于当新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度,获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应 的配置信息作为新增字段对应的配置信息。
关于查询装置的具体限定可以参见上文中对于查询方法的限定,在此不再赘述。上述查询装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图4所示,该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、输入装置和显示屏。其中,存储器包括存储介质和内存储器。该计算机设备的存储介质存储有操作系统,还可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种查询方法。该内存储器中也可储存有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行数据处理方法。计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。存储介质可以是非易失性,也可以是易失性的。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括存储介质、内存储器。该存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储数据表。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种查询方法。
本领域技术人员可以理解,图4、图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:获取查询字符串,查询字符串包括自定义的查询表达式;解析查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据子查询单元对应的目标查询方式查询得到子查询单元对应的子查询结果;当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到查询字符串对 应的目标查询结果;及当各个子查询单元对应的子查询结果为二次型查询结果时,子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到查询字符串对应的目标查询结果。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:对查询字符串进行检测,当查询字符串存在错误时,进行修复得到修复后的查询字符串,修复包括以下方式中的至少一种:当查询字符串存在错误字段时,获取错误字段对应的当前条件语句,删除错误字段对应的错误字段语句和当前条件语句;当查询字符串存在多余字段时,将多余字段对应的字段语句进行删除;及当查询字符串存在语法错误时,将错误的语法连接符进行修正。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:当第一类型子查询单元对应的目标查询方式为精准查询时,确定第一类型子查询单元对应的目标查询数据库为关系型数据库,当第二类型子查询单元对应的目标查询方式为模糊查询时,确定第二类型子查询单元对应的目标查询数据库为检索型数据库,根据第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果。将第二查询结果写入第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据完整查询单元在关系型数据库中查询得到目标查询结果。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:获取新增数据表,将查询数据库的原始候选字段与所述新增数据表中的字段进行对比,当新增数据表中存在新增字段时,将新增字段作为新增候选字段,为新增候选字段匹配对应的配置信息。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:当新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度;及获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为新增字段对应的配置信息。
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取查询字符串,查询字符串包括自定义的查询表达式;解析查询表达式,根据查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到查询字符串对应的目标查询结果;及当各个子查询单元对应的子查询结果为二次型查询结果时,子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查 询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到查询字符串对应的目标查询结果。
其中,该计算机可读存储介质可以是非易失性,也可以是易失性的。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:对查询字符串进行检测,当查询字符串存在错误时,进行修复得到修复后的查询字符串,修复包括以下方式中的至少一种:当查询字符串存在错误字段时,获取错误字段对应的当前条件语句,删除错误字段对应的错误字段语句和当前条件语句;及当查询字符串存在多余字段时,将多余字段对应的字段语句进行删除;当查询字符串存在语法错误时,将错误的语法连接符进行修正。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:当第一类型子查询单元对应的目标查询方式为精准查询时,确定第一类型子查询单元对应的目标查询数据库为关系型数据库,当第二类型子查询单元对应的目标查询方式为模糊查询时,确定第二类型子查询单元对应的目标查询数据库为检索型数据库,根据第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果。将第二查询结果写入第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据完整查询单元在关系型数据库中查询得到目标查询结果。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取新增数据表,将查询数据库的原始候选字段与所述新增数据表中的字段进行对比,当新增数据表中存在新增字段时,将新增字段作为新增候选字段,为新增候选字段匹配对应的配置信息。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:当新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度;及获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为新增字段对应的配置信息。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (18)

  1. 一种查询方法,包括:
    获取查询字符串,所述查询字符串包括自定义的查询表达式;
    解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句;
    获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式;
    根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
    当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
    当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
  2. 根据权利要求1所述的方法,其中,所述获取查询字符串之后,还包括:
    对所述查询字符串进行检测,当所述查询字符串存在错误时,进行修复得到修复后的查询字符串,所述修复包括以下方式中的至少一种:
    当所述查询字符串存在错误字段时,获取所述错误字段对应的当前条件语句,删除所述错误字段对应的错误字段语句和当前条件语句;
    当所述查询字符串存在多余字段时,将所述多余字段对应的字段语句进行删除;及
    当所述查询字符串存在语法错误时,将错误的语法连接符进行修正。
  3. 根据权利要求1所述的方法,其中,所述根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果包括:
    当所述第一类型子查询单元对应的目标查询方式为精准查询时,确定所述第一类型子查询单元对应的目标查询数据库为关系型数据库,当所述第二类型子查询单元对应的目标查询方式为模糊查询时,确定所述第二类型子查询单元对应的目标查询数据库为检索型数据库,根据所述第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果;
    所述当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果包括:
    将所述第二查询结果写入所述第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据所述完整查询单元在关系型数据库中查询得到所述目标查询结果。
  4. 根据权利要求1所述的方法,其中,所述方法还包括:
    获取新增数据表,将所述查询数据库的原始候选字段与所述新增数据表中的字段进行对比,当所述新增数据表中存在新增字段时,将所述新增字段作为新增候选字段,为所述新增候选字段匹配对应的配置信息。
  5. 根据权利要求4所述的方法,其中,所述将所述查询数据库的原始候选字段与所述新增数据表中的字段进行对比包括:
    当所述新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度;及
    获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为所述新增字段对应的配置信息。
  6. 一种查询装置,包括:
    获取模块,用于获取查询字符串,所述查询字符串包括自定义的查询表达式;
    子查询结果确定模块,用于解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句,获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式,根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
    第一目标查询结果确定模块,用于当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
    第二目标查询结果确定模块,用于当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
  7. 根据权利要求6所述的装置,其中,所述装置还包括:
    处理模块,用于对所述查询字符串进行检测,当所述查询字符串存在错误时,进行修复得到修复后的查询字符串,所述修复包括以下方式中的至少一种:当所述查询字符串存在错误字段时,获取所述错误字段对应的当前条件语句,删除所述错误字段对应的错误字段语句和当前条件语句;当所述查询字符串存在多余字段时,将所述多余字段对应的字段语句进行删除;当所述查询字符串存在语法错误时,将错误的语法连接符进行修正。
  8. 根据权利要求6所述的装置,其中,所述子查询结果确定模块还用于当所述第一类型子查询单元对应的目标查询方式为精准查询时,确定所述第一类型子查询单元对应的目标查询数据库为关系型数据库,当所述第二类型子查询单元对应的目标查询方式为模糊查询时,确定所述第二类型子查询单元对应的目标查询数据库为检索型数据库,根据所述 第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果;及
    所述第二目标查询结果确定模块还用于将所述第二查询结果写入所述第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据所述完整查询单元在关系型数据库中查询得到所述目标查询结果。
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取查询字符串,所述查询字符串包括自定义的查询表达式;
    解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句;
    获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式;
    根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
    当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
    当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
  10. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    对所述查询字符串进行检测,当所述查询字符串存在错误时,进行修复得到修复后的查询字符串,所述修复包括以下方式中的至少一种:
    当所述查询字符串存在错误字段时,获取所述错误字段对应的当前条件语句,删除所述错误字段对应的错误字段语句和当前条件语句;
    当所述查询字符串存在多余字段时,将所述多余字段对应的字段语句进行删除;及
    当所述查询字符串存在语法错误时,将错误的语法连接符进行修正。
  11. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当所述第一类型子查询单元对应的目标查询方式为精准查询时,确定所述第一类型子查询单元对应的目标查询数据库为关系型数据库,当所述第二类型子查询单元对应的目标查询方式为模糊查询时,确定所述第二类型子查询单元对应的目标查询数据库为检索型数据库,根据所述第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果;及
    将所述第二查询结果写入所述第一类型子查询单元对应的关系型数据库,将各个子查 询单元组合形成完整查询单元,根据所述完整查询单元在关系型数据库中查询得到所述目标查询结果。
  12. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取新增数据表,将所述查询数据库的原始候选字段与所述新增数据表中的字段进行对比,当所述新增数据表中存在新增字段时,将所述新增字段作为新增候选字段,为所述新增候选字段匹配对应的配置信息。
  13. 根据权利要求12所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当所述新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度;及
    获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为所述新增字段对应的配置信息。
  14. 一个或多个存储有计算机可读指令的计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取查询字符串,所述查询字符串包括自定义的查询表达式;
    解析所述查询表达式,根据所述查询表达式中的连接符将查询表达式进行分割得到对应的基本查询单元,所述基本查询单元包括条件语句和字段语句;
    获取所述基本查询单元对应的配置信息,根据基本查询单元的顺序将相同配置信息的基本查询单元形成子查询单元,所述配置信息用于确定子查询单元对应的目标查询方式;
    根据所述子查询单元对应的目标查询方式查询得到所述子查询单元对应的子查询结果;
    当各个子查询单元对应的子查询结果为组合型查询结果时,将各个子查询结果组合得到所述查询字符串对应的目标查询结果;及
    当各个子查询单元对应的子查询结果为二次型查询结果时,所述子查询单元包括第一类型子查询单元和第二类型子查询单元,所述第二类型子查询单元存在对应的第二查询结果,通过第二查询结果更新第一类型子查询单元对应的查询数据库,根据更新的查询数据库检索得到所述查询字符串对应的目标查询结果。
  15. 根据权利要求14所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    对所述查询字符串进行检测,当所述查询字符串存在错误时,进行修复得到修复后的查询字符串,所述修复包括以下方式中的至少一种:
    当所述查询字符串存在错误字段时,获取所述错误字段对应的当前条件语句,删除所述错误字段对应的错误字段语句和当前条件语句;
    当所述查询字符串存在多余字段时,将所述多余字段对应的字段语句进行删除;及
    当所述查询字符串存在语法错误时,将错误的语法连接符进行修正。
  16. 根据权利要求14所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当所述第一类型子查询单元对应的目标查询方式为精准查询时,确定所述第一类型子查询单元对应的目标查询数据库为关系型数据库,当所述第二类型子查询单元对应的目标查询方式为模糊查询时,确定所述第二类型子查询单元对应的目标查询数据库为检索型数据库,根据所述第二类型子查询单元在检索型数据库中查询得到对应的第二查询结果;及
    将所述第二查询结果写入所述第一类型子查询单元对应的关系型数据库,将各个子查询单元组合形成完整查询单元,根据所述完整查询单元在关系型数据库中查询得到所述目标查询结果。
  17. 根据权利要求14所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取新增数据表,将所述查询数据库的原始候选字段与所述新增数据表中的字段进行对比,当所述新增数据表中存在新增字段时,将所述新增字段作为新增候选字段,为所述新增候选字段匹配对应的配置信息。
  18. 根据权利要求17所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当所述新增数据表中存在新增字段时,计算新增字段与各个原始候选字段的相似度;及
    获取与新增字段的相似度超过预设阈值的目标原始候选字段,建立新增字段与目标原始候选字段的关联关系,将目标原始候选字段对应的配置信息作为所述新增字段对应的配置信息。
PCT/CN2020/098680 2020-03-20 2020-06-29 查询方法、装置、计算机设备和存储介质 WO2021184572A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010199245.7 2020-03-20
CN202010199245.7A CN111459978A (zh) 2020-03-20 2020-03-20 查询方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021184572A1 true WO2021184572A1 (zh) 2021-09-23

Family

ID=71680102

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098680 WO2021184572A1 (zh) 2020-03-20 2020-06-29 查询方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN111459978A (zh)
WO (1) WO2021184572A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265874A (zh) * 2022-03-02 2022-04-01 北京奥星贝斯科技有限公司 查询数据的方法和装置
CN114416779A (zh) * 2022-03-21 2022-04-29 北京德塔精要信息技术有限公司 一种数据处理方法、装置及系统
CN114969450A (zh) * 2022-04-19 2022-08-30 北京优特捷信息技术有限公司 一种用户行为分析方法、装置、设备及存储介质
CN115145943A (zh) * 2022-09-06 2022-10-04 北京麦聪软件有限公司 多数据源元数据快速比对方法、系统、设备和存储介质
CN115455103A (zh) * 2022-10-20 2022-12-09 广州明动软件股份有限公司 基于动态化接口引擎的动态查询系统及方法
CN116049153A (zh) * 2022-12-12 2023-05-02 本原数据(北京)信息技术有限公司 时序数据处理方法、装置、电子设备及存储介质
CN116303627A (zh) * 2023-05-22 2023-06-23 上海孤波科技有限公司 半导体测试数据的查询方法、装置、电子设备及存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667689A (zh) * 2021-01-04 2021-04-16 拉卡拉支付股份有限公司 数据查询方法、装置、电子设备、存储介质及程序产品
CN113064919B (zh) * 2021-03-31 2022-11-22 北京达佳互联信息技术有限公司 数据处理方法、数据存储系统、计算机设备及存储介质
CN113094356A (zh) * 2021-04-13 2021-07-09 北京精鸿软件科技有限公司 数据库表的设计方法、装置、可读存储介质及电子设备
CN113673256A (zh) * 2021-07-21 2021-11-19 阿里巴巴达摩院(杭州)科技有限公司 问询语句改写方法及装置
CN114020765A (zh) * 2021-11-04 2022-02-08 广州易方信息科技股份有限公司 绩效数据提取方法、装置、计算机设备和存储介质
CN116932838B (zh) * 2023-09-13 2023-11-24 浙江寰福科技有限公司 基于数据库的数据查询、更新、存储方法和装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1462959A2 (en) * 2003-03-28 2004-09-29 Microsoft Corporation System and method for invalidation of cached query results
CN1588358A (zh) * 2004-08-26 2005-03-02 陈红 对mdx多维数据查询语句的处理方法和系统
CN1851700A (zh) * 2005-11-01 2006-10-25 华为技术有限公司 一种查询方法和系统以及一种查询转换装置
CN101894143A (zh) * 2010-06-28 2010-11-24 北京用友政务软件有限公司 一种联邦检索及检索结果集成展现方法及系统
CN104765731A (zh) * 2014-01-02 2015-07-08 国际商业机器公司 数据库查询优化方法和设备
CN108509547A (zh) * 2018-03-20 2018-09-07 中国长城科技集团股份有限公司 一种信息管理方法、信息管理系统及电子设备
CN109710655A (zh) * 2018-11-09 2019-05-03 中国平安人寿保险股份有限公司 数据库查询方法、装置、终端设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1462959A2 (en) * 2003-03-28 2004-09-29 Microsoft Corporation System and method for invalidation of cached query results
CN1588358A (zh) * 2004-08-26 2005-03-02 陈红 对mdx多维数据查询语句的处理方法和系统
CN1851700A (zh) * 2005-11-01 2006-10-25 华为技术有限公司 一种查询方法和系统以及一种查询转换装置
CN101894143A (zh) * 2010-06-28 2010-11-24 北京用友政务软件有限公司 一种联邦检索及检索结果集成展现方法及系统
CN104765731A (zh) * 2014-01-02 2015-07-08 国际商业机器公司 数据库查询优化方法和设备
CN108509547A (zh) * 2018-03-20 2018-09-07 中国长城科技集团股份有限公司 一种信息管理方法、信息管理系统及电子设备
CN109710655A (zh) * 2018-11-09 2019-05-03 中国平安人寿保险股份有限公司 数据库查询方法、装置、终端设备及存储介质

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265874A (zh) * 2022-03-02 2022-04-01 北京奥星贝斯科技有限公司 查询数据的方法和装置
CN114265874B (zh) * 2022-03-02 2022-05-03 北京奥星贝斯科技有限公司 查询数据的方法和装置
CN114416779A (zh) * 2022-03-21 2022-04-29 北京德塔精要信息技术有限公司 一种数据处理方法、装置及系统
CN114969450A (zh) * 2022-04-19 2022-08-30 北京优特捷信息技术有限公司 一种用户行为分析方法、装置、设备及存储介质
CN114969450B (zh) * 2022-04-19 2023-06-27 北京优特捷信息技术有限公司 一种用户行为分析方法、装置、设备及存储介质
CN115145943A (zh) * 2022-09-06 2022-10-04 北京麦聪软件有限公司 多数据源元数据快速比对方法、系统、设备和存储介质
CN115455103A (zh) * 2022-10-20 2022-12-09 广州明动软件股份有限公司 基于动态化接口引擎的动态查询系统及方法
CN115455103B (zh) * 2022-10-20 2023-04-07 广州明动软件股份有限公司 基于动态化接口引擎的动态查询系统及方法
CN116049153A (zh) * 2022-12-12 2023-05-02 本原数据(北京)信息技术有限公司 时序数据处理方法、装置、电子设备及存储介质
CN116049153B (zh) * 2022-12-12 2023-08-25 本原数据(北京)信息技术有限公司 数据库的数据处理方法、装置、电子设备及存储介质
CN116303627A (zh) * 2023-05-22 2023-06-23 上海孤波科技有限公司 半导体测试数据的查询方法、装置、电子设备及存储介质
CN116303627B (zh) * 2023-05-22 2023-09-19 上海孤波科技有限公司 半导体测试数据的查询方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN111459978A (zh) 2020-07-28

Similar Documents

Publication Publication Date Title
WO2021184572A1 (zh) 查询方法、装置、计算机设备和存储介质
US10866971B2 (en) Hash collision tables for relational operations
US9378233B2 (en) For all entries processing
WO2019085474A1 (zh) 计算引擎实现方法、电子装置及存储介质
US8666969B2 (en) Query rewrite for pre-joined tables
CN109471857B (zh) 基于sql语句的数据修改方法、装置及存储介质
US10776571B2 (en) Dispatch of user input to multiple input fields in a user interface
US11030242B1 (en) Indexing and querying semi-structured documents using a key-value store
CN106407360B (zh) 一种数据的处理方法及装置
US10296497B2 (en) Storing a key value to a deleted row based on key range density
WO2020206910A1 (zh) 产品信息推送方法、装置、计算机设备和存储介质
MX2013014800A (es) Recomendacion de enriquecimientos de datos.
US10585896B2 (en) Managing data in relational database management system
WO2021179722A1 (zh) Sql语句解析方法、系统、计算机设备和存储介质
WO2021031687A1 (zh) 数据库分库分表的分页查询方法、装置和计算机设备
WO2021217846A1 (zh) 接口数据处理方法、装置、计算机设备和存储介质
CN113051268A (zh) 数据查询方法、数据查询装置、电子设备及存储介质
EP3926484B1 (en) Improved fuzzy search using field-level deletion neighborhoods
WO2021169626A1 (zh) 基于词库的匹配推荐方法、装置、设备及存储介质
US10936640B2 (en) Intelligent visualization of unstructured data in column-oriented data tables
JP2020123320A (ja) インデックスを管理するための方法、装置、設備及び記憶媒体
WO2021218033A1 (zh) 一种字典数据操作方法、装置、可读存储介质及终端设备
CN110874364B (zh) 一种查询语句处理方法、装置、设备及存储介质
US20150324480A1 (en) Lock-free parallel dictionary encoding
CN114138817A (zh) 基于关系型数据库的数据查询方法、设备、介质及产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20926299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 11/01/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20926299

Country of ref document: EP

Kind code of ref document: A1