Data query method and device based on large language model and computer program product

By parsing and adjusting query requests with a large language model, the problem of difficulty in capturing user intent in traditional systems is solved, achieving more efficient and accurate data query results.

CN120653764APending Publication Date: 2025-09-16BAIDU USA LLC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510808287.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-03-20
Filing Date
2025-06-17
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Traditional search and recommendation systems find it difficult to accurately capture users' deep intentions when processing fuzzy queries, resulting in low matching between search results and users.

Method used

The query request of the target object is parsed through a large language model, its real demands are determined based on the object's background information, the query request is adjusted to generate an adjusted query request that can fully express the user's needs, and data query is performed.

Benefits of technology

The efficiency and accuracy of obtaining data query results are improved, and the matching degree between query results and users is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653764A_ABST
    Figure CN120653764A_ABST
Patent Text Reader

Abstract

The invention provides a data query method and device based on a large language model, electronic equipment, a storage medium and a computer program product, relates to the technical field of computers, in particular to the technical field of artificial intelligence large models, natural language understanding and data recommendation, and can be applied to a data recommendation scene. According to the specific implementation scheme, through a large language model, according to object background information of a target object, a query request of the target object is analyzed, and an object appeal of the target object is determined; adjusting the query request according to the object appeal, and generating an adjusted query request; and performing data query according to the adjusted query request to obtain a data query result. According to the method, the acquisition efficiency and accuracy of the data query result and the matching degree of the data query result and the target object are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to the field of artificial intelligence big models, natural language understanding, and data recommendation technology, and in particular to a data query method, device, electronic device, storage medium, and computer program product based on a big language model, which can be applied in data recommendation scenarios. Background Art

[0002] In traditional search and recommendation systems, users need to manually adjust their query terms to instruct the search and recommendation system to search for data. The search results returned by the search and recommendation system have a low degree of match with the user, especially when dealing with ambiguous queries, making it difficult to accurately capture the user's deeper intent. Summary of the Invention

[0003] The present disclosure provides a data query method, device, electronic device, storage medium, and computer program product based on a large language model.

[0004] According to a first aspect, a data query method based on a large language model is provided, comprising: using the large language model, based on object background information of the target object, parsing a query request of the target object to determine the object demand of the target object; adjusting the query request based on the object demand to generate an adjusted query request; performing a data query based on the adjusted query request to obtain a data query result.

[0005] According to a second aspect, a data query device based on a large language model is provided, comprising: a parsing unit configured to parse a query request of a target object based on object background information of the target object through a large language model, and determine the object appeal of the target object; an adjustment unit configured to adjust the query request based on the object appeal and generate an adjusted query request; and a query unit configured to perform a data query based on the adjusted query request and obtain a data query result.

[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to 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 so as to enable the at least one processor to execute the method described in any implementation manner of the first aspect.

[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method as described in any implementation of the first aspect.

[0008] According to a fifth aspect, a computer program product is provided, comprising: a computer program, which implements the method described in any implementation manner of the first aspect when executed by a processor.

[0009] According to the technology disclosed in the present invention, a data query method and device based on a large language model are provided. Through the large language model, the query request of the target object is parsed according to the object background information of the target object, and the real and deep object demands of the target object are determined; according to the object demands, the query request is adjusted to generate an adjusted query request that can fully express the real needs of the target object; data query is performed according to the adjusted query request to conveniently obtain data query results, thereby improving the efficiency and accuracy of obtaining data query results, as well as the matching degree between the data query results and the target object.

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

[0011] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure. Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied; Figure 2 is a flow chart of an embodiment of a data query method based on a large language model according to the present disclosure; Figure 3 A structural diagram of an embodiment of a data query system based on a large language model according to the present disclosure; Figure 4 is a schematic diagram of an application scenario of the data query method based on a large language model according to this embodiment; Figure 5 is a flowchart of another embodiment of a data query method based on a large language model according to the present disclosure; Figure 6 is a structural diagram of an embodiment of a data query device based on a large language model according to the present disclosure; Figure 7 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0012] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0013] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0014] Figure 1 An exemplary architecture 100 is shown to which the data query method and apparatus based on a large language model of the present disclosure can be applied.

[0015] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The communication connections between terminal devices 101, 102, and 103 constitute a topological network, and network 104 is used to provide a medium for communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0016] Terminal devices 101, 102, and 103 can be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices that support network connection, information acquisition, interaction, display, processing, and other functions, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules, for example, to provide distributed services, or they can be implemented as a single software or software module. No specific limitations are given here.

[0017] Server 105 can be a server that provides various services, such as a backend processing server that receives query requests sent by target objects via terminal devices 101, 102, and 103 and determines data query results corresponding to the query requests based on a large language model. Optionally, the server can feed the data query results back to the terminal devices. For example, server 105 can be a cloud server.

[0018] It should be noted that a server can be either hardware or software. When a server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When a server is software, it can be implemented as multiple software programs or software modules (for example, software or software modules used to provide distributed services), or as a single software program or software module. This is not specifically limited here.

[0019] It should also be noted that the large language model-based data query method provided in the embodiments of the present disclosure is generally executed by a server, but this does not rule out the possibility of execution by a terminal device, or of a server and a terminal device cooperating with each other. Accordingly, the various components (e.g., various units) of the large language model-based data query apparatus can be entirely located in the server, entirely located in the terminal device, or even separately located in the server and the terminal device.

[0020] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system is merely illustrative. Any number of terminal devices, networks, and servers may be provided as needed. When the electronic device on which the large language model-based data query method is running does not need to transmit data to other electronic devices, the system architecture may only include the electronic device (e.g., terminal device or server) on which the large language model-based data query method is running.

[0021] Please refer to Figure 2 , Figure 2 This is a flow chart of a data query method based on a large language model provided by an embodiment of the present disclosure. Figure 3 , shows an interactive diagram of a data query system based on a large language model. In process 200, the following steps are included: In step 201 , a query request of a target object is parsed based on the object background information of the target object through a large language model to determine the object appeal of the target object.

[0022] In this embodiment, the execution subject of the data query method based on the large language model (for example, Figure 1 The server in the target object can obtain the query request of the target object and, using the large language model, parse the query request based on the target object's object background information to determine the target object's object demand. The object demand is used to represent the target object's true and complete needs and intentions.

[0023] Target objects include, for example, people, other smart devices, artificial intelligence assistants, and other objects. The object context information of the target object includes, but is not limited to, the user profile data of the target object, the context data of the query request, the items involved in the query request, the market environment related to the service, etc. User profile data includes the user's basic attribute data, preference and interest data, social data, etc.; context information includes historical query requests and historical data query results corresponding to historical query requests; product market environment includes, for example, the changing trends in demand, sales volume, market share, etc. for a specific product. The service market environment includes, for example, the development trends of the service industry, such as financial services, healthcare services, and travel services. It should be noted that object context information is collected with the user's authorization. Taking the target object as an example, a display interface for indicating user authorization is displayed to the user through the user's preset terminal, so that data collection is performed with the user's consent, that is, with the user's authorization.

[0024] As an example, the execution entity first filters background information related to the target object from the background information database 303. For example, based on the target object's unique identifier, the execution entity filters the background information associated with the unique identifier from the background information database. Then, the target object's query request is input into the large language model. Leveraging the model's natural language understanding capabilities, the query is initially parsed, extracting key information and core questions. The initial parsing results are then integrated with the determined background information and input into the large language model for in-depth analysis. The model comprehensively considers the target object's background information to provide a deeper understanding and interpretation of the query request. Finally, based on the in-depth analysis results, the large language model generates the target object's object appeal. Optionally, to verify the accuracy of the object appeal, multiple rounds of interaction with the target object can be conducted in the form of questions. The large language model is deployed in the Thinker module, which serves as the core processing unit of the entire intelligent system and is driven by the advanced large language model.

[0025] As another example, first, a knowledge graph is constructed that covers knowledge across various dimensions. The knowledge domains covered by the knowledge graph are sufficient to cover various queries corresponding to the target object. Then, the target object's background information is mapped into the knowledge graph to identify relevant nodes and paths. Simultaneously, the target object's query is subjected to natural language processing to extract key semantic information, which is then matched and searched within the knowledge graph. For example, for a query request regarding "how to improve battery life" from a company specializing in new energy vehicle battery research and development, the model will associate its background information (such as its technology areas and R&D directions) with relevant nodes in the knowledge graph. It will also perform semantic analysis on the query "improve battery life" to identify relevant technical paths and solutions within the knowledge graph. Finally, by analyzing the association paths and weights between background information nodes and query semantic nodes in the knowledge graph, the target object's potential demands and key concerns are identified. Node combinations with shorter association paths and higher weights tend to represent the target object's core concerns. For example, if the association path from the target object background information node to nodes such as "solid-state battery technology" and "charging facility construction" in the knowledge graph is short and has a high weight, the model can determine that its demand may be to understand these cutting-edge technologies and development trends that are directly related to improving battery life, and how to apply them in corporate R&D and market layout.

[0026] In some optional implementations of this embodiment, the execution entity may perform step 201 as follows: The first step is to determine the target object's corresponding appeal scenario and the target object's process stage under the appeal scenario based on the target object's background information.

[0027] In this implementation, the object background information of the target object is input into the large language model. Based on the natural language understanding of the object background information, the large language model can determine the demand scenario targeted by the query request of the target object and the process stage of the target object in the demand scenario.

[0028] Demand scenarios include e-commerce shopping scenarios (more specifically, the purchase of a certain item), personalized content (such as news, short videos) recommendation scenarios, smart assistants and interactive search scenarios, cross-domain information mining and recommendation scenarios, and business intelligence and precision marketing scenarios.

[0029] The process stage in the appeal scenario refers to the links or steps with relative independence and specific functions that are divided according to the nature, goals, position and role of the activities in a series of orderly and interrelated activities or processes.

[0030] For example, in a marketing context, process stages are journey stages in a marketing funnel model. Journey stages typically refer to the various stages a customer goes through from initial exposure to a brand or product to final purchase and becoming a loyal customer. They encompass the psychological and behavioral changes a customer undergoes during the purchasing decision process.

[0031] Specifically, the customer journey stages include awareness, interest, consideration, decision, action, loyalty, and recommendation. In the awareness stage, potential customers first encounter a brand or product and begin to learn about it. Companies use advertising, social media, and content marketing to increase brand awareness and attract potential customers' attention. In the interest stage, potential customers develop an interest in the brand or product and begin actively seeking more information. Companies need to provide valuable content, such as detailed product information, customer reviews, and case studies, to help them better understand the product's value. In the consideration stage, customers begin to compare different options and evaluate the brand and competitors' products. Companies can attract customers by offering trials, discounts, and detailed product comparisons, showcasing their product's unique selling points. In the decision stage, customers make a purchase decision. At this stage, companies need to provide clear purchasing instructions, price transparency, and after-sales service to facilitate the transaction. In the action stage, customers complete their purchase and become regular customers. Companies need to focus on the customer's purchasing experience, ensuring smooth delivery and excellent after-sales service to enhance customer satisfaction and loyalty. In the loyalty stage, after the purchase, the brand's goal is to convert the customer into a loyal customer. Brands can enhance customer loyalty through continuous customer care, membership systems, and high-quality after-sales services. In the referral stage, satisfied customers will actively recommend the brand to other potential customers, further promoting brand communication.

[0032] The second step is to parse the query request and determine the target demand based on the demand scenario and process stage.

[0033] In this implementation, the large language model combines the demand scenario and process stage to parse the query request of the target object and determine the real and complete object demand of the target object.

[0034] It's understandable that the appeal scenario and process stage directly influence the target audience's appeal. For the same user query request, the user's appeal varies depending on the user's stage of the process. For example, for the query "smartwatch," the target audience in the awareness stage might simply want to understand what a smartwatch is, its basic functions, or which brands are available. Their understanding of smartwatches is still preliminary, and they don't have a clear purchase intention. The target audience in the interest stage might want to learn about the features of a smartwatch from a certain brand (such as Apple or Huawei), or specific information such as its battery life and health monitoring capabilities.

[0035] In this implementation, the large language model determines the process stage of the target object in the demand scenario based on the object background information, and then parses the query request based on the demand scenario and process stage to determine the object demand, thereby improving the accuracy of the object demand and providing accurate data basis for subsequent data query processes.

[0036] In some optional implementations of this embodiment, the object background information includes historical query requests of the target object within a first time period up to the present, the first historical data query results corresponding to the historical query requests, and the first interactive behavior data of the target object for the first historical data query results.

[0037] The length of the first time period can be set according to actual conditions. The first interactive behavior data includes clicks, slides, dwell time, bounce rate, purchase behavior, collection, sharing, etc.

[0038] In general, the first time period is short, so that the large language model can determine the target object's object appeal based on short-term changes in the target object (such as changes in the target object's interests in a short period of time).

[0039] In this implementation, the large language model can interact directly with the target object via a conversational interface or indirectly via a search box-like format. The historical query requests within the first time period and the first historical data query results corresponding to the historical query requests can be context data from the current session or cross-session context data.

[0040] In this implementation, the execution subject may perform the second step as follows: according to the demand scenario, process stage, historical query request, first historical data query result and first interactive behavior data, analyze the query request and determine the target demand.

[0041] Based on the consideration of the demand scenarios and process stages, the large language model further considers the historical query requests, the first historical data query results and the first interactive behavior data within the first time period, so as to keenly perceive the short-term change data of the target object, further improving the accuracy of the object demand; so that the subsequent data query results can more accurately meet the changes in user needs, and enhance the user's trust and satisfaction with the recommendation system.

[0042] In some optional implementations of this embodiment, the execution entity may perform the object demand determination process in the following manner: First, dynamic prompt words are generated according to the demand scenario, process stage, historical query request, first historical data query result and first interactive behavior data.

[0043] As an example, the above execution entity can be based on Figure 3 The dynamic prompt word generation module 304 shown in generates dynamic prompt words according to the demand scenario, process stage, historical query request, first historical data query result and first interactive behavior data.

[0044] Among them, the dynamic prompt word generation module can be integrated into the language model or independent of the large language model.

[0045] Then, based on the dynamic prompt words, the query request is parsed to determine the object demand.

[0046] In this implementation, the dynamic prompt words are input into the large language model, and the large language model parses the query request under the guidance of the dynamic prompt words to determine the object appeal of the target object.

[0047] In this implementation, based on dynamic prompt words, the large language model can more accurately understand data such as the demand scenario, process stage, historical query requests, first historical data query results and first interactive behavior data, which helps to further improve the accuracy of the object demand.

[0048] Step 202: Adjust the query request according to the object's requirements to generate an adjusted query request.

[0049] In this embodiment, the execution subject may adjust the query request according to the object's requirements and generate an adjusted query request.

[0050] As an example, if it is determined that the query request of the target object cannot fully express the object's requirements, for example, some key requirements in the object's requirements are omitted in the query request, then a completion operation is performed based on the omitted part, that is, the query request is expanded or continued to generate an adjusted query request.

[0051] As another example, if it is determined that the query request of the target object cannot accurately express the object's demands, for example, the query request incorrectly expresses some key demands in the object's demands, then a modification operation is performed based on the erroneous part, that is, the query request is rewritten to generate an adjusted query request.

[0052] In some optional implementations of this embodiment, the execution subject may perform step 202 as follows: using a large language model, adjusting the query request according to the object's demands, and generating an adjusted query request.

[0053] Based on the powerful logical reasoning and natural language understanding capabilities of the large language model, it is possible to target demands and adjust some data that is not clearly expressed or expressed incorrectly in the query request, thereby rewriting or continuing the query request to generate an adjusted query request.

[0054] In this implementation, the powerful logical reasoning and natural language understanding capabilities of the large language model are utilized to improve the generation efficiency and accuracy of the adjusted query requests.

[0055] Step 203: perform data query according to the adjusted query request to obtain a data query result.

[0056] In this embodiment, the execution entity may perform a data query according to the adjusted query request to obtain a data query result.

[0057] As an example, the execution entity may first generate a query statement for the database based on the adjusted query request, such as a SQL (Structured Query Language) statement for a structured database. The entity then analyzes the adjusted query request, extracting key information and conditions, such as the query subject, entities involved, time range, and location. Based on this key information, the entity constructs a corresponding SQL query statement. The entity then uses a database connection tool or programming language (such as the SQLAlchemy library in Python) to establish a connection to the target database, sending the constructed SQL statement to the database to execute the query and obtain the data query results. Finally, the entity performs preliminary processing on the data query results, such as removing duplicate data and filtering irrelevant information. The entity then sorts, groups, and aggregates the data as needed to better meet the needs of the target database.

[0058] As another example, first, the adjusted query request represented in natural language is input into a data visualization tool that supports natural language processing (such as Tableau or Power BI). The tool automatically parses the query request, identifies key information, and converts it into appropriate query conditions and parameters. Then, based on the set query conditions, the data visualization tool automatically connects to the appropriate data source (such as a database, data warehouse, or Excel file). The tool automatically executes the data query in the background, retrieving data that meets the query conditions from the data source. Finally, the tool automatically analyzes the query results using built-in intelligent analysis capabilities, such as trend analysis, correlation analysis, and anomaly detection. Based on the analysis results, corresponding visualization charts, such as line charts, bar charts, and maps, are automatically generated to intuitively display the data's changing trends, distribution, and interrelationships.

[0059] In some optional implementations of this embodiment, the execution entity may perform step 203 as follows: In the first step, a target search tool for processing the adjusted query request is determined from a set of search tools using a large language model.

[0060] The search tool set includes a variety of search tools, including but not limited to web search tools, video search tools, and product search tools. The search tool set can be supported by the tool module 302, which encapsulates the task interface call, allowing the large language model to easily call various search tools.

[0061] In some implementations, the tool module also has the ability to be independently expanded, and new types of search tools can be added as needed to meet the needs of different users. As an example, the execution entity can provide the user with a search tool extension interface that includes the search tool's task interface, search functions, and other entry information.

[0062] There may be one or more target search tools.

[0063] The second step is to use the target search tool to perform data query according to the adjusted query request to obtain data query results.

[0064] The target search tool is called through the task interface corresponding to the target search tool, so that the target search tool performs data query according to the adjusted query request and obtains the data query result.

[0065] In this implementation, the large language model automatically determines the target search tool for executing the data query, and executes the data query task through the appropriate search tool, which helps to improve the accuracy of the data query results and the adaptability of the data query results to the target object.

[0066] Continue to see Figure 4 , Figure 4 Figure 400 is a schematic diagram of an application scenario of the large language model-based data query method according to this embodiment. First, server 401 obtains a query request for a target object from terminal device 403 corresponding to target object 402. Next, the target object's object background information is determined from a background information database 404. Then, using large language model 405, the query request is parsed based on the target object's object background information to determine the target object's object appeal. Based on the object appeal, the query request is adjusted to generate an adjusted query request. Data is then queried based on the adjusted query request to obtain a data query result.

[0067] In this embodiment, a data query method and device based on a large language model are provided. Through the large language model, the query request of the target object is parsed according to the object background information of the target object to determine the real and complete object demand of the target object; according to the object demand, the query request is adjusted to generate an adjusted query request that can fully express the real needs of the target object; data query is performed according to the adjusted query request to conveniently obtain data query results, thereby improving the efficiency and accuracy of obtaining data query results, as well as the matching degree between the data query results and the target object.

[0068] In some optional implementations of this embodiment, the above-mentioned execution entity can also perform the following operations: first, determine the second historical data query results corresponding to the target object in the second time period and the second interactive behavior data of the target object with respect to the second historical data query results; then, fine-tune the large language model based on the second historical data query results and the second interactive behavior data.

[0069] The length of the second time period can be set according to actual conditions. Generally, the length of the second time period is longer than the length of the first time period. The second interactive behavior data includes clicks, slides, dwell time, bounce rate, purchase behavior, collection, sharing, etc.

[0070] As an example, the above-mentioned execution entity can filter out the second historical data query results corresponding to the target object in the second time period and the second interactive behavior data of the target object with respect to the second historical data query results from the background information database 303, and intelligently organize the [second historical data query results, second interactive behavior data] information as sample data, and continuously fine-tuning the large language model according to the sample data of the current service scenario (such as a specified vertical category). This can provide search recommendation services to terminal users while continuously fine-tuning and optimizing the large language model in the current scenario, which helps to improve the data processing capabilities of the large language model in the target scenario.

[0071] In some optional implementations of this embodiment, the execution entity may further perform the following operations: The first step is to use a large language model to determine whether the data query results meet the object requirements and whether the data query results meet the preset structured requirements.

[0072] The preset structured requirements are represented by a schema 305. The large language model refers to the data structured requirements of the final UI (User Interface) defined in the schema to determine whether the determined data query structure satisfies the data fields in the data structured requirements.

[0073] The large language model can analyze the data query results to determine whether the data query results meet the target audience's needs and whether the data query results meet the preset structural requirements. If it is determined that the data query results do not meet the target audience's needs and / or the data query results do not meet the preset structural requirements, the data query results are identified as not meeting the target audience's needs and / or the data query results as not meeting the preset structural requirements.

[0074] In the second step, in response to determining that the information is not satisfied, a supplementary query is performed based on the non-compliant items through the large language model to obtain a supplementary query result.

[0075] In response to determining that the data query results do not meet the object requirements and / or the data query results do not meet the preset structured requirements, a supplementary query is performed through a large language model based on the data query results for the unsatisfied items of the object requirements and / or the data query results for the unsatisfied items of the preset structured requirements to supplement the query data corresponding to the unsatisfied items and obtain a supplementary query result.

[0076] The third step is to update the data query results based on the supplementary query results until the updated data query results meet the object requirements and preset structured requirements.

[0077] As an example, the supplementary query result is added to the data query result to obtain an updated data query result.

[0078] In this implementation, the execution subject may iteratively execute the first and third steps until the final updated data query result meets the object requirements and preset structured requirements.

[0079] In this implementation, the data query process based on the large language model needs to undergo a rigorous verification process so that the final output data query results meet the object requirements and preset structured requirements, ensuring the consistency, completeness and accuracy of the data query results.

[0080] In some optional implementations of this embodiment, the execution entity may perform the second step in the following manner: First, a large language model is used to determine supplementary query requests based on non-compliant items.

[0081] In this implementation, the above-mentioned execution entity can use the powerful logical reasoning ability and natural language understanding ability of the large language model to generate a supplementary query request that can search for data requirements that meet the non-compliant items.

[0082] Specifically, a supplementary query request is determined through a large language model according to non-conformance items, demand scenarios, process stages, historical query requests, first historical data query results, and first interactive behavior data.

[0083] Then, a supplementary search tool for processing the supplementary query request is determined from the search tool collection through the large language model.

[0084] Finally, through the supplementary search tool, data query is performed according to the supplementary query request to obtain the supplementary query results.

[0085] The supplementary search tool may be one or more, and may be the same as or different from the target search tool. In this implementation, the process of determining the supplementary query result may refer to the process of determining the data query result based on the target search tool, and will not be repeated here.

[0086] In this implementation, a specific supplementary query method is provided, which improves the efficiency and accuracy of determining the supplementary query results based on the supplementary query request and supplementary search tool generated by the large language model.

[0087] In some optional implementations of this embodiment, the execution entity may execute the search process based on the target search tool in the following manner: First, the target search tool is used to perform data query based on the adjusted query request to obtain the initial query results.

[0088] In this implementation, the target search tool is called through the task interface corresponding to the target search tool, so that the target search tool processes the data query according to the adjusted query request to obtain the initial query result.

[0089] Then, through the large language model, the initial query results are filtered according to the target object's interactive behavior data on the historical data query results to obtain the data query results.

[0090] By analyzing the target user's historical data query results and interactive behavior data, we can understand the target user's usage habits and preferences, thereby adjusting the search tool's invocation strategy to make the returned data query results more valuable. Furthermore, we can filter and select the initial query results based on the target user's historical feedback (interaction behavior data from historical data query results), improving the quality and accuracy of the answers and further enhancing the Thinker module's ability to answer the target user's query requests.

[0091] The historical data query result may be the first historical data query result in the above implementation, or the second historical data query structure, or the historical data query result of the target user in other time periods other than the first time period and the second time period.

[0092] Figure 3The overall system shown includes two major driving engines: a large language model and real-time user interaction data. When the system returns some search or recommendation results to the target object, the target object will perform interactive behaviors such as "look," "look carefully," "swipe quickly," or "click to view more detailed data." Based on these interactive behaviors, if the system records that the target object has a mediocre reaction or is not interested in a certain type of search results or search results from a certain source, the large language model will understand and guide the target search tool to reduce data calls from that source (for example, reducing the number of search results from that source, or no longer searching for data from that source).

[0093] It is understood that, in the above implementation, the supplementary search tool's supplementary query process can also be performed by the above-mentioned execution entity as follows: first, a data query is performed using the supplementary search tool with a supplementary query request to obtain initial supplementary query results. Then, using the large language model, the initial supplementary query results are filtered based on the target subject's interaction behavior with the historical data query results to obtain supplementary query results.

[0094] In this implementation, the initial query results found by the search tool are filtered through a large language model based on the target object's interactive behavior data on the historical data query results, thereby improving the adaptability of the data query results to the target object and helping to improve the target object's efficiency in obtaining information based on the data query results.

[0095] In some optional implementations of this embodiment, the above-mentioned execution subject may further perform the following operations: first, structure the data query results to obtain structured data; then, display the structured data according to a preset display style and data format.

[0096] As an example, first, the large language model can structure the data query results based on the data fields in the preset structured requirements in the Schema to obtain structured data; then, based on the preset display style and data format in the Schema, the card renderer will render the structured data according to the display style and data format, and display the rendered structured data through the terminal device corresponding to the target object.

[0097] In this implementation, based on the structuring, display style requirements and data format requirements of the data query results, the display effect of the data query results is improved, which helps to further improve the information acquisition efficiency of the target object.

[0098] Continue to refer Figure 5 , shows a schematic process 500 of another embodiment of the data query method based on a large language model according to the present disclosure. In the process 500, the following steps are included: Step 501 : Determine the demand scenario corresponding to the target object and the process stage of the target object in the demand scenario according to the object background information of the target object.

[0099] Step 502 : Generate dynamic prompt words based on the demand scenario, process stage, historical query request, first historical data query result, and first interactive behavior data.

[0100] The object background information includes historical query requests of the target object within a first time period ending at the present, first historical data query results corresponding to the historical query requests, and first interactive behavior data of the target object with respect to the first historical data query results.

[0101] Step 503: parse the query request based on the dynamic prompt word to determine the object demand.

[0102] Step 504 : Using the large language model, the query request is adjusted according to the object's requirements to generate an adjusted query request.

[0103] Step 505: Determine a target search tool for processing the adjusted query request from the search tool set using the large language model.

[0104] Step 506: Perform a data query based on the adjusted query request through the target search tool to obtain a data query result.

[0105] Step 507: Determine whether the data query result meets the target demand and whether the data query result meets the preset structured requirements through the large language model.

[0106] Step 508 : In response to determining that the conditions are not satisfied, a supplementary query request is determined based on the non-compliant items using the large language model.

[0107] Step 509: Determine a supplementary search tool for processing the supplementary query request from the search tool set using the large language model.

[0108] Step 510: Perform a data query based on the supplementary query request using the supplementary search tool to obtain a supplementary query result.

[0109] Step 511 : Update the data query result according to the supplementary query result until the updated data query result meets the object demand and the preset structured requirements.

[0110] Step 512: Query the structured data results to obtain structured data.

[0111] Step 513: Display the structured data according to the preset display style and data format.

[0112] The process 500 of the data query method based on the large language model in this embodiment specifically illustrates the process of determining the object demand, the data query process based on the target search tool, the supplementary query process based on the supplementary search tool, and the structuring and display process of the data query results, which further improves the efficiency and accuracy of obtaining the data query results, as well as the matching degree between the data query results and the target object.

[0113] Continue to refer Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a data query device based on a large language model. Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.

[0114] like Figure 6 As shown, the data query device 600 based on the large language model includes: a parsing unit 601, which is configured to parse the query request of the target object according to the object background information of the target object through the large language model, and determine the object demand of the target object; an adjustment unit 602, which is configured to adjust the query request according to the object demand and generate an adjusted query request; a query unit 603, which is configured to perform data query according to the adjusted query request and obtain a data query result.

[0115] In some optional implementations of this embodiment, the parsing unit 601 is further configured to: determine the demand scenario corresponding to the target object and the process stage of the target object in the demand scenario based on the object background information of the target object; parse the query request based on the demand scenario and the process stage to determine the object demand.

[0116] In some optional implementations of this embodiment, the object background information includes historical query requests of the target object within a first time period up to the present, the first historical data query results corresponding to the historical query requests, and the first interactive behavior data of the target object with respect to the first historical data query results; and the parsing unit 601 is further configured to: parse the query request and determine the object demand based on the demand scenario, process stage, historical query request, first historical data query result, and first interactive behavior data.

[0117] In some optional implementations of this embodiment, the parsing unit 601 is further configured to: generate dynamic prompt words based on the demand scenario, process stage, historical query request, first historical data query result and first interactive behavior data; and parse the query request based on the dynamic prompt words to determine the object demand.

[0118] In some optional implementations of this embodiment, the above-mentioned device also includes: a fine-tuning unit (not shown in the figure), which is configured to: determine the second historical data query result corresponding to the target object in the second time period and the second interactive behavior data of the target object with respect to the second historical data query result; and fine-tune the large language model based on the second historical data query result and the second interactive behavior data.

[0119] In some optional implementations of this embodiment, the adjustment unit 602 is further configured to: adjust the query request according to the object demand through the large language model to generate an adjusted query request.

[0120] In some optional implementations of this embodiment, the query unit 603 is further configured to: determine a target search tool for processing the adjusted query request from a search tool set through a large language model; perform data query according to the adjusted query request through the target search tool to obtain a data query result.

[0121] In some optional implementations of this embodiment, the above-mentioned device also includes: a determination unit (not shown in the figure) is configured to determine whether the data query result meets the object demand and whether the data query result meets the preset structured requirements through a large language model; a supplementary query unit (not shown in the figure) is configured to, in response to a determination of non-satisfaction, perform a supplementary query based on the non-compliant items through a large language model to obtain a supplementary query result; an updating unit (not shown in the figure) is configured to update the data query result based on the supplementary query result until the updated data query result meets the object demand and the preset structured requirements.

[0122] In some optional implementations of this embodiment, the supplementary query unit is further configured to: determine a supplementary query request based on non-compliant items through a large language model; determine a supplementary search tool for processing the supplementary query request from a search tool set through a large language model; and perform data query based on the supplementary query request through the supplementary search tool to obtain a supplementary query result.

[0123] In some optional implementations of this embodiment, the query unit 603 is further configured to: perform data query based on the adjusted query request through the target search tool to obtain initial query results; and filter the initial query results based on the interactive behavior data of the target object on the historical data query results through the large language model to obtain data query results.

[0124] In some optional implementations of this embodiment, the above-mentioned device also includes: a structuring unit (not shown in the figure) is configured to structure data query results to obtain structured data; and a display unit (not shown in the figure) is configured to display structured data according to a preset display style and data format.

[0125] In this embodiment, a data query device based on a large language model is provided. Through the large language model, the query request of the target object is parsed according to the object background information of the target object to determine the real and complete object demand of the target object; according to the object demand, the query request is adjusted to generate an adjusted query request that can fully express the real needs of the target object; data query is performed according to the adjusted query request to conveniently obtain data query results, thereby improving the efficiency and accuracy of obtaining data query results, as well as the matching degree between the data query results and the target object.

[0126] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and 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, and the instructions are executed by the at least one processor so that the at least one processor can implement the data query method based on the large language model described in any of the above embodiments when executing.

[0127] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the data query method based on the large language model described in any of the above embodiments when executed.

[0128] An embodiment of the present disclosure provides a computer program product, which, when executed by a processor, can implement the data query method based on a large language model described in any of the above embodiments.

[0129] 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 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

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

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

[0132] The computing unit 701 can be any general-purpose and / or specialized processing component with 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 suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the data query method based on a large language model. For example, in some embodiments, the data query method based on a large language model can be implemented as a computer software program 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 onto the 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 data query method based on a large language model described above can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the data query method based on the large language model in any other appropriate manner (for example, by means of firmware).

[0133] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data query device based on a large language model, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A 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 machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 input, voice input, or tactile input).

[0137] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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.

[0138] A computer system may include a client and a server. The client and server are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, establishing a client-server relationship. The server can be a cloud server, also known as a cloud computing server or cloud host. This server is a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services. It can also be a server in a distributed system or a server integrated with blockchain.

[0139] According to the technical solution of the embodiment of the present disclosure, a data query method and device based on a large language model are provided. Through the large language model, the query request of the target object is parsed according to the object background information of the target object, and the real and complete object demand of the target object is determined; according to the object demand, the query request is adjusted to generate an adjusted query request that can fully express the real needs of the target object; data query is performed according to the adjusted query request to conveniently obtain data query results, thereby improving the efficiency and accuracy of obtaining data query results, as well as the matching degree between the data query results and the target object.

[0140] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not a limitation herein.

[0141] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A data query method based on a large language model, comprising: By using a large language model, the query request of the target object is parsed according to the object background information of the target object, and the object demand of the target object is determined; Adjusting the query request according to the object demand to generate an adjusted query request; Perform a data query according to the adjusted query request to obtain a data query result.

2. The method according to claim 1, wherein The step of parsing the query request of the target object according to the object background information of the target object and determining the object demand of the target object includes: Determining, based on the object background information of the target object, a demand scenario corresponding to the target object and a process stage of the target object in the demand scenario; According to the demand scenario and the process stage, the query request is parsed to determine the object demand.

3. The method according to claim 2, wherein: The object background information includes historical query requests of the target object within a first time period up to the present, first historical data query results corresponding to the historical query requests, and first interactive behavior data of the target object with respect to the first historical data query results; as well as The step of parsing the query request and determining the object demand according to the demand scenario and the process stage includes: The query request is parsed according to the demand scenario, the process stage, the historical query request, the first historical data query result and the first interactive behavior data to determine the object demand.

4. The method according to claim 3, wherein: The step of parsing the query request and determining the object demand according to the demand scenario, the process stage, the historical query request, the first historical data query result, and the first interactive behavior data includes: Generate a dynamic prompt word according to the demand scenario, the process stage, the historical query request, the first historical data query result and the first interactive behavior data; According to the dynamic prompt word, the query request is parsed to determine the object demand.

5. The method according to any one of claims 1 to 4, wherein Also includes: Determining a second historical data query result corresponding to the target object within a second time period and second interaction behavior data of the target object with respect to the second historical data query result; The large language model is fine-tuned according to the second historical data query result and the second interaction behavior data.

6. The method according to claim 1, wherein The step of adjusting the query request according to the object demand to generate an adjusted query request includes: The query request is adjusted according to the object demand through the large language model to generate the adjusted query request.

7. The method according to claim 1, wherein The performing of a data query according to the adjusted query request to obtain a data query result includes: Determining, by using the large language model, a target search tool from a set of search tools for processing the adjusted query request; By using the target search tool, a data query is performed according to the adjusted query request to obtain the data query result.

8. The method according to claim 1 or 7, wherein Also includes: Determining, by means of the large language model, whether the data query result meets the object's demands and whether the data query result meets the preset structural requirements; In response to determining that the conditions are not satisfied, performing a supplementary query based on the non-compliant items using the large language model to obtain a supplementary query result; According to the supplementary query result, the data query result is updated until the updated data query result meets the object demand and the preset structured requirement.

9. The method according to claim 8, wherein The method of performing a supplementary query based on the non-conforming items using the large language model to obtain a supplementary query result includes: Determining, by means of the large language model, a supplementary query request according to the non-conforming items; Determining, by using the large language model, a supplementary search tool from the set of search tools for processing the supplementary query request; The supplementary search tool is used to perform data query according to the supplementary query request to obtain supplementary query results.

10. The method according to claim 7, wherein: The step of performing a data query according to the adjusted query request using the target search tool to obtain the data query result includes: Using the target search tool, performing a data query according to the adjusted query request to obtain an initial query result; The data query result is obtained by filtering the initial query result through the large language model according to the interactive behavior data of the target object on the historical data query result.

11. The method according to claim 1, wherein Also includes: Structuring the data query result to obtain structured data; The structured data is displayed according to a preset display style and data format.

12. A data query device based on a large language model, comprising: a parsing unit configured to parse the query request of the target object based on the object background information of the target object through a large language model, and determine the object appeal of the target object; an adjusting unit, configured to adjust the query request according to the object demand and generate an adjusted query request; The query unit is configured to perform a data query according to the adjusted query request to obtain a data query result.

13. An electronic device, characterized in that: include: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 11.

15. A computer program product comprising: A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Digital base query method and device based on large language model, equipment and medium

    CN120892459A

  • Number query method and AI intelligent agent for number query

    CN121547533A