Method, system, and computer-readable medium for implementing data question answering

By identifying the indicator entities and business scenarios in the customer operation industry and generating data query request messages, the problems of inaccurate and poor flexibility in the prior art are solved, and convenient and efficient data query is achieved.

CN119961401BActive Publication Date: 2025-08-15CHINA EASTERN AIRLINES CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510026532.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-08-15
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

The existing data query methods are difficult to understand specific expressions in the customer operation industry, resulting in inaccurate query results and poor flexibility. Users need to understand the data storage methods to conduct query.

Method used

By identifying the indicator entities in user input, determining the business scenarios associated with them, and identifying time and region condition entities, generating data query request messages, using a large language model for semantic analysis and error correction, and combining knowledge base services for data retrieval.

Benefits of technology

It realizes convenient and efficient data query in the passenger operation industry, improves the accuracy and flexibility of query, reduces user operation burden, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961401B_ABST
    Figure CN119961401B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, system, and computer-readable medium for implementing data question and answer. The method includes: receiving user input from a user; in response to determining that the user input is related to a data query, identifying an indicator entity contained in the user input, the indicator entity being used to indicate an indicator in the passenger transport industry; based on the identified indicator entity, determining a business scenario associated with a data source containing the indicated indicator; based on the determined business scenario, identifying one or more other entities from the user input, the other entities including at least one of a time condition entity indicating the time when the indicator entity occurred and a region condition entity indicating the region where the indicator entity occurred; based on all entities identified from the user input, generating a request message for data query; and displaying data obtained in response to the request message. Through the above method, users can efficiently query data in the passenger transport industry in a convenient manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of passenger transportation, and more particularly, to a method, system, and computer-readable medium for implementing data question answering in the field of passenger transportation. Background Art

[0002] With the development of technology, more and more data query methods have emerged, such as business intelligence (BI) report search, automatic conversion of search statements, intelligent dialogue robots, general query applications, etc.

[0003] While BI report search technology can enable a certain level of querying within report data, it lacks the ability to provide user-specific data information after the report is finalized and developed, resulting in limited flexibility. Furthermore, when an enterprise has a large number of reports, the tedious process of querying and opening reports makes it difficult to quickly locate the required report. While automatic search statement conversion technology can generate search statements based on natural language, the generated statements can sometimes contain errors. In particular, this technology cannot correctly handle special information such as conditions or indicators contained in natural language, significantly affecting the accuracy of query results. Intelligent conversational bot services can enable relatively general data queries, but they cannot meet the customized query requirements of specific fields. For example, in the aviation industry, they cannot parse certain calculated indicators that are not represented in the table structure, nor can they understand specialized expressions in specific fields. While general query applications can support a certain level of data querying, they require users to pre-specify the data tables and then generate query statements based on these pre-specified tables. This requires users to understand the data storage.

[0004] The above query method, at least due to its universality, is difficult to understand special expressions in a specific passenger transport industry, and thus is difficult to provide accurate data query in the passenger transport industry. At least because it requires users to understand the storage of data, it provides users with a lot of burden and lacks flexibility.

[0005] Therefore, it is hoped that a method for better data query in the passenger transport industry can be provided, so that users can query data in the passenger transport industry efficiently in a convenient manner. Summary of the Invention

[0006] A brief overview of the present disclosure is provided below to provide a basic understanding of some aspects of the present disclosure. However, it should be understood that this overview is not an exhaustive overview of the present disclosure. It is not intended to identify key or important parts of the present disclosure, nor is it intended to limit the scope of the present disclosure. Its purpose is simply to present certain concepts of the present disclosure in a simplified form as a prelude to the more detailed description that will be given later.

[0007] According to one aspect of the present disclosure, a method for implementing data question and answer is provided, the method comprising: receiving user input from a user; in response to determining that the user input is related to a data query, identifying an indicator entity contained in the user input, the indicator entity being used to indicate an indicator in the passenger transport industry; determining, based on the identified indicator entity, a business scenario associated with a data source containing the indicated indicator; based on the determined business scenario, identifying one or more other entities from the user input, the other entities including at least one of a time condition entity indicating an occurrence time of the indicator entity and an area condition entity indicating an occurrence area of the indicator entity; generating a request message for data query based on all entities identified from the user input; and displaying data obtained in response to the request message.

[0008] According to another aspect of the present disclosure, a system for implementing data question answering is provided, the system comprising: a memory storing computer-executable instructions; and a processor coupled to the memory, wherein the computer-executable instructions, when executed by the processor, cause the processor to perform the above-mentioned method.

[0009] According to another aspect of the present disclosure, a system for implementing data question answering is provided, which includes components for executing the steps of the above method.

[0010] According to yet another aspect of the present disclosure, a non-transitory computer-readable medium is provided, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor is caused to perform the above method. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The foregoing and other features and advantages of the present disclosure will become apparent from the following description of the embodiments of the present disclosure taken in conjunction with the accompanying drawings, which are incorporated herein and form a part of the specification and serve to further explain the principles of the present disclosure and enable those skilled in the art to make and use the present disclosure.

[0012] Figure 1 The software architecture diagram of the data question answering system according to an embodiment of the present disclosure is shown.

[0013] Figure 2 A structural diagram of a data question-answering system according to an embodiment of the present disclosure is shown.

[0014] Figure 3 A flowchart of a method for implementing data question answering according to an embodiment of the present disclosure is shown.

[0015] Figure 4 An example of how the question-answering system handles a situation where an indicator entity has multiple interpretations according to an embodiment of the present disclosure is shown.

[0016] Figure 5 A flowchart of entity maintenance according to an embodiment of the present disclosure is shown.

[0017] Figure 6A An example of defining an indicator through prompts according to an embodiment of the present disclosure is shown.

[0018] Figure 6B The SQL generation model according to the embodiment of the present disclosure is shown. Figure 6A Screenshot of the indicators learned in this way.

[0019] Figure 7 A flowchart of another method for implementing data question answering according to an embodiment of the present disclosure is shown.

[0020] Figure 8A A screenshot showing the display of the question answering system when a user enters query text.

[0021] Figure 8B A screenshot showing content presented by the question-answering system through memory.

[0022] Figure 8C A screenshot showing an example of identifying correct metrics using a fine-tuned LLM (Large Language Model).

[0023] Figure 8D Screenshot showing an example of a question-answering system asking a user to clarify the intent of a query.

[0024] Figure 8E Shows when the user selects Figure 8D A screenshot of the Q&A system display when selecting the option in .

[0025] Figure 8F A screenshot showing the display of the question-answering system when a specific year is specified.

[0026] Figure 8G A screenshot showing the display of the question-answering system when a specific event is specified.

[0027] Figure 9 A timing diagram of data query according to an embodiment of the present disclosure is shown.

[0028] Figure 10 A timing diagram of knowledge base query according to an embodiment of the present disclosure is shown.

[0029] Figure 11 A block diagram showing an example structure of an information processing device that can be employed in the technology according to an embodiment of the present disclosure.

[0030] Note that in the embodiments described below, the same reference numerals are sometimes used in common across different drawings to denote the same parts or parts having the same functions, and their repeated descriptions are omitted. In some cases, similar reference numerals and letters are used to denote similar items, so once an item is defined in one drawing, it need not be further discussed in subsequent drawings.

[0031] For ease of understanding, the positions, sizes, and ranges of various structures shown in the drawings and the like may not represent actual positions, sizes, and ranges, etc. Therefore, the present disclosure is not limited to the positions, sizes, and ranges disclosed in the drawings and the like. DETAILED DESCRIPTION

[0032] Various exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.

[0033] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the present disclosure, its application, or use. In other words, the structures and methods herein are presented in an exemplary manner to illustrate various embodiments of the structures and methods of the present disclosure. However, those skilled in the art will appreciate that these are merely exemplary of the disclosure that may be implemented, and are not exhaustive. Furthermore, the drawings are not necessarily drawn to scale, and some features may be exaggerated to illustrate details of specific components.

[0034] In addition, technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0035] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0036] First reference Figure 1 , describing the software architecture diagram of the data question answering system according to an embodiment of the present disclosure.

[0037] The data question-and-answer system supports natural language understanding (NLU) and can provide corresponding answers in the form of visualization or text after automatically analyzing user input. The question-and-answer system can include user-side devices (such as mobile phones, tablets, computers, etc.), and can also include various servers and databases on the network side. These devices provide answers to questions raised by users through interaction. The question-and-answer system can be deployed with an application layer, a service layer, and a data layer. The application layer can support query requests from mobile terminals and PC terminals (including web and desktop applications) and return corresponding query results. The application layer can include an independent permission management console to set different permissions for different users and / or stored data. For example, the permission management console can support atomic-level data permission management. For example, for users in the Shanghai department, they can be set to only view data from the Shanghai departure airport.

[0038] The service layer may include the AskData API service, semantic parsing service, data search service, and knowledge base service. The AskData API (Application Programming Interface) service is the API service for AskData. AskData is a platform that provides data query and analysis, including many existing platforms. This API service provides a unified query interface for the front-end (mobile, web, or desktop application) of data question and answer queries through a message format protocol. The semantic parsing service parses natural language to identify the target of the natural language and the entities contained in the natural language. Entities in this context refer to important information extracted from natural language, including indicator entities that semantically represent indicators (also known as metrics), time condition entities that semantically represent time points or time periods (such as yesterday, last week, etc.), region condition entities that semantically represent regions (such as departing from Shanghai, Shanghai to Beijing, etc.), and query method entities that semantically represent query methods (such as by day, by month, separately, highest, lowest, year-on-year, and quarter-on-quarter). The data search service generates database statements (such as structured query language (SQL) corresponding to different types of databases) for data queries and summarizes and displays the query results. The Knowledge Base service is used to perform Retrieval Augmentation Generation (RAG) queries for questions other than data queries to return relevant results for unstructured data.

[0039] The data layer can include an application database, a computational database, a full-text index, and a vector database. The application database can store data set for the AskData application, such as accessible users, each user's permissions, a data dictionary, etc. The computational database can store the data sources required for data question answering, and the data source can be used to determine the data table where the data is stored. The full-text index can be used for RAG document recall and AskData's query suggestion prompts. The vector database can be used for RAG document recall and to assist in parsing the entities contained in user input.

[0040] The model layer can include a large model group and a model training module. The large model group can call appropriate models to work together, such as using LLM-HUB (which is used for unified integrated scheduling of internal LLMs) and the API for calling LLMs to call related models to implement corresponding functions. For example, an existing semantic parsing model can be called to analyze the semantics of natural language, an existing RAG model can be called to generate answers for non-data queries, and so on. The model training module can fine-tune the existing LLM, such as for specific users, specific expressions of specific industries, RAG summarization of specific documents, etc., to fine-tune the existing LLM to better suit the application scenario.

[0041] exist Figure 2 FIG shows a schematic diagram of the structure of the data question answering system according to an embodiment of the present disclosure. Figure 2 As shown, the application layer clients (including applications or web pages on smartphones, laptops, desktop computers, tablets, etc.) can communicate with the AskData API service via RESTFUL / SSE using the AskData message protocol to perform data searches, etc. The application layer permission management console can communicate with the AskData API service via RESTFUL to set user permissions and data attributes in the application database.

[0042] When the AskData API service in the service layer receives a message corresponding to a question from a client, it analyzes whether the message is intended for a data query. If the target is a data query, the API service communicates with the semantic parsing service via RESTful. The API service sends the user input to the semantic parsing service, which performs semantic classification based on the user input and parses the entities contained in the user input. It can also determine the associated intent based on the entity. For example, the intent of an entity can indicate the data source corresponding to the entity. During the parsing process, the semantic parsing service can invoke functions that perform text similarity matching, synonym matching, and vector query to determine the entities in the user input. If resources such as GPUs (graphics processing units) are available, the semantic parsing service can also invoke the LLM to determine the entities. For example, the semantic parsing service can resolve entities using the semantic recognition LLM in the model layer, which utilizes GPU computing and inference, invoked through the LLM-HUB, to enhance semantic correction of user input (for example, if there are typos in the user input). After the semantic parsing service has parsed the entity and its intent (for example, the corresponding data source), it returns the entity and query intent to the API service. The API service can communicate with the application database and computing database in the data layer through JDBC, and / or communicate with the data interface in the data layer through RESTFUL / SOAP, so as to obtain corresponding data from the computing database and / or data interface when it is determined based on the application database according to the user's attributes and / or the attributes of the data that the user can query relevant data, and perform operations on the obtained data to meet the user's query requirements.

[0043] For example, when a user enters a query text, the query text is submitted to the API service. The API service extracts the intent permission code or scene permission code that the user can access and the permission code of the entity involved in the query text from the application database based on the user ID, and submits these permission codes to the semantic parsing service. The semantic parsing service determines whether the user needs to make clarification based on these permission codes (to be described below). If clarification is not required, it directly gives the semantic parsing result of the query text. If clarification is required, it gives the semantic parsing result of the query text based on the user's clarification content. The semantic parsing service will feedback the semantic parsing results including scenes, intents, and entities to the API service. The API service then determines whether the user is allowed to make data queries based on the user's other permission codes (for example, a user can only query data from airports departing from Beijing). When other permission codes are not met, the user is denied data query. When other permission codes are met and it is determined that the user is allowed to make data queries, query statements or interface parameters are generated based on the query text, and the query results are rendered to present them to the user.

[0044] When the target is not a data query (for example, the user input is unstructured data, and the request is for answers to the reasons for the matter, processing steps, etc.), the API service communicates with the knowledge base service through RESTFUL / SSE to perform a knowledge base retrieval query. The API service sends the user input to the knowledge base service so that the knowledge base service executes RAG based on the user input to perform a knowledge base query. When performing a knowledge base query, the knowledge base service accesses the knowledge base LLM, embedding (EMBEDDING) model, reranking (Reranking) model, etc. in the model layer to convert the user input into relevant features, and performs full-text indexing and / or vector search in the document / vector library based on the relevant features to find and generate results that meet the user input.

[0045] Although the above description uses the API service to determine whether user input is a data query as an example, those skilled in the art will understand that after the application on the client obtains the user input, the application itself can determine whether the user input is a data query and indicate whether it is a data query in the message provided to the API service.

[0046] Next, the data question-answering process for implementing data query is described in detail. Figure 3 A flowchart of a method 300 for implementing data question answering according to an embodiment of the present disclosure is shown in FIG. This method can be executed by a data question answering system or application. By implementing this method, more accurate data queries can be provided for the passenger transport industry through more accurate entity identification, thereby improving the efficiency of data question answering.

[0047] In S310 , a user input is received from a user.

[0048] Users can enter questions into an information processing device (e.g., a mobile phone, tablet, or computer) that can access a question-and-answer system or application, requesting the system or application to return answers. These questions can be data queries. These questions can be entered in text form or via voice input, which is then converted to text by the information processing device.

[0049] In S320 , in response to determining that the user input is related to the data query, an indicator entity included in the user input is identified, where the indicator entity is used to indicate an indicator in the passenger transport industry.

[0050] According to an embodiment of the present disclosure, when it is recognized that the user input contains expressions related to indicators in the passenger transport industry, it is determined that the user input is related to the data query. For example, if the user input includes "number of passengers", "occupancy rate", "flight destination", "aircraft model usage time", "income from XX to YY", etc., it can be determined that the user input is related to the data query. Determining whether the user input is related to the data query is a pre-classification of the target of the user input, which corresponds to making a coarse-grained judgment on the query statement to determine whether it is a data question answering or a knowledge base question answering, so that, for example, Figure 2 The user input is sent to the semantic parsing service or knowledge base service.

[0051] As mentioned above, entities in this context refer to the important information in the query message entered by the user. The indicator entity in the user input can be an entity that semantically indicates an indicator in the passenger transport industry. Indicator entities can indicate specific indicators, such as "passenger numbers," "occupancy rate," or "passenger-kilometers," or general indicators, such as "operating status" or "flight status." These general indicators can correspond to more specific indicator data in the data table. For example, "flight status" can correspond to more specific indicators such as "flight mileage" or "flight time."

[0052] To identify indicator entities from user input, the indicator entities contained in the user input can first be determined based on text similarity matching, synonym matching, and vector query. For example, indicators can be pre-set, and when the user input contains content that matches the preset indicators, the relevant indicator entities are determined. However, in some cases, typos may exist in the user input, affecting the implementation of text similarity matching, synonym matching, and vector query, making it impossible to find the indicator entities. In this case, the indicator entities contained in the user input can be identified based on an indicator recognition model based on machine learning. For example, an existing model for identifying specific content can be fine-tuned to enable the model to identify correct content based on typos. For example, the model can be fine-tuned using typo indicators as input and corresponding correct indicators as output as training samples. In this way, even if there are typos in the user input, the correct indicator entities can be identified from it, achieving enhanced semantic error correction.

[0053] In S330 , based on the identified indicator entity, a business scenario associated with a data source containing the indicated indicator is determined.

[0054] After identifying the indicator entity, the data source containing the indicator indicated by the indicator entity can be further determined. The data source stores the data corresponding to the indicator entity. The query intent of the indicator entity can be determined through the indicator indicated by the indicator entity. The data source can indicate a business scenario, and multiple data sources can be associated with the business scenario. Since the query intent can be determined through the indicator entity, that is, what type of data you want to query, the data source can be determined. Since the data source is associated with the business scenario, it is possible to further query the relevant data based on one or more data sources associated with the business scenario, thereby realizing cross-data source queries, avoiding users repeatedly querying different operations required by different data sources, and trying to ensure the integrity of the query data.

[0055] For example, when the indicator entity is "number of passengers", the relevant data sources can be determined in the database, such as the "operation table" containing "number of passengers", the "revenue table" containing "number of passengers" and / or the "plan table" containing "number of passengers". These data sources collectively belong to the operational business scenario. After the operational business scenario is determined, the scenario may be associated with more data sources, which will help to query the data more comprehensively. For another example, when the indicator entity is "number of employees", the relevant data source can be determined in the database to be the "human resources table" containing "number of employees", and the associated business scenario can be determined through the "human resources table" to be the internal management business scenario, which may lead to the discovery of more data related to the entity contained in the user input.

[0056] Typically, the query intent indicated by an indicator entity corresponds to a single data source and a single business scenario. However, in some cases, an indicator entity may be a generalized representation of an indicator. In this case, the query intent indicated by the indicator entity may correspond to multiple data sources. In this case, the associated business scenario can be determined from the general indicator entity (e.g., by determining the business scenario from at least one related data source). Based on the multiple specific items in the business scenario corresponding to the indicator entity and contained in the associated data source, the indicator entity can be broken down into corresponding specific indicators, so that these indicators are included in the displayed results. For example, if the indicator entity is "operating status," the associated business scenario can be determined to be the operating scenario. Next, the specific items "passenger transportation," "ticket sales," and "financial performance" can be determined from the data source associated with the scenario. These specific items correspond to "operating status," thus concretizing the indicator entity "operating status" into "passenger transportation," "ticket sales," and "financial performance," and displaying the corresponding query results. These specific items represent the query intent of the general indicator entity, and these query intents can be combined and linked together in a linked list to form an intent chain.

[0057] According to an embodiment of the present disclosure, when the identified indicator entity has multiple interpretations, the exact meaning of the indicator entity can be inferred based on the context of the user input and / or the user's permissions. For example, when the user input contains "number of people", if the user only has the authority to query the company's human resources, then it can be inferred based on the user's permissions that "number of people" refers to "number of employees". When inference cannot be made, the user can be requested to clarify the meaning of the indicator entity to determine the exact meaning of the indicator entity. For example, continuing with the above example, the user can be requested to clarify whether "number of people" refers to "number of employees" or "number of passengers". After determining the exact meaning of the indicator entity, the business scenario corresponding to the data source containing the indicated indicator can be determined accordingly.

[0058] exist Figure 4 FIGURE 2 shows an example of a processing method of a question-answering system or a question-answering application when an indicator entity has multiple interpretations according to an embodiment of the present disclosure. Figure 4 As shown in (1), it is assumed that there are two groups of permission configuration data stored in the application database: one group is the query permission for operating indicators, which supports querying passenger indicators, passenger indicator dates, and financial indicators of a specific flight segment; the other group is the query permission for human performance, which supports querying the personnel structure of a specific department.

[0059] exist Figure 4 In (2), the user is an administrator and has the two permissions (or role permissions) of querying business indicators and human performance. When the user enters the query "number of people in September", the question-answering system recognizes that the user may want to query the passenger indicator summary or the personnel structure, but cannot determine which type of number of people the user wants to query. Therefore, the question-answering system will infer the user's intention. When the question-answering system cannot infer the specific meaning based on the user's permissions and the context of the user's input (including the entities in the user's input), the question-answering system will ask the user to clarify, for example, in the form of a dialogue, asking the user to choose "number of carriers" or "number of employees". After the user responds, the question-answering system can replace the ambiguous content with the content clarified by the user to query the results based on the clarified intention.

[0060] exist Figure 4 In (3), the user is an administrator with the ability to query both operating indicators and human performance. When the user enters the query "number of people from Beijing to Shanghai in September", the Q&A system recognizes that the user may want to query the passenger transport indicator summary or the personnel structure, but cannot determine which type of number the user wants to query. Therefore, the Q&A system infers the user's intention. Based on the "Beijing to Shanghai" included in the context of the user's input, the Q&A system can determine that the user wants to query the passenger transport indicator summary in the operating indicators, and then query the results based on the passenger transport indicator summary without asking the user for further clarification.

[0061] exist Figure 4 In (4), the user has the permission to query operating indicators. When the user enters the query "number of people in September", the Q&A system recognizes that the user may want to query the passenger indicator summary or the personnel structure, but cannot determine which type of number of people the user wants to query. Therefore, the Q&A system infers the user's intention. Based on the user's permission to query only operating indicators, the Q&A system determines that the user can only query the passenger indicator summary, and then queries the results based on the passenger indicator summary without asking the user for further clarification.

[0062] exist Figure 4 In (5), the user has the permission to query human performance. When the user enters the query "number of people from Beijing to Shanghai in September", the question-answering system recognizes that the user may want to query the passenger transport indicator summary or the personnel structure, but cannot determine which type of number the user wants to query. Therefore, the question-answering system will infer the user's intention. Based on the user's permission to query only human performance, the question-answering system determines that the user can only query the personnel structure, and then queries the results based on the personnel structure without asking the user for further clarification. At this time, the entity "Beijing to Shanghai" that is not related to human performance is discarded.

[0063] return Figure 3 In S340, based on the determined business scenario, one or more other entities are identified from the user input, and the other entities include at least one of a time condition entity indicating the occurrence time of the indicator entity and a region condition entity indicating the occurrence region of the indicator entity.

[0064] According to an embodiment of the present disclosure, one or more other entities corresponding to the items are identified from the user input based on the items contained in the data source associated with the business scenario. Specifically, the data source associated with the business scenario (such as a data table) may store one or more items (for example, origin, destination, time, number of passengers, revenue, etc.), and each item may have related data. After the items are determined based on the data source corresponding to the business scenario, the entities corresponding to these items can be identified by matching the items with the content input by the user. For example, when the items in the data source include "from XX to YY" and "time", the "Beijing to Shanghai" regional condition entity and the "September" time condition entity can be identified from the user query "number of people from Beijing to Shanghai in September".

[0065] Other entities identified here may include time condition entities indicating the occurrence time of the indicator entity and / or area condition entities indicating the occurrence area of the indicator entity involved in the user input, and may also include query mode entities used to indicate how the user wants to process the indicator, such as "year-on-year", "month-on-month", "list", "percentage", etc. In addition, other entities identified here may also have similar problems with multiple interpretations as the indicator entity, so the same Figure 4 Similar approaches allow users to clarify or infer based on context and / or authority.

[0066] According to embodiments of the present disclosure, a query method can be identified based on the semantics of the user input. For example, a user can request to list different data, to sum some data, or to compare some data, such as determining year-on-year / month-on-month growth.

[0067] For example, user input may include expressions related to "year-on-year" and "month-on-month." Because the present disclosure is applied to the passenger transport industry, its calculation method for year-on-year and month-on-month comparisons differs from the typical quarterly or annual calculation method. Specifically, the year-on-year and month-on-month calculations in the present disclosure are aligned to a weekly or event-based basis to better suit the characteristics of the passenger transport industry. For example, if the user input includes expressions related to year-on-year comparisons, the year-on-year comparison is determined based on the same week of the previous 12 months. For another example, if the user input includes expressions related to month-on-month comparisons, the month-on-month comparison is determined based on the same week of the previous week. For another example, if the user input includes expressions related to events, the year-on-year comparison is determined based on the time corresponding to the same event in the previous year. Examples of events here include the Spring Festival, the May Day holiday, and National Day. If the time period determined as the basis for year-on-year and / or month-on-month comparisons does not meet predetermined conditions, the time period is adjusted forward by one or more years. For example, if passenger data is inaccurate due to a special reason such as an epidemic, the year is adjusted forward to the most recent year without the epidemic.

[0068] Through the above processing, the user input can be fully parsed to understand the semantics of the user input, thereby facilitating more targeted and accurate queries in the question-answering system.

[0069] In S350 , a request message for data query is generated according to all entities identified from the user input.

[0070] According to embodiments of the present disclosure, a request message that conforms to the semantics of the user input can be generated based on the indicator entity identified in S320 and other entities identified in S340. After identifying the indicator entity, time condition entity, region condition entity, query method entity, etc., since different data sources may have different query statements or query requirements, a corresponding request message can be generated based on whether the data source is accessed via database statements or interface calls. For example, when the data source associated with the business scenario is accessed via database statements, the database SQL can be generated based on the parsed entities. Because the user input involves relevant query methods, the generated SQL can be combined to obtain processing corresponding to the query method. Of course, it is also possible to first obtain relevant data through SQL and then perform processing corresponding to the query method on this data. For another example, when the data source associated with the business scenario is accessed via an interface call, interface parameters for calling a specified interface can be generated based on the parsed entities. The interface parameters are related to the interface specifications, and the relevant information in the user input can be filled in according to the specifications.

[0071] Although there are currently methods such as NL2SQL that convert natural language into SQL, these methods do not involve operations such as identifying indicator entities and identifying other entities based on business scenarios based on indicator entities as in the embodiments of the present disclosure. Therefore, their degree of parsing or understanding of natural language is not as accurate as the embodiments of the present disclosure, resulting in the possibility of errors in the SQL statements they generate, and the inability to achieve accurate queries. When querying data, these methods generally display the generated SQL content at the same time and allow users to determine the accuracy of the query results, making these methods unsuitable for a wider range of business users. The embodiments of the present disclosure fine-tune the existing SQL generation model so that the generated SQL meets the definition of indicators in the passenger transport industry, so that the data table fields can be appropriately combined according to the content that the user wants to query to obtain the correct indicators.

[0072] According to an embodiment of the present disclosure, entity maintenance can be performed before a user performs a data question and answer query. The question and answer system or application according to an embodiment of the present disclosure can implement a preparation process for maintaining the entities of the question and answer. First, a confirmed correct SQL fragment can be generated for each entity by selecting a data source and defining indicators. This part of the operation can be completed by a large language model in the form of prompts, and management and maintenance personnel can confirm or adjust the generated content to ensure the accuracy of the output content in the question and answer query. For example, in Figure 5 FIG. 4 shows a flowchart of entity maintenance according to an embodiment of the present disclosure.

[0073] In 5.1, entity maintenance begins. This includes indicator entities and conditional entities (e.g., time conditional entities and region conditional entities). In 5.2, the data source is selected. Since SQL is involved here, the data source is the one corresponding to the database from which data can be extracted using SQL.

[0074] When the entity is an indicator entity, go to 5.4. In 5.4, filter the indicator entity field, for example, set which text corresponds to the indicator entity. In 5.4.1, define the indicator, for example, define what indicator form the indicator entity is in the data source, which may be a specific item in the data source, or some kind of operation between specific items (such as calculating the ratio). Figure 6A An example of defining an indicator using Prompt is shown in FIG. Figure 6B The existing LLM (here is the SQL generation model) is based on Figure 6A A screenshot of the metrics learned using this method. If the learned metrics are still incorrect, further modification is required. In 5.4.2, use LLM to generate SQL snippets. In 5.4.3, confirm the SQL snippets.

[0075] If the entity is a conditional entity, proceed to step 5.3. In step 5.3, filter the conditional entity fields, for example, setting which text corresponds to the conditional entity. In step 5.3.1, define the conditional entity type to determine whether it is a time condition or a region condition, corresponding to different items in the data source. In step 5.3.2, determine the enumeration value of the conditional entity. Next, in step 5.2, combine the information in steps 5.3.2 and 5.4.3 to form SQL fragment mapping information, which generates the corresponding SQL language.

[0076] return Figure 3 , in S360 , the data obtained in response to the request message is displayed.

[0077] After the question-answering system obtains data related to the entity in the user input through database query statements or interface call instructions, it can present this data to the user in response to the user's data query.

[0078] Based on the above technical solution, by determining relevant business scenarios based on indicator entities related to the passenger transport industry, and identifying other entities in the user input based on the business scenarios, the user's query intention can be more accurately identified based on the user input, thereby more accurately returning data corresponding to the query intention, allowing users to conveniently query data in the passenger transport industry by providing natural language. This not only simplifies user operations and enhances operational flexibility, but also provides accurate query data for the passenger transport industry, thereby improving data query efficiency and enhancing user experience.

[0079] Furthermore, in some cases, user input may be unrelated to the data query. For example, the user input does not contain any statements related to indicators in the passenger transport industry. In this case, the question-answering system can determine that the user input is not a data query. In this case, retrieval-augmented generation (RAG) can be used to return an answer corresponding to the user input. For example, information related to the user's question can be retrieved from external or internal document databases, knowledge bases, etc., and the retrieved information can be combined with the generative model of the language model architecture to generate an answer using the retrieved content as additional context.

[0080] exist Figure 7 , a flowchart of another method 700 for implementing data question answering according to an embodiment of the present disclosure is shown.

[0081] In 1.0, users input natural language to allow the question-answering system to obtain user query text. For example, users can enter the query request in the form of voice or text, such as "the number of passengers from Shanghai's two airports to Beijing's Daxing Airport from the 5th to the 25th of last month, excluding FM flights and 787 aircraft." Figure 8A , which shows a screenshot of the question-answering system display when the user enters the query text.

[0082] In 1.1, the question-answering system pre-classifies the target of the user input to make a coarse-grained judgment on the query text, thereby determining whether the user input is a data query (also known as data question answering) or a non-data query (also known as knowledge base question answering).

[0083] If the user input is determined to be a data query in 1.1, proceed to 1.2. In 1.2, the question-answering system parses the user's query intent, that is, parses the semantics of the user input. The specific process of semantic parsing is described in 2.1-2.5.

[0084] In 2.1, the context information of previous conversations can be maintained by memorizing the conversations within a certain period of time, so as to query the relevant content for the semantic analysis of the current user input. The context information may supplement the semantics of the user input, such as supplementing the entities involved in the user input, which may reduce the triggering of the above-mentioned clarification of the meaning of the entity. Figure 8B A screenshot showing content presented by the question-answering system through memory.

[0085] In 2.2, the question-answering system can extract indicator entities from user input. The embodiment of the present disclosure can classify natural language entities into multiple categories, among which the business scenario of data query can be determined through the indicator entity (as shown in 2.3). When extracting indicator entities, the full-text index of synonyms and professional vocabulary can be used to match the indicator entity. If the indicator entity is not matched, the existing vector search and RERANKING threshold scheme can be used to match the indicator entity. If the indicator entity is still not matched, enhanced recognition can be performed through the intervention of LLM. Unlike conventional semantic understanding, the embodiment of the present disclosure utilizes LLM for enhanced recognition, which can improve the accuracy of entity recognition and enhance error correction capabilities.

[0086] The LLM here can be an enhanced indicator extractor implemented through SFT (supervised fine-tuning) and FewShot (small sample learning) solutions. For example, when the user enters a wrong word or misspelling, it may not be possible to match the entity through the full-text index and word vector, then LLM can be used to enhance the recognition ability of the entity. Figure 8C A screenshot of an example of using the fine-tuned LLM to identify the correct indicator is shown in Figure 1. The user entered the incorrect indicator entity "gram seat rate", and the question-answering system correctly identified it as "passenger seat rate".

[0087] When fine-tuning an existing indicator recognition model (for example, which can be implemented by a general large language model) through FewShot's Prompt, an example of Prompt can be as follows: [{'role':'system','content':'You are a named entity recognition extractor. Your task is to extract "indicator" information from the sentence. Here are some learning examples'},{'role':'user','content':'Occupancy rate and revenue on January 1'},{'role':'assistant','content':'Indicator: Occupancy rate, revenue'},{'role':'user','content':'Aircraft utilization in December'},{'role':'assistant','content':'Indicator: Aircraft utilization'}].

[0088] Because the database can store multiple indicators with partially identical text, when a user's input may correspond to multiple indicators, the Q&A system can use context to determine the specific data the user is looking for and clarify the user's query intent. However, in some cases, the Q&A system may not be able to infer the user's query intent. In this case, the system can request the user to clarify their query intent. Figure 8D A screenshot of an example of a question-answering system asking a user to clarify the query intent is shown in FIG. Figure 8EWhen the user selects Figure 8D A screenshot of the Q&A system display when entering the "Number of Carriers" field.

[0089] The clarification mechanism can determine the user's exact query intention based on the various types of information entered by the user. If the exact meaning of the entity entered by the user can be determined based on the user's permission to only query a certain type of data, then the user's query intention can be determined without going through the clarification mechanism, and the clarification mechanism will not be triggered at this time. In some cases, the exact meaning of the indicator entity entered by the user can be determined by the information of other entities in the context contained in the user input (for example, entities specific to the query intention contained in the user input), and the clarification mechanism can be skipped at this time to directly determine the user's query intention. Unlike the clarification function of other data question-and-answer systems, the embodiment of the present disclosure can make a comprehensive judgment based on the context of the user input (for example, content that provides additional information and / or entities specific to the query intention) and / or the user's permissions to infer the user's query intention, thereby reducing the triggering of the clarification mechanism and improving query efficiency.

[0090] In 2.3, the extracted indicator entities can be used to identify relevant business scenarios. Current data question-and-answer systems lack context for identifying these scenarios, making it difficult to fully understand the more general semantics of indicator entities and thus discover relevant data sources. By identifying business scenarios, question-and-answer applications can be made more convenient for business users without requiring them to understand data storage methods.

[0091] Other existing data question-and-answer applications require users to understand in advance which data sources are available and which indicators can be calculated based on the data sources. For example, when a user wants to query various indicators such as revenue, number of passengers, and average ticket price, the user needs to specify these indicators separately. Data across data sources may also need to be queried multiple times, which increases the cost of use for business users. However, according to the question-and-answer application of the present disclosure, business scenarios can be determined based on indicator entities, thereby combining different query intents within the business scenario based on the user's query needs. For example, when a user enters a relatively general or vague indicator entity (for example, an indicator entity that cannot be directly mapped to an item in any data source) corresponding to the "operating status" scenario, the relatively general or vague indicator entity can be decomposed into a combination of various data types such as "passenger transportation" + "ticket sales" + "financial performance", and the query intents represented by these data can be combined and connected in a linked list to form an intent chain, thereby avoiding the burden of having to enter precise indicator entities. In this way, compared to other question-and-answer applications, users can focus more on familiarizing themselves with the business rather than the data, thereby improving user efficiency.

[0092] In 2.4, based on the user's query intent, for example, based on the items in the data source corresponding to the indicator entities, time condition entities, region condition entities, and query method entities are extracted from the user input. For example, using the query "Number of passengers from Shanghai's two airports to Beijing's Daxing Airport from the 5th to the 25th of last month, excluding FM flights and 787 aircraft," the indicator entity "Number of passengers" can be used to determine the corresponding data source. "Number of passengers" can be parsed into [yyyymmdd, yyyymmdd] using the time parsing rule engine for query convenience. "Shanghai Airport" can be parsed into "SHA, PVG," and Beijing Daxing Airport can be parsed into "PKX." "Excluding FM flights and 787 aircraft" can be parsed into exclusions for the corresponding flight and aircraft entities. The parsed form can be related to the item form in the data source, facilitating querying the data source using related expressions. To determine the multiple entities contained in the user input, rule parsing, similarity matching, and / or syllable matching can be employed. These methods are well known to those skilled in the art and will not be elaborated upon here.

[0093] In 2.5, if the query method is determined to include year-on-year and month-on-month analysis through semantic parsing of user input, the corresponding year-on-year and month-on-month calculation is generated according to the semantics. In other data question-and-answer applications, year-on-year and month-on-month calculations can only meet the year-on-year and month-on-month calculations of a specific month or quarter. However, the passenger transport industry is not suitable for this rule. For example, the total number of days in February and March is different, and the number of passengers will be quite different. If the user specifies any time, such as March 1st to March 5th, the same days from March 1st to March 5th compared to last year will also be quite different because of whether the weekend is included. According to the data question-and-answer application of the embodiment of the present disclosure, the rule of week alignment ("DayOfWeek" rule, referred to as DOW rule) can be adopted to ensure that the year-on-year and month-on-month calculations are more in line with the special circumstances of the passenger transport industry. The specific implementation method can be: year-on-year calculations are implemented as [T-364, T-364], and month-on-month calculations are implemented as [T-7, T-7], where T is a specific date. In addition, due to special reasons such as the epidemic of infectious diseases, the data of recent years will be distorted compared to the same period last year, so it can be corrected to before the epidemic occurred according to the rules.

[0094] Based on the metrics you want to query, you can determine how to set the year-on-year and year-on-year comparisons. For example, for the aforementioned operational data, you can set the year-on-year and year-on-year comparisons according to the DOW rule. However, for data that is not affected by time, such as sales and personnel, you can avoid the DOW rule and use the usual yearly or quarterly time alignment.

[0095] In addition, semantic parsing can also determine the time period that the user wants to compare. For example, the user can specify a specific year for comparison. Figure 8FThe screenshot of the question-answering system display when a specific year is specified is shown in the figure. The question-answering system can support users to enter a specific time range. In this case, the DOW rule cannot be used, but the comparison day range can be reduced or increased according to the number of days queried. The question-answering system can also support corresponding event ratios, such as "Spring Festival travel", "Labor Day holiday", "National Day holiday", etc. Because the length of holidays varies from year to year, the comparison time will also be leveled according to the user's query intention and the rules of the event. Figure 8G FIG. 4 is a screenshot of the display of the question-answering system when a specific event is specified.

[0096] Through the execution of 1.2, the semantics of the user input can be recognized, thereby determining the query intent and entities. For example, if the user enters "yesterday's Shanghai to Beijing revenue, number of people, passenger load factor, seat revenue, passenger revenue", the following can be identified through semantics:

[0097] => Query Intent: Carrier Data

[0098] => Time condition entity: Yesterday -> 2024.09.09

[0099] => Regional Condition Entity: Shanghai to Beijing -> SHA / PVG-PEK / PKX

[0100] =>Indicator Entity:

[0101] Revenue->Passenger revenue

[0102] Number of people->Number of passengers

[0103] occupancy rate

[0104] Seat revenue->seat-kilometer revenue

[0105] Passenger revenue->Revenue passenger-kilometers

[0106] Corresponding to the implementation method of data query, it can be converted into the following computer language:

[0107] => Query intent: Carrier data -> Data source, table = flight_data_reportl

[0108] => Time condition: 2024.09.09->flight_dt = '2024-09-09'

[0109] => Area Condition: SHA / PVG-PEK / PKX->orig IN('SHA','PVG') AND dest IN('PEK','PKX')

[0110] =>Indicators:

[0111] Income->SUM(earning)

[0112] Number of people->SUM(psg)

[0113] Passenger load factor -> SUM(psg_km) / SUM(seats_km)

[0114] Seats earned->SUM(earning) / SUM(seats_km)

[0115] Customer Revenue->SUM(earning) / SUM(psg_km)

[0116] After semantically parsing the user input, in 1.3, a permissions check is performed to determine whether the user has permission to query the requested data. Permissions can be broken down into field values that support permission checks. For example, a user could be restricted to querying data for only a few airports. If the user's query exceeds the allowed range, the Q&A system will terminate the subsequent data query.

[0117] If the user's query intent is for information from a data table, this means the data source to be queried must be accessed via a database statement, so proceed to 1.4.1. If the user's query intent is for information accessed via an interface call, this means the data source to be queried must be accessed via an interface call, so proceed to 1.5.1. For example, the supported databases according to embodiments of the present disclosure may be MySQL / PostgreSQL, and the supported interfaces may be RESTful interfaces.

[0118] In 1.4.1, you can retrieve data table structure information based on query intent. In 1.4.2, you can map the indicator entity information to the corresponding database SQL statement. In 1.4.3, you can map the condition entity information to the corresponding database SQL statement. In 1.4.4, you can determine the query method based on the semantics of user input. In 1.4.5, you can combine the final query statement.

[0119] Regarding query methods, the default query method is "overall aggregation and summary" of the data. For example, "income" means "total income." When the semantics of the user input include expressions such as "by," "per," and "based on," grouping and aggregation are performed by corresponding fields based on the obtained table structure information, such as "daily," "monthly," and so on. When the semantics of the user input include ranking expressions, such as "the 10 highest-earning routes," after extracting the entity "income," "income" will be used as the sorting rule, 10 as the TopN entity, and the route as the aggregate entity. In addition, the query method can also be to list specific data details, such as "What are the flight numbers departing from Shanghai last week?", which corresponds to "DISTINCT flight number."

[0120] In 1.5.1, you can obtain interface information based on the query intent. In 1.5.2, you can map the indicator entity information to the corresponding interface parameters. In 1.5.3, you can map the condition entity information to the corresponding interface parameters. In 1.5.4, you can generate interface call instructions based on the entity splicing interface parameters, thereby calling the specified interface.

[0121] In 1.6.1, query results can be aligned and spliced. For example, when the query intent is "overall aggregation summary" or "aggregation by a certain field" in the same-year and month-on-month sense, the year-on-year and month-on-month data can be queried multiple times and related operations can be performed according to the same-year and month-on-month rules of semantic analysis, and an "intention chain" can be formed. Similar processing can be applied to the case of querying percentages. For example, the data obtained from multiple queries can be spliced into the final result according to the same indicators and dimensions, and the same-year and month-on-month data (such as growth rate, growth value, base point change, etc.) or percentage data (such as percentage, etc.) can be calculated based on the indicator information. The "intention chain" involved in the scenario obtained through semantic analysis can also be queried multiple times, and the query results can be finally spliced. The calculation results of year-on-year, month-on-month and percentage can be output in the same result table as the indicator data. Multiple queries can be made from multiple data sources based on the intention chain, and the query results can be combined.

[0122] In 1.7, the data obtained can be converted into display data, such as EChartsOptions data, based on the query method. For example, if the corresponding chart can be generated based on the query data (for example, a pie chart for percentage, a horizontal bar chart for TopN, or a line chart for date aggregation), then the JSON data of ECharts Options will be generated.

[0123] In 1.8, you can render the final result in a specific format (such as AskData Message format). For example, the question-answering system can support rendering methods such as plain text, rich text, lists, data tables, graphics (ECharts data compatible), Markdown, and chapters. Using the Message format as the output can facilitate different client rendering, thereby improving the user experience.

[0124] In 1.9, the rendered final result can be output to the client (for example, through an application, a web page, etc.), so that the user can obtain the result corresponding to the query statement.

[0125] exist Figure 9 , which shows a timing diagram of data query according to an embodiment of the present disclosure.

[0126] like Figure 9As shown in Figure 1, the user initiates a query request in natural language from the client. Then, the user query request is classified and the data query process is entered if it is determined that the user query request is a data query. Figure 2 AskData API service shown in the figure) receives the query request from the client again and communicates with the semantic parsing service (such as Figure 2The semantic parsing service shown in the figure) collaborates to perform semantic parsing of natural language, such as parsing natural language into indicator entities and their query intent, business scenarios, various conditional entities, etc. For unrecognizable user input content, the semantic parsing service sends it to the fine-tuned semantic LLM for enhanced parsing to perform semantic enhancement and error correction. Here, text similarity matching, specific entity regular matching (such as flights), synonym matching, and vector query can be used to determine entities, and entity classification can be determined, such as conditional entities, measurement or indicator entities, query method entities (by day, by month, respectively, highest, lowest), etc. Based on the parsing of the entity, the exact meaning of the entity in the user input can be inferred to clarify its intent. For entities whose intent cannot be confirmed, a clarification mechanism can be implemented using multiple rounds of dialogue. For example, relative time range entities that the LLM cannot handle can be parsed according to specific query intent (such as yesterday, last Wednesday, this year's Spring Festival travel, and a specified lunar calendar). For example, a user with full data query permission enters "number of people last week," but cannot determine from the query whether it refers to "number of passengers last week" or "total number of company employees as of last week." Therefore, the user is required to confirm the ambiguous query statement twice. However, if the meaning can be determined from other entities in the query statement, such as "number of people traveling from Shanghai to Beijing last week," the query can be inferred to be about the number of passengers, directly determining the data query intent and matching the corresponding items in the data source. For another example, industry-specific information (such as flight number abbreviations, city transfer airports, etc.) can be parsed and mapped to determine the corresponding specific items in the data table. The semantic parsing service can return the query intent and entities obtained from this to the AskData service, which then sends these intents and entities, along with user attributes (e.g., user ID), to the permission configuration server to determine whether the user can query the relevant data. When the user has query permission, the AskData service can interact with the data source or data storage device called through the interface to query the corresponding data. For example, SQL statements are generated based on the intent match and the corresponding entities to perform the data query. For example, if the user input specifies a year-on-year calculation or an event cycle ratio calculation (such as "the ratio of this year's Spring Festival travel revenue to the 23rd year's Spring Festival travel revenue"), the corresponding year-on-year query will be executed. If the user's query intent can be parsed into a combination of intent chains, multiple queries will be performed according to different intents to obtain the corresponding data, thereby performing multiple queries with multiple intent combinations based on the scenario. The AskData service can combine the query results obtained in this way and return the results to the client through, for example, a unified AskData service message protocol. The client renders the returned results and presents them to the user.

[0127] exist Figure 10The timing diagram of the knowledge base query according to the embodiment of the present disclosure is shown in FIG. Since the knowledge base query performed after determining that it is not a data query according to the user input in the embodiment of the present disclosure is basically the same as the existing technology, it will not be described in detail. Those skilled in the art will be able to understand the above description and the Figure 10 The diagram can fully understand the timing of knowledge base queries.

[0128] like Figure 10 As shown, the knowledge base service, embedding model, and vector indexing / full-text indexing modules pre-process documents, including document classification and segmentation according to permission requirements, and indexing by full text and vectors. The user initiates a query request from the client in natural language. Next, the user query request is classified, and if it is determined that the user query request is not a data query, the knowledge base query process is entered. The AskData service receives the query request again from the client and, together with other modules, performs a knowledge base query based on the user's query document permissions. For example, full text and vectors can be applied to implement multi-way recall. The recalled content can be evaluated using a model to achieve secondary matching screening and identify more similar content. Next, the knowledge base can be used to summarize the results of the closest content through LLM to generate content refinement. Finally, the generated results can be returned to the client in an SSE manner, for example, through the unified AskData service Message protocol. The client renders the returned results and presents them to the user.

[0129] The technical solutions provided by the embodiments of the present disclosure enable effective parsing of user input for data queries specific to the passenger transport industry, enabling more accurate return of data corresponding to the query intent. The question-and-answer system or Q&A application according to the embodiments of the present disclosure provides users with an easy-to-understand query entry point, simplifying user operations. Users can perform queries simply by entering natural language, without having to familiarize themselves with individual reports. This significantly reduces the user burden and improves data query efficiency. Furthermore, by adapting queries to the specific expressions of the client's industry, the Q&A application is more tailored to the characteristics of the passenger transport industry, increasing the accuracy of data queries in the passenger transport industry. The Q&A application according to the embodiments of the present disclosure is an enhanced data analysis tool that requires no understanding of the underlying data structure or specialized terminology, resulting in virtually no learning cost. It uses textual expressions to accurately identify industry-specific terms, enabling rapid data acquisition. Through a unified abstraction for rendering results, it is easily adaptable to various clients and can be embedded into any business system, supporting agile decision-making. Its flexible query combinations can reduce the development and maintenance costs of customized reports within an enterprise and significantly improve the ability to quickly meet data query requirements. In addition, the modular design of the system is replicable and supports simple and small-scale customized development and training, so that the method according to the embodiment of the present disclosure can be quickly implemented in the business field.

[0130] The above describes various exemplary methods and the like according to the embodiments of the present disclosure. It should be understood that the steps and / or operations of each method can also be combined with each other in any appropriate order to similarly implement more or fewer operations than described. It should be understood that the machine-readable storage medium or the machine-executable instructions in the program product according to the embodiments of the present disclosure can be configured to perform operations corresponding to the above-mentioned embodiments. When referring to the above-mentioned embodiments, the embodiments of the machine-readable storage medium or the program product are clear to those skilled in the art and are therefore not repeated. Machine-readable storage media and program products for carrying or including the above-mentioned machine-executable instructions also fall within the scope of the present disclosure. Such storage media may include, but are not limited to, floppy disks, optical disks, magneto-optical disks, memory cards, memory sticks, and the like.

[0131] In addition, it should be understood that the above series of processes and devices can also be implemented by software and / or firmware. In the case of implementation by software and / or firmware, the data is transmitted from a storage medium or a network to a computer with a dedicated hardware structure, such as Figure 11 The illustrated information processing apparatus 1300 installs programs constituting the software, and when the various programs are installed, the information processing apparatus can execute various functions and the like. Figure 11 is a block diagram illustrating an example structure of an information processing device that can be employed in the technology according to an embodiment of the present disclosure.

[0132] exist Figure 11 In the embodiment, a central processing unit (CPU) 1301 executes various processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage section 1308 to a random access memory (RAM) 1303. In the RAM 1303, data required when the CPU 1301 executes various processes and the like is also stored as needed.

[0133] The CPU 1301, the ROM 1302, and the RAM 1303 are connected to one another via a bus 1304. An input / output interface 1305 is also connected to the bus 1304.

[0134] The following components are connected to the input / output interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet.

[0135] A drive 1310 is also connected to the input / output interface 1305 as needed. A removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 1310 as needed so that a computer program read therefrom is installed in the storage section 1308 as needed.

[0136] In the case of realizing the above-described series of processing by software, a program constituting the software is installed from a network such as the Internet or a storage medium such as the removable medium 1311 .

[0137] It should be understood by those skilled in the art that such storage media is not limited to Figure 11 The removable medium 1311 shown has a program stored therein and is distributed separately from the device to provide the program to the user. Examples of the removable medium 1311 include magnetic disks (including floppy disks (registered trademark)), optical disks (including compact disk read-only memories (CD-ROMs) and digital versatile disks (DVDs)), magneto-optical disks (including minidiscs (MDs) (registered trademark)), and semiconductor memories. Alternatively, the storage medium may be ROM 1302, a hard disk included in storage section 1308, or the like, in which the program is stored and distributed to the user along with the device containing it.

[0138] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, apparatus, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0139] The foregoing description describes one or more exemplary embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the exemplary embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0140] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a server system. Of course, the present disclosure does not exclude that with the future development of computer technology, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0141] Although one or more embodiments of the present disclosure provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When an actual device or terminal product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in an environment of parallel processors or multi-threaded processing, or even in a distributed data processing environment).

[0142] The terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, product, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, product, or apparatus that includes the elements is not precluded. For example, if words such as "first," "second," etc. are used to indicate names, they do not imply any particular order.

[0143] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more embodiments of the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0145] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means that implement the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.

[0146] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0147] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0148] The same or similar parts between the various embodiments of the present disclosure can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of the present disclosure, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In the present disclosure, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in an appropriate manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in the present disclosure and the features of different embodiments or examples without contradiction.

[0149] In addition, when used in this disclosure, the words "herein," "above," "below," "hereunder," "supra," and words of similar meaning shall refer to the disclosure as a whole and not to any particular portions of the disclosure. Furthermore, unless expressly stated otherwise or otherwise understood in the context of use, conditional language used herein, such as "may," "might," "for example," "such as," and the like, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements, and / or states. Thus, such conditional language is generally not intended to imply that one or more embodiments in any way require features, elements, and / or states, or whether such features, elements, and / or states are included or performed in any particular embodiment.

[0150] The foregoing is merely an example of one or more embodiments of the present disclosure and is not intended to limit the one or more embodiments of the present disclosure. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims.

Claims

1. A method for implementing data question answering, comprising: receiving user input from a user; In response to determining that the user input is related to a data query, identifying an indicator entity included in the user input, where the indicator entity is used to indicate an indicator in the passenger transport industry; Based on the identified indicator entity, determining a business scenario associated with a data source containing the indicated indicator; identifying one or more other entities from the user input according to the determined business scenario, the other entities including at least one of a time condition entity indicating an occurrence time of the indicator entity and a region condition entity indicating an occurrence region of the indicator entity; generating a request message for data query based on all entities identified from the user input; as well as Data obtained in response to the request message is displayed.

2. The method according to claim 1, further comprising: In response to identifying that the user input includes a statement related to indicators in the passenger transportation industry, it is determined that the user input is related to a data query.

3. The method according to claim 1, wherein Identifying the indicator entity included in the user input includes: Determining the indicator entity contained in the user input based on text similarity matching, synonym matching, and vector query; and When the indicator entity cannot be determined based on text similarity matching, synonym matching, and vector query, the indicator entity included in the user input is identified based on an indicator identification model based on machine learning.

4. The method according to claim 1, wherein According to the determined business scenario, identifying one or more other entities from the user input includes: According to the items contained in the data source associated with the business scenario, the one or more other entities corresponding to the items are identified from the user input.

5. The method according to claim 1, further comprising at least one of the following: If the user input includes a statement related to year-on-year comparison, the year-on-year comparison is determined based on the same week in the previous 12 months; If the user input includes a statement related to the year-on-year comparison, determining the year-on-year comparison based on the same week of the previous week; and If the user input includes an event-related expression, the year-on-year comparison is determined based on the time corresponding to the same event last year.

6. The method according to claim 5, further comprising: If the period used as the basis for year-on-year and / or quarter-on-quarter comparisons does not meet the predetermined conditions, the period will be adjusted forward by one or more years.

7. The method according to claim 1, further comprising: Determining whether the user has the authority to query data related to the indicator entity; as well as In the case that the user does not have the authority to query the data related to the indicator entity, the request message is not generated.

8. The method according to claim 1, wherein Generating a request message for data query includes: Generates a corresponding request message based on whether the data source associated with the business scenario is accessed through database statements or interface calls.

9. The method according to claim 8, further comprising: When a data source associated with the business scenario is accessed through a database statement, a structured query language (SQL) of the database is generated according to all entities identified from the user input.

10. The method according to claim 9, further comprising: Fine-tune the machine learning-based SQL generation model to ensure that the generated SQL meets the definition of indicators in the passenger transport industry.

11. The method according to claim 8, further comprising: When a data source associated with a business scenario is accessed through an interface call, interface parameters for calling a specified interface are generated based on all entities identified from the user input.

12. The method according to claim 1, wherein Based on the identified indicator entity, determining a business scenario associated with a data source containing the indicated indicator includes: When the identified indicator entity has multiple interpretations, the exact meaning of the indicator entity is inferred according to the context of the user input and / or the user's authority, so as to determine the business scenario according to the exact meaning of the indicator entity.

13. The method according to claim 12, further comprising: When the exact meaning of the indicator entity cannot be inferred according to the context of the user input and / or the user's authority, the user is requested to clarify the meaning of the indicator entity to determine the exact meaning of the indicator entity according to the clarification.

14. The method according to claim 1, further comprising: When at least one of the one or more identified other entities has multiple interpretations, the exact meaning of the entity with multiple interpretations is inferred based on the context of the user input and / or the user's authority to generate a request message based on the exact meaning of the entity.

15. The method according to claim 14, further comprising: When the exact meaning of an entity with multiple interpretations cannot be inferred according to the context of the user input and / or the user's authority, the user is requested to clarify the meaning of the entity to determine the exact meaning of the entity.

16. The method according to claim 1, further comprising: When the indicator entity corresponds to multiple projects in a business scenario, the indicator entity is decomposed into indicator entities corresponding to the multiple projects.

17. The method according to claim 1, further comprising: In response to determining that the user input is not relevant to the data query, an answer corresponding to the user input is returned using retrieval enhancement generation (RAG).

18. A system for implementing data question answering, comprising: a memory storing computer-executable instructions; as well as A processor is coupled to the memory, wherein the computer-executable instructions, when executed by the processor, cause the processor to perform the method according to any one of claims 1-17.

19. A system for implementing data question answering, comprising components for performing the steps of the method according to any one of claims 1 to 17.

20. A non-transitory computer-readable medium storing computer-executable instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1-17.

Citation Information

Patent Citations

  • Text processing method and device, electronic equipment and storage medium

    CN113743115A

  • Entity identification method, system and equipment for operator business performance index based on large model, and medium

    CN119150866A