Dialogue data processing method and related device based on knowledge system
By building a condition matching, retrieval trajectory and semantic expansion knowledge base, the efficiency and accuracy issues of concrete data query in the financial and economic fields of intelligent dialogue systems are solved, and fast and accurate data query is achieved.
Patent Information
- Application Number
- CN202510865455.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing intelligent dialogue systems have slow response speeds in concrete data queries in the financial and economic fields and are prone to intent recognition errors, affecting query efficiency and accuracy.
A conversation data processing method based on a knowledge system is constructed, including a condition matching knowledge base, a retrieval trajectory knowledge base, and a semantic expansion knowledge base. Through these knowledge bases, query conditions are extracted from the user's question content, and missing conditions are supplemented when detected, and finally a target query condition set is generated to execute data query.
It improves the efficiency and accuracy of data queries and ensures fast and accurate responses in specific areas.
Smart Images

Figure CN120371859B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic digital data processing technology, and specifically relates to a conversation data processing method based on a knowledge system and related devices. Background Art
[0002] Currently, intelligent dialogue systems based on large language models offer significant convenience for data search across all fields. After identifying user questions, they instantly search and organize external data to produce answers. However, for queries targeting specific data in specific fields, such as finance and economics, existing intelligent dialogue systems require significant time to search and organize external data due to the nature of instant search, resulting in slow response times. Furthermore, if user questions are incomplete, intent recognition errors are prone to occur. This leads to significant time-consuming data searches, impacting query efficiency and accuracy, and resulting in a poor user experience. Summary of the Invention
[0003] The embodiments of the present application provide a knowledge system-based dialogue data processing method and related devices, in order to solve the problem that existing intelligent dialogue systems are unable to quickly and accurately respond to query requirements for concrete data in specific fields, improve data query efficiency, and optimize user experience.
[0004] In a first aspect, an embodiment of the present application provides a method for processing conversation data based on a knowledge system, comprising:
[0005] Construct a proprietary knowledge system for the target domain, which includes a condition matching knowledge base, a search trajectory knowledge base, and a semantic expansion knowledge base. The condition matching knowledge base is used to characterize the structural features of the data stored in the underlying database. The search trajectory knowledge base is used to characterize the regular patterns of the tag user's historical search behavior for the underlying database. The semantic expansion knowledge base is used to characterize the association relationship between domain terms.
[0006] Extracting multiple query conditions from the user's question content according to the condition matching knowledge base;
[0007] When missing query conditions are detected, the plurality of query conditions are supplemented according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set;
[0008] A data query operation is performed on the underlying database based on the target query condition set, and a query result is output.
[0009] Furthermore, the construction of the own knowledge system for the target field includes: parsing the field definitions of all data tables in the underlying database, extracting metadata features, and the metadata features at least include: query indicators, time range, field range, and enterprise attributes; constructing a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtaining the search trajectory data of each tagged user for the underlying database, and the search trajectory data includes a mapping relationship between a historical search input sequence and a final query result; constructing a search trajectory knowledge base based on the search trajectory data; extracting derivative data corresponding to each field attribute from an external authoritative data source, and the derivative data includes synonyms and hyponyms of the field attribute; and constructing a semantic expansion knowledge base based on each field attribute and the corresponding derivative data.
[0010] Furthermore, the mapping relationship between the metadata features and the data table fields is constructed to obtain a condition matching knowledge base, including: constructing a mapping relationship between the query indicators and the indicator fields; constructing a mapping relationship between the time range and the time span corresponding to the data table where the indicator field is located; constructing a mapping relationship between the field range and the industry or sector corresponding to the data table where the indicator field is located; and constructing a mapping relationship between the enterprise attributes and the enterprise tags corresponding to the data table where the indicator field is located.
[0011] Furthermore, the constructing of a retrieval trajectory knowledge base based on 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 results; associating the plurality of reference query conditions with the plurality of final query conditions based on the metadata features to determine a plurality of groups of retrieval semantic mapping relationships; for each search term, calculating the quantity ratio of each retrieval semantic mapping relationship corresponding to the search term; and extracting the retrieval semantic mapping relationships whose quantity ratio is greater than a preset threshold to form a retrieval trajectory knowledge base.
[0012] Furthermore, the semantically expanded knowledge base is constructed based on each field attribute and the corresponding derived data, including: constructing a term relationship network for the field attribute based on the derived data corresponding to each field attribute, the term relationship network including term nodes, synonymous term relationship edges and hyponymous term relationship edges; adding contextual weights to each relationship edge in the term relationship network to obtain a semantically expanded knowledge base.
[0013] Furthermore, extracting multiple query conditions from the user question content according to the condition matching knowledge base includes: performing natural language processing on the user question content to split the user question content into multiple keywords; and mapping the multiple keywords to the metadata features according to semantics to obtain multiple query conditions.
[0014] Furthermore, when a missing query condition is detected, the multiple query conditions are supplemented according to the retrieval trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set, including: when an invalid query condition containing a target metadata feature is detected among the multiple query conditions, determining that there is a missing query condition, the target metadata feature refers to a metadata feature that has no mapping object or the 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 condition according to the retrieval trajectory 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 condition according to the retrieval trajectory knowledge base to obtain an updated query condition set; when a confirmation instruction for the updated query condition set is received, determining that the updated query condition set is the target query condition set.
[0015] In a second aspect, an embodiment of the present application provides a conversation data processing device based on a knowledge system, comprising:
[0016] A knowledge system construction unit is used to construct a proprietary knowledge system for the target domain. The proprietary knowledge system includes a condition matching knowledge base, a search trajectory knowledge base, and a semantic expansion knowledge base. The condition matching knowledge base is used to characterize the structured features of the data stored in the underlying database. The search trajectory knowledge base is used to characterize the regular patterns of the historical search behavior of the tagged user on the underlying database. The semantic expansion knowledge base is used to characterize the association relationship between domain terms.
[0017] A condition extraction unit, configured to extract multiple query conditions from the user's question content according to the condition matching knowledge base;
[0018] a condition supplementation unit, configured to supplement the plurality of query conditions according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set when a missing query condition is detected;
[0019] The query unit is used to perform a data query operation on the underlying database based on the target query condition set and output a query result.
[0020] In a third aspect, an embodiment of the present application provides a server comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps in the method described in the first aspect of the present application.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect of the present application.
[0022] 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 based on the condition matching knowledge base in the knowledge system. When it is detected that there are missing query conditions, the server performs condition supplementation based on the retrieval track knowledge base and / or the semantic expansion knowledge base in the knowledge system to generate a target query condition set. Finally, based on the target query condition set, the server performs a data query operation on the underlying database and outputs the query result. 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 on the underlying database through the complete target query condition set, the corresponding fields are accurately indexed, and the efficiency and accuracy of data query are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 This is a structural block diagram of a conversation data processing system based on a knowledge system provided in an embodiment of the present application;
[0025] Figure 2 This is a flowchart of a method for processing conversation data based on a knowledge system provided in an embodiment of the present application;
[0026] Figure 3 This is a flowchart of a method for constructing a proprietary knowledge system provided in an embodiment of the present application;
[0027] Figure 4This is a schematic diagram of extracting and retrieving semantic mapping relationships provided by an embodiment of the present application;
[0028] Figure 5 This is an example diagram of a term relationship network provided by an embodiment of the present application;
[0029] Figure 6 This is a structural block diagram of a conversation data processing device based on a knowledge system provided in an embodiment of the present application;
[0030] Figure 7 This is a structural block diagram of another conversation data processing device based on a knowledge system provided in an embodiment of the present application;
[0031] Figure 8 This is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0034] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] Currently, most intelligent dialogue systems are designed as search engines for users across all fields. They leverage powerful computing power to instantly search and organize external data, and then integrate and output query results. For each round of data query, these intelligent dialogue systems require accurate intent recognition and instant data search to obtain the basic data required by the user. However, due to the nature of instant search, existing intelligent dialogue systems inevitably require a significant amount of time to search and organize external data, resulting in slow response times. Furthermore, if user questions are incomplete, intent recognition errors are prone to occur, leading to a significant amount of time spent searching for incorrect data during the data query process, significantly impacting the efficiency and accuracy of data queries.
[0036] To solve the above problems, the embodiments of the present application provide a conversation data processing method and related devices based on a knowledge system.
[0037] See also Figure 1 , Figure 1 This is a structural diagram of a conversation data processing system based on a knowledge system provided in an embodiment of the present application. Figure 1 As shown, the conversation data processing system 10 includes a server 11 and a client 12. The server 11 and the client 12 are in communication with each other to implement interactive data transmission. The server 11 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. The client 12 refers to a smart device used by a user, such as a mobile phone, tablet computer, or personal computer.
[0038] Among them, the server 11 stores an underlying database that is deeply cultivated around the target field, covering data resources of various concrete data in the target field. The underlying database contains several data tables, and each data table contains several fields. In this example, 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 demand for concrete data, due to the small data granularity, conventional search engines need to frequently access various public data sources, and it is usually difficult to achieve fast and accurate queries. However, under the premise of an existing structured underlying database, it is only necessary to quickly and accurately locate the field position to achieve it, greatly improving the query efficiency. In actual situations, user questions are usually non-standard, and after word segmentation, they cannot correspond one-to-one with the data table fields, and even the necessary conditions are missing, resulting in the inability to index specific fields. Based on this, the embodiment of the present application provides a conversation data processing method and related devices based on a knowledge system to overcome the problem of being unable to index specific data table fields for data queries.
[0039] The following describes a method for processing conversational data based on a knowledge system according to an embodiment of the present application.
[0040] See also Figure 2 , Figure 2 This is a flow chart of a method for processing conversation data based on a knowledge system provided in an embodiment of the present application, which is applied to Figure 1 In the server 11 shown, Figure 2 As shown, the method includes:
[0041] S201, build your own knowledge system for the target field.
[0042] The proprietary knowledge system includes a condition matching knowledge base, a search trajectory knowledge base, and a semantic expansion knowledge base.
[0043] Among them, the conditional matching knowledge base is used to characterize the structured features of the data stored in the underlying database. The structured features refer to attribute features extracted from data tables or fields with clear classification and standardized definitions. Through the conditional matching knowledge base, the user question content after word segmentation can be structured and mapped directly to the attribute features of the data table or field.
[0044] Among them, the retrieval trajectory knowledge base is used to characterize the regular pattern of the historical retrieval behavior of the tagged user for the underlying database. In the embodiment of the present application, each user can access the underlying database through the client to query data, and finally determine the required data content, which constitutes the exclusive retrieval behavior data of each user. The convenience and authority of the long-term operating underlying database in practice have attracted many experts and scholars, and the retrieval behavior data of experts and scholars has a certain authority and guiding significance in the field. The search terms used are more in line with the application scenarios of the practical dimension, and can explain or supplement the user's non-standard question content to a certain extent.
[0045] Among them, the semantic expansion knowledge base is used to represent the association relationship between domain terms. Professional terms in different fields may have different nicknames, and the fields stored in the database table generally only store one of the term names. Through the semantic expansion knowledge base, different expressions of the same term can be associated, which can explain the user's non-standard questions to a certain extent.
[0046] S202: extracting multiple query conditions from the user's question content according to the condition matching knowledge base.
[0047] 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 to the data table fields, and there may be uncorresponding structured features, which requires explanation and supplementation of the query conditions.
[0048] S203: When it is detected that there are missing query conditions, the multiple query conditions are supplemented according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set.
[0049] The target query condition set refers to a query condition set that has been interpreted and / or supplemented and can be accurately mapped to a specific data table field.
[0050] For example, when the time range is a necessary query condition and the time range is not clearly stated in the user's question content, the trajectory knowledge base can be searched to determine the time range commonly used by label users when querying this field or indicator data similar to this field, such as 2020-2024, so as to supplement the conditions and achieve the correspondence of the time range conditions.
[0051] For example, the time range constraint in the user's question is nearly five years, but such a time span does not exist in the underlying database. The semantic expansion knowledge base can be used to expand the interpretation to nearly five years, for example, to 2020-2024, thereby achieving the correspondence of the time range conditions.
[0052] S204: Execute a data query operation on the underlying database based on the target query condition set, and output a query result.
[0053] 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 indicates the data source of the target field. The query result can be displayed on the front end through the client and supports real-time modification by the user.
[0054] It can be seen that in this example, by building a knowledge system around the existing underlying database, building 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, the missing query conditions in the user's question content are supplemented by searching the trajectory knowledge base and / or the semantic expansion knowledge base. Finally, the data query operation on the underlying database is executed through the complete target query condition set, and the corresponding fields are accurately indexed, thereby improving the efficiency and accuracy of data query.
[0055] In one possible example, the construction of an own knowledge system for the target field includes: parsing the field definitions of all data tables in the underlying database and extracting metadata features, wherein the metadata features include at least query indicators, time range, field range, and enterprise attributes; constructing a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtaining the search trajectory data of each tagged user for the underlying database, wherein the search trajectory data includes a mapping relationship between a historical search input sequence and a final query result; constructing a search trajectory knowledge base based on the search trajectory data; extracting derivative data corresponding to each field attribute from an external authoritative data source, wherein the derivative data includes synonyms and hyponyms of the field attribute; and constructing a semantic expansion knowledge base based on each field attribute and the corresponding derivative data.
[0056] The target domain is the financial economics domain, and the underlying database is the CSMAR database. The underlying database contains a vast number of data table fields, making it almost impossible for a user to query data by entering natural language that is identical to the field name. Based on this, in an 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 constructing a condition matching knowledge base, a search trajectory knowledge base, and a semantic expansion knowledge base.
[0057] Specifically, if Figure 3 As shown, S201 builds its own knowledge system for the target field, including:
[0058] S301, building a condition matching knowledge base; S302, building a retrieval trajectory knowledge base; S303, building a semantic expansion knowledge base.
[0059] Among them, S301 specifically includes:
[0060] S3011, parsing the field definitions of all data tables in the underlying database and extracting metadata features;
[0061] S3012: Construct a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base.
[0062] The server parses the field definitions of all data tables in the entire database to extract structured features of all data, namely metadata features. These metadata features include at least four essential dimensions: query indicator, time range, domain range, and enterprise attributes. Optionally, these metadata features may also include dimensions such as research direction, subject matter, data frequency, and data source. For example, in the "Financial Indicator Analysis" data table, there is a field called "Net Profit Ratio of Total Assets," which is a financial indicator. A mapping relationship is then established between the metadata feature "Query Indicator" and the field "Net Profit Ratio of Total Assets." Based on the aforementioned logic, field attributes in the database table, such as the specific field, the time attribute of the specific field, the domain attribute of the specific field, and the enterprise attribute of the specific field, are mapped to corresponding metadata features to construct a conditional matching knowledge base. This allows the conditional matching knowledge base to quickly identify the metadata feature corresponding to each sub-content in the user's question content and verify the completeness of the user's question content based on the existing mapping relationships associated with these metadata features. This facilitates interpretation and supplementation of non-standard or incomplete user question content through the search trajectory knowledge base and / or semantic expansion knowledge base.
[0063] S302 specifically includes:
[0064] S3021, obtaining search trajectory data of each tagged user for the underlying database, wherein the search trajectory data includes a mapping relationship between a historical search input sequence and a final determined query result;
[0065] S3022: Construct a search trajectory knowledge base according to the search trajectory data.
[0066] Among them, the retrieval trajectory data includes a mapping relationship between a historical retrieval input sequence and a finalized query result. The historical retrieval input sequence can be a piece of text content. The finalized query result refers to the data content that the tagged user determined to access and perform related data operations under the historical retrieval input sequence. The related data operations include data download operations or browsing operations with a browsing time greater than a preset time. For example, let the tagged user's historical retrieval input sequence be "Company A's ROA", and the query result finally determined by the tagged user is Company A's return on assets from 2020 to 2024. Then, a mapping relationship between the above historical retrieval input sequence and the finalized query result can be established, i.e., retrieval trajectory data. By statistically analyzing the retrieval trajectory data of different tagged users, retrieval statements with consistent pointing can be extracted, and a retrieval trajectory knowledge base can be constructed to facilitate the interpretation and supplementation of user questions.
[0067] Among them, S303 specifically includes:
[0068] S3031, extracting derived data corresponding to each field attribute from an external authoritative data source, wherein the derived data includes synonyms and hyponyms of the field attribute;
[0069] S3032: Build a semantically extended knowledge base based on each field attribute and corresponding derived data.
[0070] Specifically, external authoritative data sources include authoritative textbooks, academic papers, industry standard documents, and other data. For example, the indicator "operating status" can be interpreted as multiple sub-indicators such as "profitability, operating capacity, cash flow analysis, development capacity, and debt repayment capacity." Different sub-indicators can be further interpreted. For example, "profitability" can be interpreted as indicator fields existing in the underlying database, such as "net profit, net profit margin of total assets, and return on net assets," while "development capacity" can be 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, derived data corresponding to each field attribute is extracted through external authoritative data sources, and associations are established to build a semantically expanded knowledge base to facilitate the interpretation of user questions.
[0071] As can be seen in this example, the server extracts metadata features encompassing at least four dimensions by parsing the field definitions of all data tables in the underlying database to build a condition-matching knowledge base. Furthermore, it constructs a search trajectory knowledge base by acquiring the search trajectory data of each tagged user against the underlying database. Finally, it constructs a semantically expanded knowledge base by extracting derivative data corresponding to each field attribute from external data sources. This builds a proprietary knowledge system specific to the target domain, facilitating the conversion of user questions into structured query conditions, which are then interpreted and supplemented, improving the efficiency and accuracy of data queries.
[0072] In one possible example, constructing a mapping relationship between the metadata features and the data table fields to obtain a condition matching knowledge base includes: constructing a mapping relationship between the query indicators and the indicator fields; constructing a mapping relationship between the time range and the time span corresponding to the data table where the indicator field is located; constructing a mapping relationship between the field range and the industry or sector corresponding to the data table where the indicator field is located; and constructing a mapping relationship between the enterprise attributes and the enterprise labels corresponding to the data table where the indicator field is located.
[0073] Among them, in the specific process of building a condition matching knowledge base, a mapping relationship can be constructed according to the four necessary metadata features of query indicators, time range, field range and enterprise attributes.
[0074] Specifically, the query indicator corresponds to one or more fields in the database with the smallest data granularity, such as net profit, net profit margin of total assets, return on net assets, etc. By building an association between the query indicator and the indicator field, the structured features of the entire database table data in the query indicator dimension can be extracted.
[0075] Specifically, the time range corresponds to the time span of the data table where each indicator field resides. Users can limit the time range to obtain indicator fields under different time spans to meet business needs such as indicator trend analysis and indicator capability analysis. By establishing an association between the time range and the time span corresponding to the data table where the indicator field resides, the structured features of the time range dimension of the entire database table data can be extracted.
[0076] Specifically, the domain scope corresponds to the industry or sector corresponding to the data table where each indicator field is located. Examples of these industries include manufacturing, construction, and finance, while sectors include the low-altitude economy, technology, and consumer sectors. Users can define the domain scope to obtain indicator fields from different industries or sectors to meet business needs such as industry trend analysis and sector stability analysis. By establishing an association between the domain scope and the industry or sector corresponding to the data table where the indicator field is located, the structural features of the entire database table data in the domain scope dimension can be extracted.
[0077] Specifically, enterprise attributes correspond to the enterprise tags corresponding to the data tables where each indicator field resides. Examples of these tags include: specialized, specialized, innovative, small giant, listed company, size ranking, market capitalization, and so on. Users can restrict enterprise attributes to obtain indicator data for specific types of enterprises, meeting business needs for analyzing indicator data for specific types of enterprises. By establishing an association between enterprise attributes and the enterprise tags corresponding to the data tables where the indicator fields reside, we can extract the structural features of the enterprise attribute dimension across all database table data.
[0078] As can be seen, in this example, the server specifically associates all database table data based on metadata features in four dimensions: query indicators, time range, field range, and enterprise attributes, and builds a condition matching knowledge base to facilitate the conversion of user questions into structured query conditions, thereby improving the efficiency and accuracy of data queries.
[0079] In one possible example, constructing a 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 final query results; associating the multiple reference query conditions with the multiple final query conditions based on the metadata features to determine multiple groups of retrieval semantic mapping relationships; for each search term, calculating the quantitative proportion of each retrieval semantic mapping relationship corresponding to the search term; and extracting the retrieval semantic mapping relationships whose quantitative proportion is greater than a preset threshold to form a retrieval trajectory knowledge base.
[0080] The final query condition refers to the query condition extracted from the final query result corresponding to the historical search input sequence. Figure 4 As shown, taking the historical search input sequence of "Company A's ROA" and the final query result of "Company A's net profit margin of total assets from 2020 to 2024" as an example, multiple reference query conditions are extracted from the historical search input sequence, including: "Query indicator: ROA," "Time range: Missing," "Domain range: Default," and "Enterprise attribute: Company A." The final query conditions extracted from the final query result include: "Query indicator: Net profit margin of total assets," "Time range: 2020-2024," "Domain range: Default," and "Enterprise attribute: Company A." The reference query conditions and the final query conditions are associated through metadata features to determine multiple sets of search semantic mapping relationships. In this example, the metadata feature "Query indicator" in the reference query condition corresponds to "ROA," while the metadata feature "Query indicator" in the final query condition corresponds to "Net profit margin of total assets," forming a set of search semantic mapping relationships. In addition, the mapping object corresponding to the metadata feature "time range" in the reference query condition is missing, while the mapping object corresponding to the metadata feature "time range" in the final query condition is 2020-2024, forming another set of retrieval semantic mapping relationships. Furthermore, by counting the retrieval semantic mapping relationships corresponding to all tagged users, the number of each retrieval semantic mapping relationship corresponding to each search term is calculated, and the retrieval semantic mapping relationships whose number ratio is greater than the preset threshold are extracted, a retrieval trajectory database is constructed to explain or supplement fuzzy search terms or missing search terms. For example, the ROA in the user's question content is interpreted as the net profit rate of total assets. When the time range is missing in the user's question content, the time range is supplemented to 2020-2024.
[0081] As can be seen in this example, the server extracts reference query conditions from the historical search input sequence, extracts final query conditions from the finalized query results, and associates them based on metadata features to determine multiple sets of search semantic mapping relationships. Furthermore, the server statistically calculates the proportion of each search semantic mapping relationship corresponding to each search term, extracting those search semantic mapping relationships with a proportion greater than a preset threshold to form a search trajectory knowledge base. In this way, by building a search trajectory knowledge base using the search trajectory data of experts and scholars in the field, the server can explain and supplement ambiguous or missing query conditions in user questions, thereby improving the efficiency and accuracy of data queries.
[0082] In one possible example, the method of constructing a semantically expanded knowledge base based on each field attribute and the corresponding derived data includes: constructing a term relationship network for the field attribute based on the derived data corresponding to each field attribute, the term relationship network including term nodes, synonymous term relationship edges, and hyponymous term relationship edges; adding contextual weights to each relationship edge in the term relationship network to obtain a semantically expanded knowledge base.
[0083] Among them, after the derived data is obtained from the external authoritative data source, the association relationship between the two is constructed according to the semantic relationship between the field attributes and the derived data, such as synonymous relationship, hyponymy relationship, etc. For example, ROA and net profit margin of total assets are synonyms, and the two term nodes are connected by a synonymous term relationship edge. For another example, profitability and net profit margin of total assets are hyponymy relationships, and the two term nodes are connected by a hyponymy relationship edge. Specifically, the synonymous term relationship edge can be in the form of a double arrow, and the hyponymy relationship edge can be in the form of a single arrow, specifically, it can be from the superordinate term node to the subordinate term node, in which case it is used to represent the inclusion relationship, or it can be from the subordinate term node to the superordinate term node, in which case it is used to represent the belonging relationship. Combining all the association relationships, a term relationship network is obtained. For example, if Figure 5 As shown, taking "net profit margin of total assets" as an example, the term relationship network includes the term nodes "ROA," "return on assets," and "return on assets" representing its synonyms, which are connected by synonym edges; the term node "profitability," representing its hypernym, which is connected by an inclusion edge; the term node "return on net assets," representing the hyponym of "profitability," which is connected by an inclusion edge; and the term node "ROE," representing the synonym of "return on net assets," which is connected by a synonym edge. A contextual weight is then added to each relationship edge in the term relationship network to indicate semantic expansion in different contexts.
[0084] It is understandable that the above-mentioned 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 constitute any limitation to the present application.
[0085] It can be seen that in this example, the server constructs a term relationship network based on the derived data corresponding to each field attribute, and adds context weights to each relationship edge of the term relationship network to obtain a semantically expanded knowledge base, so as to explain and supplement the vague query conditions in the user's question content and improve the efficiency and accuracy of data query.
[0086] In a possible example, extracting multiple query conditions from the user question content based on the condition matching knowledge base includes: performing natural language processing on the user question content to split the user question content into multiple keywords; and mapping the multiple keywords to the metadata features according to semantics to obtain multiple query conditions.
[0087] Among them, the natural language processing includes word segmentation processing. For example, the user's question content "Query the net profit margin of total assets of non-ST listed companies in the manufacturing industry from 2020 to 2024" is segmented to obtain multiple keywords, including: "manufacturing", "non-ST listed companies", "2020-2024", "net profit margin of total assets", and the above multiple keywords are mapped to metadata features of at least four dimensions including query indicators, time range, field range and enterprise attributes according to semantics to obtain query conditions, namely "Query indicators: net profit margin of total assets", "Time range: 2020-2024", "Field range: manufacturing", "Enterprise attributes: non-ST listed companies".
[0088] It is understandable that the method involved in this embodiment can also be used to extract reference query conditions from the historical search input sequence and to extract final query conditions from the final query results in the previous embodiment.
[0089] In some embodiments, when splitting the user's question content into multiple keywords, the search trajectory knowledge base and / or the semantic expansion knowledge base can be called to assist in the splitting, thereby further improving the data query efficiency.
[0090] 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, thereby improving the efficiency and accuracy of data query.
[0091] In one possible example, when a missing query condition is detected, the multiple query conditions are supplemented according to the retrieval trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set, including: when an invalid query condition containing a target metadata feature is detected among the multiple query conditions, determining that there is a missing query condition, where the target metadata feature refers to a metadata feature that has no 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 condition according to the retrieval trajectory 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 condition according to the retrieval trajectory knowledge base to obtain an updated query condition set; and when a confirmation instruction for the updated query condition set is received, determining the updated query condition set as the target query condition set.
[0092] Among them, let's record the user's question as "I need the operating status of representative companies in the low-altitude economy field". The multiple query conditions obtained after extraction include: "Query indicator: operating status", "Time range: missing", "Field range: low-altitude economy sector", "Enterprise attributes: representative companies". There is no indicator field with the field name "operating status" in the underlying database, nor is there a database table with the enterprise label "representative company". In this example, the target metadata features are: query indicator, time range, and enterprise attributes. Correspondingly, the invalid query conditions are: "Query indicator: operating status", "Time range: missing", and "Enterprise attributes: representative companies", that is, there are missing query conditions, which need to be supplemented by searching the trajectory knowledge base and / or the semantic expansion knowledge base.
[0093] For invalid query conditions where the mapping object for the target metadata feature is not in the underlying database, such as "Query indicator: operating status" or "Enterprise attributes: representative companies," both the search trajectory knowledge base and the semantic expansion knowledge base can be used to supplement the invalid query conditions. For example, the semantic expansion knowledge base can interpret "operating status" as "profitability (net profit, net profit margin on total assets, return on equity), operating capacity (inventory turnover, total asset turnover), cash flow analysis (net cash flow from operating activities, enterprise free cash flow), development capacity (operating income growth rate, net profit growth rate, new orders), and debt repayment capacity (liability-to-asset ratio, quick ratio)." The search trajectory knowledge base can interpret "representative companies" as "non-ST listed companies that are specialized, innovative, and ranked in the top 1 / 3 in terms of scale, with a market capitalization of ≥50 billion yuan." It is understandable that in actual practice, the search trajectory knowledge base can also be used to interpret "operating status," and the semantic expansion knowledge base can be used to interpret "representative companies," and this is not a strict limitation here.
[0094] Among them, for invalid query conditions where the target metadata feature has no mapping object, such as "time range: missing", the invalid query conditions are supplemented by searching the trajectory knowledge base. For example, in this example, the time range is supplemented and interpreted as "2020-2024". It should be noted that in actual practice, label users usually supplement the missing time range with the past five years. Therefore, in other embodiments, the time range can also be supplemented and interpreted as "nearly five years" by searching the trajectory knowledge base, and then "nearly five years" is further interpreted at the current time point to obtain complete time span data.
[0095] In other embodiments, the multiple query conditions are supplemented according to the retrieval trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set, including: if the target metadata feature is the query indicator, the invalid query condition is supplemented according to the semantic expansion knowledge base; if the target metadata feature is not the query indicator, the invalid query condition is supplemented according to the retrieval trajectory knowledge base.
[0096] In this embodiment, whether to use the retrieval trajectory knowledge base or the semantic expansion knowledge base to supplement the conditions depends on the target metadata feature. When the target metadata feature is a query indicator, since external authoritative data sources have clear definitions and nicknames for most indicator parameters in the financial and economic fields, the semantic expansion knowledge base is used to supplement and explain such invalid query conditions, further improving accuracy. Also, when the target metadata feature is not a query indicator, since metadata features in other dimensions are more practical and the specific practices of experts and scholars can better represent the habits of industry users, the retrieval trajectory knowledge base is used to supplement and explain such invalid query conditions, further improving accuracy.
[0097] After the conditions of the search trajectory knowledge base and / or the semantic expansion knowledge base are supplemented, an updated query condition set is obtained. At this time, the server sends a reply content containing the updated query condition set to the client, and the user confirms whether the updated query condition set is accurate. If it is inaccurate, it can be modified in real time in the reply content to re-match the search. If it is accurate, a confirmation instruction can be applied by clicking a confirmation button, etc. When the server receives this confirmation instruction, it determines that the updated query condition set is the target query condition set, thereby executing the final data query operation.
[0098] As can be seen, in this example, when the server detects the existence of an invalid query condition containing the target metadata feature, it determines that there is a missing query condition, and specifically, when the mapping object of the target metadata feature is not in the underlying database, it supplements the invalid query condition based on the retrieval trajectory knowledge base and / or the semantic expansion knowledge base, and when the target metadata feature has no mapping object, it supplements the invalid query condition based on the retrieval trajectory knowledge base to obtain an updated query condition set, and when receiving the user's confirmation instruction 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, based on the specific situation of the target metadata feature, the retrieval trajectory knowledge base and / or the semantic expansion knowledge base are selected to supplement the invalid query condition, thereby achieving correspondence with the field attributes in the database table, achieving fast and accurate data query, and improving the efficiency and accuracy of data query.
[0099] In a possible example, the proprietary knowledge system supports dynamic updating.
[0100] The dynamic update process of the condition matching knowledge base includes: when a change in the database table structure is detected, reconstructing the mapping rules and updating the condition matching knowledge base.
[0101] The dynamic update process of the search trajectory knowledge base includes: re-acquiring the search trajectory data of the tagged user and the newly tagged user every preset time period; and updating the search trajectory knowledge base according to the search trajectory data.
[0102] The dynamic update process of the semantically expanded knowledge base includes: re-acquiring derivative data of field attributes from an external authoritative data source at preset intervals; and updating the semantically expanded knowledge base according to the newly acquired derivative data.
[0103] In one possible example, when a modification instruction from the user for the updated query condition set is received, it is determined whether the modified query condition set has any missing conditions; if so, S203 is repeated; if not, the modified query condition is determined to be the target query condition set, and the exclusive parameters of the user's knowledge system are updated according to the user's modification content.
[0104] That is, in this example, when the user modifies the query condition set, the content in the knowledge system can be flexibly changed according to the user's modified content, such as replacing synonyms with the modified target words, etc., thereby providing a unique knowledge system that belongs to the user and improving the adaptability of the user and the dialogue system.
[0105] For the same example as above, please refer to Figure 6 , Figure 6 : This is a structural block diagram of a conversation data processing device based on a knowledge system provided in an embodiment of the present application. The conversation data processing device 60 based on the knowledge system includes: a knowledge system construction unit 601, which is used to construct a proprietary knowledge system for a target domain. The proprietary 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 characterize the structured features of data stored in the underlying database, the retrieval trajectory knowledge base is used to characterize the regular patterns of historical retrieval behaviors of tagged users for the underlying database, and the semantic expansion knowledge base is used to characterize the association relationship between domain terms; a condition extraction unit 602, which is used to extract multiple query conditions from the user's question content based on the condition matching knowledge base; a condition supplementation unit 603, which is used to supplement the multiple query conditions based on the retrieval trajectory knowledge base and / or the semantic expansion knowledge base when missing query conditions are detected to generate a target query condition set; and a query unit 604, which is used to perform a data query operation on the underlying database based on the target query condition set and output a query result.
[0106] In one possible example, in terms of constructing the own knowledge system for the target field, the knowledge system construction unit 601 is specifically used to: parse the field definitions of all data tables in the underlying database and extract metadata features, wherein the metadata features include at least query indicators, time range, field range, and enterprise attributes; construct a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; obtain the search trajectory data of each tagged user for the underlying database, wherein the search trajectory data includes a mapping relationship between a historical search input sequence and a final query result; construct a search trajectory knowledge base based on the search trajectory data; extract derivative data corresponding to each field attribute from an external authoritative data source, wherein the derivative data includes synonyms and hyponyms of the field attribute; and construct a semantic expansion knowledge base based on each field attribute and the corresponding derivative data.
[0107] In one possible example, in terms of constructing the mapping relationship between the metadata features and the data table fields to obtain the condition matching knowledge base, the knowledge system construction unit 601 is specifically used to: construct the mapping relationship between the query indicators and the indicator fields; construct the mapping relationship between the time range and the time span corresponding to the data table where the indicator field is located; construct the mapping relationship between the field range and the industry or sector corresponding to the data table where the indicator field is located; and construct the mapping relationship between the enterprise attributes and the enterprise labels corresponding to the data table where the indicator field is located.
[0108] In one possible example, in terms of constructing a retrieval trajectory knowledge base based on the retrieval trajectory data, the knowledge system construction unit 601 is specifically used to: construct the retrieval trajectory knowledge base based on the retrieval trajectory data, including: extracting multiple reference query conditions from the historical retrieval input sequence; extracting multiple final query conditions from the final query results; associating the multiple reference query conditions with the multiple final query conditions based on the metadata features to determine multiple groups of retrieval semantic mapping relationships; for each search term, calculating the proportion of each retrieval semantic mapping relationship corresponding to the search term; extracting the retrieval semantic mapping relationships whose proportion is greater than a preset threshold to form a retrieval trajectory knowledge base.
[0109] In one possible example, in terms of constructing a semantically expanded knowledge base based on each field attribute and the corresponding derived data, the knowledge system construction unit 601 is specifically used to: construct a term relationship network for the field attribute based on the derived data corresponding to each field attribute, the term relationship network including term nodes, synonymous term relationship edges, and hyponymous term relationship edges; add contextual weights to each relationship edge in the term relationship network to obtain a semantically expanded knowledge base.
[0110] In one possible example, in extracting multiple query conditions from the user question content according to the condition matching knowledge base, the condition extraction unit 602 is specifically used to: perform natural language processing on the user question content to split the user question content into multiple keywords; and map the multiple keywords to the metadata features according to semantics to obtain multiple query conditions.
[0111] In one possible example, in terms of 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 when missing query conditions are detected, the condition supplementing unit 603 is specifically used to: when detecting that an invalid query condition containing a target metadata feature exists among the multiple query conditions, determine that there is a missing query condition, where the target metadata feature refers to a metadata feature that has no 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 trajectory 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, supplement the invalid query condition according to the retrieval trajectory knowledge base to obtain an updated query condition set; and when receiving a confirmation instruction for the updated query condition set, determine that the updated query condition set is the target query condition set.
[0112] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.
[0113] In the case of integrated units, such as Figure 7 As shown, Figure 7 This is a structural block diagram of another conversation data processing device based on a knowledge system provided in an embodiment of the present application. Figure 7 In the embodiment, the conversation 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 conversation data processing device based on the knowledge system, for example, executing the steps of the knowledge system construction unit 601, the condition extraction unit 602, the condition supplementation unit 603 and the query unit 604, and / or other processes for executing the technology described herein. The communication module 61 is used to support the interaction between the conversation data processing device based on the knowledge system and other devices. Figure 7 As shown, the conversation data processing device based on the knowledge system may further include a storage module 63, and the storage module 63 is used to store program codes and data of the conversation data processing device based on the knowledge system.
[0114] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above-mentioned conversation data processing device 60 based on the knowledge system can execute the above-mentioned Figure 2 The conversation data processing method based on the knowledge system is shown.
[0115] Based on the description of the above method embodiment and device embodiment, please refer to Figure 8 , Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application. Figure 8 The server shown includes a memory 801 , a processor 802 , a communication interface 803 and a bus 804 . The memory 801 , the processor 802 and the communication interface 803 are connected to each other via the bus 804 .
[0116] The memory 801 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0117] The memory 801 can store programs. 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 perform the various steps of the knowledge system-based conversation data processing method of the embodiment of the present application.
[0118] The processor 802 can adopt 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 to execute relevant programs to implement the functions required to be performed by the units in the server of the embodiment of the present application, or to execute the knowledge system-based dialogue data processing method of the method embodiment of the present application.
[0119] Processor 802 can also be an integrated circuit chip with signal processing capabilities. During implementation, the various steps of the knowledge-based conversation data processing method of this application can be completed by hardware integrated logic circuits or software instructions within processor 802. The aforementioned 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, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software modules can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other such storage media. The 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 performed by the units included in the server of the embodiment of the present application, or executes the knowledge system-based dialogue data processing method of the method embodiment of the present application.
[0120] The communication interface 803 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the server and other devices or a communication network. For example, data can be obtained through the communication interface 803.
[0121] The bus 804 may include a path for transmitting information between various components of the server (eg, the memory 801 , the processor 802 , and the communication interface 803 ).
[0122] It should be noted that although Figure 8 The server shown only shows the memory 801, processor 802, and communication interface 803. However, in the specific implementation process, those skilled in the art will 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 will understand that the server may also include hardware devices that implement other additional functions. In addition, those skilled in the art will understand that the server may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 8 All devices shown in .
[0123] An embodiment of the present application also provides a computer storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, part or all of the steps of any method described in the above method embodiments are implemented.
[0124] In the several embodiments provided in this 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 schematic; for example, the division of the units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection of some interfaces, devices or units, which may be electrical, mechanical or other forms.
[0125] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0126] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be read-only memory, random access memory, magnetic media such as floppy disks, hard disks, magnetic tape, magnetic disks, optical media such as digital versatile disks, or semiconductor media such as solid-state drives.
[0127] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
[0128] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separate. Furthermore, some or all of the units and modules may be selected based on actual needs to achieve the objectives of the present embodiment. Those skilled in the art can understand and implement the present invention without inventive effort.
[0129] Although the present application discloses the above, the present application is not limited thereto. Any person skilled in the art may readily conceive of variations or substitutions, and may make various changes and modifications, including combinations of the above-mentioned functions and implementation steps, including software and hardware implementations, without departing from the spirit and scope of the present application, and all are within the scope of protection of the present application.
Claims
1. A conversation data processing method based on a knowledge system, characterized in that: include: Construct a proprietary knowledge system for the target domain, the proprietary 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 characterize the structured features of the data stored in the underlying database, the retrieval trajectory knowledge base is used to characterize the regular patterns of the historical retrieval behaviors of the tagged users for the underlying database, and the semantic expansion knowledge base is used to characterize the association relationship between domain terms; wherein, the retrieval trajectory knowledge base is constructed by the following steps: obtaining the retrieval trajectory data of each tagged user for the underlying database, the retrieval trajectory data includes the mapping relationship between the historical retrieval input sequence and the final determined query result; extracting multiple reference query conditions from the historical retrieval input sequence; extracting multiple reference query conditions from the final determined query result. final query conditions; associating the multiple reference query conditions and the multiple final query conditions based on metadata features to determine multiple groups of retrieval semantic mapping relationships; for each search term, calculating the quantity ratio of each retrieval semantic mapping relationship corresponding to the search term; extracting the retrieval semantic mapping relationships whose quantity ratio is greater than a preset threshold to form a retrieval trajectory knowledge base; wherein, the target field is the financial and economic field, the metadata features include at least query indicators, time range, field range, and enterprise attributes, the tagged users include experts and scholars in the target field, and the final determined query result refers to the data content that the tagged user determines to consult and perform related data operations under the historical search input sequence, and the related data operations include data download operations or browsing operations with a browsing time greater than a preset time; Extracting multiple query conditions from the user's question content according to the condition matching knowledge base; When a missing query condition is detected, the multiple query conditions are supplemented according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set; wherein, the supplementing the multiple query conditions according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set includes: when an invalid query condition containing a target metadata feature is detected among the multiple query conditions, determining that there is a missing query condition, the target metadata feature being a metadata feature with no mapping object or a mapping object not in the underlying database; if the target metadata feature is the query indicator, supplementing the invalid query condition according to the semantic expansion knowledge base; if the target metadata feature is not the query indicator, supplementing the invalid query condition according to the search trajectory knowledge base; A data query operation is performed on the underlying database based on the target query condition set, and a query result is output.
2. The method according to claim 1, characterized in that The construction of a proprietary knowledge system for the target field includes: Parsing the field definitions of all data tables in the underlying database and extracting metadata features; Constructing a mapping relationship between the metadata features and field attributes to obtain a condition matching knowledge base; Extracting derived data corresponding to each field attribute from an external authoritative data source, wherein the derived data includes synonyms and hyponyms of the field attribute; A semantically extended knowledge base is constructed based on each field attribute and the corresponding derived data.
3. The method according to claim 2, characterized in that The step of constructing a mapping relationship between the metadata features and the data table fields to obtain a condition matching knowledge base includes: Constructing a mapping relationship between the query index and the index field; Constructing a mapping relationship between the time range and the time span corresponding to the data table where the indicator field is located; Constructing a mapping relationship between the domain scope and the industry or sector corresponding to the data table where the indicator field is located; A mapping relationship between the enterprise attributes and the enterprise labels corresponding to the data table where the indicator fields are located is constructed.
4. The method according to claim 2, characterized in that The semantically expanded knowledge base is constructed based on each field attribute and corresponding derived data, including: Constructing a term relationship network for each field attribute based on the derived data corresponding to the field attribute, wherein the term relationship network includes term nodes, synonym term relationship edges, and hyponym and hyponym term relationship edges; A context weight is added to each relationship edge of the term relationship network to obtain a semantically expanded knowledge base.
5. The method according to any one of claims 2 to 4, characterized in that: The step of 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 to split the user's question content into multiple keywords; The multiple keywords are mapped to the metadata features according to semantics to obtain multiple query conditions.
6. A conversation data processing device based on a knowledge system, characterized in that: include: The knowledge system construction unit is used to construct an own knowledge system for the target field, and the own 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 characterize the structured features of the data stored in the underlying database, the retrieval trajectory knowledge base is used to characterize the regular patterns of the historical retrieval behavior of the tagged user for the underlying database, and the semantic expansion knowledge base is used to characterize the association relationship between domain terms; wherein, the retrieval trajectory knowledge base is constructed by the following steps: obtaining the retrieval trajectory data of each tagged user for the underlying database, the retrieval trajectory data including the mapping relationship between the historical retrieval input sequence and the final determined query result; extracting multiple reference query conditions from the historical retrieval input sequence; extracting the reference query conditions from the final determined query result extracting multiple final query conditions; associating the multiple reference query conditions and the multiple final query conditions based on metadata features to determine multiple groups of retrieval semantic mapping relationships; for each search term, calculating the quantity ratio of each retrieval semantic mapping relationship corresponding to the search term; extracting the retrieval semantic mapping relationships whose quantity ratio is greater than a preset threshold to form a retrieval trajectory knowledge base; wherein, the target field is the financial and economic field, the metadata features at least include query indicators, time range, field range, and enterprise attributes, the tagged users include experts and scholars in the target field, and the final determined query result refers to the data content determined by the tagged user to consult and perform related data operations under the historical retrieval input sequence, and the related data operations include data download operations or browsing operations with a browsing time greater than a preset time; A condition extraction unit, configured to extract multiple query conditions from the user's question content according to the condition matching knowledge base; a condition supplementation unit, configured to supplement the plurality of query conditions according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set when a missing query condition is detected; wherein the supplementation of the plurality of query conditions according to the search trajectory knowledge base and / or the semantic expansion knowledge base to generate a target query condition set comprises: determining the presence of a missing query condition when an invalid query condition containing a target metadata feature is detected among the plurality of query conditions, wherein the target metadata feature refers to a metadata feature for which there is no mapping object or a mapping object is not in the underlying database; if the target metadata feature is the query indicator, supplementing the invalid query condition according to the semantic expansion knowledge base; if the target metadata feature is not the query indicator, supplementing the invalid query condition according to the search trajectory knowledge base; The query unit is used to perform a data query operation on the underlying database based on the target query condition set and output a query result.
7. A server, characterized in that: The method comprises a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 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