A service query method and device, electronic equipment and storage medium
By combining text similarity algorithms and recurrent neural network models, the problem of low accuracy and efficiency in business queries in speech recognition technology is solved, achieving precise localization of user speech and efficient querying of business terms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing speech recognition technology suffers from low accuracy and efficiency in business inquiries, especially when users are unfamiliar with technical terms, making it difficult to quickly match business or function buttons, which affects user experience and business processing conversion rates.
This approach combines text similarity algorithms and recurrent neural network models. First, the text similarity algorithm is used to locate business terms for the first time. Then, the recurrent neural network model is used in the knowledge graph for the second time to accurately locate the business terms that the user wants to query by voice.
The accuracy and efficiency of business queries have been improved. By dynamically adjusting keyword weights and updating and iterating the recurrent neural network model, the accuracy of queries has been further enhanced.
Smart Images

Figure CN116631402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech recognition technology, and in particular to a business query method, apparatus, electronic device and storage medium. Background Technology
[0002] Speech recognition technology, also known as Automatic Speech Recognition (ASR), aims to convert the lexical content of human speech into computer-readable input, such as keystrokes, binary codes, or character sequences. With societal development, this technology has been widely applied across various industries, including driving, healthcare, smart homes, and financial services.
[0003] Taking financial services as an example, users utilize voice recognition to access basic services such as voice navigation, voice transactions, and business processing. As the types of services continue to expand, applications and web-based software designed for users will also include specialized terminology corresponding to various services. Currently, when conducting business inquiries based on voice recognition technology, the following two methods are primarily employed:
[0004] Firstly, the method involves recognizing the acquired user voice and converting it into corresponding text information. This text information is then segmented and keywords extracted. Based on the extracted keywords, the method matches the service or function button the user wants to query. However, this method relies on the user speaking relatively accurate technical terms. If the user is unfamiliar with the technical terms of various services, it is impossible to quickly and accurately match the service or function button the user wants to query, thereby increasing the user's operation time, affecting the user experience, and even impacting the conversion rate of service transactions.
[0005] Secondly, based on natural language understanding technology, the acquired user speech is understood and analyzed to predict the business or function button the user wants to query. Although this method does not rely on the user to speak relatively accurate technical terms, the algorithm is complex, the processing time is long, and the predicted query results may even contain errors, which reduces the user experience.
[0006] Therefore, improving the accuracy and efficiency of business queries is an urgent problem that needs to be solved. Summary of the Invention
[0007] This application provides a business query method to improve the accuracy and efficiency of business queries.
[0008] Firstly, a business query method is provided, including:
[0009] The system recognizes the acquired user speech to obtain its text content; based on the text content, it filters target triples that meet the requirements from a historical experience database; based on the business terms in the target triples, it obtains the nodes corresponding to the business terms in a knowledge graph; it inputs the keywords in the text content into the recurrent neural network model corresponding to the node to obtain a classification result; it provides the user with the query result based on the classification result; and the user selects from the provided query result to obtain the query result based on the user's speech.
[0010] Optionally, the step of filtering target triplet data that meet the requirements from the historical experience database based on the text content includes:
[0011] Keyword extraction is performed on the text content to obtain the extracted keywords; all triple data in the historical experience database are obtained, and the target triple data is selected from all triple data based on the extracted keywords.
[0012] Optionally, the step of filtering the target triplet data from all the triplet data based on the extracted keywords includes:
[0013] For each triplet in all the triplet data, the keywords are sorted from highest to lowest weight value to obtain the top 3 keywords by weight value. For each triplet, the top 3 keywords by weight value are compared with the extracted keywords to obtain the number of identical keywords. The number of identical keywords in each triplet is compared with the extracted keywords, and the numbers are sorted from highest to lowest to obtain the triplet data corresponding to the top 5 numbers. The similarity between the extracted keywords and the triplet data corresponding to the top 5 numbers is calculated to obtain 5 similarity values. The triplet data corresponding to the largest similarity value among the 5 similarity values is taken as the target triplet data.
[0014] Optionally, the step of providing the query results to the user based on the classification results includes:
[0015] When the classification result is "no type" or the node is a leaf node, the business terminology corresponding to the node is obtained, and the business button control corresponding to the business terminology in the system interface is used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface. When the classification result is the node's next-level node, the extracted keywords are input into the node's next-level node to obtain the classification result again. The classification is performed layer by layer according to the tree node hierarchy of the knowledge graph until the classification result is "no type" or the current node is a leaf node. The business button control corresponding to the business terminology of the current node in the system interface is then used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface.
[0016] Optionally, the user selects from the returned query results to obtain query results based on the user's voice, including:
[0017] When the user selects the first query result, the first query result is used as the query result of the user's voice. When the user selects a business button control corresponding to a business term in the second query result, the extracted keywords and the business term corresponding to the business button control selected by the user are used as positive samples and input into the new sample library of the recurrent neural network model of the node corresponding to the business term selected by the user. The extracted keywords and the business term corresponding to the business button control selected by the user are used as negative samples and input into the new sample library of the recurrent neural network model of the node corresponding to the first query result, so that the recurrent neural network model of each node can be periodically optimized according to the samples in each new sample library. After the optimization is completed, the samples in each new sample library are deleted.
[0018] Secondly, a business query device is provided, comprising:
[0019] The system includes a recognition module for recognizing acquired user speech and obtaining the text content of the user speech; a filtering module for filtering target triples that meet the requirements from a historical experience database based on the text content; a query module for obtaining the nodes corresponding to the business terms in the knowledge graph based on the business terms in the target triples; a classification module for inputting keywords from the text content into the recurrent neural network model corresponding to the node to obtain the classification result; a feedback module for providing the query result to the user based on the classification result; and a selection module for the user to select from the feedback query result to obtain the query result of the user speech.
[0020] Optionally, the filtering module is specifically used for:
[0021] Keyword extraction is performed on the text content to obtain the extracted keywords; all triple data in the historical experience database are obtained, and the target triple data is selected from all triple data based on the extracted keywords.
[0022] Optionally, the filtering module is specifically used for:
[0023] For each triplet in all the triplet data, the keywords are sorted from highest to lowest weight value to obtain the top 3 keywords by weight value. For each triplet, the top 3 keywords by weight value are compared with the extracted keywords to obtain the number of identical keywords. The number of identical keywords in each triplet is compared with the extracted keywords, and the numbers are sorted from highest to lowest to obtain the triplet data corresponding to the top 5 numbers. The similarity between the extracted keywords and the triplet data corresponding to the top 5 numbers is calculated to obtain 5 similarity values. The triplet data corresponding to the largest similarity value among the 5 similarity values is taken as the target triplet data.
[0024] Optionally, the feedback module is specifically used for:
[0025] When the classification result is "no type" or the node is a leaf node, the business terminology corresponding to the node is obtained, and the business button control corresponding to the business terminology in the system interface is used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface. When the classification result is the node's next-level node, the extracted keywords are input into the node's next-level node to obtain the classification result again. The classification is performed layer by layer according to the tree node hierarchy of the knowledge graph until the classification result is "no type" or the current node is a leaf node. The business button control corresponding to the business terminology of the current node in the system interface is then used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface.
[0026] Optionally, the selection module is specifically used for:
[0027] The selection module is specifically used for:
[0028] When the user selects the first query result, the first query result is used as the query result of the user's voice. When the user selects a business button control corresponding to a business term in the second query result, the extracted keywords and the business term corresponding to the business button control selected by the user are used as positive samples and input into the new sample library of the recurrent neural network model of the node corresponding to the business term selected by the user. The extracted keywords and the business term corresponding to the business button control selected by the user are used as negative samples and input into the new sample library of the recurrent neural network model of the node corresponding to the first query result, so that the recurrent neural network model of each node can be periodically optimized according to the samples in each new sample library. After the optimization is completed, the samples in each new sample library are deleted.
[0029] Thirdly, an electronic device is provided, comprising:
[0030] A memory for storing computer programs; a processor for executing the computer programs stored in the memory to implement the method steps described in any one of the first aspects.
[0031] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of the method described in any one of the first aspects.
[0032] Fifthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method steps described in any one of the first aspects.
[0033] In this embodiment, a method combining text similarity algorithms and recurrent neural network models is used to locate the business terms the user wants to query based on the text content of the user's speech. First, the text similarity algorithm is used to perform the first location of business terms in the text content of the user's speech, obtaining the first located business terms. Based on the first located business terms, a recurrent neural network model is used in the nodes of the knowledge graph to perform a second location of the text content of the user's speech, finally locating the business terms the user wants to query. Through the above two-stage location method, the business terms the user wants to query can be accurately located, while improving the efficiency of business query.
[0034] For the various aspects of the second to fifth aspects mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect, which will not be repeated here. Attached Figure Description
[0035] Figure 1 This is a schematic diagram illustrating the application scenarios applicable to the embodiments of this application;
[0036] Figure 2 A flowchart illustrating a business query method provided in this application embodiment;
[0037] Figure 3 A flowchart for filtering target triplet data is provided in an embodiment of this application;
[0038] Figure 4 This is a schematic diagram of the structure of a business query device provided in an embodiment of this application;
[0039] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A connected to B can represent: A and B directly connected, and A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for distinguishing the purpose of description and should not be construed as indicating or implying relative importance or order.
[0041] The acquisition (or information), storage, use, and processing of data in this application all comply with the requirements of relevant national laws and regulations.
[0042] To better understand the embodiments of this application, some terms used in the embodiments of this application will be explained below so that those skilled in the art can understand them.
[0043] (1) Recurrent Neural Network (RNN) is a type of recurrent neural network that takes sequential data as input, recursively moves along the direction of the sequence, and all nodes (recurrent units) are connected in a chain-like manner. It is widely used in Natural Language Processing (NLP), such as speech recognition, language modeling, and machine translation.
[0044] (2) A knowledge graph is a graph-based data structure consisting of nodes (points) and edges (edges). Each node represents an "entity" (in this application, it refers to business), and each edge represents the "relationship" between entities. Essentially, a knowledge graph is a semantic network.
[0045] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0046] Figure 1 This is a schematic diagram illustrating an application scenario applicable to the embodiments of this application. As shown in the figure, the application scenario mainly includes: terminal 10 and server 11. Terminal 10 and server 11 can interact via a communication network, which can employ communication methods including wireless communication and wired communication.
[0047] For example, terminal 10 can access the network and communicate with server 11 through cellular mobile communication technology, which may include 5th Generation Mobile Networks (5G) technology.
[0048] For example, terminal 10 can access the network and communicate with server 11 via short-range wireless communication, which may include Wireless Fidelity (Wi-Fi) technology.
[0049] This application embodiment does not impose any limitation on the number of the above-mentioned devices, such as Figure 1 As shown, only terminal 10 and server 11 are described as examples. The following is a brief introduction to each of the above devices and their respective functions.
[0050] Terminal 10 is a device that can provide users with voice and / or data connectivity, including: handheld terminal devices with wireless connectivity, vehicle-mounted terminal devices, etc.
[0051] For example, terminal 10 includes, but is not limited to: mobile phones, tablets, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.
[0052] Furthermore, a business query-related client can be installed on terminal 10. This client can be software (e.g., an app, a browser, etc.), or a webpage, a mini-program, etc. In this embodiment, terminal 10 can use the aforementioned business query-related client and can interact with server 11 to exchange information related to business queries.
[0053] Furthermore, server 11 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0054] Furthermore, in this embodiment of the application, the server 11 may be equipped with a business query platform or device corresponding to the client, for processing various business queries.
[0055] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed in the order shown in the embodiments or drawings, or in combination.
[0056] Figure 2 This is a flowchart illustrating a business query method provided in an embodiment of this application. This process can be executed by a business query device, which can be implemented in software, hardware, or a combination of both.
[0057] In this embodiment, a method combining text similarity algorithms and recurrent neural network models is used to locate the business terms the user wants to query based on the text content of the user's speech. Specifically, firstly, the text similarity algorithm is used to perform an initial business term location on the user's speech text content, obtaining the first located business terms. Then, based on the first located business terms, a recurrent neural network model is used within the knowledge graph nodes to perform a second location, ultimately locating the business terms the user wants to query. This two-stage location method accurately identifies the business terms the user wants to query, while also improving the efficiency of business querying. Figure 2 As shown, the process includes the following steps:
[0058] S201: Recognize the acquired user speech to obtain the text content of the user speech.
[0059] In this step, common speech recognition methods can be used to recognize the user's speech and obtain the text content. This application embodiment does not impose any limitations on this.
[0060] In some embodiments, after obtaining the text content, repeated words and words irrelevant to the business can be filtered out from the text content.
[0061] S202: Based on the above text content, select target triplet data that meet the requirements from the historical experience database.
[0062] Optionally, the target triplet data that meets the requirements can be selected from the historical experience database in the following ways: extract keywords from the text content to obtain the extracted keywords; obtain all triplet data from the historical experience database, and select the target triplet data from all triplet data based on the extracted keywords.
[0063] Optionally, each triplet in the historical experience database may include keywords from the historical text content, keyword weight values, and business terms. Keywords from the historical text content can be a set of keywords extracted from the historical text content corresponding to multiple users' historical voice recordings; keyword weight values are the weight values of the keywords extracted from the historical text content corresponding to multiple users' historical voice recordings; and business terms are the business terms that the user wants to query corresponding to the triplet data.
[0064] For example, a triplet data entry might be: {insurance, health, disease, elderly, senior citizens, retirement, security}; {5, 3, 3, 2, 2, 2, 1}; elderly health insurance. In this triplet, {insurance, health, disease, elderly, senior citizens, retirement, security} represents keywords from historical text content, extracted and summarized from historical text content corresponding to multiple users' historical voice recordings. {5, 3, 3, 2, 2, 2, 1} represents the weight values of each keyword within {insurance, health, disease, elderly, senior citizens, retirement, security}. For example, insurance has a weight of 5, elderly has a weight of 2, and elderly health insurance is a business term, specifically the business term corresponding to this triplet data entry.
[0065] Furthermore, based on the extracted keywords, target triplet data that meet the requirements are filtered from the historical experience database. Specifically, this can be done as follows: Figure 3 As shown:
[0066] S301: For each triplet in all triplet data, sort the keywords according to their weight values from high to low, and obtain all the top 3 keywords with the highest weight values.
[0067] For example, consider the following triplet data: {insurance, health, disease, elderly, senior citizens, retirement, security}; {5, 3, 3, 2, 2, 2, 1}; elderly health insurance. This triplet is sorted by weight value from highest to lowest. The top 3 keywords with the highest weight values are selected as the keywords corresponding to weight values 5, 3, and 2, which are insurance, health, disease, elderly, senior citizens, and retirement.
[0068] S302: For each triplet data, compare all the top 3 keywords by weight with the extracted keywords to obtain the number of identical keywords.
[0069] Assuming the extracted keywords are: insurance, health, and elderly, by comparing the triplet data of S301 above, it can be determined that there are 3 identical keywords.
[0070] S303: Compare the number of identical keywords in each triplet with the number of extracted keywords, sort the numbers from highest to lowest, and obtain the triplet data corresponding to the top 5 numbers.
[0071] For example, the number of candidate keywords in the triplet data A, B, C, D, E, F, G that have the same keywords as the extracted keywords are 10, 3, 6, 5, 1, 8, and 9 respectively. The number of the top 5 keywords, which is 10, 9, 8, 6, and 5, corresponds to the triplet data A, G, F, C, and D.
[0072] S304: Calculate the similarity between the extracted keywords and the triplet data corresponding to the top 5 keywords, and obtain 5 similarity values.
[0073] For example, the similarity scores of A, G, F, C, and D above are calculated with the extracted keywords to obtain five similarity scores.
[0074] S305: Take the triplet data corresponding to the largest similarity value among the 5 similarity values as the target triplet data.
[0075] Optionally, the similarity numerical calculation expression is as follows: Where R is the similarity score, and λ is the similarity score. i The weight value of the extracted keywords that are the same as the triple data obtained in S303; n is the number of extracted keywords that are the same as the triple data obtained in S303.
[0076] In some embodiments, when some of the extracted keywords exist in the target triplet data, the weight m of the keywords in the target triplet data that are the same as those in the extracted keywords is assigned, m = 0.01; when some of the extracted keywords do not exist in the target triplet data, these keywords can be added to the target triplet data, and the weight value of the added keywords is set to 1.
[0077] In other embodiments, when constructing the historical experience database, the weight value of the keyword in each triplet data is set to 1 during initialization. Further, prior to S201, when constructing the historical experience database, the weight value of the keyword in each triplet data is set to 1 during initialization.
[0078] S203: Based on the business terms in the target triplet data above, obtain the node corresponding to the business term in the knowledge graph.
[0079] Furthermore, each business term in the aforementioned historical experience database corresponds to a node in a knowledge graph.
[0080] Furthermore, the knowledge graph can be pre-constructed based on the hierarchical relationships between various business functions. It can exist in the form of a tree diagram, including root nodes, intermediate nodes, and leaf nodes. Each node corresponds to a business function, and each business function has its own unique business terminology. Taking the hierarchical relationship of business terms such as finance, insurance, funds, children's insurance, and senior citizen insurance as an example, the constructed knowledge graph would be as follows: "finance" is the root node, "insurance" and "funds" are intermediate nodes; "children's insurance" and "senior citizen insurance" are the next-level nodes of the intermediate node "insurance," that is, the leaf nodes.
[0081] Furthermore, each root node and intermediate node in this knowledge graph contains a recurrent neural network (RNN) model. Each RNN model is pre-built, and its input can be keywords from the text content. The output is a classification result, which represents whether the keyword input to the RNN model of a given node corresponds to the next-level node or has no type in the knowledge graph. For example, for an intermediate node with the business term "insurance," its next-level nodes are "children's insurance" and "elderly insurance." For the RNN model corresponding to this intermediate node, if the input keywords are "children, young age, toddlers, insurance, protection," the classification result is "children's insurance"; if the input keywords are "insurance, protection," the classification result is "no type."
[0082] Optionally, the recurrent neural network model for a node is constructed as follows: Keywords corresponding to the user's historical speech for that node and its next-level nodes, along with the ultimately located business terms, are used as samples to train the recurrent neural network model, thus obtaining a trained model. For example, for an intermediate node with the business term "insurance," its next-level nodes might be "children's insurance" or "elderly insurance." Positive samples would be {"children, young children, toddlers, insurance, protection": children's insurance}, {"insurance, protection": no type}, etc.; negative samples would be {protection, children, financial management: children's insurance}, etc. The recurrent neural network model is then trained based on these positive and negative samples.
[0083] S204: Input the keywords in the above text content into the recurrent neural network model corresponding to the node to obtain the classification result.
[0084] S205: Provide the user with the query results based on the above classification results.
[0085] Optionally, this step may specifically include the following procedures:
[0086] When the classification result is no type or the node is a leaf node, the business term corresponding to the node is obtained, and the business button control corresponding to the business term in the system interface is used as the first query result. The business button control corresponding to the business term of the node's parent node and all nodes in the next level in the system interface is used as the second query result. The first query result and the second query result are then fed back to the user in the system interface.
[0087] When the classification result is a sub-node of a node, the extracted keywords are input into the sub-node to obtain the classification result again. The classification is performed layer by layer according to the tree node hierarchy of the knowledge graph until the classification result is uncategorized or the current node is a leaf node. The business button control corresponding to the business term of the current node in the system interface is taken as the first query result, and the business button control corresponding to the business term of the parent node and all sub-nodes of the current node in the system interface is taken as the second query result. The first query result and the second query result are displayed to the user in the system interface.
[0088] In some embodiments, if the current node is a leaf node and has no next-level node, the business button control corresponding to the business term of its parent node in the system interface is used as the second query result.
[0089] S206: The user selects from the returned query results and obtains the query results via the user's voice.
[0090] Optionally, the user can select from the returned query results to obtain query results based on the user's voice, which may include:
[0091] When the user selects the first query result, it is used as the query result of the user's voice. When the user selects a business button control corresponding to a business term in the second query result, the extracted keywords and the business term corresponding to the business button control selected by the user are used as positive samples and input into the new sample library of the recurrent neural network model of the node corresponding to the business term selected by the user. The extracted keywords and the business term corresponding to the business button control selected by the user are used as negative samples and input into the new sample library of the recurrent neural network model of the node corresponding to the first query result. This allows the neural network model of each node to be periodically optimized based on the samples in each new sample library. After optimization, the samples in each new sample library are deleted.
[0092] The beneficial effects of the embodiments in this application are as follows:
[0093] 1. The first positioning of business terms is performed using a text similarity algorithm, which directly locates relatively accurate nodes in the knowledge graph, improving the overall efficiency of the business term query algorithm; and the second positioning of business terms is performed using a recurrent neural network model, which improves the accuracy of business term query.
[0094] 2. The use of keywords and keyword weights to achieve initial positioning of business terms improves the accuracy of business term queries;
[0095] 3. Dynamically adjusting keywords and keyword weights in the historical experience database can further improve the accuracy of business term queries; at the same time, positive and negative samples are generated based on user selections, and the recurrent neural network model is updated and iterated for training, which further improves the accuracy of business term queries.
[0096] Based on the same technical concept, this application also provides a business query device, which can implement the business query method flow described above in this application.
[0097] Figure 4 This is a schematic diagram of a business query device provided in an embodiment of this application. The device includes an identification module 401, a filtering module 402, a query module 403, a classification module 404, a feedback module 405, and a selection module 406.
[0098] The recognition module 401 is used to recognize the acquired user voice and obtain the text content of the user voice.
[0099] The filtering module 402 is used to filter target triplet data that meet the requirements from the historical experience database based on the text content.
[0100] The query module 403 is used to obtain the node corresponding to the business term in the knowledge graph based on the business term in the target triple data.
[0101] The classification module 404 is used to input the keywords in the text content into the recurrent neural network model corresponding to the node to obtain the classification result.
[0102] The feedback module 405 is used to provide the user with the query results based on the classification results.
[0103] The selection module 406 is used by the user to select from the feedback query results and obtain the query results from the user's voice.
[0104] Optional, the filtering module 402 is specifically used for:
[0105] Keyword extraction is performed on the text content to obtain the extracted keywords; all triple data in the historical experience database are obtained, and the target triple data is selected from all triple data based on the extracted keywords.
[0106] Optional, the filtering module 402 is specifically used for:
[0107] For each triplet in all the triplet data, the keywords are sorted from highest to lowest weight value to obtain the top 3 keywords by weight value. For each triplet, the top 3 keywords by weight value are compared with the extracted keywords to obtain the number of identical keywords. The number of identical keywords in each triplet is compared with the extracted keywords, and the numbers are sorted from highest to lowest to obtain the triplet data corresponding to the top 5 numbers. The similarity between the extracted keywords and the triplet data corresponding to the top 5 numbers is calculated to obtain 5 similarity values. The triplet data corresponding to the largest similarity value among the 5 similarity values is taken as the target triplet data.
[0108] Optionally, the feedback module 405 is specifically used for:
[0109] When the classification result is "no type" or the node is a leaf node, the business terminology corresponding to the node is obtained, and the business button control corresponding to the business terminology in the system interface is used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface. When the classification result is the node's next-level node, the extracted keywords are input into the node's next-level node to obtain the classification result again. The classification is performed layer by layer according to the tree node hierarchy of the knowledge graph until the classification result is "no type" or the current node is a leaf node. The business button control corresponding to the business terminology of the current node in the system interface is then used as the first query result. The business button controls corresponding to the business terms of the node's parent node and all its next-level nodes in the system interface are used as the second query result. The first query result and the second query result are then displayed to the user in the system interface.
[0110] Optionally, the selection module 406 is specifically used for:
[0111] When the user selects the first query result, the first query result is used as the query result of the user's voice. When the user selects a business button control corresponding to a business term in the second query result, the extracted keywords and the business term corresponding to the business button control selected by the user are used as positive samples and input into the new sample library of the recurrent neural network model of the node corresponding to the business term selected by the user. The extracted keywords and the business term corresponding to the business button control selected by the user are used as negative samples and input into the new sample library of the recurrent neural network model of the node corresponding to the first query result, so that the recurrent neural network model of each node can be periodically optimized according to the samples in each new sample library. After the optimization is completed, the samples in each new sample library are deleted.
[0112] It should be noted that the apparatus provided in this application embodiment can implement all the method steps in the above method embodiment and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0113] Based on the same technical concept, this application also provides an electronic device that can realize the function of the aforementioned business query device.
[0114] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0115] At least one processor 501 and a memory 502 connected to at least one processor 501. In this embodiment, the specific connection medium between the processor 501 and the memory 502 is not limited. Figure 5 The example shown is the connection between processor 501 and memory 502 via bus 500. Bus 500 is... Figure 5 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The Bus 500 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 5 The term 501 is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 501 can also be called a controller; there is no restriction on the name.
[0116] In this embodiment, memory 502 stores instructions executable by at least one processor 501. By executing the instructions stored in memory 502, at least one processor 501 can perform a data processing method as described above. Processor 501 can implement... Figure 4 The functions of each module in the device shown.
[0117] The processor 501 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 502 and calling data stored in memory 502, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0118] In one possible design, processor 501 may include one or more processing units. Processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0119] Processor 501 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of a business query method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0120] Memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 502 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 502 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0121] By designing and programming the processor 501, the code corresponding to a business query method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute it during runtime. Figure 2 The illustrated embodiment presents a business query method. How to design and program the processor 501 is a technique well-known to those skilled in the art and will not be described further here.
[0122] It should be noted that the electronic device provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0123] This application also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a business query method described in the above embodiments.
[0124] This application also provides a computer program product, which, when invoked by a computer, causes the computer to execute a business query method described in the above embodiments.
[0125] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0127] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0128] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
Claims
1. A service query method, characterized by, The method comprises the following steps: recognizing the obtained user voice to obtain text content of the user voice; screening target triple data meeting requirements from a historical experience database according to the text content; wherein each triple data in the historical experience database comprises keywords of historical text content, keyword weight values, and business vocabulary; obtaining a node corresponding to the business vocabulary in a knowledge graph according to the business vocabulary in the target triple data; inputting the keywords in the text content into a recurrent neural network model corresponding to the node to obtain a classification result; feeding back a query result to a user according to the classification result; selecting the fed-back query result by the user to obtain a query result of the user voice.
2. The method of claim 1, wherein, The step of screening the target triple data from the historical experience database according to the text content comprises the following steps: extracting keywords from the text content to obtain extracted keywords; obtaining all triple data in the historical experience database, and screening the target triple data from the all triple data according to the extracted keywords.
3. The method of claim 2, wherein, The step of screening the target triple data from the all triple data according to the extracted keywords comprises the following steps: sorting the keywords in each triple data in the all triple data according to weight values from high to low to obtain all keywords with top 3 weight values; comparing the all keywords with top 3 weight values with the extracted keywords for each triple data to obtain a number of same keywords; comparing the number of same keywords between each triple data and the extracted keywords, sorting the numbers from high to low to obtain triple data corresponding to top 5 numbers; performing similarity calculation on the extracted keywords and the triple data corresponding to the top 5 numbers respectively to obtain 5 similarity values; taking triple data corresponding to a maximum similarity value in the 5 similarity values as the target triple data.
4. The method of claim 2, wherein, The step of feeding back the query result to the user according to the classification result comprises the following steps: when the classification result is of no type or the node is a leaf node, obtaining a business vocabulary corresponding to the node, taking a business button control corresponding to the business vocabulary in a system interface as a first query result, taking business button controls corresponding to a parent node and all child nodes of the node in the system interface as a second query result, and feeding back the first query result and the second query result to the user in the system interface. When the classification result is a next level node of the node, the extracted keyword is input to the next level node of the node, and a classification result is obtained again, and classification is performed layer by layer according to the tree node level of the knowledge graph until the classification result is no type or the current node is a leaf node, the business vocabulary corresponding to the current node is taken as the first query result, the business button control corresponding to the business vocabulary of the upper and lower level nodes of the node in the system interface is taken as the second query result, and the first query result and the second query result are fed back to the user in the system interface.
5. The method of claim 4, wherein, The user selects the feedback query result to obtain the query result of the user voice, including: When the user selects the first query result, the first query result is taken as the query result of the user voice; When the user selects a business button control corresponding to a business vocabulary in the second query result, the extracted keyword and the business vocabulary corresponding to the selected business button control are taken as positive samples and input into the new sample library of the recurrent neural network model of the node corresponding to the selected business vocabulary, and the extracted keyword and the business vocabulary corresponding to the selected business button control are taken as negative samples and input into the new sample library of the recurrent neural network model of the node corresponding to the first query result, so that the recurrent neural network model of each node is periodically optimized according to the samples in each new sample library, and after optimization is completed, the samples in each new sample library are deleted.
6. A service query apparatus characterized by comprising: Including: The recognition module is configured to recognize the obtained user voice to obtain text content of the user voice; The screening module is configured to screen target triple data meeting requirements from a historical experience database according to the text content; wherein each triple data in the historical experience database includes a keyword of historical text content, a keyword weight value, and a business vocabulary; The query module is configured to obtain a node corresponding to the business vocabulary in a knowledge graph according to the business vocabulary in the target triple data; The classification module is configured to input the keyword in the text content into the recurrent neural network model corresponding to the node to obtain a classification result; The feedback module is configured to feed back a query result to a user according to the classification result; The selection module is configured to enable the user to select the feedback query result to obtain the query result of the user voice.
7. The apparatus of claim 6, wherein, The screening module is specifically configured to: extract a keyword from the text content to obtain an extracted keyword; obtain all triple data in the historical experience database, and screen the target triple data from all the triple data according to the extracted keyword.
8. The apparatus of claim 7, wherein, The screening module is specifically configured to: sort the keywords in each triple data in the all triple data according to weight values from high to low to obtain all keywords with top 3 weight values; For each of the triple data, compare all keywords with the top 3 weight values with the extracted keywords to obtain the number of same keywords; Compare the number of same keywords of each triple data and the extracted keywords, sort the number from high to low, and obtain the triple data corresponding to the top 5 numbers; Calculate the similarity of the extracted keywords and the triple data corresponding to the top 5 numbers respectively to obtain 5 similarity values; The triple data corresponding to the maximum similarity value in the 5 similarity values is taken as the target triple data.
9. The apparatus of claim 7, wherein, The feedback module is specifically configured to: When the classification result is no type or the node is a leaf node, obtain the business vocabulary corresponding to the node, take the business button control corresponding to the business vocabulary in the system interface as the first query result, take the business button control corresponding to the business vocabulary of the upper level node and all lower level nodes of the node in the system interface as the second query result, and feed back the first query result and the second query result to the user in the system interface; When the classification result is the next level node of the node, input the extracted keywords into the next level node of the node, obtain the classification result again, and classify layer by layer according to the tree node level of the knowledge graph until the classification result is no type or the current node is a leaf node, take the business button control corresponding to the business vocabulary of the current node in the system interface as the first query result, take the business button control corresponding to the business vocabulary of the upper level node and all lower level nodes of the node in the system interface as the second query result, and feed back the first query result and the second query result to the user in the system interface.
10. The apparatus of claim 9, wherein, The selection module is specifically configured to: When the user selects the first query result, take the first query result as the query result of the user's voice; When the user selects the business button control corresponding to one business vocabulary in the second query result, take the extracted keywords and the business vocabulary corresponding to the business button control selected by the user as positive samples, input them into the new sample library of the recurrent neural network model of the node corresponding to the business vocabulary selected by the user, and take the extracted keywords and the business vocabulary corresponding to the business button control selected by the user as negative samples, input them into the new sample library of the recurrent neural network model of the node corresponding to the first query result, so that the recurrent neural network model of each node is periodically optimized according to the samples in each new sample library, and after the optimization is completed, the samples in each new sample library are deleted.
11. An electronic device, comprising: It includes: Memory for storing computer programs; The processor is configured to execute the computer programs stored in the memory to implement the method steps of any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps of any one of claims 1-5.
13. A computer program product comprising a computer program, characterized in that, The computer program, which is executed by a processor, implements the method steps of any one of claims 1-5.
Citation Information
Patent Citations
Business question and answer knowledge query method and device, computer equipment and storage medium
CN112182174A
Confidence checking for speech processing and query answering
US10332508B1