Big model-based data query method, device, equipment and medium

By combining internal and external information in the data query method, and using a large language model for entity recognition, data analysis and generation, the problem of incomplete query results in existing technologies is solved, and more accurate and comprehensive query results are achieved.

CN119377345BActive Publication Date: 2026-03-20BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing large language models struggle to provide comprehensive and accurate query results when processing data analysis and information retrieval.

Method used

By combining internal and external information, and through entity recognition, data analysis, and data generation, a Large Language Model (LLM) is used for data querying. Internal information is analyzed using LLM, while external information is generated using Retrieval Augmentation (RAG). The results from both are combined to improve the comprehensiveness and accuracy of the query results.

Benefits of technology

By combining internal and external information and leveraging the data analysis capabilities of LLM, the comprehensiveness and accuracy of query results have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377345B_ABST
    Figure CN119377345B_ABST
Patent Text Reader

Abstract

The present disclosure provides a large model-based data query method, device, equipment and medium, relating to the technical field of artificial intelligence, specifically the technical field of natural language processing, deep learning, large model, etc., which can be applied to dialogue systems, information retrieval and other scenarios. The large model-based data query method comprises: performing entity recognition on a query sentence to obtain a target entity in the query sentence; obtaining first associated content associated with the target entity in internal information, performing data analysis on the first associated content based on an LLM to obtain a data analysis result; obtaining second associated content associated with the target entity in external information, performing data generation on the second associated content based on the LLM to obtain a data generation result; and obtaining a query result corresponding to the query sentence based on the data analysis result and the data generation result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to the technical field of natural language processing, deep learning, large model, etc., which can be applied to dialog systems, information retrieval, etc., and particularly relates to a data query method and device based on a large model, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of large language models (LLM, referred to as large models) in the field of natural language processing, they have shown excellent capabilities in complex dialog, reasoning ability and generated content. SUMMARY

[0003] The present disclosure provides a data query method and device based on a large model, equipment and a storage medium.

[0004] According to an aspect of the present disclosure, a data query method based on a large model is provided, comprising: performing entity recognition on a query sentence to obtain a target entity in the query sentence; obtaining first associated content associated with the target entity in internal information, performing data analysis on the first associated content based on an LLM to obtain a data analysis result; obtaining second associated content associated with the target entity in external information, performing data generation on the second associated content based on the LLM to obtain a data generation result; and obtaining a query result corresponding to the query sentence based on the data analysis result and the data generation result.

[0005] According to another aspect of the present disclosure, a data query device based on a large model is provided, comprising: an identification module configured to perform entity recognition on a query sentence to obtain a target entity in the query sentence; an analysis module configured to obtain first associated content associated with the target entity in internal information, and perform data analysis on the first associated content based on an LLM to obtain a data analysis result; a generation module configured to obtain second associated content associated with the target entity in external information, and perform data generation on the second associated content based on the LLM to obtain a data generation result; and an obtaining module configured to obtain a query result corresponding to the query sentence based on the data analysis result and the data generation result.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.

[0007] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method according to any one of the aspects above.

[0008] 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 the method according to any one of the aspects above.

[0009] The present disclosure can improve the comprehensiveness and accuracy of query results.

[0010] It should be understood that the contents described in this part are not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0011] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:

[0012] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0013] Figure 2 is a schematic diagram of an application scenario for implementing an embodiment of the present disclosure;

[0014] Figure 3 is a schematic diagram of a data analysis module provided according to an embodiment of the present disclosure;

[0015] Figure 4 is a schematic diagram of a RAG module provided according to an embodiment of the present disclosure;

[0016] Figure 5 is a schematic diagram according to a second embodiment of the present disclosure;

[0017] Figure 6 is a schematic diagram according to a third embodiment of the present disclosure;

[0018] Figure 7 is a schematic diagram of an electronic device for implementing a large model-based data query method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to be clear and concise, the description below omits the description of well-known functions and structures.

[0020] While LLMs excel in some areas, they often fail to provide comprehensive and accurate answers when dealing with complex tasks involving data analysis and information retrieval.

[0021] To improve the accuracy of query results, the present disclosure provides the following embodiments.

[0022] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure. The present embodiment provides a large model-based data query method, which comprises:

[0023] 101. performing entity recognition on the query statement to obtain a target entity in the query statement.

[0024] 102. obtaining first associated content associated with the target entity in internal information, and performing data analysis on the first associated content based on an LLM to obtain a data analysis result.

[0025] 103. obtaining second associated content associated with the target entity in external information, and performing data generation on the second associated content based on the LLM to obtain a data generation result.

[0026] 104. obtaining a query result corresponding to the query statement based on the data analysis result and the data generation result.

[0027] wherein the query statement (query) is the content to be queried. Specifically, the user can input a query statement in natural language.

[0028] The target entity refers to the entity obtained after entity recognition of the query statement. The target entity can be one or more.

[0029] The target entity can include one or more of geographic information, time information, domain information, etc. For example, the query statement is "Why is the GDP of City X growing in the first quarter of 2023?", and after entity recognition of the query statement, the following target entities can be obtained: geographic information: City X; time information: the first quarter of 2023; domain information: Gross Domestic Product (GDP).

[0030] To improve the comprehensiveness and accuracy of the query result, in the present embodiment, the query result is obtained by combining internal information and external information.

[0031] The internal information refers to private information of a user, for example, the internal information is a local database of the user, in which structured data such as data tables can be stored. Generally, the internal information is not publicly disclosed and cannot be obtained through retrieval of a search engine.

[0032] The external information refers to public information such as news and forums, which is publicly disclosed and can be obtained through retrieval of a search engine.

[0033] The content associated with the target entity obtained in the internal information is referred to as first associated content, and the content associated with the target entity obtained in the external information is referred to as second associated content.

[0034] After obtaining the first associated content, the LLM can be used to perform data analysis on the first associated content to obtain a data analysis result.

[0035] Data analysis refers to using the LLM to understand and gain insights from data, identify data trends, and summarize data trends to obtain a data analysis result.

[0036] For example, in the field of social economy, based on the above query statement example, the impact factor (IF) of the field information (such as GDP) can be obtained, the IF is for example income (such as information income, software income, etc.), and the trend curve of the change of these IFs over time is analyzed, such as the trend curve of the increase or decrease of income in the above-mentioned place and time (such as the first quarter of 2023 in city X). After obtaining the above-mentioned trend curve, the trend curve can be summarized to obtain a summary result of the text as a data analysis result.

[0037] After obtaining the second associated content, the LLM can be used to perform data generation on the second associated content to obtain a data generation result.

[0038] Data generation refers to using the LLM to generate based on the retrieved data to obtain newly generated data, and the newly generated data is taken as a data generation result.

[0039] In this embodiment, the second associated content is obtained from the external information, and the LLM performs data generation based on the second associated content. Since the external information is referred to, not only the generation ability of the LLM itself is used, therefore, the data generation of this embodiment can be referred to as retrieval-augmented generation (RAG), which combines language models and information retrieval techniques, thereby improving the accuracy of the data generation result.

[0040] After obtaining the data analysis result and the data generation result, a final query result can be obtained based on the two results, for example, the data analysis result and the data generation result are spliced together as the query result.

[0041] In this embodiment, the first associated content is obtained in the internal information, and the second associated content is obtained in the external information, so that data query can be performed in combination with the internal and external information, and comprehensiveness is improved. The first associated content is subjected to data analysis, and the second associated content is subjected to data generation, and the query result is obtained according to the data analysis result and the data generation result, so that the query result can be obtained in multiple ways, and comprehensiveness is further improved. The data analysis and the data generation are performed by the LLM, so that the powerful data analysis and data generation capabilities of the LLM can be utilized, and accuracy is improved. Therefore, the comprehensiveness and the accuracy of data query can be improved.

[0042] In order to better understand the embodiments of the present disclosure, an application scenario to which the embodiments of the present disclosure can be applied is described.

[0043] Figure 2 is a schematic diagram of an application scenario for implementing the embodiments of the present disclosure.

[0044] In this scenario, a user can input a query statement (query) to a data query system through an application (Application, APP) installed on a user terminal, and the query statement is, for example, “Why is the GDP of city X growing in the first quarter of 2023?”.

[0045] After the data query system receives the query statement, it performs entity recognition on the query statement to obtain target entities in the query statement.

[0046] The data query system can perform entity recognition using a preset entity recognition rule, or the data query system can call an LLM to perform entity recognition on the query statement using the LLM. Taking entity recognition based on the LLM as an example, the data query system can input the query statement and a prompt into the LLM, and the prompt can be preset, such as “identify the entities therein”. The LLM performs entity recognition on the query statement based on the prompt to obtain target entities in the query statement and feeds back to the data query system.

[0047] Based on the above query statement example, the target entities include, for example: domain information: GDP; time information: 2023Q1; geographic information: city X.

[0048] As shown in Figure 2 The query part of the data query system includes a data analysis module 201 and a retrieval-augmented generation (Retrieval-Augmented Generation, RAG) module 202.

[0049] The data analysis module mainly obtains first associated content associated with the target entity in internal information, performs data analysis on the first associated content based on the LLM to obtain a data analysis result.

[0050] The RAG module mainly obtains second associated content associated with the target entity in external information, performs data generation on the second associated content based on the LLM to obtain a data generation result.

[0051] The internal information is, for example, a local database set by the user, and the local database can store a data table. The first associated content is obtained by querying the data table.

[0052] After obtaining the first associated content, the LLM can be used to analyze, calibrate, summarize, etc. the first associated content to obtain the data analysis result.

[0053] The external information is, for example, a search engine. The second associated content is retrieved in external information such as news and forums through the search engine.

[0054] After obtaining the second associated content, the LLM can be used to filter, generate, etc. the second associated content to obtain the data generation result.

[0055] After obtaining the data analysis result and the data generation result, the two results can be spliced to obtain a query result, that is, the query result includes two parts, one part is the data analysis result, and the other part is the data generation result.

[0056] Figure 3 is a schematic diagram of a data analysis module provided according to an embodiment of the present disclosure.

[0057] As shown in Figure 3 , the data analysis module includes a vector retrieval and matching module, an associated index analysis module, and a calibration and summary module.

[0058] The vector retrieval and matching module mainly converts the target entity into an entity vector, matches the entity vector with a field vector in a database, and determines a target field.

[0059] In this way, it can be ensured that the entity in the user query can be correctly mapped to the corresponding field in the database, and the system uses vector search technology to identify the database column name that is most similar to the query entity. For example, “GDP” in the user query can be marked as “gross domestic product” in the database, and the correct field can be matched through vector search technology.

[0060] Correlation index analysis module: mainly based on the knowledge graph to obtain the IF related to the target field, and analyze the trend of the IF in the specified time and place. For example, the time and place contained in the query statement.

[0061] For example, through the knowledge graph, the IF related to "GDP" can be obtained, including: information income, software income, etc. The time trend data of these incomes in the specified time and place can be obtained in the database. Then, the LLM is used to analyze these incomes to obtain the analysis result. For example, the LLM calculates the numerical values of these incomes, and then obtains the GDP value according to the relationship between the incomes and the GDP.

[0062] Calibration and summary module: mainly calibrates the analysis result to obtain the calibration result, and summarizes the calibration result to obtain the data analysis result.

[0063] For example, the query statement input by the user may not be accurate. For example, the query statement indicates that the GDP is increasing, but the correct result may be decreasing. Therefore, during calibration, it is mainly judged whether the GDP is increasing. For example, after analysis, the accurate GDP value can be obtained, and based on the GDP value, it can be judged whether the GDP is increasing. If the query statement is wrong, the query statement is calibrated, and the calibration result is "the GDP of city X in the first quarter of 2023 is decreasing".

[0064] After obtaining the calibration result, the calibration result and the analysis result are summarized to obtain the data analysis result. For example, the data analysis result is "the GDP value of city X in the first quarter of 2023 is Y yuan, which is derived from information income and software income". For another example, if the correct result of the GDP is decreasing, the data analysis result can be "the GDP value of city X in the first quarter of 2023 is Y yuan, which is decreasing", which can correct the user's query error in time and improve the accuracy of the query result.

[0065] Figure 4 is a schematic diagram of the RAG module provided by the embodiments of the present disclosure.

[0066] As shown in Figure 4 , the RAG module includes a time-sensitive retrieval module, a multi-dimensional filtering module, and a generation module.

[0067] Time-sensitive retrieval module: the general retrieval is based on the similarity between the candidate document and the target entity. In this embodiment, in order to improve the timeliness, the retrieval module mainly obtains the candidate document whose publishing time matches the time information in the target entity.

[0068] Specifically, the target entity is converted into an entity vector, matched with the pre-processed document segments, and the documents published within a relevant time period (such as the first quarter of 2023) are preferentially retrieved, thereby ensuring the timeliness and relevance of the retrieval results.

[0069] Multi-dimensional filtering module: based on LLM, the retrieval results are filtered in multiple dimensions, including relevance to query indicators, time matching degree, geographic matching degree, etc. Only those contents meeting all the standards will be retained and enter the next summary generation process.

[0070] Summary and generation module: using LLM to summarize and generate the filtered results. In addition, when generating data, the information source (such as document title, website address, etc.) corresponding to the filtered results will be referred to, in order to improve the credibility of the generated content. For example, preferentially referring to the content of authoritative websites, etc.

[0071] The data generation result is, for example, "Some opinions believe that the GDP growth of City X in the first quarter of 2023 is mainly due to..."

[0072] After obtaining the data analysis result and the data generation result, the two results can be spliced to obtain the query result, for example, the query result is "The GDP value of City X in the first quarter of 2023 is Y yuan, which is derived from information income and software income; Some opinions believe that the GDP growth of City X in the first quarter of 2023 is mainly due to..."

[0073] In combination with the above application scenarios, the present disclosure further provides the following embodiments.

[0074] Figure 5 is a schematic diagram according to the second embodiment of the present disclosure, and the present embodiment provides a data query method based on a large model, which comprises:

[0075] 501. Using LLM to perform entity recognition on the query sentence to obtain the target entity in the query sentence.

[0076] For example, the data query system can input the query sentence and the prompt information (prompt) into the LLM, and the prompt information can be pre-set, such as "recognize the entity therein", and the LLM performs entity recognition on the query sentence based on the prompt information to obtain the target entity in the query sentence and feeds back to the data query system.

[0077] In the present embodiment, the target entity in the query sentence is obtained based on the LLM, which can utilize the excellent performance of the LLM to improve the accuracy of the target entity and thus improve the data query accuracy.

[0078] 502、obtain first associated content associated with the target entity in the internal information, and perform data analysis on the first associated content based on the LLM to obtain a data analysis result.

[0079] For the first associated content: convert the target entity into an entity vector; obtain target content matching the entity vector in the internal information; obtain related content of the target content based on a preset knowledge graph; and take the target content and the related content as the first associated content.

[0080] For example, the internal information is a local database, and a query statement can be converted into a query instruction, such as a structured query language (SQL) instruction. The query statement can be converted into a query instruction based on a preset rule or the LLM, and the query instruction contains an entity vector corresponding to the target entity. The target field (such as the domestic gross product value) matching the target entity (such as the GDP) can be obtained by querying the local database through the query instruction. Then, the target field and its field value (such as the specific GDP value) are taken as the target content.

[0081] After obtaining the target content, the related content of the target content can be obtained based on the knowledge graph. For example, the knowledge graph shows that the GDP is related to information income and software income, so the information income and software income are taken as the related content. Alternatively, the specific values of these related contents (such as information income and software income) can be obtained in the local database, and these indicators (information income and software income) and their values are taken as the related content.

[0082] In this embodiment, the target entity is converted into an entity vector, and the target content is obtained based on the entity vector, which can solve the problem of inconsistency between the target entity in the query statement and the stored target content, and improve the comprehensiveness and accuracy of the query. The target content and the related content are taken as the first associated content through the knowledge graph, which can further improve the comprehensiveness and accuracy of the query.

[0083] For data analysis: the LLM is used to analyze the first associated content to obtain an analysis result; the LLM is used to calibrate the query statement based on the analysis result to obtain a calibration result; and the LLM is used to summarize the analysis result and the calibration result to obtain the data analysis result.

[0084] For example, the value of the relevant index can obtain the time trend data of the relevant index, and the analysis result is obtained based on the time trend data, such as information income increasing leading to GDP growth; in addition, the correct result of whether the GDP is increasing can be determined based on the GDP value obtained in the local database, if the correct result is inconsistent with the query statement, the query statement is calibrated, such as the query statement indicating that the GDP is increasing, but the correct result may be decreasing, and the calibration result indicates that the GDP is decreasing, which is beneficial to error correction and improves the data query accuracy. Then, the analysis result and the calibration result can be summarized by using the LLM to obtain the data analysis result.

[0085] In this embodiment, the data analysis result obtained by analysis, calibration and summarization can improve the accuracy of the data analysis result, and further improve the data query accuracy.

[0086] 503、In the external information, obtain second associated content associated with the target entity, and generate data based on the LLM to obtain data generation result.

[0087] For the second associated content: based on the publication time of the external information, obtain external information that matches the query statement in time; in the time-matched external information, obtain second associated content associated with the target entity.

[0088] For example, assuming that the query statement is to inquire about the situation in the first quarter of 2023, in the external information, the text data with the publication time in the first quarter of 2023 is taken as the time-matched external information.

[0089] For these text data with the publication time in the first quarter of 2023, the relevant text data can be obtained as the second associated content according to the similarity with the target entity, which can be the vector similarity.

[0090] In this embodiment, by obtaining the second associated content in the time-matched external information, the timeliness and relevance of data query can be improved.

[0091] For data generation: filter the second associated content by using the LLM to obtain a filtering result; and generate the filtering result based on the information source corresponding to the filtering result by using the LLM to obtain the data generation result.

[0092] Wherein, the filtering can be multi-dimensional filtering, such as filtering according to time, geography, index and the like, removing the results inconsistent with the time, geography, index and the like in the query statement in the search results to obtain the filtering result.

[0093] The filtered result is usually text data, and the corresponding information source can be a website address, title, or the like of the text data. When the data is generated, the LLM can combine the website address and title of the text data to generate the data, and obtain a data generation result.

[0094] In this embodiment, data generation is performed by filtering and combining information sources, which can improve the accuracy of the data generation result.

[0095] 504、Based on the data analysis result and the data generation result, obtain a query result corresponding to the query statement.

[0096] For example, the data analysis result and the data generation result are spliced to obtain the query result.

[0097] Figure 6 is a schematic diagram according to the third embodiment of the present disclosure. This embodiment provides a data query device based on a large model, as shown in Figure 6 The device 600 includes an identification module 601, an analysis module 602, a generation module 603, and an acquisition module 604.

[0098] The identification module 601 is configured to perform entity recognition on a query statement to obtain a target entity in the query statement. The analysis module 602 is configured to obtain first associated content associated with the target entity in internal information, perform data analysis on the first associated content based on an LLM to obtain a data analysis result. The generation module 603 is configured to obtain second associated content associated with the target entity in external information, perform data generation on the second associated content based on the LLM to obtain a data generation result. The acquisition module 604 is configured to obtain a query result corresponding to the query statement based on the data analysis result and the data generation result.

[0099] In this embodiment, the first associated content is obtained in the internal information, and the second associated content is obtained in the external information, which can combine internal and external information for data query and improve comprehensiveness. The first associated content is analyzed and the second associated content is generated, and the query result is obtained according to the data analysis result and the data generation result, which can obtain the query result in multiple ways and further improve comprehensiveness. Data analysis and data generation are performed by the LLM, which can utilize the powerful data analysis and data generation capabilities of the LLM to improve accuracy. Therefore, the comprehensiveness and accuracy of data query can be improved.

[0100] In some embodiments, the analysis module 602 is further configured to:

[0101] convert the target entity into an entity vector;

[0102] obtain target content matching the entity vector in the internal information;

[0103] obtain related content of the target content based on a preset knowledge graph;

[0104] take the target content and the related content as the first associated content.

[0105] In this embodiment, the target entity is converted into an entity vector, and the target content is obtained based on the entity vector, which can solve the problem of inconsistency between the target entity in the query statement and the stored target content, and improve the comprehensiveness and accuracy of the query; the related content is obtained through the knowledge graph, and the target content and the related content are taken as the first associated content, which can further improve the comprehensiveness and accuracy of the query.

[0106] In some embodiments, the analysis module 602 is further configured to:

[0107] analyze the first associated content using the LLM to obtain an analysis result;

[0108] calibrate the query statement based on the analysis result using the LLM to obtain a calibration result;

[0109] summarize the analysis result and the calibration result using the LLM to obtain the data analysis result.

[0110] In this embodiment, the data analysis result is obtained through analysis, calibration and summarization, which can improve the accuracy of the data analysis result and further improve the data query accuracy.

[0111] In some embodiments, the generation module 603 is further configured to:

[0112] obtain external information matching the query statement in time based on the publication time of the external information;

[0113] obtain second associated content associated with the target entity in the time-matched external information.

[0114] In this embodiment, the second associated content is obtained in the time-matched external information, which can improve the timeliness and relevance of data query.

[0115] In some embodiments, the generation module 603 is further configured to:

[0116] filter the second associated content using the LLM to obtain a filtering result;

[0117] generate the filtering result based on the information source corresponding to the filtering result using the LLM to obtain the data generation result.

[0118] In this embodiment, the data generation can be performed by filtering and combining information sources, so as to improve the accuracy of the data generation result.

[0119] In some embodiments, the identification module 601 is further configured to:

[0120] perform entity recognition on the query statement based on the LLM to obtain the target entity.

[0121] In this embodiment, the target entity in the query statement is obtained based on the LLM, which can improve the accuracy of the target entity by using the excellent performance of the LLM, and further improve the data query accuracy.

[0122] It can be understood that the same or similar contents in different embodiments in the embodiments of the present disclosure can be mutually referred to.

[0123] It can be understood that "first", "second", and the like in the embodiments of the present disclosure are only used for distinction, and do not represent importance level, time sequence, and the like.

[0124] It can be understood that the order of steps in the flow is not limited in terms of time sequence unless otherwise specified.

[0125] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations, and do not violate public order and good customs.

[0126] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.

[0127] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, servers, blades, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present disclosure described and / or claimed in this document.

[0128] As Figure 7As shown, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded into a random access memory (RAM) 703 from a storage unit 708. Various programs and data required for the operation of the electronic device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0129] A plurality of components in the electronic device 700 are connected to the I / O interface 705, including an input unit 706 such as a keyboard, a mouse, and the like, an output unit 707 such as various types of displays, a speaker, and the like, a storage unit 708 such as a magnetic disk, an optical disk, and the like, and a communication unit 709 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0130] The computing unit 701 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 701 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 appropriate processor, controller, microcontroller, and the like. The computing unit 701 performs various methods and processes described above, such as the large model-based data query method. For example, in some embodiments, the large model-based data query method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the large model-based data query method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the large model-based data query method by any other appropriate means, such as by means of firmware.

[0131] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0132] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable computing apparatus to produce a machine, such that the program code, when executed by the processor or controller, implements the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as part of a standalone software package, or entirely on a remote machine or server.

[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0134] 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 the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0135] The systems and techniques described here can be implemented in a computing system that includes a back end 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 back end, 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 a local area network (LAN), a wide area network (WAN), and the Internet.

[0136] The computer system can include clients and servers. A client and server are generally 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. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The server can also be a server of a distributed system, or a server combined with a blockchain.

[0137] It should be understood that various forms of flow shown above can be used with orders of steps reordered, added to, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure are achieved, which are not limited herein.

[0138] The above detailed description does not limit the scope of the disclosure. Various modifications, combinations, sub-combinations and alternatives can be made to the detailed description. Any modification, equivalent replacement and improvement etc. made within the spirit and principle of the disclosure shall be included in the scope of the disclosure.

Claims

1. A data query method based on a large model, comprising: Entity recognition is performed on the query statement to obtain the target entity in the query statement; Obtain the first associated content related to the target entity from the internal information, and perform data analysis on the first associated content based on the Large Language Model (LLM) to obtain the data analysis results. Obtain second associated content related to the target entity from external information, and generate data based on the LLM to obtain data generation results; The data analysis results and the data generation results are concatenated to obtain the query results corresponding to the query statement; The first associated content is related to the target field obtained based on a knowledge graph, and the target field is obtained based on vector search. The data analysis results are obtained by summarizing the calibration results and analysis results. The analysis results are obtained by analyzing the relevant content of the target field. The calibration results are obtained by calibrating the query statement based on the analysis results.

2. The method according to claim 1, wherein, The step of obtaining the first associated content related to the target entity from the internal information includes: Convert the target entity into an entity vector; Obtain the target content that matches the entity vector from the internal information; Based on a pre-defined knowledge graph, relevant content of the target content is obtained; The target content and the related content are used as the first associated content.

3. The method according to claim 1, wherein, The data analysis of the first associated content based on LLM to obtain data analysis results includes: The LLM is used to analyze the first associated content to obtain analysis results; Using the LLM, the query statement is calibrated based on the analysis results to obtain calibration results; The LLM is used to summarize the analysis results and the calibration results to obtain the data analysis results.

4. The method according to claim 1, wherein, The step of obtaining the second associated content related to the target entity from external information includes: Based on the publication time of the external information, obtain external information that matches the time of the query statement; From the time-matched external information, obtain the second associated content related to the target entity.

5. The method according to claim 1, wherein, The step of generating data for the second associated content based on the LLM to obtain data generation results includes: The LLM is used to filter the second associated content to obtain the filtering result; Using the LLM, the filtering result is generated based on the information source corresponding to the filtering result to obtain the data generation result.

6. The method according to claim 1, wherein, The step of performing entity recognition on the query statement to obtain the target entity in the query statement includes: Based on the LLM, entity recognition is performed on the query statement to obtain the target entity.

7. A data query device based on a large model, comprising: The identification module is used to perform entity identification on the query statement in order to obtain the target entity in the query statement. The analysis module is used to obtain the first associated content related to the target entity from the internal information, and perform data analysis on the first associated content based on the Large Language Model (LLM) to obtain data analysis results. The generation module is used to obtain second associated content related to the target entity from external information, and generate data on the second associated content based on the LLM to obtain data generation results; The acquisition module is used to concatenate the data analysis results and the data generation results to obtain the query results corresponding to the query statement; The first associated content is related to the target field obtained based on a knowledge graph, and the target field is obtained based on vector search. The data analysis results are obtained by summarizing the calibration results and analysis results. The analysis results are obtained by analyzing the relevant content of the target field. The calibration results are obtained by calibrating the query statement based on the analysis results.

8. The apparatus according to claim 7, wherein, The analysis module is further used for: Convert the target entity into an entity vector; Obtain the target content that matches the entity vector from the internal information; Based on a pre-defined knowledge graph, relevant content of the target content is obtained; The target content and the related content are used as the first associated content.

9. The apparatus according to claim 7, wherein, The analysis module is further used for: The LLM is used to analyze the first associated content to obtain analysis results; Using the LLM, the query statement is calibrated based on the analysis results to obtain calibration results; The LLM is used to summarize the analysis results and the calibration results to obtain the data analysis results.

10. The apparatus according to claim 7, wherein, The generation module is further used for: Based on the publication time of the external information, obtain external information that matches the time of the query statement; From the time-matched external information, obtain the second associated content related to the target entity.

11. The apparatus according to claim 7, wherein, The generation module is further used for: The LLM is used to filter the second associated content to obtain the filtering result; Using the LLM, the filtering result is generated based on the information source corresponding to the filtering result to obtain the data generation result.

12. The apparatus according to claim 7, wherein, The identification module is further used for: Based on the LLM, entity recognition is performed on the query statement to obtain the target entity.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Data processing method and related equipment

    CN116910202A