Data query method and device, electronic equipment, storage medium and program product

By displaying and allowing modification of the processing results of the data query steps on the interactive page, the problem of inefficiency when the query results do not meet the needs is solved, and a more efficient query process is achieved.

CN120492710APending Publication Date: 2025-08-15BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510550387.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the existing data query methods, the cause of the error cannot be known when the query results do not meet the needs, resulting in inefficient query. Users need to modify the query problem many times to obtain satisfactory results.

Method used

Display the processing results of the query step on the interactive page, and allow the user to modify the processing results of the target step, retrieving the query to obtain updated results.

Benefits of technology

By visually displaying the processing of query steps, users can modify inaccurate steps in a timely manner, improving query efficiency and reducing the number of repeated modifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492710A_ABST
    Figure CN120492710A_ABST
Patent Text Reader

Abstract

The invention discloses a data query method and device, electronic equipment, a storage medium and a program product, and relates to the field of a data processing technology, an artificial intelligence technology, a large model technology and a large language model.The method comprises the steps that in response to a query instruction of a first query problem, the first query problem is displayed on an interaction page, triggering processing of the first query problem according to a query plan, wherein the query plan comprises a plurality of query steps; displaying the first processing result of each query step on an interaction page; and in response to a modification instruction for the first processing result of the target query step, triggering re-query for the first query problem, and obtaining and displaying a second processing result of each query step. According to the method, the query result of each query step can be intuitively displayed, the inaccurate query step can be intuitively understood, the query step is timely modified and re-queried, and the query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of data processing technology, artificial intelligence technology, large model technology, and large language model technology, and specifically to data query methods, devices, electronic devices, storage media, and program products. Background Art

[0002] When querying data, users typically enter their query through an interactive interface. After processing by the backend program, the query results are fed back to the frontend and displayed on the frontend's interactive interface. However, the frontend interface displays query results specifically. If a query fails, the cause is unknown, requiring corrections and re-asking. Consequently, this data query method results in low query efficiency. Summary of the Invention

[0003] In view of this, the present application provides a data query method, device, electronic device, storage medium and program product to solve the problem of low data query efficiency.

[0004] In a first aspect, the present application provides a data query method, comprising:

[0005] In response to a query instruction of a first query question, displaying the first query question on an interactive page and triggering processing of the first query question according to a query plan, wherein the query plan includes a plurality of query steps;

[0006] Displaying the first processing result of each query step on the interactive page;

[0007] In response to a modification instruction for the first processing result of the target query step, a re-query for the first query question is triggered, and a second processing result of each of the query steps is obtained and displayed.

[0008] In a second aspect, the present application provides a data query method, comprising:

[0009] Obtaining a query instruction of the query object for the first query question;

[0010] Processing the first query question based on the query plan to obtain a first processing result of each query step in the query plan, wherein the query plan includes a plurality of the query steps;

[0011] Based on the order of the query steps, the first processing results of the query steps are fed back to the requester of the query instruction in sequence, and the processing results of the query steps are displayed on the interactive page of the requester;

[0012] Obtaining a modification instruction for the first processing result of the target query step;

[0013] Re-querying the first query question based on the modification result and the query plan to obtain a second processing result of each query step;

[0014] Based on the order of the query steps, the second processing results of the query steps are fed back to the requester of the query instruction in sequence.

[0015] In a third aspect, the present application provides a data query device, comprising:

[0016] a query question display module, configured to display the first query question on an interactive page in response to a query instruction of the first query question, and trigger processing of the first query question according to a query plan, wherein the query plan includes a plurality of query steps;

[0017] A first processing result display module, configured to display the first processing result of each query step on the interactive page;

[0018] The second processing result display module is used to trigger a re-query for the first query question in response to a modification instruction for the first processing result of the target query step, and obtain and display the second processing result of each query step.

[0019] In a fourth aspect, the present application provides a data query device, comprising:

[0020] An instruction acquisition module, configured to acquire a query instruction of the query subject for the first query question;

[0021] a first processing module, configured to process the first query question based on the query plan to obtain a first processing result of each query step in the query plan, wherein the query plan includes a plurality of the query steps;

[0022] A first feedback module is configured to feed back the first processing result of the query step to the requester of the query instruction in sequence based on the order of the query steps, and the processing result of the query step is displayed on the interactive page of the requester;

[0023] An instruction modification module, configured to obtain a modification instruction for the first processing result of the target query step;

[0024] a re-query module, configured to re-query the first query question based on the modification result and the query plan, and obtain a second processing result of each query step;

[0025] The second feedback module is used to feed back the second processing results of the query steps to the requester of the query instruction in sequence based on the order of the query steps.

[0026] In a fifth aspect, the present application provides an electronic device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the data query method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0027] In a sixth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data query method of the first aspect or any corresponding embodiment thereof.

[0028] In a seventh aspect, the present application provides a computer program product, comprising computer instructions, which are used to enable a computer to execute the data query method of the above-mentioned first aspect or any corresponding embodiment thereof.

[0029] The data query method provided by the embodiment of the present application, by responding to the query instruction of the first query question, displays the first query question on the interactive page and triggers the processing of the first query question according to the query plan, wherein the query plan includes multiple query steps; displays the first processing result of each query step on the interactive page; responds to the modification instruction of the first processing result of the target query step, triggers a re-query for the first query question, and obtains and displays the second processing result of each query step. The method processes the first query question according to the query plan during the processing of the first query question, and displays the corresponding first processing result for each query step in the query plan. By displaying the first processing result of each query step, the user can intuitively understand the processing status of each query step, and can modify inaccurate processing results in an interactive manner to trigger a re-query. The method can intuitively display the query results of each query step, facilitate intuitive understanding of inaccurate query steps, and modify them in time and re-query, thereby improving query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the specific implementation methods of this application or the technical solutions in related technologies, the following is a brief introduction to the drawings required for use in the specific implementation methods or related technical descriptions. Obviously, the drawings described below are some implementation methods of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0031] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application;

[0032] Figure 2 This is a schematic diagram of a first flow chart of a data query method according to an embodiment of the present application;

[0033] Figure 3 This is a first schematic diagram of an interactive page according to an embodiment of the present application;

[0034] Figure 4 This is a second schematic diagram of an interactive page according to an embodiment of the present application;

[0035] Figure 5 This is a second flow chart of the data query method according to an embodiment of the present application;

[0036] Figure 6 This is a first processing diagram of the data query method according to an embodiment of the present application;

[0037] Figure 7 This is a second processing diagram of the data query method according to an embodiment of the present application;

[0038] Figure 8 This is a first structural block diagram of a data query device according to an embodiment of the present application;

[0039] Figure 9 This is a second structural block diagram of the data query device according to an embodiment of the present application;

[0040] Figure 10 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0042] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0043] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0044] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0045] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0046] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0047] In related technologies, data query tasks typically involve providing a query and displaying the query results on an interactive page. During this process, since the interactive page only displays the final query results, if the query results don't meet the requirements, the query must be reformulated and queried again. Furthermore, since the reasons for the unsatisfactory query results are unclear, obtaining a satisfactory result requires multiple revisions to the query.

[0048] Furthermore, since it may take a while, for example, several seconds or tens of seconds, for the query result to be displayed on the interactive page after the user has given a query question, the user can only wait during this period, resulting in a low user experience.

[0049] Based on this, an embodiment of the present disclosure provides a data query method, which processes the first query question according to the query plan during the processing, and displays the corresponding first processing result for each query step in the query plan. By displaying the first processing result of each query step, the user can intuitively understand the processing status of each query step, and can modify inaccurate processing results in an interactive manner to trigger re-query. The method can intuitively display the query results of each query step, facilitate intuitive understanding of inaccurate query steps, and promptly modify them and re-query, thereby improving query efficiency.

[0050] As used in the embodiments of the present application, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology, etc., taking deep learning as an example, deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. In the embodiments of the present application, the model can also be referred to as a machine learning model, a machine learning network or a network, and these terms can be used interchangeably in this article. Among them, a model can also include different types of processing units or networks.

[0051] As an optional application scenario of the embodiment of the present disclosure, Figure 1 As shown, the terminal device 110 has an application 101 installed therein, and the user 130 can interact with the application 101 through the terminal device 110 and / or an access device of the terminal device 110 .

[0052] For example, application 101 can be any application that can provide question-answering related services. For example, application 101 can be a resource recommendation application. Figure 1 In the application scenario shown, if the application 101 is active, the terminal device 110 can present the interface 102 of the application 101. The interface 102 can include various pages that the application 101 can provide, such as an interaction page, a setting page, a query page, and the like.

[0053] In some embodiments, the terminal device 110 is in communication with the server 120 to provide services for the application 101. The terminal device 110 can be a mobile terminal, a fixed terminal, or a portable terminal, including but not limited to a mobile phone, a desktop computer, a laptop computer, a multimedia tablet, an e-book device, a gaming device, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface, and the server 120 can be any type of computing system or server that can provide computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.

[0054] The user provides a query question through interaction with the terminal device 110, and the server 120 analyzes and processes the query question to obtain processing results of each query step and feeds them back to the terminal device 110 for display.

[0055] It should be noted that Figure 1 This is merely an example of an application scenario and does not limit the scope of protection of the present disclosure.

[0056] The embodiments of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that the pages shown in the accompanying drawings are merely examples, and various page designs may actually exist. The various graphic elements in the page may have different arrangements and different visual representations, one or more of which may be omitted or replaced, and one or more other elements may also exist, which are not limited in the embodiments of the present disclosure. In addition, the embodiments are described below mainly with respect to the terminal device 110. It should be understood that the actions described with respect to the terminal device 110 may be performed by the application 101 on the terminal device 110, or may be performed by the application 101 in collaboration with its service end (e.g., server 120).

[0057] According to an embodiment of the present application, an embodiment of a data query method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] In this embodiment, a data query method is provided, which can be used for the above-mentioned terminal device. Figure 2 is a flow chart of a data query method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0059] Step S201 : In response to a query instruction of a first query question, the first query question is displayed on an interactive page, and processing of the first query question according to a query plan is triggered.

[0060] The query plan includes multiple query steps.

[0061] The first query question is used in the query task. That is, the user enters the query question through interaction with the interactive page, and the agent thinks based on the query question and gives the query result. For the convenience of the following description, the query question entered by the user is referred to as the first query question in this embodiment.

[0062] The query instruction for the first query question can be generated by a user inputting the first query question through interaction with the interactive page, triggering the query based on this input. The input form for the first query question includes, but is not limited to, text input, voice input, and so on, and is configured based on actual needs. Accordingly, different types of input methods correspond to different input controls on the interactive page. For example, a voice input instruction is displayed on the interactive page, and the first query question is obtained by interacting with the voice interaction control.

[0063] The interactive page is used to represent the page provided by the query application, and the first question is displayed in the first area of the interactive page. The first question is a question obtained in response to the input instruction of the question-and-answer task. Corresponding to the input instruction described above, the first question includes but is not limited to text, text and an image, text and a file, etc. For example, the first question may include only a question description, or include an image and the question description, or include a file and the question description, etc.

[0064] By responding to the query instruction of the first query question, the first query question is displayed on the interactive page, and the processing of the first query question is triggered. Specifically, the processing of the first query question is based on the query plan, and the query plan includes multiple query steps. For data query tasks, the query steps included in the query plan can be the same, or they can be set according to the differences of the first query question. Accordingly, if the query plan is applicable to all query tasks, the query plan can be implemented and configured, and can be called during the query process; if the query plan is related to the query question, after obtaining the query question, the query question is understood through the language model to generate a query plan. Of course, other methods can also be used to generate query plans, and there is no limitation on them here.

[0065] Step S202: Display the first processing result of each query step on the interactive page.

[0066] As described above, a query plan represents the agent's thought process. This thought process includes multiple query steps, and a corresponding first processing result can be obtained for each query step. In this embodiment, the first processing result of each query step is displayed on the interactive page, allowing users to promptly understand the processing status of the query step.

[0067] For example, Figure 3 As shown, user 301 provides a first query question 302 by interacting with the interactive page. Accordingly, the first query question 302 is displayed on the interactive page. Agent 303 provides an answer prompt 304 for the first query question 302, such as "We have received your question and will help you query it now." After the answer prompt 304, the query steps in the query plan and the first processing results 305 of each query step are displayed. Figure 3 As shown, in this example, the query plan includes four query steps: query step 1 to query step 4. A processing status indicator 306 is provided for each query step, with different processing statuses corresponding to different processing status indicators. Furthermore, the processing time for each query step can also be provided for the user to intuitively understand.

[0068] Step S203 , in response to the modification instruction for the first processing result of the target query step, triggering a re-query for the first query question, and obtaining and displaying the second processing results of each query step.

[0069] Since the first processing result of each query step is displayed on the interactive page, users can intuitively understand the query step that caused the query result to not meet their requirements. Since the first processing result of the query step is automatically analyzed, there may be processing results that do not meet the requirements, which in turn leads to unsatisfactory query results. Therefore, users can modify the first processing result of the target query step by interacting with the interactive page, and accordingly, a modification instruction for the first processing result of the target query step is generated.

[0070] The target query step is used to identify the query step that needs to be modified. In the query plan, the first processing results of all query steps can provide the modification function, or the first processing results of some query steps can provide the modification function. The specific setting depends on actual needs and is not limited here.

[0071] After modifying the first processing result of the target query step, a modification instruction is generated. Accordingly, a new query plan is generated. Then, a query is performed based on the new query plan to obtain the second processing result of each query step. The first and second processing results are used to distinguish between processing results generated at different times. Similar to the first processing result, after obtaining the second processing result, the second processing result of each query step is displayed on the interactive page.

[0072] It should be noted that the second processing result can be displayed as an overlay on the first processing result, or after the first processing result, or in other ways, without any limitation here. Furthermore, for each query plan, its version number can also be recorded. Accordingly, the generated first processing result is associated with the query plan version number, and the query plan version number can be used to review the processing results later.

[0073] The data query method provided in this embodiment processes the first query question according to the query plan, and displays the corresponding first processing result for each query step in the query plan. The display of the first processing result for each query step allows the user to intuitively understand the processing status of each query step. Inaccurate processing results can be modified interactively to trigger a re-query. This method can intuitively display the query results of each query step, facilitate intuitive understanding of inaccurate query steps, and promptly modify them and re-query, thereby improving query efficiency.

[0074] In some optional implementations, the query step includes question resolution and data query. Accordingly, the resolution fields of the question resolution and the field values of the resolution fields are displayed on the interactive page, and the query data is displayed in the first style.

[0075] The question parsing in the query step represents the breakdown of the first query question, for example, the metrics, dimensions, time information, etc. The metrics, dimensions, and time information are referred to as parsed fields, and the specific values are referred to as field values of the parsed fields.

[0076] In the query step of question resolution, the resolution fields and the field values of the resolution fields for the first query question are displayed. It is understood that the resolution fields and the field values of the resolution fields corresponding to different first query questions are different.

[0077] Data queries represent the final data query results. Since the query object is data, the data display format is involved, including but not limited to line charts, tables, radar charts, etc. The display format of the queried data can be the one specified in the first query question. If the first query question does not specify the display format, the default format is used.

[0078] Exemplarily, the query data is displayed in a first style, which may be specified in the first query question or a default display style.

[0079] In some optional embodiments, the target query step includes at least one of question parsing and data querying. The first processing result of the question parsing includes the parsed field and the field value of the parsed field; the first processing result of the data query includes displaying the query data in a first style.

[0080] As described above, the query steps of the query plan may all provide modifiable functions, or may partially provide modifiable functions. In this embodiment, the query steps that provide modifiable functions are referred to as target query steps, including at least one of problem analysis and data center. That is, each time the first query result of the query step is modified, it may be the first processing result of the problem analysis that is modified, or the first processing result of the data query that is modified, or the first processing results of the problem analysis and the data query that are modified, etc. The specific modification is made according to actual needs and is not limited here.

[0081] The query steps and the first processing results thereof are displayed on the interactive page. Accordingly, the first processing result of the problem resolution includes the resolution fields and the field values of the resolution fields, and the first processing result of the data query includes displaying the query data in the first style.

[0082] Specifically, the parsed fields and field values corresponding to the question parsing are related to the first query question. During the modification process, the field values of the parsed fields can be modified, or, further, the parsed fields and field values can be modified, etc. The query results of the data query are represented by the query data, and the query data is displayed using the first style. If the first style does not meet the requirements, the display style can be modified interactively. In other words, the modification of the first processing result of the data query is a modification of the display style.

[0083] In some optional implementations, the above step S203 includes:

[0084] Step a1: Determine a modification result in response to a modification instruction for a field value of a parsed field and / or a first style.

[0085] Step a2, in response to the interactive instruction for the re-query control on the interactive page, triggering a re-query of the first query question based on the modified result, and obtaining and displaying the second processing results of each query step.

[0086] For example, the modification of the query step of question resolution is to modify the field value of the resolution field, and accordingly, a modification instruction for the field value is generated. The modification of the query step of data query is to modify the display style, and accordingly, a modification instruction for the display style is generated.

[0087] After modifying the field value and / or the first style of the parsed field, a re-query interaction instruction is generated by interacting with the re-query control on the interactive page, which is used to trigger a re-query of the first query file based on the modification result, obtain the second processing result of each query step and display it on the interactive page.

[0088] Exemplarily, the query step also includes question rewriting, topic routing, and recommended questions; the processing results of question rewriting, topic routing, question parsing, data query, and recommended questions are displayed in sequence on the interactive page.

[0089] For example, Figure 4 As shown, the query plan generated for the user's first query question includes five query steps: question rewriting, topic routing, question parsing, data query, and recommended question processing results. Each query step displays the corresponding first processing result. Furthermore, each query step also displays the processing status, including but not limited to in progress, completed, and paused, though these are not specifically limited.

[0090] For example, question rewriting involves semantically understanding the user's first query and rewriting it into a language understandable by the large model. Topic routing is used to determine the topic corresponding to the first query. Question parsing is used to parse the rewritten question and identify key fields and field values. Data query is used to display the retrieved data using the corresponding display style. Recommended questions are used to provide questions related to the first query.

[0091] exist Figure 4 In the example, the field values for problem analysis include indicators, dimensions, time ranges, and filter conditions. A modification control is provided for each analysis field. For example, the indicator analysis field corresponds to a field value modification control 401. For data query, a display style modification control 403 is provided on the interactive page. Of course, the field value modification control 401 and the display style modification control 403 are Figure 4 The above are merely examples of controls and do not limit the scope of protection of this application.

[0092] After analyzing the query plan and obtaining the first processing results for each query step, the first processing results are displayed on the interactive page. If any first processing results do not meet the requirements, they can be modified interactively. For example, you can interact with field value modification controls and / or display style controls to obtain modified field values and / or display styles.

[0093] After the modification is completed, through interaction with the re-query control 402, a re-query for the modified first processing result is triggered to obtain the second processing results of each query step.

[0094] During the processing of the first query, the system proceeds sequentially through question rewriting, topic routing, question analysis, data query, and recommended questions. The first query is then rewritten into a question that the language model can understand. Based on this, topic routing is performed to locate the desired topic. Further question analysis is performed to determine a refined query direction and obtain accurate data query results. Finally, question recommendations are performed to facilitate further question expansion.

[0095] During the data query process, the results of each query step are displayed, shortening the wait time for the interactive page to display content after the query question is obtained. In other words, a staged information disclosure strategy is adopted to show users the progress of each link, clearly informing them of the specific process the query is currently processing.

[0096] According to an embodiment of the present application, an embodiment of a data query method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0097] In this embodiment, a data query method is provided, which can be used for the above-mentioned server. Figure 5 is a flow chart of a data query method according to an embodiment of the present application, such as Figure 5 As shown, the process includes the following steps:

[0098] Step S501: Obtain a query instruction of a query object for a first query question.

[0099] The first query question is triggered by the query object through interactive input with the interactive page, and accordingly, a query instruction for the first query question is generated. In addition, the details of the query instruction are described above and will not be repeated here.

[0100] Step S502: Process the first query question based on the query plan to obtain a first processing result of each query step in the query plan.

[0101] The query plan includes multiple query steps.

[0102] The query plan and query steps are described in detail above and will not be repeated here.

[0103] For each query step, the input content can be processed by a corresponding large model to obtain the corresponding processing result. Alternatively, the processing result can be obtained by parsing the corresponding data. There is no limitation on the processing method of each query step.

[0104] For example, for question rewriting, the first query question can be input into the question rewriting model to obtain the result of question rewriting. For topic routing, the result of question rewriting can be input into the topic classification model to obtain the topic routing corresponding to the first query question. For question parsing, semantic analysis can be performed on the determined topic and the rewritten question to obtain the parsed fields and field values. For data query, query instructions can be generated based on the result of question parsing, and queries can be performed in the corresponding database to obtain the search data. For question recommendation, the first query question can be used to match in the question library, and questions with a similarity greater than a preset threshold are selected as recommended questions.

[0105] It should be noted that the above processing method for each query step is only an example and does not limit the scope of protection of this application. It can be set according to actual needs.

[0106] Step S503: Based on the order of the query steps, the first processing results of the query steps are fed back to the requester of the query instruction in sequence.

[0107] The requester's interactive page is used to display the processing results of the query step.

[0108] The order of query steps is represented by the query plan. Following the order of each query step, after obtaining the first processing result of a query step, the first processing result of that query step is fed back to the requester of the query instruction for display on the requester's interactive page. In other words, each time the first processing result of a query step is obtained, it is fed back to the requester of the query instruction without having to wait until all query steps have been executed.

[0109] Step S504: Obtain a modification instruction for the first processing result of the target query step.

[0110] As described above, the first processing result of a query step may not meet the requirements. In this case, the user can modify the first processing result of this query step, referred to as the target query step, and generate a corresponding modification instruction. For the server, the modification instruction obtained can be represented by the database language SQL (Structured Query Language).

[0111] For example, during or after the generation of the first processing result, the SQL statement used for the data query is recorded on the requester of the query instruction. Then, after the modification of the first processing result, the SQL statement can be modified and the modified SQL statement is used as the modification instruction.

[0112] Step S505 : re-query the first query question based on the modification result and the query plan to obtain second processing results of each query step.

[0113] After obtaining the modification instruction, the first query question is requeried in combination with the modification result and the query plan. For example, the query is re-executed in the same manner as the first processing result to obtain the second processing result of each query step.

[0114] Step S506: Based on the order of the query steps, the second processing results of the query steps are fed back to the requester of the query instruction in sequence.

[0115] Similar to the feedback method of the first processing result, the second processing result of each query step is fed back to the requester of the query instruction in sequence according to the order of the query steps.

[0116] It should be noted that although the above description only involves one modification, the scope of protection of this application is not limited to this. The specific number of modifications is determined based on actual needs and is not limited here.

[0117] The data query method provided in this embodiment processes the query instructions according to the query steps in the query plan after obtaining them, and feeds back the first processing results of each query step, so that the requesting party can know the processing results of each query step in a timely manner, and the user can intuitively understand the processing status of each query step. Inaccurate processing results can be modified interactively to trigger re-query, thereby improving query efficiency.

[0118] In some optional implementations, the query step includes question rewriting. Accordingly, the above step S502 includes:

[0119] Step b1: Obtain the historical conversations between the query object and the agent.

[0120] Each round of dialogue between the query object and the agent can be assigned a unique identifier, which remains unchanged across all conversations in that round. If the current round of dialogue ends and the next round of dialogue begins, a new unique identifier is assigned to the next round.

[0121] Within the same conversational turn, the conversational content can be considered relevant. Therefore, in order to more accurately rewrite the first query, it is necessary to obtain the historical conversations between the query subject and the agent. Alternatively, this can be understood as obtaining the context of the conversation surrounding the first query.

[0122] Step b2: If the target word exists in the first query question, determine a replacement word for the target word.

[0123] The target word is used to represent a special word that is difficult for the large model to understand. These special words can be configured in advance. When performing a target word query, the special words can be used to match the first query question in sequence to determine whether the target word exists in the first query question.

[0124] If the first query question contains a target word, a replacement word for the target word needs to be determined. The mapping relationship between the target word and the replacement word can be pre-configured, for example, a mapping relationship between a special word and the replacement word can be pre-configured, and the mapping relationship can be recorded in a table.

[0125] Exemplarily, it also includes:

[0126] Step b21: Obtain a word mapping corresponding to the query object. The word mapping is used to represent the mapping relationship between the target word and the replacement word.

[0127] Step b22: If the word in the first query question can be found in the word mapping, it is determined that the target word exists in the first query question.

[0128] Specifically, the word mapping is related to the query object. The word mappings of different query objects can be the same or different. For example, query objects from the same source can correspond to the same word mapping, while query objects from different sources correspond to different word mappings. For example, if query object 1 belongs to resource recommendation platform A, and query object 2 comes from resource recommendation platform B, since the query objects come from different resource recommendation platforms, the corresponding word mappings are also different. Therefore, when obtaining the word mapping, it is necessary to obtain the word mapping corresponding to the query object.

[0129] The word mapping is used to match the first query question to determine whether the target word exists in the first query question. If a match is found, it indicates that the target word exists in the first query question. Accordingly, the word mapping is configured with a replacement word for the target word. Therefore, after determining the target word, the replacement word for the target word can also be obtained.

[0130] There are corresponding word mappings for different query objects. Using the word mappings to query the words in the first query question can improve the efficiency and accuracy of the target word query.

[0131] Step b3: Generate first prompt information based on the first query question, historical conversations, and replacement words for the target word.

[0132] The first query question is the original query question given by the query object. The first prompt information is generated by combining the first query question, historical conversation, and the replacement word of the target word. For example, the large language model can provide a template with the prompt information. The first prompt information can be obtained by filling the template with the above three elements.

[0133] Step b4: using the question rewriting model to output a rewritten question of the first query question based on the first prompt information, wherein the first processing result of the question rewriting includes the rewritten question.

[0134] The first prompt information is used to instruct the question rewriting model to rewrite the first query question to obtain a rewritten question. Specifically, the question rewriting model receives the first prompt information as input and outputs the rewritten question of the first query question. The question rewriting model can be based on a pre-trained language model and fine-tuned based on fine-tuning data from a data query scenario to obtain the question rewriting model.

[0135] After receiving the first query, it is rewritten so that it can be processed by the subsequent question rewriting model. In addition, the question rewriting process combines historical conversations and replacement words for the target word to further improve the accuracy of the question rewriting.

[0136] In some optional implementations, the query step includes topic routing. Accordingly, the above step S502 includes:

[0137] Step c1: Acquire information of a query subject corresponding to a query object. The information of the query subject includes at least one of fields under the query subject and enumeration meta-information.

[0138] Each query object maintains its own query subject information. After obtaining the first query question, the query subject information corresponding to the query object can be obtained using the query object identifier. Of course, the mapping relationship between query object and query subject information can be queried using methods other than the query object identifier, and this is not limited to any method.

[0139] Specifically, the information of the query subject includes the query subject, and at least one of the fields and enumeration information under each query subject. The fields under the query subject include but are not limited to indicator fields and dimension fields, and the indicator fields and dimension fields included under different query subjects are not all the same. For example, if the query subject is the basic data of the recommended resource, the indicator field includes but is not limited to consumption, and the dimension field includes but is not limited to the resource provider id, plan id and promotion plan, wherein under the promotion plan, there is enumeration meta-information: promotion method 1 and promotion method 2; if the query subject is the material data of the recommended resource, the indicator field includes but is not limited to consumption, and the dimension field includes but is not limited to the material id and material type, wherein under the material type, there is enumeration meta-information: title, video and picture.

[0140] Step c2: segmenting the rewritten question of the first query question based on the information of the query subject to obtain recall results of the keywords under each query subject.

[0141] During the word segmentation process of the rewritten question of the first query question, a word segmentation algorithm may be used in combination with a pre-configured dictionary and information about the query subject. The word segmentation algorithm includes but is not limited to stuttering word segmentation, rule-based word segmentation, and regular expression-based word segmentation.

[0142] For example, the Jieba word segmenter is used to segment keywords in the rewriting question (the word segmenter's dictionary is derived from the fixed configuration in the code and the field / enumeration metadata of all query subjects of the query object). After segmentation, it is determined whether the keyword is a special word that needs to be replaced. If so, the special word is replaced based on the mapping relationship between the special word and the replacement word.

[0143] After word segmentation, the keywords in the rewriting question can be recalled using vectors of fields and enumerated metadata under each query topic. This is called a recall result. Keywords represent the words obtained after word segmentation of the rewriting question. These keywords are matched against each query topic to obtain recall results for each query topic. For example, if the rewriting question obtains five keywords after word segmentation, these five keywords are matched against each query topic, and recall results for each query topic are obtained for five keywords. In other words, for the same rewriting question, there are corresponding recall results under each query topic.

[0144] Based on the above example, if the question is rewritten under the query topic of "Basic data of recommended resources", the recall results include indicator fields, dimension fields, and enumerated meta-information of dimension fields; under the query topic of "Material data of recommended resources", the recall results include indicator fields, dimension fields, and enumerated meta-information of dimension fields.

[0145] Under the same query topic, there may be multiple recall results for the same keyword, and there may also be multiple enumeration metadata. For example, the recall results for a keyword under a query topic include indicator fields 1 to 4, dimension fields 1 to 5, and enumeration metadata 1 to 3. In addition to the recall fields, the recall results also include the recall distance corresponding to the recall fields. The recall distance indicates the degree of similarity between the recall field and the keyword in the rewritten question.

[0146] Step c3: Filter the recall results for each query topic to obtain the recall field with the smallest distance between the keywords in the recall results.

[0147] Because multiple recall results may appear for the same keyword under the same query topic, the recall results are filtered to retain the recall field with the smallest recall distance. Continuing with the above example, compare the recall distances of indicator fields 1 to 4 and retain the indicator field with the smallest recall distance; compare the recall distances of dimension fields 1 to 5 and retain the dimension field with the smallest recall distance; and compare the recall distances of enumeration meta-information 1 to 3 and retain the enumeration meta-information with the smallest recall distance.

[0148] Step c4: Based on the minimum distance between the keywords in the recall results under each query topic, each query topic is screened to determine the target query topic of the first query question.

[0149] After the initial screening described above, the fields with the smallest distances across metrics, dimensions, and enumeration metadata for the same keyword within the same query topic are retained. The recall distances corresponding to all keywords within the same query topic can then be summed to obtain the total recall distance for that query topic. By comparing the total recall distances across query topics, the query topic with the smallest recall distance is determined as the target query topic for the first query question.

[0150] Alternatively, after determining the total recall distance, the weights of the various query topics may be combined and compared after weighted processing to determine the target query topic.

[0151] Alternatively, for each query topic, the minimum recall distance may be compared, and the query topic with the minimum recall distance may be determined as the target query topic.

[0152] Of course, other methods may also be used to determine the target query subject, which is not limited here.

[0153] During topic routing, the rewritten question is segmented based on the query subject information corresponding to the query object, resulting in a preliminary recall of the keywords in the rewritten question within the query subject. Based on this, the recall results are filtered to obtain the recall field with the minimum distance corresponding to the keywords within each query subject. That is, for each keyword within the query subject, the recall field with the minimum distance is obtained. Finally, based on the minimum distance corresponding to the keyword within the recall results, all query subjects are filtered to obtain the target query subject. This query process uses a gradual screening approach, improving query efficiency while ensuring query accuracy.

[0154] In some optional implementations, the above step c3 includes:

[0155] Step c31 : for each keyword under each query topic, if a preset identifier exists in the recall result corresponding to the keyword, the preset identifier and the content corresponding to the preset identifier are removed to obtain a processed recall result.

[0156] Since the information description form of the query subject is not fixed and the description rules are not unified under each query subject, it may cause the recall distance of essentially the same fields to deviate due to the different description forms. Based on this, in this embodiment, the recall results corresponding to the keywords are preprocessed, and then the recall distance is corrected using the preprocessed recall results. Among them, the preprocessing of the recall results can be to remove the preset identifier in the recall results and the content corresponding to the preset identifier. For example, the recall result includes the indicator field: quantity (pieces), and the keyword is quantity, then it is necessary to remove "(pieces)" in the indicator field before matching.

[0157] The preset identifiers include but are not limited to parentheses, square brackets, and curly brackets, etc., which are identifiers that explain the fields; the content corresponding to the preset identifier represents the content within the preset identifier, including but not limited to the content within the parentheses, the content within the square brackets, and the content within the curly brackets, etc.

[0158] Step c32: Based on the matching degree between the keyword and the processed recall result, the distance corresponding to the processed recall result is corrected to obtain a corrected distance.

[0159] The processed recall result and the keyword are similarly calculated to obtain a similarity calculation result, i.e., a matching degree. The matching degree value can be directly used to correct the distance corresponding to the processed recall result to obtain a corrected distance.

[0160] Step c33: Filter out the recall fields with the smallest distance between the keywords under the query subject in the recall results based on the corrected distance.

[0161] After the recall distance is corrected, the recall results of the same keyword under each query topic are filtered in a similar manner as described in step c3, and the recall field with the minimum distance is retained.

[0162] In the process of filtering the recall results, since there may be characters in the recall results that affect the degree of matching, the results will be processed with preset labels during the filtering process, and the original recall distance will be corrected based on the matching degree of the processed recall results and keywords to ensure the accuracy of the corrected distance. On this basis, the accuracy of the recall can be further improved, thereby ensuring the accuracy of subsequent topic screening.

[0163] In some optional implementations, the above step c32 includes:

[0164] Step c321: If the keyword completely matches the processed recall result, the distance corresponding to the processed recall result is set to the preset minimum distance to obtain the corrected distance.

[0165] Step c322: If the keyword does not match the processed recall result, the suffix word corresponding to the query object is obtained.

[0166] Step c323: concatenate the keyword and the suffix to obtain a concatenation result.

[0167] In step c324 , if the stitching result completely matches the processed recall result, the distance corresponding to the processed recall result is set as the preset minimum distance to obtain the corrected distance.

[0168] After processing the preset identifiers, a processed recall result corresponding to the keyword can be obtained. If the two are completely matched, the distance corresponding to the processed recall result is set to a preset minimum distance, which is greater than 0. For example, 0.001. The preset minimum distance is set to be greater than 0 rather than equal to 0 to avoid errors in the processing of the preset identifiers.

[0169] In data query topics, fields within the query topic may contain suffixes, such as "id," "name," "number," and "rate." These suffixes can affect the recall distance. Therefore, it's necessary to concatenate the keyword with each of these suffixes to obtain a concatenated result. This concatenation is then matched against the processed recall result. If an exact match is found, the distance corresponding to the processed recall result is set to the preset minimum distance to obtain the corrected distance.

[0170] There may be some common suffixes in the recall field. Therefore, after concatenating the keyword with the suffix of the query object, the processed recall results are matched again to further ensure the accuracy of the corrected distance.

[0171] In some optional implementations, the above step c4 includes:

[0172] Step c41 , for each query topic, count the first number of recall fields corresponding to all keywords whose distance is less than a first preset distance, the second number of recall fields whose distance is less than a second preset distance, and the sum of the distances, where the first preset distance is less than the second preset distance.

[0173] Step c42: Determine the target query topic of the first query question by sorting based on the priority of the first quantity, the second quantity, the sum of the distances, and the weight of the query topic.

[0174] During the target query process, the search is filtered based on comparison priority. For each query topic, the recall distances corresponding to all keywords are compared. The number of recall fields with a recall distance less than a first preset distance is counted to obtain a first count. The number of recall fields with a recall distance less than a second distance from the color number is counted to obtain a second count. All recall distances are summed to obtain the total distance. Furthermore, each query topic is assigned a corresponding weight.

[0175] Specifically, when comparing, first compare the sizes of the first quantities, and determine the query subject with the smallest first quantity as the target query subject; if the first quantities are the same, then compare the sizes of the second quantities, and determine the query subject with the smallest second quantity as the target query subject; if the second quantities are the same, then compare the sizes of the sums of the quantities, and determine the query subject with the smallest sum of the quantities as the target query subject; if the sums of the quantities are also the same, then compare the weights of the various query subjects, and determine the query subject with the largest weight as the target query subject.

[0176] It should be noted that although only the first preset distance and the second preset distance are given in the above description, this does not limit the protection scope of this application and can be set according to actual needs.

[0177] When filtering query topics, they are sorted according to the number of topics filtered out by different thresholds, the total distance, and the priority of the query topic weight, thereby improving the efficiency and accuracy of query topic filtering.

[0178] In some optional implementations, the query step includes question analysis. Accordingly, the above step S502 includes:

[0179] Step d1, obtaining current time information.

[0180] Step d2: Generate second prompt information based on the current time information, the rewritten question of the first query question, the query subject of the first query question, and the optional parsed field.

[0181] Step d3: Generate domain-specific language based on the second prompt information using the large language model.

[0182] Step d4, obtain the parsing field of the first query question in the specific domain language and the field value of the parsing field. The current time information can be used to represent the time when the query instruction is obtained, and the optional parsing field can represent the parsing field that can be provided when the subsequent question is parsed. The second prompt information is generated using the current time information, the rewritten question, the query subject and the optional parsing field, and the second prompt information is used to instruct the large language model to generate a specific domain language (Domain Specific Language, DSL). For the optional parsing field, if the content of this parsing field is not included in the rewritten question, the field value of the optional parsing field can be set to empty, and the optional parsing field will not be displayed later. Among them, the parsing field of the first query question and the field value of the parsing field can be obtained by analyzing and processing the specific language model.

[0183] Data query is achieved by generating domain-specific languages through large language models, which is more flexible than constructing domain-specific languages through code.

[0184] The data query process executed in the server, such as Figure 6 As shown, after a user question is given, the question is rewritten to obtain the result of the question rewriting, and the result of the question rewriting is fed back to the device front end for display. Then, based on the result of the question rewriting, topic routing is performed to obtain the result of topic routing. Similarly, the result of topic routing is fed back to the device front end for display. After the topic routing is completed, DSL construction is performed to obtain the DSL and the corresponding parsing fields of the user question, that is, the indicators, dimension filter items and dates used. The result of SQL generation is stored on the device front end to facilitate subsequent modification of the first processing result to generate a new SQL statement to indicate data query. DSL is used for subsequent data queries, and the results of the data query are fed back to the device front end for display. Finally, question recommendation processing is also performed to obtain recommended questions, and the recommended questions are fed back to the device front end for display.

[0185] As a specific application example of the embodiment of the present application, Figure 7 As shown, the data query process involves three layers: the interface layer, the platform backend layer, and the query plug-in backend layer. Specifically, the interface layer corresponds to the terminal device, the platform backend layer corresponds to the server where the application is deployed on the terminal device, and the query plug-in backend layer corresponds to the platform server. Users enter their questions through the interactive interface. The platform backend layer screens the questions to determine whether they are data query questions. If so, the query instructions are sent to the query plug-in backend layer. The query plug-in backend layer undergoes processing steps including question rewriting, topic routing, SQL generation, data query, and question recommendation. In the question rewriting stage, keywords are extracted from the user question. If any special words are present, they are mapped. The question is then rewritten based on the user question and historical conversations, and the rewritten question is fed back to the interface layer for display. Next, the topic routing stage begins, matching topic routes based on the rewritten question to obtain and feed back topic routes. The DSL is then generated by combining the rewritten question, time information, data topic, and recall metrics to create a complete SDL. The platform backend extracts key information from the query DSL from the complete SDL, deriving the parsed fields and values for question resolution, and displays these parsed fields and values on the interface. Next, the data query phase begins. The query results are obtained by executing the DSL and fed back to the platform backend. The backend converts these results into charts and displays them on the interface. Finally, the recommended question phase begins. Recommended questions are generated based on user questions, special word mappings, historical conversations, fallback questions, and recall metrics, and the recommendations are fed back to the interface for display.

[0186] In this embodiment, a data query device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details already described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0187] This embodiment provides a data query device, such as Figure 8 As shown, including:

[0188] The query question display module 801 is used to display the first query question on the interactive page in response to the query instruction of the first query question, and trigger the processing of the first query question according to the query plan, which includes multiple query steps.

[0189] The first processing result display module 802 is used to display the first processing result of each query step on the interactive page.

[0190] The second processing result display module 803 is used to trigger a re-query for the first query question in response to a modification instruction for the first processing result of the target query step, and obtain and display the second processing result of each query step.

[0191] In some optional embodiments, the target query step includes at least one of question parsing and data query; the first processing result of the question parsing includes the parsed field and the field value of the parsed field; the first processing result of the data query includes displaying the query data in a first style.

[0192] In some optional implementations, the display module is configured to display the resolution fields and field values of the resolution fields of the question on the interactive page, and to display the query data in a first style.

[0193] In some optional implementations, the second processing result display module 803 includes:

[0194] The modification unit is configured to determine a modification result in response to a modification instruction for a field value of the parsed field and / or a first style.

[0195] The re-query unit is used to trigger a re-query of the first query question based on the modification result in response to an interactive instruction for the re-query control on the interactive page, and obtain and display the second processing results of each query step.

[0196] In some optional implementations, the query step also includes question rewriting, topic routing, and recommended questions; the processing results of question rewriting, topic routing, question parsing, data query, and recommended questions are displayed in sequence on the interactive page.

[0197] This embodiment provides a data query device, such as Figure 9 As shown, including:

[0198] The instruction acquisition module 901 is used to acquire a query instruction of a query object for a first query question.

[0199] The first processing module 902 is used to process the first query question based on the query plan to obtain a first processing result of each query step in the query plan, where the query plan includes multiple query steps.

[0200] The first feedback module 903 is used to feed back the first processing results of the query steps to the requester of the query instruction in sequence based on the order of the query steps, and the requester's interactive page is used to display the processing results of the query steps.

[0201] The instruction modification module 904 is used to obtain a modification instruction for the first processing result of the target query step.

[0202] The re-query module 905 is configured to re-query the first query question based on the modification result and the query plan to obtain a second processing result of each query step.

[0203] The second feedback module 906 is configured to feed back the second processing results of the query steps to the requester of the query instruction in sequence based on the order of the query steps.

[0204] In some optional implementations, the query step includes question rephrasing, and the first processing module 902 includes:

[0205] The historical conversation acquisition unit is used to obtain the historical conversations between the query object and the intelligent agent.

[0206] The replacement word determination unit is configured to determine a replacement word for the target word if the target word exists in the first query question.

[0207] The first prompt information generating unit is configured to generate first prompt information based on the first query question, the historical conversation, and the replacement word of the target word.

[0208] The rewritten question output unit is used to output a rewritten question of the first query question based on the first prompt information using the question rewriting model, wherein the first processing result of the question rewriting includes the rewritten question.

[0209] In some optional implementations, the first processing module 902 includes:

[0210] The mapping acquisition unit is used to acquire the word mapping corresponding to the query object, where the word mapping is used to represent the mapping relationship between the target word and the replacement word.

[0211] The target word determining unit is configured to determine that the target word exists in the first query question if the word in the first query question can be found in the word mapping.

[0212] In some optional implementations, the query step includes topic routing, and the first processing module 902 includes:

[0213] The information acquisition unit is used to acquire information of a query subject corresponding to the query object, where the information of the query subject includes at least one of fields under the query subject and enumeration meta-information.

[0214] The word segmentation unit is used to segment the rephrased question of the first query question based on the information of the query subject, and obtain the recall results of the keywords under each query subject.

[0215] The filtering unit is used to filter the recall results for each query topic and obtain the recall field with the smallest distance between the keywords in the recall results.

[0216] The screening unit is configured to screen each query topic based on the minimum distance between the keywords in the recall results under each query topic, and determine a target query topic for the first query question.

[0217] In some optional embodiments, the filtration unit includes:

[0218] The removal subunit is used for removing the preset identifier and the content corresponding to the preset identifier from the keywords under each query topic to obtain the processed recall result if the preset identifier exists in the recall result corresponding to the keyword.

[0219] The correction subunit is used to correct the distance corresponding to the processed recall result based on the matching degree between the keyword and the processed recall result to obtain a corrected distance.

[0220] The field determination subunit is used to filter out the recall fields with the smallest distance between the keywords under the query subject in the recall results based on the corrected distance.

[0221] In some optional embodiments, the correction subunit includes:

[0222] The first setting subunit is configured to set the distance corresponding to the processed recall result to a preset minimum distance to obtain a corrected distance if the keyword completely matches the processed recall result.

[0223] The suffix acquisition subunit is used to obtain the suffix corresponding to the query object if the keyword does not match the processed recall result.

[0224] The splicing subunit is used to splice the keyword and the suffix word to obtain a splicing result.

[0225] The second setting subunit is configured to set the distance corresponding to the processed recall result to a preset minimum distance if the splicing result completely matches the processed recall result, thereby obtaining the corrected distance.

[0226] In some optional embodiments, the screening unit includes:

[0227] The statistical subunit is used to count the first number of recall fields corresponding to all keywords with distances less than a first preset distance, the second number of distances less than a second preset distance, and the sum of the distances for each query topic, where the first preset distance is less than the second preset distance.

[0228] The sorting unit is configured to sort the first query question based on the first quantity, the second quantity, the sum of the distances, and the priority of the weight of the query subject, and determine the target query subject of the first query question.

[0229] In some optional implementations, the query step includes question parsing, and the first processing module 902 includes:

[0230] The time information acquisition unit is used to acquire current time information.

[0231] The second prompt unit is configured to generate second prompt information based on current time information, the rewritten question of the first query question, the query subject of the first query question, and the optional parsed field.

[0232] A generation unit is used to generate a domain-specific language based on the second prompt information using a large language model.

[0233] The information acquisition unit is configured to obtain a parsed field of the first query question and a field value of the parsed field in a domain-specific language.

[0234] The data query device provided by the embodiment of the present disclosure can execute the data query method provided by any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method. The device processes the first query question according to the query plan, and displays the corresponding first processing result for each query step in the query plan. By displaying the first processing result of each query step, the user can intuitively understand the processing status of each query step, and can modify inaccurate processing results in an interactive manner to trigger re-query. The method can intuitively display the query results of each query step, facilitate intuitive understanding of inaccurate query steps, and timely modify them and re-query, thereby improving query efficiency. The further functional description of each of the above modules and units is the same as that of the corresponding embodiment above, and will not be repeated here.

[0235] Figure 10 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.

[0236] The following specific reference Figure 10 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a memory 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device are also stored in the RAM 1003. The processor 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0237] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown, and more or fewer devices may be implemented or possessed instead.

[0238] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the memory 1008, or installed from the ROM 1002. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the data query method of the embodiment of the present disclosure are performed.

[0239] Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0240] The embodiments of the present application also provide a computer-readable storage medium. The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the data query method shown in the above embodiment is implemented.

[0241] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0242] Although the embodiments of the present application have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations shall fall within the scope defined by the appended claims.

Claims

1. A data query method, characterized in that: include: In response to a query instruction of a first query question, displaying the first query question on an interactive page and triggering processing of the first query question according to a query plan, wherein the query plan includes a plurality of query steps; Displaying the first processing result of each query step on the interactive page; In response to a modification instruction for the first processing result of the target query step, a re-query for the first query question is triggered, and a second processing result of each of the query steps is obtained and displayed.

2. The method according to claim 1, characterized in that The target query step includes at least one of question analysis and data query; The first processing result of the problem analysis includes a parsed field and a field value of the parsed field; The first processing result of the data query includes displaying the query data in a first style.

3. The method according to claim 2, characterized in that The analysis fields of the problem analysis and the field values of the analysis fields are displayed on the interactive page, and the query data is displayed in a first style.

4. The method according to claim 2, characterized in that The step of triggering a re-query for the first query question in response to a modification instruction for the first processing result of the target query step, and obtaining and displaying the second processing result of each query step includes: Determining a modification result in response to a modification instruction for a field value of the parsed field and / or the first style; In response to an interactive instruction for a re-query control on the interactive page, a re-query of the first query question based on the modified result is triggered, and a second processing result of each of the query steps is obtained and displayed.

5. The method according to any one of claims 1 to 4, characterized in that The query step also includes question rewriting, topic routing, and recommended questions; The processing results of the question rewriting, topic routing, question parsing, data query and recommended questions are displayed in sequence on the interactive page.

6. A data query method, characterized in that: include: Obtaining a query instruction of the query object for the first query question; Processing the first query question based on the query plan to obtain a first processing result of each query step in the query plan, wherein the query plan includes a plurality of the query steps; Based on the order of the query steps, the first processing results of the query steps are fed back to the requester of the query instruction in sequence, and the processing results of the query steps are displayed on the interactive page of the requester; Obtaining a modification instruction for the first processing result of the target query step; Re-querying the first query question based on the modification result and the query plan to obtain a second processing result of each query step; Based on the order of the query steps, the second processing results of the query steps are fed back to the requester of the query instruction in sequence.

7. The method according to claim 6, characterized in that The query step includes question rewriting, and the processing of the first query question based on the query plan to obtain first processing results of each query step in the query plan includes: Obtaining historical conversations between the query object and the agent; If the target word exists in the first query question, determining a replacement word for the target word; generating first prompt information based on the first query question, the historical conversation, and a replacement word for the target word; A rewritten question of the first query question is outputted based on the first prompt information using a question rewriting model, and a first processing result of the question rewriting includes the rewritten question.

8. The method according to claim 7, characterized in that include: Obtaining a word mapping corresponding to the query object, wherein the word mapping is used to represent a mapping relationship between a target word and a replacement word; If the word in the first query question can be found in the word mapping, it is determined that the target word exists in the first query question.

9. The method according to claim 6, characterized in that The query step includes topic routing, and the processing of the first query question based on the query plan to obtain first processing results of each query step in the query plan includes: Acquire information of a query subject corresponding to the query object, where the information of the query subject includes at least one of fields and enumeration meta-information under the query subject; Performing word segmentation on the rephrased question of the first query question based on the information of the query subject, and obtaining recall results of keywords under each of the query subjects; For each query topic, filtering the recall results to obtain the recall field with the smallest distance between the keyword and the recall results; Based on the minimum distance between the keywords under each query topic and the corresponding recall results, each query topic is screened to determine a target query topic for the first query question.

10. The method according to claim 9, characterized in that The step of filtering the recall results for each query topic to obtain the recall field with the smallest distance between the keyword and the recall results includes: For each keyword under the query topic, if a preset identifier exists in the recall result corresponding to the keyword, the preset identifier and the content corresponding to the preset identifier are removed to obtain a processed recall result; Based on the matching degree between the keyword and the processed recall result, the distance corresponding to the processed recall result is corrected to obtain a corrected distance; Based on the corrected distance, the recall field with the smallest distance among the keywords under the query subject in the recall results is filtered out.

11. The method according to claim 10, characterized in that The method of correcting the distance corresponding to the processed recall result based on the matching degree between the keyword and the processed recall result to obtain the corrected distance includes: If the keyword completely matches the processed recall result, the distance corresponding to the processed recall result is set as the preset minimum distance to obtain the corrected distance; If the keyword does not match the processed recall result, then obtain the suffix word corresponding to the query object; Splicing the keyword and the suffix to obtain a splicing result; If the stitching result completely matches the processed recall result, the distance corresponding to the processed recall result is set as the preset minimum distance to obtain the corrected distance.

12. The method according to claim 9, characterized in that The step of screening each query topic based on the minimum distance between the keyword in each query topic and the corresponding recall result to determine a target query topic of the first query question includes: For each query topic, counting a first number of recall fields corresponding to all keywords whose distance is less than a first preset distance, a second number of recall fields whose distance is less than a second preset distance, and the sum of the distances, wherein the first preset distance is less than the second preset distance; The target query topic of the first query question is determined based on the priority ranking of the first number, the second number, the sum of the distances, and the weights of the query topics.

13. The method according to claim 6, characterized in that The query step includes question parsing, and processing the first query question based on the query plan to obtain first processing results of each query step in the query plan includes: Get current time information; generating second prompt information based on the current time information, the rewritten question of the first query question, the query subject of the first query question, and the optional parsed field; Generate domain-specific language based on the second prompt information using a large language model; Obtain a parsed field of the first query question and a field value of the parsed field in the domain-specific language.

14. A data query device, characterized in that: include: a query question display module, configured to display the first query question on an interactive page in response to a query instruction of the first query question, and trigger processing of the first query question according to a query plan, wherein the query plan includes a plurality of query steps; A first processing result display module, configured to display the first processing result of each query step on the interactive page; The second processing result display module is used to trigger a re-query for the first query question in response to a modification instruction for the first processing result of the target query step, and obtain and display the second processing result of each query step.

15. A data query device, characterized in that: include: An instruction acquisition module, configured to acquire a query instruction of the query subject for the first query question; a first processing module, configured to process the first query question based on the query plan to obtain a first processing result of each query step in the query plan, wherein the query plan includes a plurality of the query steps; A first feedback module is configured to feed back the first processing result of the query step to the requester of the query instruction in sequence based on the order of the query steps, and the processing result of the query step is displayed on the interactive page of the requester; An instruction modification module, configured to obtain a modification instruction for the first processing result of the target query step; a re-query module, configured to re-query the first query question based on the modification result and the query plan, and obtain a second processing result of each query step; The second feedback module is used to feed back the second processing results of the query steps to the requester of the query instruction in sequence based on the order of the query steps.

16. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data query method according to one of claims 1 to 13 by executing the computer instructions.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data query method according to any one of claims 1 to 13.

18. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data query method according to any one of claims 1 to 13.

Citation Information

Cited By

  • Smart card generation method for data query system and related device

    CN122220590A