CN118152423A - Intelligent query method, intelligent query device, electronic equipment and readable storage medium - Google Patents

Intelligent query method, intelligent query device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN118152423A
CN118152423A CN202410236759.3A CN202410236759A CN118152423A CN 118152423 A CN118152423 A CN 118152423A CN 202410236759 A CN202410236759 A CN 202410236759A CN 118152423 A CN118152423 A CN 118152423A
Authority
CN
China
Prior art keywords
data
query instruction
data query
target database
description information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202410236759.3A
Other languages
Chinese (zh)
Inventor
尹雷
陈勇
林坤达
孙海南
潘国仰
叶继秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Geely Automobile Research Institute Ningbo Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Geely Automobile Research Institute Ningbo Co Ltd
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 Zhejiang Geely Holding Group Co Ltd, Geely Automobile Research Institute Ningbo Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202410236759.3A priority Critical patent/CN118152423A/en
Publication of CN118152423A publication Critical patent/CN118152423A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides an intelligent query method, an intelligent query device, electronic equipment and a readable storage medium, wherein the intelligent query method comprises the following steps: acquiring description information related to data requirements input by a user; analyzing the description information and extracting at least one data demand parameter in the description information; determining a target database for executing the data query instruction based on the data demand parameter, and generating the data query instruction; and executing the data query instruction in the target database to acquire data.

Description

Intelligent query method, intelligent query device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an intelligent query method, an intelligent query device, an electronic device, and a readable storage medium.
Background
As the production and business of enterprises continue to increase, more and more data is deposited and accumulated, the composition of data assets becomes more and more complex, and the following data query positioning and calculation requirements become more and more complex. In order to simplify the complexity of data extraction, enterprises meet the data use requirements of business departments, and have to develop a large number of data application functions in a data center. As a result, data application functions or data reports of the data center station are more and more, and management is more and more difficult.
Disclosure of Invention
The application provides an intelligent query method, which comprises the following steps:
acquiring description information related to data requirements input by a user;
Analyzing the description information and extracting at least one data demand parameter in the description information;
determining a target database for executing the data query instruction based on the data demand parameter, and generating the data query instruction;
and executing the data query instruction in the target database to acquire data.
Optionally, determining a target database for executing the data query instruction based on the data requirement parameter, and generating the data query instruction includes:
Formatting the data demand parameters, inputting a pre-trained query instruction generation model, determining a target database for executing the query instruction by the query instruction generation model, and generating a data query instruction; the query instruction generation model comprises a machine learning model which is subjected to supervised training based on metadata of a plurality of databases as training samples.
Optionally, the method further comprises:
And inputting the query result obtained based on the data query instruction and the data query instruction as a training sample into the query instruction generation model for training.
Optionally, the data query instruction further includes an environmental parameter of an execution environment of the data query instruction;
executing the data query instruction in the target database to obtain data, including:
determining a driver corresponding to the target database based on the environmental parameter;
And creating a driving instance corresponding to the driving program, and connecting a target database based on the driving instance so as to execute the data query instruction in the target database to acquire data.
Optionally, executing the data query instruction in the target database to obtain data includes:
Checking keywords in the data query instruction and the content of the data query instruction, and determining whether the data query instruction has a security risk or not;
if the data query instruction does not have the security risk, determining whether the data query instruction can be executed or not based on the keyword and the grammar corresponding to the data query instruction;
if the data query instruction can be executed, checking whether the performance of the data query instruction meets the preset requirement;
And if the performance of the data query instruction meets the preset requirement, executing the data query instruction in the target database to acquire data.
Optionally, the method further comprises:
and acquiring a query result of the data query instruction, and generating a visualized data analysis legend based on the query result.
Optionally, the acquiring the description information related to the data requirement input by the user includes:
acquiring descriptive information related to data requirements in text form input by a user, or,
And acquiring the description information of the audio form input by the user through voice, and converting the description information of the audio form related to the data requirement into the description information of the text form.
The application also provides an intelligent query device, which comprises:
the descriptive information acquisition unit is used for acquiring descriptive information related to data requirements input by a user;
The description information analysis unit is used for analyzing the description information and extracting at least one data demand parameter in the description information;
The query instruction generating unit is used for determining a target database for executing the data query instruction based on the data demand parameters and generating the data query instruction;
and the data query unit is used for executing the data query instruction in the target database to acquire data.
The application also provides electronic equipment, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
The memory stores machine readable instructions and the processor performs the method by invoking the machine readable instructions.
The present application also provides a computer readable storage medium storing machine readable instructions that when invoked and executed by a processor implement the above-described method.
In the scheme described in the above embodiment, the data query instruction is automatically generated by analyzing the description information input by the user, and the corresponding database query data is automatically located. The method has the advantages that the data can be obtained from the database through an automatic process only by inputting the description information related to the requirements, the time cost of writing the data query instruction by the developer is reduced, and the data obtaining efficiency of the user is improved.
Drawings
Fig. 1 is a flow chart of an intelligent query method according to an exemplary embodiment.
Fig. 2 is an application schematic diagram of an intelligent query method according to an exemplary embodiment.
Fig. 3 is a hardware configuration diagram of an electronic device in which an intelligent query apparatus is located according to an exemplary embodiment.
FIG. 4 is a block diagram of an intelligent query apparatus provided in an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
Referring to fig. 1, fig. 1 is a flow chart of an intelligent query method according to an exemplary embodiment. The method may comprise the steps of:
Step 102, acquiring description information related to data requirements input by a user.
In this specification, a user may input descriptive information related to data requirements through a query interface related to data queries. The description information related to the data requirement may specifically include data required by the user.
For example, the user may enter descriptive information related to the data demand "i need sales of car a in 2023".
In one embodiment, a query interface associated with a data query may provide a text box or input box in which a user enters text. And obtains text information input by the user through the text box or the input box.
The user can also query the voice input interface provided by the interface, input through voice, and convert the voice into text by the voice recognition technology, thereby realizing the voice recognition function.
And 104, analyzing the description information, and extracting at least one data demand parameter in the description information.
After the description information related to the data requirement input by the user is acquired, the description information can be parsed.
Specifically, the obtained description information may be preprocessed, including removing redundant punctuation marks, converting into lower case letters, and the like, and unifying text formats.
Further, the entities related to the user's needs, such as "car a", "2023", "sales", can be extracted by named entity recognition technology. Named entity recognition models can be trained to recognize different classes of entities. In particular implementations, entity identification may be performed using existing NER libraries (e.g., spaCy, NLTK, etc.) or using deep learning models (e.g., BERT, GPT, etc.).
In addition, keyword matching is also possible. A list containing possible keywords, such as "car a", "2023 years", "sales", etc., is created before recognition. Then, a character string matching algorithm (such as regular expression, trie, etc.) is used to find the matched keywords in the text, and relevant information is extracted.
For better understanding of the context, the acquired descriptive information may also be analyzed using language models (e.g., GPT, BERT, etc.) to obtain more semantic information.
And extracting data demand parameters in the description information according to the results of entity identification and keyword matching.
For example, the description information related to the data demand input by the user is "i need sales of car a in 2023". The data demand parameters analyzed by the method described above are "car a", "2023", and "sales".
And step 106, determining a target database for executing the data query instruction based on the data demand parameter, and generating the data query instruction.
In this specification, the data query instruction may specifically include a DQL instruction.
The DQL instruction may perform various types of query operations including SELECT, sort, filter, JOIN, aggregate, etc. The data query instruction provides flexible grammar and functions, so that a user can write complex queries according to own requirements.
Common DQL instructions include Structured Query Language (SQL), which is the most common query language in relational database management systems (RDBMS). In addition to SQL, there are other types of DQLs, such as the query language of the NoSQL database.
In this specification, the parsed parameters may be used to determine a target database for executing the data query instruction, and to construct the data query instruction.
Taking the SQL statement as an example, when the analyzed data demand parameters are "car a", "2023 year", and "sales", the database related to the sales "can be located according to" car a "," sales ", and assuming that the database has a table named" sales ", the SQL statement can be constructed:
SELECT quantity FROM SALES WHERE CAR _name= 'car' AND year=2023.
In one embodiment, the data query instructions may be constructed by a pre-trained query instruction generation model.
The query instruction generation model may specifically be a machine learning model that performs supervised training based on metadata of a plurality of databases as training samples.
The metadata of the database may specifically include a database name of each database, a table name of each data table in the database, a column name of a data column in each data table, and the like.
By taking metadata of the database as a training sample, the query instruction generation model can identify data demand parameters and locate the data demand parameters to a specific database and a data table, so that an accurate data query instruction can be directly generated.
In practical application, the data demand parameters may be formatted, the formatted data demand parameters may be input into a pre-trained query instruction generation model.
In particular, the plurality of data requirement parameters may be processed into formatted text, wherein the formatted text may include requirements and conditions in particular. Typically, the formatted text is JSON text.
Take the data demand parameters as "car a", "2023 years", "sales" for example. The corresponding formatted text may be { requirements: sales amount; conditions are as follows: automobile a,2022 }.
By formatting the data demand parameters, the query instruction generation model can be enabled to determine the target database more quickly, and the efficiency of generating the data query instruction is improved.
In one embodiment, the query result obtained based on the data query instruction and the query instruction may be used together as a set of training samples, and the training samples may be input into the query instruction generation model for training. Iterative training is performed, and when the use frequency of a user is higher, the generated query instruction is more accurate.
And step 108, executing the data query instruction in the database to acquire data.
In this specification, after the data query instruction is generated, a connection with a target database may be established, and a query operation is performed, so as to obtain a query result from the database.
In one embodiment, when the data query instruction is generated, the data query instruction further includes an environmental parameter of an execution environment of the data query instruction.
The environment parameters may specifically include a driver identifier of a driver corresponding to the target database, and so on.
Based on the environmental parameters, a driver corresponding to the target database may be determined, and further, a driver instance may be created based on a driver identification. The driving instance specifically may include a driving identifier, database connection information, a database operation function, and the like.
The database connection information may specifically refer to a DBMS connection string, where the DBMS connection string may specifically include a URL, a database name, user information specifying pattern encryption, password information specifying pattern encryption, and the like.
The database operating functions may include, in particular, database query command functions, database definition command functions, generic database command functions, and the like.
Based on the database connection information and the database operation function in the driving instance, the data query instruction can be executed and a query result can be obtained.
In one embodiment, a call request for a driver of the target database may also be initiated to the driver management center; the call request includes a driver identification of the driver.
The driver management center can receive a call request of a driver for the target database initiated by the call end and acquire a driver identification of the driver for the target database.
Further, the driver management center may query an available driver pool in response to the call request to determine a driver corresponding to the driver identification.
If the driver corresponding to the driver identification is queried, a driver instance corresponding to the driver can be directly created, and the target database is connected and operated through the driver instance.
In one embodiment, security risk checks, executability checks, and performance checks may also be performed on the data query instructions generated, thereby ensuring that the data query instructions can be accurately executed.
Specifically, the key words in the data query instruction and the content of the data query instruction can be checked first to determine whether the data query instruction has security risk
If there is no security risk, further checks can be made. If there is a security risk, repair is required for the security risk.
And if the data query instruction does not have the security risk, determining whether the data query instruction can be executed or not based on the keyword and the grammar corresponding to the DQL.
In practical applications, there may be cases where the data query instruction cannot be executed due to a keyword miss and a syntax error. Therefore, whether the key words of the data query instruction are complete or not and whether the grammar of the data query instruction is correct or not can be checked, and whether the parameters in the data query instruction are matched with the parameter types or not also needs to be checked.
If the data query instruction can be executed, it can be further checked, before executing, whether the performance of the data query instruction meets the preset requirement.
In practical applications, the data query instruction may include sub-query, deduplication, and so on, which consume very much data warehouse performance, so that when the performance of the data query instruction does not meet the preset requirement, optimization is required for the data query instruction.
The security check, the executability check and the performance maintenance check form a complete intelligent query system, the security check, the executability check and the performance check are sequentially executed, and the risk check of the data query instruction in a flow mode is carried out, so that the accuracy of the data query instruction which is put into use is ensured, and the production efficiency is improved in practical application.
In one embodiment, the query result of the data query instruction may also be obtained, and a visualized data analysis legend may be generated based on the query result.
According to the query result of the data query instruction, necessary preprocessing and conversion can be performed on the data. For example, aggregating, screening, ordering, grouping, etc., the data for subsequent data visualization.
Depending on the type and requirements of the data, a suitable data visualization tool may be selected. Common data visualization tools include matplotlib, seaborn, plotly, tableau, and the like.
The selected data visualization tool may further be used to generate a visualization based on the processed data.
In addition, AIGC techniques may also be used to automatically generate corresponding visual illustrations based on pre-trained analytical models and query results.
In the scheme described in the above embodiment, the data query instruction is automatically generated by analyzing the description information input by the user, and the corresponding database query data is automatically located. The method has the advantages that the data can be obtained from the database through an automatic process only by inputting the description information related to the requirements, the time cost of writing the data query instruction by the developer is reduced, and the data obtaining efficiency of the user is improved.
Referring to fig. 2, fig. 2 is a schematic application diagram of an intelligent query method according to an exemplary embodiment.
As shown in fig. 2, a user may input description information related to data requirements, format the description information after acquiring the description information, and input the formatted description into a pre-trained query instruction generation model.
The training samples of the query instruction generation model are metadata of databases, the training samples are generated based on the metadata of a plurality of databases, and the query instruction generation model can be trained.
In addition, each generated data query instruction and the query result of the data query instruction can also be used for generating a training sample and inputting the training sample into the query instruction generation model for iterative training, so that the accuracy of the model is improved.
The data query instructions may be generated by a pre-trained query instruction generation model. In practical applications, the automatically generated data query instruction may have various problems, and thus, it is necessary to check and repair the data query instruction.
In practical application, the data query instruction can be overhauled from the three aspects of safety, executable and performance. After the overhaul is completed, the data query instruction may be put into use.
In practical application, a plurality of databases of different types may exist, and the drivers of the different databases are different, so that for whole-course automation, the driver of the target database can be automatically selected according to the target database corresponding to the data query instruction, and connection with the target database is established after the driver is generated.
The data query instruction can be further executed to obtain a query result. After the query result is obtained, a visual legend can be automatically generated based on the query result, so that the user can conveniently view the visual legend.
In the scheme described in the above embodiment, the data query instruction is automatically generated by analyzing the description information input by the user, and the corresponding database query data is automatically located. The method has the advantages that the data can be obtained from the database through an automatic process only by inputting the description information related to the requirements, the time cost of writing the data query instruction by the developer is reduced, and the data obtaining efficiency of the user is improved.
Referring to fig. 3, fig. 3 is a hardware configuration diagram of an electronic device where an intelligent query apparatus is located in an exemplary embodiment. At the hardware level, the device includes a processor 302, an internal bus 304, a network interface 306, memory 308, and non-volatile storage 310, although other hardware required for the service is possible. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 302 reading a corresponding computer program from the non-volatile storage 310 into the memory 308 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 4, fig. 4 is a block diagram of an intelligent query apparatus according to an exemplary embodiment. The intelligent query device can be applied to the electronic equipment shown in fig. 2 to realize the technical scheme of the specification. Wherein, the intelligent inquiry device may include:
a description information obtaining unit 402, configured to obtain description information related to a data requirement input by a user;
A description information parsing unit 404, configured to parse the description information, and extract at least one data requirement parameter in the description information;
A query instruction generating unit 406, configured to determine a target database for executing the data query instruction based on the data requirement parameter, and generate a data query instruction;
A data query unit 408, configured to execute the data query instruction in the target database to obtain data.
In this embodiment, the query instruction generating unit is further configured to format the data requirement parameter, input a pre-trained query instruction generating model, and determine a target database for executing the query instruction by using the query instruction generating model to generate a data query instruction; the query instruction generation model comprises a machine learning model which is subjected to supervised training based on metadata of a plurality of databases as training samples.
In this embodiment, the apparatus further includes:
and the iterative training unit is used for inputting the query result obtained based on the data query instruction and the data query instruction as a training sample into the query instruction generation model for training.
In this embodiment, the data query instruction further includes an environmental parameter of an execution environment of the data query instruction;
The data query unit is further used for determining a driver corresponding to the target database based on the environment parameters;
And creating a driving instance corresponding to the driving program, and connecting a target database based on the driving instance so as to execute the data query instruction in the target database to acquire data.
In this embodiment, the data query unit is further configured to check a keyword in the data query instruction and a content of the data query instruction, to determine whether the data query instruction has a security risk;
if the data query instruction does not have the security risk, determining whether the data query instruction can be executed or not based on the keyword and the grammar corresponding to the data query instruction;
if the data query instruction can be executed, checking whether the performance of the data query instruction meets the preset requirement;
And if the performance of the data query instruction meets the preset requirement, executing the data query instruction in the target database to acquire data.
In this embodiment, the apparatus further includes:
And the legend generating unit is used for acquiring the query result of the data query instruction and generating a visualized data analysis legend based on the query result.
In this embodiment, the description information acquiring unit is further configured to acquire description information related to the data requirement in text form input by the user, or,
And acquiring the description information of the audio form input by the user through voice, and converting the description information of the audio form related to the data requirement into the description information of the text form.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are illustrative only, in that the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in this specification are both information and data authorized by the user or sufficiently authorized by the parties, and the collection, use and processing of relevant data requires compliance with relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation portals for the user to choose authorization or denial.
The present specification also provides an embodiment of a computer-readable storage medium. The computer readable storage medium stores machine readable instructions that, when invoked and executed by a processor, implement the intelligent query method provided by any of the embodiments in the present specification.
The computer readable storage medium provided by the embodiments of the present specification may specifically include, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROMs (Read-Only memories), RAMs (Random Access Memory, random access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only memories), flash memories, magnetic cards, or optical fiber cards. That is, a readable storage medium includes a readable medium that can store or transfer information.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (10)

1. An intelligent query method, the method comprising:
acquiring description information related to data requirements input by a user;
Analyzing the description information and extracting at least one data demand parameter in the description information;
determining a target database for executing the data query instruction based on the data demand parameter, and generating the data query instruction;
and executing the data query instruction in the target database to acquire data.
2. The method of claim 1, determining a target database to execute a data query instruction based on the data demand parameter, generating a data query instruction, comprising:
Formatting the data demand parameters, inputting a pre-trained query instruction generation model, determining a target database for executing the query instruction by the query instruction generation model, and generating a data query instruction; the query instruction generation model comprises a machine learning model which is subjected to supervised training based on metadata of a plurality of databases as training samples.
3. The method of claim 2, the method further comprising:
And inputting the query result obtained based on the data query instruction and the data query instruction as a training sample into the query instruction generation model for training.
4. The method of claim 2, wherein the data query instruction further comprises an environmental parameter of an execution environment of the data query instruction;
executing the data query instruction in the target database to obtain data, including:
determining a driver corresponding to the target database based on the environmental parameter;
And creating a driving instance corresponding to the driving program, and connecting a target database based on the driving instance so as to execute the data query instruction in the target database to acquire data.
5. The method of claim 1, executing the data query instruction in the target database to obtain data, comprising:
Checking keywords in the data query instruction and the content of the data query instruction, and determining whether the data query instruction has a security risk or not;
if the data query instruction does not have the security risk, determining whether the data query instruction can be executed or not based on the keyword and the grammar corresponding to the data query instruction;
if the data query instruction can be executed, checking whether the performance of the data query instruction meets the preset requirement;
And if the performance of the data query instruction meets the preset requirement, executing the data query instruction in the target database to acquire data.
6. The method of claim 1, the method further comprising:
and acquiring a query result of the data query instruction, and generating a visualized data analysis legend based on the query result.
7. The method of claim 1, the obtaining the description information related to the data requirement input by the user, comprising:
acquiring descriptive information related to data requirements in text form input by a user, or,
And acquiring the description information of the audio form input by the user through voice, and converting the description information of the audio form related to the data requirement into the description information of the text form.
8. An intelligent query apparatus, the apparatus comprising:
the descriptive information acquisition unit is used for acquiring descriptive information related to data requirements input by a user;
The description information analysis unit is used for analyzing the description information and extracting at least one data demand parameter in the description information;
The query instruction generating unit is used for determining a target database for executing the data query instruction based on the data demand parameters and generating the data query instruction;
and the data query unit is used for executing the data query instruction in the target database to acquire data.
9. An electronic device comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
The memory stores machine readable instructions, and the processor performs the method of any of claims 1-7 by invoking the machine readable instructions.
10. A computer readable storage medium storing machine readable instructions which, when invoked and executed by a processor, implement the method of any one of claims 1-7.
CN202410236759.3A 2024-03-01 2024-03-01 Intelligent query method, intelligent query device, electronic equipment and readable storage medium Pending CN118152423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410236759.3A CN118152423A (en) 2024-03-01 2024-03-01 Intelligent query method, intelligent query device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410236759.3A CN118152423A (en) 2024-03-01 2024-03-01 Intelligent query method, intelligent query device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN118152423A true CN118152423A (en) 2024-06-07

Family

ID=91288008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410236759.3A Pending CN118152423A (en) 2024-03-01 2024-03-01 Intelligent query method, intelligent query device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN118152423A (en)

Similar Documents

Publication Publication Date Title
US11995073B2 (en) One-shot learning for text-to-SQL
US8122045B2 (en) Method for mapping a data source to a data target
CN110659282B (en) Data route construction method, device, computer equipment and storage medium
US11651014B2 (en) Source code retrieval
CN109033410B (en) SQL (structured query language) analysis method based on regular and character string cutting
CN112000773B (en) Search engine technology-based data association relation mining method and application
CN110597844B (en) Unified access method for heterogeneous database data and related equipment
US9043367B2 (en) Self-learning data lenses for conversion of information from a first form to a second form
CN112434024B (en) Relational database-oriented data dictionary generation method, device, equipment and medium
CN110555035A (en) Method and device for optimizing query statement
US20130198117A1 (en) Systems and methods for semantic data integration
CN110909126A (en) Information query method and device
CN116415430B (en) Customized SysML model conversion method oriented to space science task demonstration
CN113297251A (en) Multi-source data retrieval method, device, equipment and storage medium
US20180336235A1 (en) Reconciled data storage system
WO2016156995A1 (en) Methods, systems and computer program products for machine based processing of natural language input
CN117112590A (en) Method for generating structural query language and data query equipment
US10877998B2 (en) Highly atomized segmented and interrogatable data systems (HASIDS)
Bartoli et al. Semisupervised wrapper choice and generation for print-oriented documents
CN118152423A (en) Intelligent query method, intelligent query device, electronic equipment and readable storage medium
CN113505117A (en) Data quality evaluation method, device, equipment and medium based on data indexes
CN103377199A (en) Information processing device and information processing method
CN117389980B (en) Log file analysis method and device, computer equipment and readable storage medium
CN115952203B (en) Data query method, device, system and storage medium
US11250010B2 (en) Data access generation providing enhanced search models

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination