CN116894048A - Data query method, device, equipment and storage medium based on artificial intelligence - Google Patents

Data query method, device, equipment and storage medium based on artificial intelligence Download PDF

Info

Publication number
CN116894048A
CN116894048A CN202310783619.3A CN202310783619A CN116894048A CN 116894048 A CN116894048 A CN 116894048A CN 202310783619 A CN202310783619 A CN 202310783619A CN 116894048 A CN116894048 A CN 116894048A
Authority
CN
China
Prior art keywords
data
target
statement
prompt
candidate
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
CN202310783619.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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310783619.3A priority Critical patent/CN116894048A/en
Publication of CN116894048A publication Critical patent/CN116894048A/en
Pending legal-status Critical Current

Links

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
    • 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/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a data query method, a device, equipment and a storage medium based on artificial intelligence, relates to the technical field of artificial intelligence, in particular to the technical fields of natural language understanding, big data and the like, and can be applied to smart city, city management and emergency management scenes. The data query method comprises the following steps: acquiring candidate data based on the query statement, wherein the candidate data comprises data of a target class; acquiring a prompt statement, wherein the prompt statement is used for indicating and filtering the data of the target category; invoking a pre-training language model to filter the target class data indicated by the prompt statement in the candidate data by adopting the pre-training language model, and obtaining target data; and receiving the target data sent by the pre-training language module and displaying the target data. The data query accuracy can be improved.

Description

Data query method, device, equipment and storage medium based on artificial intelligence
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of natural language understanding, big data and the like, and can be applied to smart city, city management and emergency management scenes, in particular to a data query method, device, equipment and storage medium based on artificial intelligence.
Background
For public opinion products, public opinion data is generally provided outwards in the form of an interface or the like. In these interfaces, query sentences of the database are often formed through some time ranges, keywords or other forms of limiting conditions, and then query operations are performed on the database to obtain corresponding data. However, for various reasons, the data returned by the interface is not expected.
In the related art, in order to obtain more accurate data, it is generally desirable to improve the definition conditions of a query term and obtain more accurate data by defining finer categories.
Disclosure of Invention
The present disclosure provides a data query method, apparatus, device and medium based on artificial intelligence.
According to an aspect of the present disclosure, there is provided an artificial intelligence based data query method, including: acquiring candidate data based on the query statement, wherein the candidate data comprises data of a target class; acquiring a prompt statement, wherein the prompt statement is used for indicating and filtering the data of the target category; invoking a pre-training language model to filter the target class data indicated by the prompt statement in the candidate data by adopting the pre-training language model, and obtaining target data; and receiving the target data sent by the pre-training language module and displaying the target data.
According to another aspect of the present disclosure, there is provided an artificial intelligence based data query apparatus including: the first acquisition module is used for acquiring candidate data based on the query statement, wherein the candidate data comprises data of a target class; the second acquisition module is used for acquiring a prompt statement, wherein the prompt statement is used for indicating and filtering the data of the target category; the calling module is used for calling a pre-training language model to filter the target class data indicated by the prompt statement from the candidate data by adopting the pre-training language model so as to obtain target data; and the display module is used for receiving the target data sent by the pre-training language module and displaying the target data.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to any one of the above aspects.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the above aspects.
According to the technical scheme, the data query accuracy can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an application scenario provided according to an embodiment
FIG. 3 is a schematic diagram of the overall architecture of an artificial intelligence based data querying system provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 6 is a schematic diagram of an electronic device for implementing an artificial intelligence based data querying method in accordance with an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The main reasons why the interface returns data that is not expected are: the data queried based on the query statement may contain junk data. For example, the category defined by the query statement is news, but because the classification of the data stored in the database is not accurate enough, entertainment data or advertisement data that is not desired by the user may be returned.
In the related art, in order to obtain more accurate data, it is generally desirable to improve the definition conditions of a query term and obtain more accurate data by defining finer categories.
However, this approach has limited performance improvement and the classification criteria for different users may not be consistent, resulting in accuracy of the acquired data still to be improved.
In order to improve data query accuracy, the present disclosure provides the following embodiments.
FIG. 1 is a schematic diagram of a first embodiment of the present disclosure, which provides an artificial intelligence based data query method, including:
101. candidate data is acquired from a database based on the query statement, the candidate data including data of the target class.
102. And acquiring a prompt statement, wherein the prompt statement is used for indicating to filter the data of the target category.
103. Invoking a pre-training language model to filter the data of the target category in the candidate data based on the prompt statement by adopting the pre-training language model, and acquiring target data.
104. And receiving the target data sent by the pre-training language module and displaying the target data.
Where a query statement refers to a statement used to query a database, such as a structured query language (StructuredQueryLanguage, SQL) statement.
When a user needs to inquire data, the user can construct SQL sentences based on time, address, category and the like, and send the SQL sentences to a database, and inquire corresponding data in the database.
The data obtained within the database based on the query statement may be referred to as candidate data.
Since the category of data in the database may not be accurate enough, candidate data obtained based on the query statement may contain data of a category that the user does not wish.
The target category refers to a category to be filtered, i.e., a category that the user does not wish to see. For example, the category specified by the user when constructing the query term is a news category, but the candidate data obtained based on the query term may contain an advertisement category; assuming that the user does not wish to include advertisement categories in the data, the target categories include advertisements. The target category may be one or more categories.
And the prompt statement is used for indicating the data of the filtering target category. For example, it may be "please help me filter data of advertisement categories".
The alert sentences may be preconfigured and different users may configure the same or different alert sentences.
The subject performing the data query method may be referred to as a data query device, and the hint statement may be configured in a database or in the data query device. For example, when the hint statement is configured in the database, the database may also return the hint statement to the data query device at the same time when the candidate data is returned, and then the data query device performs processing based on the candidate data and the hint statement. Or when the prompt sentence is configured in the data query device, the data query device can acquire the self-configured prompt sentence after receiving the candidate data returned by the database, and then process the candidate data and the prompt sentence.
In addition, one or more alert sentences may be preconfigured for the same user. When the prompt statement is one type, the data query device can adopt the default prompt statement to filter the data. When the prompting sentences are multiple, multiple selectable prompting sentences can be displayed to the user, and the user can select one prompting sentence to carry out data filtering processing according to actual needs. Or, a default prompting sentence can be adopted for data filtering processing at the beginning, and if the user finds that the target data does not meet the self requirement, the user can change the prompting sentence to acquire new target data again.
The pre-trained language model refers to a model for filtering target class data. The model may be self-trained by the data query provider and may be referred to as a filtering model. The filtering model can be multiple, each filtering model is used for filtering one category of data. For example, if the target class indicated by the prompt sentence is an advertisement, the data query device may send the candidate data to a filtering model corresponding to the advertisement class, process the candidate data through the filtering model of the advertisement class, and output the candidate data as filtered data, that is, target data.
Data filtering can be achieved by setting a plurality of types of filtering models.
To improve efficiency and accuracy, the pre-trained language model may also be a Large model (Large LanguageModel, LLM) based on which multiple categories of data may be filtered without the need to refer to a filtering model for each category separately.
LLM is a hot problem in the field of artificial intelligence in recent years, and LLM is a pre-training language model, and by pre-training on massive text data, rich language knowledge and world knowledge are learned, so that a remarkable effect can be achieved on various natural language processing (NaturalLanguageProcessing, NLP) tasks. The relics, chatGPT and the like are all applications based on LLM development, and can generate smooth, logical and creative text contents and even perform natural dialogue with human beings. Specifically, the large model may be a general pre-training (GPT) model based on a transducer, an enhanced representation (EnhancedRepresentationthroughKnowledgeIntegration, ERNIE) model based on knowledge integration, or the like.
After the data query device acquires the candidate data and the prompt sentence, the candidate data and the prompt sentence can be sent to the large model, the large model processes the input candidate data and the prompt sentence, and the output is the target data.
The large model returns the output target data to the data query device, and the data query device displays the target data to the user.
In this embodiment, candidate data is filtered through the pre-training language model to obtain target data, so that the accuracy of the target data can be improved by utilizing the excellent performance of the pre-training language model.
In order to better understand the embodiments of the present disclosure, application scenarios of the embodiments of the present disclosure are described below.
As shown in fig. 2, a user may interact with a data query system through a user terminal 201, and obtain target data through the data query system. The user terminal may be a personal computer (Personal Computer), a notebook computer, a mobile device (e.g., a cell phone), etc. The data query system may be located on a server 202, which may be a local server or cloud server, etc., and the server may be a single server or a cluster of servers.
The user may send a data query request to the data query system via the user terminal, wherein query conditions, such as time, address, category, etc., may be specified. The data query system can acquire target data based on the data query request and then display the target data to a user through the user terminal.
Taking the acquisition of target data through a large model as an example, as shown in fig. 3, the data query system includes: the system comprises an application display module, a data service module, a database and a large model interface. The application display module is located on the data display layer, the data service module is located on the data interface layer, and the database and the large model interface are located on the data providing layer.
The data query system may open an interface to the user through which the user sends a data query request to the data service module, and the data service module constructs an SQL statement using specified information (e.g., time, address, category) included in the data query request as a query parameter, and sends the SQL statement to the database.
The database stores a large amount of data, category information can be recorded in the data, category comparison can be performed after the database receives the SQL statement, and the data with the category specified by the SQL statement is returned to the data service module as original data.
The data service module receives the original data returned by the database, and can take the original data as candidate data; alternatively, part of the data may be screened out from the original data as candidate data based on the setting information, for example, the original data may include: if the title and the text are set and filtered based on the title, the title in the original data is used as candidate data.
The data service module may also obtain a hint statement.
The prompt sentences may be preconfigured in a database, and prompt sentences of a plurality of users may be recorded in the database. The SQL statement can carry user information, the corresponding relation between the user and the prompt statement is recorded in the database, the database can acquire the prompt statement of the current user based on the corresponding relation and the user information in the SQL statement, and the prompt statement and the original data are returned to the data service module. The prompt statement may be configured in the data service module itself, and after the data service module obtains the candidate data, the prompt statement may be obtained from the configuration information of the data service module itself.
An interface exists between the data service module and the large model to invoke the large model through the interface. After the data service module acquires the candidate data and the prompt sentences, the candidate data and the prompt sentences are extracted and sent to the large model, the large model processes the candidate data and the prompt sentences to obtain target data, and the target data is returned to the data service module.
The data service module sends the target data to the application display module, and the target data is displayed to the user through the application display module.
In combination with the application scenario, the disclosure further provides a data query method.
FIG. 4 is a schematic diagram of a second embodiment of the present disclosure, which provides an artificial intelligence based data query method, comprising:
401. and constructing a query statement based on the query information set by the user, and acquiring the original data in the database based on the query statement.
402. Candidate data is acquired based on the original data, wherein the candidate data comprises data of a target class.
In combination with the architecture shown in fig. 3, a user may send a data query request to the data service module through an interface provided by the data query system, where the data query request may carry query information set by data, where the query information includes, for example, time, address, category, and the like.
After receiving the data query request, the data service module can construct an SQL sentence by taking the query information as the query parameter of the SQL sentence.
After the data service module constructs the SQL statement, the SQL statement is sent to the database.
The database queries data matched with the SQL statement in the pre-stored data, takes the data as the original data, and returns the original data to the data service module.
After the data service module acquires the original data returned by the database, the original data can be used as candidate data, or the data service module can also screen the original data and select preset field content as candidate data.
For example, the data query request may further carry field information (such as a title), and the corresponding SQL statement may further specify that the field is a title. The data stored in the database may include a title and a body, and since the title is specified by the SQL statement, the original data returned by the database is the title, and the original data may be used as candidate data at this time.
For another example, the SQL statement does not specify a title, and the original data returned by the database includes a title and a text, at this time, the data service module may filter the original data based on the setting information, and use the setting field content as candidate data, for example, may use the title of the original data as candidate data, and not include the text. The setting information may be preconfigured in the data service module, for example, the data service module may preconfigured the filter header field. Alternatively, the alert sentence includes a set screening field, for example, in the alert sentences of a plurality of users recorded in the database, the same or different screening fields may be set for different users, such as screening a title for a first user, screening a text for a second user, and so on.
In this embodiment, the original data is obtained from the database based on the query statement, so that the existing database resources can be utilized, and the resource utilization rate is improved.
In this embodiment, the original data is used as candidate data, or the candidate data is obtained by screening the original data, so that flexibility can be improved, and personalized requirements can be met.
403. And acquiring a pre-configured prompt statement, wherein the prompt statement is used for indicating the filtering of the data of the target category.
The prompt statement may be preconfigured in the database, and the database may return the prompt statement when returning the original data. Alternatively, the prompt sentence may be further configured in the data service module, and the data service module may obtain the prompt sentence from the configuration information thereof after obtaining the candidate data.
For each user, testing can be performed on line, and the prompt sentences meeting the user demands are used as the prompt sentences of final configuration. The final configured alert sentences for different users may be different due to different needs of the users.
In addition, format information can be contained in the hint statement so that the large model obtains the target data with the format information.
Examples of candidate data and hint statements may be as follows:
"title 1", "title 2", "title 3", "title 20";
the method is characterized in that the method comprises the steps of firstly, 20 news titles, namely, please help me filter low-quality data with the content of entertainment, advertisement, sales and the like and data without news property, then displaying each piece of data according to the original sequence, wherein the display style of each row is whether the original title # # is filtered by the # filtering reason, whether the filtered display is yes or not, and the filtering reason is displayed as the reason within 4 words.
In this embodiment, by including format information in the prompt statement, target data with corresponding format information may be obtained, and display with corresponding format may be performed, thereby improving display effect.
In the embodiment, through pre-configuring the prompt statement, user intervention is not needed when the user inquires the data, the target data with better effect can be automatically obtained, the operation complexity of the user is reduced, and the user experience is improved.
404. And sending the candidate data and the prompt sentences to the large model through an interface between the candidate data and the large model, so that the large model filters the data of the target class in the candidate data based on the prompt sentences, and the target data is acquired.
The data service module can send the candidate data and the prompt sentences to the large model through an interface between the data service module and the large model, and after the large model receives the candidate data and the prompt sentences, the large model can filter the candidate data based on target categories in the prompt sentences to obtain target data, and the large model returns the obtained target data to the data service module.
In this embodiment, the candidate data and the prompt statement are processed through the large model to obtain the target data, so that data filtering can be realized by using the excellent performance of the large model, and the accuracy of the target data is improved.
405. And receiving the target data sent by the large model and displaying the target data.
The prompting information is pre-configured, and the prompting information can be input by a user. For example, after target data is obtained and displayed based on preconfigured prompt information, if the user finds that the target data does not meet the requirement of the user, the user can also construct a prompt sentence by himself and send the prompt sentence to the data service module, the data service module sends the prompt sentence generated by the user to the large model, and the large model can process the prompt sentence based on the current prompt sentence or based on the current prompt sentence and the historical prompt sentence to obtain new target data and return the new target data to the user. The above-mentioned process can be one or several rounds, i.e. the user can make several rounds of dialogue interaction with large model by means of data service module so as to obtain the final result.
FIG. 5 is a schematic diagram of a third embodiment of the present disclosure, which provides an artificial intelligence based data query apparatus 500, the apparatus 500 comprising: a first acquisition module 501, a second acquisition module 502, a calling module 503 and a presentation module 504.
The first obtaining module 501 is configured to obtain candidate data based on a query statement, where the candidate data includes data of a target class; the second obtaining module 502 is configured to obtain a prompt sentence, where the prompt sentence is used to indicate filtering the data of the target class; the invoking module 503 is configured to invoke a pre-training language model, so as to filter, in the candidate data, the data of the target class indicated by the prompt sentence by using the pre-training language model, and obtain target data; the presentation module 504 is configured to receive the target data sent by the pre-training language module, and present the target data.
In this embodiment, candidate data is filtered through the pre-training language model to obtain target data, so that the accuracy of the target data can be improved by utilizing the excellent performance of the pre-training language model.
In some embodiments, the pre-trained language model is a large model; the calling module 503 is further configured to: and sending the candidate data and the prompt sentences to the large model through an interface between the candidate data and the large model, so that the large model filters the data of the target class in the candidate data based on the prompt sentences, and the target data is acquired.
In this embodiment, the candidate data and the prompt statement are processed through the large model to obtain the target data, so that data filtering can be realized by using the excellent performance of the large model, and the accuracy of the target data is improved.
In some embodiments, the hint statement includes: the big model also acquires the target data with the format information based on the prompt statement; the display module 504 is further configured to: the target data with the format information is shown.
In this embodiment, by including format information in the prompt statement, target data with corresponding format information may be obtained, and display with corresponding format may be performed, thereby improving display effect.
In some embodiments, the first obtaining module 501 is further configured to: constructing a query statement based on query information set by a user, and acquiring original data in a database based on the query statement; and acquiring the candidate data based on the original data.
In this embodiment, the original data is obtained from the database based on the query statement, so that the existing database resources can be utilized, and the resource utilization rate is improved.
In some embodiments, the first obtaining module 501 is further configured to: taking the original data as the candidate data; or, taking the preset field content in the original data as the candidate data.
In this embodiment, the original data is used as candidate data, or the candidate data is obtained by screening the original data, so that flexibility can be improved, and personalized requirements can be met.
It is to be understood that in the embodiments of the disclosure, the same or similar content in different embodiments may be referred to each other.
It can be understood that "first", "second", etc. in the embodiments of the present disclosure are only used for distinguishing, and do not indicate the importance level, the time sequence, etc.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. The electronic device 600 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device 600 may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, ROM602, and RAM603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as an artificial intelligence based data query method. For example, in some embodiments, the artificial intelligence based data query method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM602 and/or the communication unit 609. When the computer program is loaded into RAM603 and executed by computing unit 601, one or more of the steps of the artificial intelligence based data querying method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the artificial intelligence based data querying method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems-on-chips (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable load balancing apparatus, such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("VirtualPrivate Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (13)

1. An artificial intelligence based data query method, comprising:
acquiring candidate data based on the query statement, wherein the candidate data comprises data of a target class;
acquiring a prompt statement, wherein the prompt statement is used for indicating and filtering the data of the target category;
invoking a pre-training language model to filter the target class data indicated by the prompt statement in the candidate data by adopting the pre-training language model, and obtaining target data;
and receiving the target data sent by the pre-training language module and displaying the target data.
2. The method of claim 1, wherein,
the pre-trained language model is a large model;
the invoking the pre-training language model to filter the target class data in the candidate data based on the prompt sentence by adopting the pre-training language model to obtain target data comprises the following steps:
and sending the candidate data and the prompt sentences to the large model through an interface between the candidate data and the large model, so that the large model filters the data of the target class in the candidate data based on the prompt sentences, and the target data is acquired.
3. The method of claim 2, wherein,
the prompting statement comprises the following steps: the big model also acquires the target data with the format information based on the prompt statement;
the displaying the target data comprises:
the target data with the format information is shown.
4. The method of claim 1, wherein the obtaining candidate data based on a query statement comprises:
constructing a query statement based on query information set by a user, and acquiring original data in a database based on the query statement;
and acquiring the candidate data based on the original data.
5. The method of claim 4, wherein the obtaining the candidate data based on the raw data comprises:
taking the original data as the candidate data; or,
and taking the preset field content in the original data as the candidate data.
6. An artificial intelligence based data querying device, comprising:
the first acquisition module is used for acquiring candidate data based on the query statement, wherein the candidate data comprises data of a target class;
the second acquisition module is used for acquiring a prompt statement, wherein the prompt statement is used for indicating and filtering the data of the target category;
the calling module is used for calling a pre-training language model to filter the target class data indicated by the prompt statement from the candidate data by adopting the pre-training language model so as to obtain target data;
and the display module is used for receiving the target data sent by the pre-training language module and displaying the target data.
7. The apparatus of claim 6, wherein,
the pre-trained language model is a large model;
the calling module is further configured to:
and sending the candidate data and the prompt sentences to the large model through an interface between the candidate data and the large model, so that the large model filters the data of the target class in the candidate data based on the prompt sentences, and the target data is acquired.
8. The apparatus of claim 7, wherein,
the prompting statement comprises the following steps: the big model also acquires the target data with the format information based on the prompt statement;
the display module is further to:
the target data with the format information is shown.
9. The apparatus of claim 6, wherein the first acquisition module is further to:
constructing a query statement based on query information set by a user, and acquiring original data in a database based on the query statement;
and acquiring the candidate data based on the original data.
10. The apparatus of claim 9, wherein the first acquisition module is further to:
taking the original data as the candidate data; or,
and taking the preset field content in the original data as the candidate data.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-5.
CN202310783619.3A 2023-06-29 2023-06-29 Data query method, device, equipment and storage medium based on artificial intelligence Pending CN116894048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310783619.3A CN116894048A (en) 2023-06-29 2023-06-29 Data query method, device, equipment and storage medium based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310783619.3A CN116894048A (en) 2023-06-29 2023-06-29 Data query method, device, equipment and storage medium based on artificial intelligence

Publications (1)

Publication Number Publication Date
CN116894048A true CN116894048A (en) 2023-10-17

Family

ID=88311550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310783619.3A Pending CN116894048A (en) 2023-06-29 2023-06-29 Data query method, device, equipment and storage medium based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN116894048A (en)

Similar Documents

Publication Publication Date Title
EP3901843A2 (en) Screen projection method and apparatus, and storage medium
CN113239295A (en) Search method, search device, electronic equipment and storage medium
CN114428902B (en) Information searching method, device, electronic equipment and storage medium
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN115481227A (en) Man-machine interaction dialogue method, device and equipment
CN113220710B (en) Data query method, device, electronic equipment and storage medium
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN110888672A (en) Metadata architecture-based expression engine implementation method and system
CN116955817A (en) Content recommendation method, device, electronic equipment and storage medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN117370520A (en) Method, device, equipment and medium for processing split dialogue
CN114995719B (en) List rendering method, device, equipment and storage medium
CN116594709A (en) Method, apparatus and computer program product for acquiring data
CN114491253B (en) Method and device for processing observation information, electronic equipment and storage medium
CN113407749B (en) Picture index construction method and device, electronic equipment and storage medium
CN115994534A (en) Government scene hot word mining method, device, equipment and storage medium
CN116894048A (en) Data query method, device, equipment and storage medium based on artificial intelligence
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium
CN113961797A (en) Resource recommendation method and device, electronic equipment and readable storage medium
CN113239054A (en) Information generation method, related device and computer program product
CN112887426A (en) Information flow pushing method and device, electronic equipment and storage medium
CN112527126B (en) Information acquisition method and device and electronic equipment
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN118035557A (en) Resource pushing method, device, electronic equipment, storage medium and program product
CN117806758A (en) Plug-in UI rendering method and device, electronic equipment and storage medium

Legal Events

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