Dialogue data processing method based on knowledge system and related device
By building the conditional matching, search trajectory and semantic expansion knowledge base of its own knowledge system, the problem of slow response speed and intent identification errors in data queries of specific fields is solved, and fast and accurate data queries are achieved.
Patent Information
- Application Number
- CN202510865455.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-26
AI Technical Summary
The existing intelligent dialogue system responds slowly in specific data queries in specific fields and is prone to intent identification errors, which affects the efficiency and accuracy of data queries.
Build your own knowledge system for the target field, including a condition matching knowledge base, a search trajectory knowledge base and a semantic expansion knowledge base. Through these knowledge bases, query conditions are extracted from user questions and supplemented when missing is detected, and finally perform data query operations of the underlying database.
Improves the efficiency and accuracy of data queries, ensuring the fast and accurate index of query results to the corresponding fields.
Smart Images

Figure CN120371859A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of electronic digital data processing, and particularly relates to a method and related device for processing dialogue data based on a knowledge system. Background Art
[0002] Currently, intelligent dialogue systems based on large language models provide great convenience in searching for information across all fields. After identifying a user's question, they immediately search and organize external data to output an answer. However, for the query requirements of specific domain-specific data, such as in the financial and economic fields, due to the nature of immediate search, existing intelligent dialogue systems need to spend a large amount of time searching and organizing external data, resulting in a slow response speed. Moreover, when the user's question is incomplete, it is easy to misidentify the intention, leading to a large amount of time spent querying incorrect data during the data query process, affecting the efficiency and accuracy of data query, and resulting in a poor user experience. Summary of the Invention
[0003] Embodiments of this application provide a method and related device for processing dialogue data based on a knowledge system, aiming to solve the problem that existing intelligent dialogue systems cannot quickly and accurately respond to the query requirements of specific domain-specific data, improve the data query efficiency, and optimize the user experience.
[0004] In a first aspect, embodiments of this application provide a method for processing dialogue data based on a knowledge system, including: Construct an in-house knowledge system for the target domain, where the in-house knowledge system includes a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base. The condition matching knowledge base is used to represent the structured features of the data stored in the underlying database. The retrieval track knowledge base is used to represent the regular patterns of the historical retrieval behaviors of labeled users for the underlying database. The semantic expansion knowledge base is used to represent the association relationships between domain terms; Extract multiple query conditions from the user's question content according to the condition matching knowledge base; When it is detected that there are missing query conditions, supplement the multiple query conditions according to the retrieval track knowledge base and / or the semantic expansion knowledge base to generate a target query condition set; Execute a data query operation for the underlying database based on the target query condition set and output a query result.
[0005] Furthermore, the construction of the proprietary knowledge system for the target domain includes: parsing the field definitions of all data tables in the underlying database to extract metadata features, where the metadata features at least include: query metrics, time range, domain range, and enterprise attributes; constructing a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtaining the retrieval trajectory data of each of the labeled users for the underlying database, where the retrieval trajectory data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result; constructing a retrieval trajectory knowledge base based on the retrieval trajectory data; extracting derivative data corresponding to each field attribute from external authoritative data sources, where the derivative data includes synonyms and hypernyms / hyponyms of the field attribute; and constructing a semantic expansion knowledge base based on each field attribute and the corresponding derivative data.
[0006] Furthermore, the construction of the mapping relationship between the metadata features and data table fields to obtain a condition matching knowledge base includes: constructing a mapping relationship between the query metrics and metric fields; constructing a mapping relationship between the time range and the time span corresponding to the data table where the metric field is located; constructing a mapping relationship between the domain range and the industry or sector corresponding to the data table where the metric field is located; and constructing a mapping relationship between the enterprise attribute and the enterprise label corresponding to the data table where the metric field is located.
[0007] Furthermore, the construction of the retrieval trajectory knowledge base based on the retrieval trajectory data includes: extracting multiple reference query conditions from the historical retrieval input sequence; extracting multiple final query conditions from the finally determined query result; associating the multiple reference query conditions and the multiple final query conditions based on the metadata features to determine multiple sets of retrieval semantic mapping relationships; calculating the proportion of the number of each retrieval semantic mapping relationship corresponding to each retrieval term; and extracting the retrieval semantic mapping relationships with the proportion greater than the preset threshold to form the retrieval trajectory knowledge base.
[0008] Furthermore, the construction of the semantic expansion knowledge base based on each field attribute and the corresponding derivative data includes: constructing a term relationship network for the field attribute based on the derivative data corresponding to each field attribute, where the term relationship network includes term nodes, synonym term relationship edges, and hypernym / hyponym term relationship edges; and adding context weights to each relationship edge in the term relationship network to obtain the semantic expansion knowledge base.
[0009] Further, extracting multiple query conditions from the user's question content according to the condition matching knowledge base includes: performing natural language processing on the user's question content, splitting the user's question content into multiple keywords; respectively mapping the multiple keywords to the metadata features according to semantics to obtain multiple query conditions.
[0010] Further, when it is detected that there are missing query conditions, supplementing the multiple query conditions according to the retrieval track knowledge base and / or the semantic expansion knowledge base to generate a target query condition set, including: when it is detected that there are invalid query conditions including target metadata features in the multiple query conditions, determining that there are missing query conditions, where the target metadata feature refers to a metadata feature without a mapping object or whose mapping object is not in the underlying database; if the mapping object of the target metadata feature is not in the underlying database, supplementing the invalid query conditions according to the retrieval track knowledge base and / or the semantic expansion knowledge base to obtain an updated query condition set; if the target metadata feature has no mapping object, supplementing the invalid query conditions according to the retrieval track knowledge base to obtain an updated query condition set; when a confirmation instruction for the updated query condition set is received, determining the updated query condition set as the target query condition set.
[0011] In a second aspect, an embodiment of the present application provides a dialogue data processing device based on a knowledge system, including: A knowledge system construction unit for constructing an in-house knowledge system for a target domain, where the in-house knowledge system includes a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base. The condition matching knowledge base is used to represent the structured features of the data stored in the underlying database. The retrieval track knowledge base is used to represent the regular patterns of the historical retrieval behaviors of the labeled users for the underlying database. The semantic expansion knowledge base is used to represent the association relationships between domain terms; A condition extraction unit for extracting multiple query conditions from the user's question content according to the condition matching knowledge base; A condition supplementing unit for supplementing the multiple query conditions according to the retrieval track knowledge base and / or the semantic expansion knowledge base to generate a target query condition set when it is detected that there are missing query conditions; A query unit for performing a data query operation on the underlying database based on the target query condition set and outputting a query result.
[0012] In a third aspect, an embodiment of the present application provides a server, including a processor, a memory, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor. The programs include instructions for performing the steps in the method described in the first aspect of the present application.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program or instructions are stored. When the computer program or instructions are executed by a processor, the steps of the method described in the first aspect of the present application are implemented.
[0014] It can be seen that in the embodiment of the present application, the server first constructs its own knowledge system including a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base, and extracts multiple query conditions from the user's question content according to the condition matching knowledge base in the knowledge system. When it is detected that there are missing query conditions, condition supplementation is performed according to the retrieval track knowledge base and / or the semantic expansion knowledge base in the knowledge system to generate a target query condition set. Finally, a data query operation for the underlying database is executed based on the target query condition set, and the query result is output. In this way, by constructing a knowledge system around the existing underlying database, constructing a standard template for query conditions through the condition matching knowledge base, and correspondingly extracting the existing query conditions in the user's question content, supplementing the missing query conditions in the user's question content through the retrieval track knowledge base and / or the semantic expansion knowledge base, and finally executing a data query operation for the underlying database through the complete target query condition set to accurately index the corresponding fields, the efficiency and accuracy of data query are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 is a structural block diagram of a dialogue data processing system based on a knowledge system provided by an embodiment of the present application; Figure 2 is a flowchart of a method for processing dialogue data based on a knowledge system provided by an embodiment of the present application; Figure 3 is a flowchart of a method for constructing an own knowledge system provided by an embodiment of the present application; Figure 4 is a schematic diagram of extracting a retrieval semantic mapping relationship provided by an embodiment of the present application; Figure 5 It is a schematic diagram of an example of a term relationship network provided by an embodiment of the present application; Figure 6 It is a structural block diagram of a dialogue data processing device based on a knowledge system provided by an embodiment of the present application; Figure 7 It is a structural block diagram of another dialogue data processing device based on a knowledge system provided by an embodiment of the present application; Figure 8 It is a schematic diagram of the structure of a server provided by an embodiment of the present application. Detailed implementation manners
[0017] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0018] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0019] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0020] Currently, most intelligent dialogue systems are designed as search engines for all-domain users, which instantaneously search and organize external data through powerful computing power and integrate and output query results. For each round of data query, such intelligent dialogue systems need to go through accurate intent recognition and instant data search to obtain the basic data required by users. However, due to the characteristics of instant search, existing intelligent dialogue systems are bound to spend a large amount of time searching and organizing external data, with a slow response speed. Moreover, when the user's question is incomplete, it is easy to make mistakes in intent recognition, which in turn leads to spending a large amount of time querying incorrect data during the data query process, greatly affecting the efficiency and accuracy of data query.
[0021] To solve the above problems, the embodiments of the present application provide a dialogue data processing method and related device based on a knowledge system.
[0022] Please refer to Figure 1 , Figure 1 which is a structural block diagram of a dialogue data processing system based on a knowledge system provided by the embodiments of the present application. As Figure 1 shown, the dialogue data processing system 10 includes a server 11 and a client 12, and the server 11 is communicatively connected to the client 12 to achieve interactive transmission of data. Among them, the server 11 can be a single server, or a server cluster composed of several servers, or a cloud computing service center; the client 12 refers to intelligent devices used by users, such as mobile phones, tablet computers, and personal computers.
[0023] Among them, the server 11 stores an underlying database established by delving deep into the target domain, covering data resources of various concrete data within the target domain. The underlying database contains several data tables, and each data table contains several fields. In this example, the concrete data refers to one field among the above-mentioned several fields or a field set composed of multiple fields. When a user has a query need for concrete data, due to the small data granularity, conventional search engines need to frequently access various public data sources and usually it is difficult to achieve fast and accurate queries. However, on the premise of the existing structured underlying database, it can be achieved only by quickly and accurately locating the field position, greatly improving the query efficiency. In actual situations, user questions are usually non-standard. After word segmentation, they cannot correspond one by one with the data table fields, and even there is a lack of necessary conditions, resulting in the inability to index specific fields. Based on this, the embodiments of the present application provide a dialogue data processing method and related device based on a knowledge system to overcome the problem of being unable to index specific data table fields for data query.
[0024] Next, a dialogue data processing method based on a knowledge system provided by the embodiments of the present application will be introduced.
[0025] Please refer toFigure 2 , Figure 2 is a schematic flowchart of a method for processing dialogue data based on a knowledge system provided by an embodiment of the present application, which is applied to a server 11 as shown in Figure 1 shown, as shown in Figure 2 , the method includes: S201, construct an in-house knowledge system for the target domain.
[0026] Among them, the in-house knowledge system includes a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base.
[0027] Among them, the condition matching knowledge base is used to represent the structured features of the data stored in the underlying database. The structured features refer to the attribute features extracted from data tables or fields, which have clear classifications and standardized definitions. Through the condition matching knowledge base, the segmented user question content can be structurally mapped to directly correspond to the attribute features of data tables or fields.
[0028] Among them, the retrieval track knowledge base is used to represent the regular patterns of the historical retrieval behaviors of labeled users for the underlying database. In the embodiments of the present application, each user can access the underlying database through a client to query data, and finally determine the required data content, constituting the retrieval behavior data exclusive to each user. The long-term operation of the underlying database is convenient and authoritative in practice, attracting many experts and scholars. The retrieval behavior data of experts and scholars has certain authority and guiding significance in the field, and the retrieval terms used are more in line with the application scenarios of the practical dimension, and can, to a certain extent, explain or supplement the non-standard question content of users.
[0029] Among them, the semantic expansion knowledge base is used to represent the association relationships between domain terms. There may be different aliases for professional terms in different domains, and generally only one term name is stored in the fields of the database table. Through the semantic expansion knowledge base, different expressions of the same term can be associated, and the non-standard question content of users can be explained to a certain extent.
[0030] S202, extract multiple query conditions from the user question content according to the condition matching knowledge base.
[0031] Among them, each query condition includes a structured feature in the condition matching knowledge base and its corresponding original content input by the user. The original content input by the user may not correspond one-to-one with the data table fields, and there may be uncorresponding structured features, and the query conditions need to be explained and supplemented.
[0032] S203. When it is detected that there are missing query conditions, supplement the multiple query conditions according to the retrieval track knowledge base and / or the semantic augmentation knowledge base to generate a target query condition set.
[0033] Among them, the target query condition set refers to the query condition set that can be accurately mapped to specific data table fields after being interpreted and / or supplemented.
[0034] For example, when the time range is a necessary query condition and the time range is not clearly specified in the user's question content, the time range commonly used by the labeled user when querying this field or similar index data can be determined through the retrieval track knowledge base, such as 2020 - 2024, so as to supplement the conditions and achieve the correspondence of the time range conditions.
[0035] Another example is that the time range constraint in the user's question content is the past five years, but such a time span does not exist in the underlying database. The past five years can be expanded and interpreted through the semantic augmentation knowledge base, such as interpreted as 2020 - 2024, so as to achieve the correspondence of the time range conditions.
[0036] S204. Execute a data query operation on the underlying database based on the target query condition set and output the query result.
[0037] Among them, the query result refers to the data set corresponding to one or more data table fields corresponding to the target query condition set. The query result also includes the query table path, which is used to indicate the data source of the target field. Among them, the query result can be front - end displayed through the client and supports real - time modification by the user.
[0038] It can be seen that in this example, by constructing a knowledge system around the existing underlying database, constructing a standard template for query conditions through the condition matching knowledge base, and correspondingly extracting the existing query conditions in the user's question content, supplementing the missing query conditions in the user's question content through the retrieval track knowledge base and / or the semantic augmentation knowledge base, and finally executing a data query operation on the underlying database through the complete target query condition set to accurately index the corresponding fields, improving the efficiency and accuracy of data query.
[0039] In a possible example, building the proprietary knowledge system for the target domain includes: parsing the field definitions of all data tables in the underlying database, extracting metadata features, where the metadata features at least include: query metrics, time range, domain range, enterprise attributes; building the mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtaining the retrieval track data of each of the labeled users for the underlying database, where the retrieval track data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result; building a retrieval track knowledge base according to the retrieval track data; extracting the derivative data corresponding to each field attribute from an external authoritative data source, where the derivative data includes synonyms and hyponyms / hypernyms of the field attribute; building a semantic expansion knowledge base according to each field attribute and the corresponding derivative data.
[0040] Among them, the target domain is the financial and economic domain, and the underlying database refers to the CSMAR database. The underlying database contains a large number of data table fields, and it is almost impossible for users to query data by entering natural language that is exactly the same as the field name. Based on this, in the embodiment of the present application, the server converts and supplements the user's question content into query conditions that can correspond to the fields by building a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base.
[0041] Specifically, as Figure 3 shown, S201 builds the proprietary knowledge system for the target domain, specifically including: S301, building a condition matching knowledge base; S302, building a retrieval track knowledge base; S303, building a semantic expansion knowledge base.
[0042] Among them, S301 specifically includes: S3011, parsing the field definitions of all data tables in the underlying database, extracting metadata features; S3012, building the mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base.
[0043] Among them, the server extracts the structured features of all data, that is, metadata features, by parsing the field definitions of all data tables in the entire database. The metadata features at least include four necessary dimensions: query metrics, time range, domain range, and enterprise attributes. Optionally, the metadata features may further include dimensions such as research direction, attributed theme, data frequency, data source, etc. Exemplarily, in the "Financial Indicator Analysis" data table, there is a field "Net Profit Rate of Total Assets", which belongs to a financial indicator. Then, a mapping relationship between the metadata feature "query metrics" and the field "Net Profit Rate of Total Assets" is constructed. Based on the above logic, the field attributes in the database table, such as specific fields, time attributes of specific fields, domain attributes of specific fields, and enterprise attributes of specific fields, can be mapped to the corresponding metadata features respectively to construct a condition matching knowledge base. In this way, the metadata features corresponding to each sub-content in the user's question content can be quickly identified through the condition matching knowledge base, and the completeness of the user's question content can be verified based on the existing mapping relationship under the metadata feature. In order to explain and supplement in the case of non-standard or incomplete content in the user's question content, the retrieval track knowledge base and / or semantic expansion knowledge base can be retrieved.
[0044] Among them, S302 specifically includes: S3021, obtaining the retrieval track data of each of the labeled users for the underlying database, where the retrieval track data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result; S3022, constructing a retrieval track knowledge base according to the retrieval track data.
[0045] Among them, the retrieval track data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result. The historical retrieval input sequence can be a piece of text content, and the finally determined query result is the data content that the labeled user determines to view and perform relevant data operations under the historical retrieval input sequence. The relevant data operations include data download operations or browsing operations with a browsing duration greater than a preset duration. Exemplarily, if the historical retrieval input sequence of the labeled user is "ROA of Company A", and the finally determined query result of this labeled user is the return on assets of Company A from 2020 to 2024, then the mapping relationship between the above historical retrieval input sequence and the finally determined query result, that is, the retrieval track data, can be established. By statistically analyzing the retrieval track data of different labeled users, retrieval statements with consistent directions are extracted to construct a retrieval track knowledge base for explaining and supplementing the user's question content.
[0046] Among them, S303 specifically includes: S3031, extracting the derivative data corresponding to each field attribute from an external authoritative data source, where the derivative data includes synonyms and hyponyms of the field attribute; S3032. Construct a semantic expansion knowledge base based on each field attribute and the corresponding derivative data.
[0047] Among them, the external authoritative data sources specifically include: data such as authoritative textbooks, academic papers, and industry standard documents. For example, the indicator "operating condition" is interpreted as multiple sub-indicators such as "profitability, operating ability, cash flow analysis, development ability, and solvency". For different sub-indicators, further expansion explanations can be made. For example, "profitability" is interpreted as indicator fields existing in the underlying database such as "net profit, return on total assets, return on net assets", and "development ability" is interpreted as indicator fields existing in the underlying database such as "operating income growth rate, net profit growth rate, and new order volume". In this way, derivative data corresponding to each field attribute is extracted from the external authoritative data source, and an association relationship is established to construct a semantic expansion knowledge base for explaining the content of the user's question.
[0048] It can be seen that in this example, the server extracts metadata features including at least four dimensions by parsing the field definitions of all data tables in the underlying database to construct a condition matching knowledge base; and, constructs a retrieval track knowledge base by obtaining the retrieval track data of each tagged user for the underlying database; and, constructs a semantic expansion knowledge base by extracting derivative data corresponding to each field attribute from external data sources. In this way, a proprietary knowledge system for the target domain is constructed to facilitate converting the content of the user's question into a structured query condition and interpreting and supplementing it, improving the efficiency and accuracy of data query.
[0049] In a possible example, constructing the mapping relationship between the metadata features and the data table fields to obtain a condition matching knowledge base includes: constructing the mapping relationship between the query indicators and the indicator fields; constructing the mapping relationship between the time range and the time span corresponding to the data table where the indicator fields are located; constructing the mapping relationship between the domain range and the industry or sector corresponding to the data table where the indicator fields are located; constructing the mapping relationship between the enterprise attributes and the enterprise labels corresponding to the data table where the indicator fields are located.
[0050] Among them, in the specific process of constructing the condition matching knowledge base, the mapping relationship can be constructed according to four necessary metadata features: query indicators, time range, domain range, and enterprise attributes.
[0051] Specifically, the query indicators correspond to one or more fields in the database, with the smallest data granularity, such as net profit, return on total assets, return on net assets, etc. By constructing the association relationship between the query indicators and the indicator fields, the structured features of the full database table data in the dimension of the query indicators are extracted.
[0052] Specifically, the time range corresponds to the time span of the data table where each indicator field is located. Users can obtain indicator fields under different time spans by limiting the time range to meet business requirements such as indicator trend analysis and indicator capability analysis. By constructing the association relationship between the time range and the time span of the data table where the indicator field is located, the structured features of the full database table data in the time range dimension are extracted.
[0053] Specifically, the domain range corresponds to the industry or sector of the data table where each indicator field is located. The industries include, for example, manufacturing, construction, finance, etc., and the sectors include the low-altitude economy sector, technology sector, consumer sector, etc. Users can obtain indicator fields under different industries or sectors by limiting the domain range to meet business requirements such as industry trend analysis and sector stability analysis. By constructing the association relationship between the domain range and the industry or sector of the data table where the indicator field is located, the structured features of the full database table data in the domain range dimension are extracted.
[0054] Specifically, the enterprise attribute corresponds to the enterprise label of the data table where each indicator field is located. The enterprise labels include, for example: specialized and sophisticated, little giant, listed company, scale ranking, market value, etc. Users can obtain indicator data of specific types of enterprises by limiting the enterprise attribute to meet the business requirements of indicator data analysis for specific types of enterprises. By constructing the association relationship between the enterprise attribute and the enterprise label of the data table where the indicator field is located, the structured features of the full database table data in the enterprise attribute dimension are extracted.
[0055] It can be seen that in this example, the server specifically associates the full database table data according to the metadata features of the four dimensions of query indicators, time range, domain range, and enterprise attribute, and constructs a condition matching knowledge base to facilitate the conversion of the user's question content into a structured query condition, improving the efficiency and accuracy of data query.
[0056] In a possible example, constructing the retrieval trajectory knowledge base according to the retrieval trajectory data includes: extracting a plurality of reference query conditions from the historical retrieval input sequence; extracting a plurality of final query conditions from the finally determined query result; associating the plurality of reference query conditions and the plurality of final query conditions based on the metadata features to determine multiple sets of retrieval semantic mapping relationships; calculating the proportion of the number of each retrieval semantic mapping relationship corresponding to each retrieval term; extracting the retrieval semantic mapping relationships with the proportion greater than a preset threshold to form the retrieval trajectory knowledge base.
[0057] Among them, the final query condition refers to the query condition extracted from the finally determined query result corresponding to the historical retrieval input sequence. Exemplarily, such as Figure 4As shown in the figure, taking the historical retrieval input sequence as "ROA of Company A" and the finally determined query result as "Net profit rate of total assets of Company A from 2020 to 2024" as an example, multiple reference query conditions extracted from the historical retrieval input sequence include: "Query indicator: ROA", "Time range: missing", "Domain range: default", "Enterprise attribute: Company A", and the final query conditions extracted from the finally determined query result include: "Query indicator: Net profit rate of total assets", "Time range: 2020 - 2024", "Domain range: default", "Enterprise attribute: Company A". By associating the reference query conditions and the final query conditions through metadata features, multiple groups of retrieval semantic mapping relationships are determined. In this example, the mapping object corresponding to the metadata feature "Query indicator" in the reference query conditions is "ROA", while the mapping object corresponding to the metadata feature "Query indicator" in the final query conditions is "Net profit rate of total assets", forming a group of retrieval semantic mapping relationships. Also, the mapping object corresponding to the metadata feature "Time range" in the reference query conditions is missing, while the mapping object corresponding to the metadata feature "Time range" in the final query conditions is 2020 - 2024, forming another group of retrieval semantic mapping relationships. Further, by counting the retrieval semantic mapping relationships corresponding to all tag users, calculating the proportion of the number of each retrieval semantic mapping relationship corresponding to each retrieval term, and extracting the retrieval semantic mapping relationships with a proportion greater than the preset threshold, a retrieval trace database is constructed for explaining or supplementing fuzzy retrieval terms or missing retrieval terms. For example, ROA in the user's question content is interpreted as Net profit rate of total assets, and when the time range is missing in the user's question content, the time range is supplemented with 2020 - 2024.
[0058] It can be seen that in this example, the server extracts reference query conditions from the historical retrieval input sequence, extracts the final query conditions from the finally determined query result, associates them based on metadata features, determines multiple groups of retrieval semantic mapping relationships, and counts and calculates the proportion of the number of each retrieval semantic mapping relationship corresponding to each retrieval term, and extracts the retrieval semantic mapping relationships with a proportion greater than the preset threshold to form a retrieval trace knowledge base. In this way, a retrieval trace knowledge base is constructed through the retrieval trace data of experts and scholars in the field to facilitate the interpretation and supplementation of fuzzy or missing query conditions in the user's question content, improving the efficiency and accuracy of data query.
[0059] In a possible example, constructing a semantic expansion knowledge base according to each field attribute and the corresponding derivative data includes: constructing a term relationship network for the field attribute according to the derivative data corresponding to each field attribute, where the term relationship network includes term nodes, synonymous term relationship edges, and hyponym and hypernym term relationship edges; adding context weights to each relationship edge in the term relationship network to obtain a semantic expansion knowledge base.
[0060] Among them, after obtaining the derivative data from an external authoritative data source, the association relationship between the two is constructed according to the field attributes and the semantic relationship of the derivative data, such as the synonym relationship, the hypernym-hyponym relationship, etc. For example, ROA and net profit rate of total assets are synonyms, and the two term nodes are connected by a synonym term relationship edge. Another example is that profitability and net profit rate of total assets belong to the hypernym-hyponym relationship, and the two term nodes are connected by a hypernym-hyponym term relationship edge. Specifically, the synonym term relationship edge can adopt a double-arrow form, and the hypernym-hyponym relationship edge can adopt a single-arrow form. Specifically, it can be from the hypernym term node to the hyponym term node, which is used to represent the inclusion relationship at this time, or from the hyponym term node to the hypernym term node, which is used to represent the belonging relationship at this time. Combining all the association relationships, a term relationship network is obtained. Exemplarily, as Figure 5 shown, taking "net profit rate of total assets" as an example, the term relationship network includes term nodes "ROA", "return on assets", and "return on total assets" that represent its synonyms, which are connected by synonym relationship edges; and includes a term node "profitability" that represents its hypernym, which is connected by an inclusion relationship edge; and includes a term node "return on net assets" that represents the hyponym of "profitability", which is connected by an inclusion relationship edge; and includes a term node "ROE" that represents the synonym of "return on net assets", which are connected by synonym relationship edges. Subsequently, a context weight is added to each relationship edge in the term relationship network to indicate semantic expansion in different contexts.
[0061] It can be understood that the above term relationship network diagram is only used to assist in understanding the relevant content involved in the embodiments of the present application, and does not impose any limitation on the present application.
[0062] It can be seen that in this example, the server constructs a term relationship network according to the derivative data corresponding to each field attribute, and adds a context weight to each relationship edge in the term relationship network to obtain a semantic expansion knowledge base, so as to explain and supplement the fuzzy query conditions in the user's question content, and improve the efficiency and accuracy of data query.
[0063] In a possible example, the extracting multiple query conditions from the user's question content according to the condition matching knowledge base includes: performing natural language processing on the user's question content, splitting the user's question content into multiple keywords; and respectively mapping the multiple keywords to the metadata features according to semantics to obtain multiple query conditions.
[0064] Among them, the natural language processing includes word segmentation processing. For example, the user's question content "Query the total asset net profit rate of non-ST listed companies in the manufacturing industry from 2020 to 2024" is subjected to word segmentation processing to obtain multiple keywords, including: "manufacturing industry", "non-ST listed company", "2020 - 2024", "total asset net profit rate". The above multiple keywords are respectively mapped to the metadata features of at least four dimensions including query indicators, time range, domain range, and enterprise attributes according to semantics, and a query condition is obtained, that is, "Query indicator: total asset net profit rate", "Time range: 2020 - 2024", "Domain range: manufacturing industry", "Enterprise attribute: non-ST listed company".
[0065] It can be understood that in the previous embodiments, the method involved in this embodiment can also be used to extract the reference query condition from the historical retrieval input sequence and extract the final query condition from the finally determined query result.
[0066] In some embodiments, when splitting the user's question content into multiple keywords, the retrieval trace knowledge base and / or the semantic expansion knowledge base can be called for auxiliary splitting to further improve the data query efficiency.
[0067] It can be seen that in this example, the server first performs natural language processing on the user's question content, splits it into multiple keywords, and then maps the multiple keywords to the metadata features of the condition matching knowledge base according to semantics to obtain multiple query conditions, improving the efficiency and accuracy of data query.
[0068] In a possible example, when it is detected that there is a missing query condition, the multiple query conditions are supplemented according to the retrieval trace knowledge base and / or the semantic expansion knowledge base to generate a target query condition set, including: when it is detected that there is an invalid query condition including the target metadata feature in the multiple query conditions, it is determined that there is a missing query condition, and the target metadata feature refers to the metadata feature without a mapping object or the mapping object not in the underlying database; if the mapping object of the target metadata feature is not in the underlying database, the invalid query condition is supplemented according to the retrieval trace knowledge base and / or the semantic expansion knowledge base to obtain an updated query condition set; if the target metadata feature has no mapping object, the invalid query condition is supplemented according to the retrieval trace knowledge base to obtain an updated query condition set; when a confirmation instruction for the updated query condition set is received, the updated query condition set is determined as the target query condition set.
[0069] Among them, if the user's question content is recorded as "the operating conditions of representative companies in the low-altitude economy field", then the multiple query conditions obtained after extraction include: "Query indicator: operating conditions", "Time range: missing", "Field range: low-altitude economy sector", "Enterprise attribute: representative company". Among them, there is no indicator field with the field name "operating conditions" in the underlying database, nor is there a database table with the enterprise label "representative company". Then, in this example, the target metadata features are: query indicator, time range, enterprise attribute. Correspondingly, the invalid query conditions are: "Query indicator: operating conditions", "Time range: missing", "Enterprise attribute: representative company", that is, there are missing query conditions, and condition supplementation is required by retrieving the trajectory knowledge base and / or semantic expansion knowledge base.
[0070] Among them, for invalid query conditions where the mapping objects for the target metadata features are not in the underlying database, such as "Query indicator: operating conditions", "Enterprise attribute: representative company", both the retrieval trajectory knowledge base and the semantic expansion knowledge base can be used to supplement the invalid query conditions. For example, through the semantic expansion knowledge base, "operating conditions" is interpreted as "profitability (net profit, return on total assets, return on net assets), operating ability (inventory turnover ratio, total asset turnover ratio), cash flow analysis (net cash flow from operating activities, free cash flow of the enterprise), development ability (operating income growth rate, net profit growth rate, new order volume), solvency (asset-liability ratio, quick ratio)". Through the retrieval trajectory knowledge base, "representative company" is interpreted as "non-ST listed company, and specialized, refined, and innovative, and ranked in the top 1 / 3 in terms of scale, and market value ≥ 50 billion". It can be understood that in specific practices, the retrieval trajectory knowledge base can also be used to interpret "operating conditions", and the semantic expansion knowledge base can be used to interpret "representative company", and this is not uniquely limited here.
[0071] Among them, for invalid query conditions where there are no mapping objects for the target metadata features, such as "Time range: missing", the invalid query conditions are supplemented through the retrieval trajectory knowledge base. For example, in this example, the time range is supplemented and interpreted as "2020 - 2024". It should be noted that in specific practices, label users usually supplement and interpret the missing time range as the past five years. Therefore, in other embodiments, the time range can also be supplemented and interpreted as "the past five years" through the retrieval trajectory knowledge base, and then further interpreted based on the current time point to obtain the complete time span data.
[0072] In other embodiments, supplementing the multiple query conditions according to the retrieved trajectory knowledge base and / or the semantic augmentation knowledge base to generate a target query condition set includes: if the target metadata feature is the query index, supplementing the invalid query conditions according to the semantic augmentation knowledge base; if the target metadata feature is not the query index, supplementing the invalid query conditions according to the retrieved trajectory knowledge base.
[0073] In this embodiment, whether to use the retrieved trajectory knowledge base or the semantic augmentation knowledge base for condition supplementation depends on the target metadata feature. When the target metadata feature is the query index, since external authoritative data sources have clear definitions and aliases for most of the index parameters in the financial and economic fields, the semantic augmentation knowledge base is used to supplement and explain such invalid query conditions to further improve accuracy; and when the target metadata feature is not the query index, since the metadata features in other dimensions are more practice-oriented, the specific practices of experts and scholars can better represent the habits of industry users, so the retrieved trajectory knowledge base is used to supplement and explain such invalid query conditions to further improve accuracy.
[0074] After the condition supplementation of the retrieved trajectory knowledge base and / or the semantic augmentation knowledge base, an updated query condition set is obtained. At this time, the server sends a response content containing the updated query condition set to the client, and the user is asked to confirm whether the updated query condition set is accurate. If it is not accurate, the user can modify it in real time in the response content to re-match the search. If it is accurate, the user can issue a confirmation instruction by clicking the confirmation button or other means. When the server receives this confirmation instruction, it determines the updated query condition set as the target query condition set, and thus performs the final data query operation.
[0075] It can be seen that in this example, when the server detects an invalid query condition containing the target metadata feature, it determines that there are missing query conditions. Specifically, when the mapped object of the target metadata feature is not in the underlying database, the invalid query conditions are supplemented according to the retrieved trajectory knowledge base and / or the semantic augmentation knowledge base, and when there is no mapped object for the target metadata feature, the invalid query conditions are supplemented according to the retrieved trajectory knowledge base to obtain an updated query condition set. And when receiving the confirmation instruction from the user for the updated query condition set, it determines the updated query condition set as the target query condition set to perform the final data query operation. In this way, the retrieved trajectory knowledge base and / or the semantic augmentation knowledge base are selected to supplement the invalid query conditions based on the specific situation of the target metadata feature, so as to correspond to the field attributes in the database table, achieve fast and accurate data query, and improve the efficiency and accuracy of data query.
[0076] In a possible example, the proprietary knowledge system supports dynamic updates.
[0077] Among them, the dynamic update process of the condition matching knowledge base includes: when it is detected that the database table structure changes, reconstruct the mapping rules and update the condition matching knowledge base. Among them, the dynamic update process of the retrieval track knowledge base includes: re-obtaining the retrieval track data of labeled users and newly added labeled users every preset time period; updating the retrieval track knowledge base according to the retrieval track data.
[0078] Among them, the dynamic update process of the semantic expansion knowledge base includes: re-obtaining the derivative data of field attributes from external authoritative data sources every preset time period; updating the semantic expansion knowledge base according to the newly obtained derivative data.
[0079] In a possible example, when a modification instruction for the updated query condition set is received from the user, it is determined whether there are missing conditions in the modified query condition set; if so, S203 is repeated; if not, the modified query condition is determined as the target query condition set, and the exclusive parameters of the knowledge system for this user are updated according to the user's modification content.
[0080] That is, in this example, after the user modifies the query condition set, the content in the knowledge system can be flexibly changed according to the user's modification content. For example, the target word after modification is used to replace synonyms, etc., so as to provide a proprietary knowledge system exclusive to this user and improve the adaptability between the user and the dialogue system.
[0081] Consistent with the above embodiments, please refer to Figure 6 , Figure 6 is a structural block diagram of a dialogue data processing device based on a knowledge system provided by an embodiment of the present application. The dialogue data processing device 60 based on the knowledge system includes: a knowledge system construction unit 601, configured to construct a proprietary knowledge system for a target domain. The proprietary knowledge system includes a condition matching knowledge base, a retrieval track knowledge base, and a semantic expansion knowledge base. The condition matching knowledge base is used to represent the structured features of the data stored in the underlying database. The retrieval track knowledge base is used to represent the regular patterns of the historical retrieval behaviors of labeled users for the underlying database. The semantic expansion knowledge base is used to represent the association relationships between domain terms; a condition extraction unit 602, configured to extract a plurality of query conditions from the user's question content according to the condition matching knowledge base; a condition supplement unit 603, configured to supplement the plurality of query conditions according to the retrieval track knowledge base and / or the semantic expansion knowledge base when it is detected that there are missing query conditions, and generate a target query condition set; a query unit 604, configured to perform a data query operation on the underlying database based on the target query condition set and output a query result.
[0082] In a possible example, in terms of constructing its own knowledge system for the target field, the knowledge system construction unit 601 is specifically configured to: analyze the field definitions of all data tables in the underlying database, extract metadata features, where the metadata features at least include: query metrics, time range, field range, enterprise attributes; construct a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtain the retrieval track data of each of the labeled users for the underlying database, where the retrieval track data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result; construct a retrieval track knowledge base according to the retrieval track data; extract the derivative data corresponding to each field attribute from an external authoritative data source, where the derivative data includes synonyms and hyponyms / hypernyms of the field attribute; construct a semantic expansion knowledge base according to each field attribute and the corresponding derivative data.
[0083] In a possible example, in terms of constructing the mapping relationship between the metadata features and the data table fields to obtain a condition matching knowledge base, the knowledge system construction unit 601 is specifically configured to: construct a mapping relationship between the query metrics and the metric fields; construct a mapping relationship between the time range and the time span corresponding to the data table where the metric fields are located; construct a mapping relationship between the field range and the industry or sector corresponding to the data table where the metric fields are located; construct a mapping relationship between the enterprise attributes and the enterprise labels corresponding to the data table where the metric fields are located.
[0084] In a possible example, in terms of constructing a retrieval track knowledge base according to the retrieval track data, the knowledge system construction unit 601 is specifically configured to: constructing a retrieval track knowledge base according to the retrieval track data includes: extracting a plurality of reference query conditions from the historical retrieval input sequence; extracting a plurality of final query conditions from the finally determined query result; associating the plurality of reference query conditions and the plurality of final query conditions based on the metadata features to determine multiple groups of retrieval semantic mapping relationships; for each retrieval term, calculating the proportion of the number of each retrieval semantic mapping relationship corresponding to the retrieval term; extracting the retrieval semantic mapping relationships with the proportion greater than a preset threshold to form a retrieval track knowledge base.
[0085] In a possible example, in terms of constructing a semantic expansion knowledge base according to each field attribute and the corresponding derivative data, the knowledge system construction unit 601 is specifically configured to: construct a term relationship network for the field attribute according to the derivative data corresponding to each field attribute, where the term relationship network includes term nodes, synonym term relationship edges, and hyponym / hypernym term relationship edges; add context weights to each relationship edge in the term relationship network to obtain a semantic expansion knowledge base.
[0086] In a possible example, in terms of extracting multiple query conditions from the user's question content according to the condition matching knowledge base, the condition extraction unit 602 is specifically configured to: perform natural language processing on the user's question content, split the user's question content into multiple keywords; map the multiple keywords to the metadata features respectively according to semantics, and obtain multiple query conditions.
[0087] In a possible example, when it is detected that there are missing query conditions, and supplementing the multiple query conditions according to the retrieval track knowledge base and / or the semantic augmentation knowledge base to generate a target query condition set, the condition supplementing unit 603 is specifically configured to: when it is detected that there are invalid query conditions including target metadata features among the multiple query conditions, determine that there are missing query conditions, where the target metadata feature refers to a metadata feature without a mapped object or the mapped object is not in the underlying database; if the mapped object of the target metadata feature is not in the underlying database, supplement the invalid query conditions according to the retrieval track knowledge base and / or the semantic augmentation knowledge base to obtain an updated query condition set; if the target metadata feature has no mapped object, supplement the invalid query conditions according to the retrieval track knowledge base to obtain an updated query condition set; when receiving a confirmation instruction for the updated query condition set, determine the updated query condition set as the target query condition set.
[0088] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, therefore, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part, and will not be elaborated here.
[0089] In the case of adopting an integrated unit, as Figure 7 shown, Figure 7 is a structural block diagram of another dialogue data processing device based on a knowledge system provided by an embodiment of the present application. In Figure 7 , the dialogue data processing device 60 based on the knowledge system includes: a processing module 62 and a communication module 61. The processing module 62 is used to control and manage the actions of the dialogue data processing device based on the knowledge system. For example, it executes the steps of the knowledge system construction unit 601, the condition extraction unit 602, the condition supplementing unit 603, and the query unit 604, and / or is used to execute other processes of the technologies described herein. The communication module 61 is used to support the interaction between the dialogue data processing device based on the knowledge system and other devices. As Figure 7 shown, the dialogue data processing device based on the knowledge system may further include a storage module 63, and the storage module 63 is used to store the program code and data of the dialogue data processing device based on the knowledge system.
[0090] Among them, all relevant contents of each scenario involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be elaborated here. The above-described dialogue data processing device 60 based on the knowledge system can execute all of the above Figure 2 shown knowledge system-based dialogue data processing methods.
[0091] Based on the descriptions of the above method embodiments and device embodiments, please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a server provided by an embodiment of the present application. Figure 8 The shown server includes a memory 801, a processor 802, a communication interface 803, and a bus 804. Among them, the memory 801, the processor 802, and the communication interface 803 are communicatively connected to each other through the bus 804.
[0092] The memory 801 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0093] The memory 801 can store a program. When the program stored in the memory 801 is executed by the processor 802, the processor 802 and the communication interface 803 are used to execute each step of the knowledge system-based dialogue data processing method of the embodiments of the present application.
[0094] The processor 802 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits, and is used to execute relevant programs to implement the functions required to be executed by the units in the server of the embodiments of the present application, or to execute the knowledge system-based dialogue data processing method of the method embodiments of the present application.
[0095] The processor 802 can also be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the method for processing dialogue data based on a knowledge system according to the present application can be completed by the integrated logic circuit of the hardware in the processor 802 or the instructions in the form of software. The above-mentioned processor 802 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by a combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801 and combines its hardware to complete the functions required to be executed by the units included in the server in the embodiments of the present application, or execute the method for processing dialogue data based on a knowledge system in the method embodiments of the present application.
[0096] The communication interface 803 uses a transceiver device such as, but not limited to, a transceiver to implement the communication between the server and other devices or communication networks. For example, data can be obtained through the communication interface 803.
[0097] The bus 804 can include a path for transmitting information between various components of the server (for example, the memory 801, the processor 802, the communication interface 803).
[0098] It should be noted that although Figure 8 the server shown only shows the memory 801, the processor 802, and the communication interface 803, in the specific implementation process, those skilled in the art should understand that the server also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the server may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the server may also only include the devices necessary for implementing the embodiments of the present application, and do not necessarily include Figure 8 all the devices shown in
[0099] The embodiments of the present application also provide a computer storage medium, on which computer programs / instructions are stored. When the computer programs / instructions are executed by a processor, some or all of the steps of any of the methods described in the above method embodiments are implemented.
[0100] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical or other form.
[0101] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, some or all of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrating one or more available media. The available medium can be a read-only memory, a random access memory, a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a digital versatile disc, or a semiconductor medium, such as a solid-state drive, etc.
[0103] As described above, it is only the specific implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
[0104] The device embodiments described above are merely illustrative. The units and modules described as separate components may or may not be physically separated. Additionally, some or all of the units and modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.
[0105] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present application, and can make various modifications and alterations, including combinations of the above different functions and implementation steps, including software and hardware implementation manners, all within the protection scope of the present application.
Claims
1. A method for processing dialogue data based on a knowledge system, characterized in that, Including: Constructing an in - house knowledge system for the target domain, where the in - house knowledge system includes a condition - matching knowledge base, a retrieval - trajectory knowledge base, and a semantic - expansion knowledge base. The condition - matching knowledge base is used to represent the structured features of the data stored in the underlying database. The retrieval - trajectory knowledge base is used to represent the regular patterns of the historical retrieval behaviors of the labeled users for the underlying database. The semantic - expansion knowledge base is used to represent the association relationships between domain terms. Extracting multiple query conditions from the user's question content according to the condition - matching knowledge base. When it is detected that there are missing query conditions, supplementing the multiple query conditions according to the retrieval - trajectory knowledge base and / or the semantic - expansion knowledge base to generate a target query condition set. Performing a data query operation on the underlying database based on the target query condition set and outputting the query result.
2. The method according to claim 1, characterized in that The constructing of the in - house knowledge system for the target domain includes: Analyzing the field definitions of all data tables in the underlying database and extracting metadata features. The metadata features at least include: query metrics, time range, domain range, enterprise attributes. Constructing the mapping relationship between the metadata features and field attributes to obtain the condition - matching knowledge base. Obtaining the retrieval - trajectory data of each labeled user for the underlying database. The retrieval - trajectory data includes the mapping relationship between the historical retrieval input sequence and the finally determined query result. Constructing the retrieval - trajectory knowledge base according to the retrieval - trajectory data. Extracting the derivative data corresponding to each field attribute from an external authoritative data source. The derivative data includes synonyms and hyponyms / hypernyms of the field attribute. Constructing the semantic - expansion knowledge base according to each field attribute and the corresponding derivative data.
3. The method according to claim 2, characterized in that, The constructing of the mapping relationship between the metadata features and data - table fields to obtain the condition - matching knowledge base includes: Constructing the mapping relationship between the query metrics and metric fields. Constructing the mapping relationship between the time range and the time span corresponding to the data table where the metric field is located. Constructing the mapping relationship between the domain range and the industry or sector corresponding to the data table where the metric field is located. Constructing the mapping relationship between the enterprise attributes and the enterprise label corresponding to the data table where the metric field is located.
4. The method according to claim 2, wherein The constructing of the retrieval - trajectory knowledge base according to the retrieval - trajectory data includes: Extracting multiple reference query conditions from the historical retrieval input sequence. Extracting multiple final query conditions from the finally determined query result. Associating the multiple reference query conditions and the multiple final query conditions based on the metadata features to determine multiple groups of retrieval - semantic mapping relationships. For each retrieval term, calculating the proportion of the number of each retrieval - semantic mapping relationship corresponding to the retrieval term. Extracting the retrieval - semantic mapping relationships with the proportion greater than a preset threshold to form the retrieval - trajectory knowledge base.
5. The method according to claim 2, characterized in that The constructing of the semantic - expansion knowledge base according to each field attribute and the corresponding derivative data includes: Constructing a term - relationship network for the field attribute according to the derivative data corresponding to each field attribute. The term - relationship network includes term nodes, synonym - term relationship edges, and hyponym / hypernym - term relationship edges. Add a context weight to each relationship edge of the term relationship network to obtain a semantically augmented knowledge base.
6. The method according to any one of claims 2-5, characterized in that, The extracting multiple query conditions from the user's question content according to the condition matching knowledge base includes: Perform natural language processing on the user's question content, and split the user's question content into multiple keywords; Map the multiple keywords to the metadata features respectively according to semantics to obtain multiple query conditions.
7. The method according to claim 6, wherein When it is detected that there are missing query conditions, supplement the multiple query conditions according to the retrieval track knowledge base and / or the semantically augmented knowledge base to generate a target query condition set, including: When it is detected that there is an invalid query condition including a target metadata feature in the multiple query conditions, it is determined that there are missing query conditions, where the target metadata feature refers to a metadata feature without a mapping object or whose mapping object is not in the underlying database; If the mapping object of the target metadata feature is not in the underlying database, supplement the invalid query condition according to the retrieval track knowledge base and / or the semantically augmented knowledge base to obtain an updated query condition set; If the target metadata feature has no mapping object, supplement the invalid query condition according to the retrieval track knowledge base to obtain an updated query condition set; When a confirmation instruction for the updated query condition set is received, determine the updated query condition set as the target query condition set.
8. A dialogue data processing device based on a knowledge system, characterized in that, Including: A knowledge system construction unit for constructing an in-house knowledge system for a target domain. The in-house knowledge system includes a condition matching knowledge base, a retrieval track knowledge base, and a semantically augmented knowledge base. The condition matching knowledge base is used to represent the structured features of the data stored in the underlying database. The retrieval track knowledge base is used to represent the regular patterns of the historical retrieval behaviors of label users for the underlying database. The semantically augmented knowledge base is used to represent the association relationships between domain terms; A condition extraction unit for extracting multiple query conditions from the user's question content according to the condition matching knowledge base; A condition supplement unit for supplementing the multiple query conditions according to the retrieval track knowledge base and / or the semantically augmented knowledge base to generate a target query condition set when it is detected that there are missing query conditions; A query unit for performing a data query operation on the underlying database based on the target query condition set and outputting a query result.
9. A server, characterized in that, Including a processor, a memory, and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the processor. The programs include instructions for performing the steps in the method according to any one of claims 1-7.
10. A computer-readable storage medium having computer programs / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Interactive intelligence user demand deep mining and retrieval method based on power grid operation information
CN110427400A
Main data-oriented natural language query and report intelligent generation method
CN110674164A
Tourism information autonomous query and strategy generation method based on AI Agent technology
CN118503529A
Heuristic knowledge navigation recommendation method fusing user retrieval intention
CN118939787A
Query generation
US20080120326A1