Human-computer interaction method and system, server, storage medium and program product
By building a customized vocabulary in the Q&A system and replacing the customized words in user queries as standard words, the problem of user habitual terms reducing recall is solved, and the quality of reply and knowledge recall is improved.
Patent Information
- Application Number
- CN202510458413.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The habitual terms in user questions reduce the recall of candidate knowledge in the Q&A system and affect the quality of reply.
The customized vocabulary is constructed through the client, including customized words corresponding to the standard words. In response to receiving the query information, the customized words are replaced with standard words, a rewrite query is generated, and searched in the knowledge base to obtain matching knowledge.
Improve the recall rate of knowledge and the quality of reply information, and adapt to the habitual use preferences of different users.
Smart Images

Figure CN119988569A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a human-computer interaction method, system, server, storage medium and program product. Background Art
[0002] In the field of human-computer interaction, when users ask questions, many of them use different words to refer to the same thing, such as "bedroom" to refer to the bedroom, and "mysql to refer to rds". There are many such habitual expressions, and the question-answering system needs to adapt to the word usage preferences of different users. The user's word usage preferences are more related to the user's own work scenario, accumulated usage habits, and even personal growth background. It is challenging to meet these users' word usage preferences for the question-answering system.
[0003] In current question-answering systems, habitual terms in user questions reduce the recall rate of enhanced retrieved candidate knowledge, thus affecting the quality of generated answers. Summary of the invention
[0004] The present application provides a human-computer interaction method, system, server, storage medium and program product to solve the problem that habitual terms in user questions will reduce the recall rate of enhanced retrieved candidate knowledge, thereby affecting the answer quality of the question-answering system.
[0005] In a first aspect, the present application provides a human-computer interaction method, comprising:
[0006] In response to receiving query information sent by a client, determining a custom word library corresponding to the client, the custom word library containing at least one custom word corresponding to a standard word;
[0007] Based on the customized word library corresponding to the client, the customized words in the query information are replaced with corresponding standard words to obtain a rewritten query;
[0008] Searching in a knowledge base according to the rewritten query to obtain knowledge matching the rewritten query;
[0009] Reply information is generated based on the knowledge that matches the rewritten query.
[0010] In a second aspect, the present application provides a human-computer interaction system, including: a client and a server,
[0011] The server stores a customized word library corresponding to the client, wherein the customized word library includes at least one customized word corresponding to a standard word;
[0012] The client is used to receive input query information and send the query information to the server;
[0013] The server is used to: receive the query information sent by the client; based on the customized word library corresponding to the client, replace the customized words in the query information with corresponding standard words to obtain a rewritten query; search in the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query; generate reply information according to the knowledge matching the rewritten query; and return the reply information to the client;
[0014] The client is further configured to output the reply information.
[0015] In a third aspect, the present application provides a server, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the server executes the method provided in the first aspect above.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method provided in the first aspect is implemented.
[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method provided in the first aspect.
[0018] The human-computer interaction method, system, server, storage medium and program product provided by the present application support users to build a corresponding customized word library through the client according to their own habitual usage preferences, and the customized word library contains customized words corresponding to at least one standard word. In the question-answering process, in response to receiving the query information sent by the client, based on the customized word library corresponding to the client, the customized words in the query information are replaced with corresponding standard words to obtain a rewritten query; according to the rewritten query, the knowledge base is searched to obtain the knowledge matching the rewritten query, and the knowledge required for generating the answer can be accurately recalled for the customized words used or preferred by different users, thereby improving the knowledge recall rate; further, the answer information is generated according to the knowledge matching the rewritten query, which can improve the quality of the generated answer information, thereby improving the question-answering quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] Figure 1 A schematic diagram of the system architecture of the human-computer interaction system provided for this application;
[0021] Figure 2 A flow chart of a human-computer interaction method provided for an exemplary embodiment of the present application;
[0022] Figure 3 A flowchart of building a customized vocabulary library provided for an exemplary embodiment of the present application;
[0023] Figure 4 A schematic diagram of a custom word configuration interface provided by an exemplary embodiment of the present application;
[0024] Figure 5 A flowchart of retrieving knowledge matching with a rewritten query provided for an exemplary embodiment of the present application;
[0025] Figure 6 A flowchart of a custom word configuration provided by an exemplary embodiment of the present application;
[0026] Figure 7 An interactive flow chart of a human-computer interaction system provided for an exemplary embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0030] It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] First, the terms involved in this application are explained:
[0032] Question answering system: It is a form of dialogue system based on information retrieval / enhanced retrieval, which can answer questions raised by users in natural language in an accurate and concise natural language.
[0033] Synonyms: Synonyms are words that can be used interchangeably to express similar or close meanings.
[0034] Recall rate: also known as recall rate, is an important indicator for evaluating the performance of a model or system. It is usually used to measure the proportion of samples that are correctly identified as positive in the actual positive class. Recall rate = true positive examples / (true positive examples + false negative examples). Taking question answering as an example, we compare the candidate solutions (i.e. candidate knowledge) actually recalled by the question answering system with the candidate solutions that should be recalled by manual annotation. If the question answering system correctly retrieves 7 candidate solutions (i.e. true positive examples) but fails to identify 3 candidate solutions (i.e. false negative examples), then the recall rate of the question answering system is 7 / (7+3)=0.7, which is 70%. This means that in this question sample, the question answering system correctly recalled 70% of the samples.
[0035] A large model refers to a deep learning model with large-scale model parameters, usually containing hundreds of millions, tens of billions, or even hundreds of billions of model parameters. A large model can also be called a foundation model / foundation model (FM). It is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as large-scale language models (LLMs) and multi-modal pre-training models.
[0036] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0037] In order to address the problem that habitual terms in user questions in a question-and-answer system reduce the recall rate of enhanced retrieved candidate knowledge, thereby affecting the quality of generated answers, the present application provides a human-computer interaction method that supports users to build a corresponding customized vocabulary through a client based on their own habitual usage preferences. The customized vocabulary contains at least one customized word corresponding to a standard word.
[0038] Among them, standard words are standardized words in the question-and-answer system, and users can configure customized words corresponding to standard words according to their own habitual expressions. In the question-and-answer process, the customized words configured by users can be used to refer to the corresponding standard words. The customized words corresponding to standard words can be synonyms, antonyms, abbreviations, abbreviations, words with the same meaning in different languages / languages, or aliases customized by users according to their own habitual expressions, aliases commonly used in specific scenarios, etc., which are not specifically limited here.
[0039] For example, in a sample scenario, suppose the person in charge of a product (product name is B) is named A, and users are accustomed to calling the product "A's product". When asking questions about the product, they may use "A's product" to refer to product B. For example, users may ask "When will A's product be launched?"
[0040] During the question-and-answer process, in response to receiving the query information sent by the client, the customized words in the query information are replaced with corresponding standard words based on the customized vocabulary library corresponding to the client to obtain a rewritten query; a search is performed in the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query, and the knowledge required to generate a reply can be accurately recalled based on the customized words that different users are accustomed to using or prefer, thereby improving the knowledge recall rate; further, reply information is generated based on the knowledge that matches the rewritten query, which can improve the quality of the generated reply information, thereby improving the quality of question-and-answering.
[0041] Figure 1 This is a schematic diagram of the system architecture of the human-computer interaction system provided in this application. Figure 1 As shown, the system architecture includes a server and a client device. There is a communication link between the server and the client device, which can realize the communication connection between the server and the client device.
[0042] The server is a device with computing capabilities deployed in the cloud or locally, such as a cloud cluster, etc. The server is a server device in the question-answering system, responsible for generating corresponding answer information based on the query information input by the user.
[0043] The client device can be an electronic device running the client of the question-and-answer system, and specifically can be a hardware device with network communication function, computing function and information display function, including but not limited to smart phones, tablet computers, desktop computers, local servers, cloud servers, etc. Users can interact with the server through the client device they use to realize human-computer intelligent dialogue / question-and-answer.
[0044] In this embodiment, the user can customize and configure his own custom word library on the server through the client. The user configures at least one custom word corresponding to a standard word in the custom word library. When conducting a question and answer session, the user inputs or submits query information through the client, and the client sends the query information input by the user to the server. The server receives the query information sent by the client, determines the custom word library corresponding to the client, and based on the custom word library corresponding to the client, replaces the custom word in the query information with the corresponding standard word to obtain a rewritten query; searches the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query; and generates reply information based on the knowledge matching the rewritten query.
[0045] Furthermore, the server returns reply information to the client, and the client outputs the reply information to the user.
[0046] The human-computer interaction method provided in this application can be applied to question-answering systems in various fields to improve the recall rate of the question-answering system for the knowledge required to generate answers, thereby improving the answer quality of the question-answering system.
[0047] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0048] Figure 2 This is a flow chart of a human-computer interaction method provided by an exemplary embodiment of the present application. The execution subject of this embodiment is the server in the aforementioned system architecture. Figure 2 As shown, the specific steps of this method are as follows:
[0049] Step S201: In response to receiving query information sent by a client, determining a custom word library corresponding to the client, wherein the custom word library contains at least one custom word corresponding to a standard word.
[0050] In this embodiment, the user can customize the corresponding custom word library by using the client device, and the custom word library contains at least one custom word corresponding to a standard word.
[0051] Among them, standard words are standardized words in the question-answering system. Exemplarily, standard words can be standardized words set by domain experts in the question-answering system. For example, the knowledge stored in the knowledge base of the question-answering system has one or more classification labels, which can be designed and formulated by experts in the relevant technical field, and standard words can be entity words contained in the classification labels of the knowledge. In addition, standard words can also be standardized terms contained in the knowledge in the knowledge base, such as technical terms, product names, etc., which are not specifically limited here.
[0052] For example, in the question-and-answer scenario of technical operation and maintenance, the knowledge base can store various types of operation and maintenance knowledge. In order to accurately recall relevant knowledge during the question-and-answer process, two-level labels can be added to the knowledge base for operation and maintenance knowledge. The first-level labels can include: involved products, fault scenarios, phenomenon descriptions, processing solutions, troubleshooting solutions, etc. The first-level labels can contain one or more second-level labels. For example, a second-level label is set under the first-level label "Product", and the content of the second-level label is a specific product name, such as "IPv6 Gateway", "Artificial Intelligence Platform", etc.
[0053] In this embodiment, the user can configure the customized word corresponding to the standard word according to his habitual language. The customized word configured by the user can be used to refer to the corresponding standard word. The customized word corresponding to the standard word can be a synonym, an antonym, an abbreviation, an abbreviation, a word with the same meaning in a different language / language, or an alias customized by the user according to his own habitual language, an alias commonly used in a specific scenario, etc., which is not specifically limited here.
[0054] During the question-answering process, the user inputs query information through the client used, and the client sends the query information input by the user to the server. In response to receiving the query information sent by the client, the server can determine the customized word library corresponding to the client.
[0055] Exemplarily, the client sends the query information to the server and at the same time sends the client identifier to the server. The server can search the existing customized word library corresponding to the client identifier according to the client identifier to determine the customized word library corresponding to the client.
[0056] Optionally, the server can maintain a mapping relationship table between client identifiers and customized word library identifiers, and the mapping relationship table stores the corresponding relationship between client identifiers and customized word library identifiers. According to the client identifier of the current client, the corresponding customized word library identifier can be determined by searching the mapping relationship table, and the customized word library corresponding to the customized word library identifier is used as the customized word library corresponding to the current client.
[0057] Optionally, the custom word library may store the corresponding client identifier. The server may search the existing custom word library for a custom word library whose stored client identifier is consistent with the client identifier of the current client according to the client identifier sent by the current client, as the custom word library corresponding to the current client.
[0058] In addition, the server may also store the correspondence between the client and the custom word library in other ways, and determine the custom word library corresponding to the client based on the client identifier of the current client. The specific implementation method is not specifically limited here.
[0059] Step S202: based on the customized word library corresponding to the client, replace the customized words in the query information with corresponding standard words to obtain a rewritten query.
[0060] After determining the customized word library corresponding to the client, the server replaces the customized words in the query information with corresponding standard words based on the customized word library corresponding to the client to obtain a rewritten query.
[0061] Optionally, the server may perform named entity recognition (NER) on the query information to obtain entities contained in the query information. Entities belonging to custom words in the query information are replaced with corresponding standard words to replace the custom words in the query information with corresponding standard words to obtain a rewritten query.
[0062] Optionally, the server may perform word segmentation on the query information to obtain a tag (i.e., token) sequence contained in the query information, and replace the tags (i.e., tokens) belonging to the customized words in the query information with corresponding standard words to achieve replacing the customized words in the query information with corresponding standard words to obtain a rewritten query.
[0063] In addition, in this step, other methods may be used to replace the customized words in the query information with corresponding standard words to obtain a rewritten query, which is not specifically limited here.
[0064] Step S203: Search the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query.
[0065] After replacing the custom words in the query information with the corresponding standard words to obtain a rewritten query, the server searches the knowledge base according to the rewritten query and uses the retrieved knowledge that matches the rewritten query as the source knowledge for generating the reply information.
[0066] For example, the server can calculate the similarity between the rewritten query and the knowledge in the knowledge base, and use the knowledge with a similarity greater than a preset recall similarity as the knowledge matching the rewritten query. The recall similarity can be set and adjusted according to the needs of the actual application scenario. For example, the recall similarity can be set to 0.6, 0.7, etc., which is not specifically limited here.
[0067] Step S204: Generate response information based on the knowledge matching the rewritten query.
[0068] In this step, the question-answering model is used to generate reply information based on the knowledge that matches the rewritten query. The question-answering model can be any question-answering model used by the question-answering system, and can be various pre-trained large models, such as the large language model LLM, etc., which are not specifically limited here.
[0069] Optionally, the server can use the knowledge matching the rewritten query as reference knowledge for generating reply information, input it into a question-answering model together with the query information, and generate reply information for the query information based on the knowledge matching the rewritten query through the question-answering model.
[0070] In an optional implementation, the server may use the knowledge that matches the rewritten query as reference knowledge for generating reply information, and based on the matching degree between the reference knowledge and the rewritten query, screen out the first reference knowledge whose matching degree with the rewritten query is greater than or equal to the matching degree threshold, and use the first reference knowledge as reply information. The matching degree threshold is greater than the recall similarity, for example, the recall similarity can be set to 0.6, and the matching degree threshold can be set to 0.9. The matching degree threshold and the recall similarity can be set and adjusted according to the needs of the actual application scenario, and are not specifically limited here.
[0071] According to the matching degree between the reference knowledge and the rewritten query, if the matching degree between the reference knowledge and the rewritten query is less than the matching degree threshold, the reference knowledge and the query information are input into the question-answering model together, and the question-answering model generates reply information of the query information according to the first reference knowledge.
[0072] When the matching degree between the knowledge in the knowledge base and the rewritten query is less than the set recall similarity, no knowledge matching the rewritten query is retrieved, and the server inputs the query information into the question-answering model and directly generates the reply information through the question-answering model.
[0073] In this embodiment, users can build a corresponding customized word library through the client according to their own habitual usage preferences, and the customized word library contains at least one customized word corresponding to a standard word. In the question-answering process, in response to receiving the query information sent by the client, based on the customized word library corresponding to the client, the customized word in the query information is replaced with the corresponding standard word to obtain a rewritten query; according to the rewritten query, the knowledge base is searched to obtain the knowledge matching the rewritten query, and the knowledge required for generating the answer can be accurately recalled for the customized words that different users habitually use or prefer to use, thereby improving the knowledge recall rate; further, the answer information is generated according to the knowledge matching the rewritten query, which can improve the quality of the generated answer information, thereby improving the question-answering quality.
[0074] Figure 3 A flowchart of building a custom word library is provided for an exemplary embodiment of the present application. Figure 3 As shown, the process for users to customize the corresponding custom word library through the client is as follows:
[0075] Step S301: Obtain a customized word corresponding to at least one standard word input through a client.
[0076] Among them, standard words are standardized words in the question-answering system. Exemplarily, standard words can be standardized words set by domain experts in the question-answering system. For example, the knowledge stored in the knowledge base of the question-answering system has one or more classification labels, which can be designed and formulated by experts in the relevant technical field, and standard words can be entity words contained in the classification labels of the knowledge. In addition, standard words can also be standardized terms contained in the knowledge in the knowledge base, such as technical terms, product names, etc., which are not specifically limited here.
[0077] For example, in the question-and-answer scenario of technical operation and maintenance, the knowledge base can store various types of operation and maintenance knowledge. In order to accurately recall relevant knowledge during the question-and-answer process, two-level labels can be added to the knowledge base for operation and maintenance knowledge. The first-level labels can include: involved products, fault scenarios, phenomenon descriptions, processing solutions, troubleshooting solutions, etc. The first-level labels can contain one or more second-level labels. For example, a second-level label is set under the first-level label "Product", and the content of the second-level label is a specific product name, such as "IPv6 Gateway", "Artificial Intelligence Platform", etc.
[0078] In this embodiment, the user can configure a custom word corresponding to any standard word according to his or her habitual language. The custom word configured by the user can be used to refer to the corresponding standard word. The custom word corresponding to the standard word can be a synonym, an antonym, an abbreviation, an abbreviation, a word with the same meaning in a different language / language, or an alias customized by the user according to his or her own habitual language, an alias commonly used in a specific scenario, etc., which is not specifically limited here.
[0079] Exemplarily, the question-answering system provides a custom word configuration control on the human-computer interaction interface provided to the user, and the user can use the custom word configuration control to trigger the client to send a custom word configuration request to the server.
[0080] In response to receiving a custom word configuration request from a client, the server outputs a custom word configuration interface to the client. The custom word configuration interface is used to customize the custom words corresponding to the standard words. The user can configure the custom words corresponding to any standard words in the custom word configuration interface through the client to build his own custom word library. The server receives at least one custom word corresponding to the standard word input in the custom word configuration interface by the client.
[0081] Exemplarily, the custom word configuration interface may provide an input area for standard words and custom words, in which the user may enter / select a standard word and enter at least one custom word corresponding to the standard word. Among them, which standard words allow the user to define corresponding custom words may be pre-configured in the question-answering system. The server outputs the standard words that allow the corresponding custom words to be configured in the custom word configuration interface, and the user may search to find / locate the standard words that need to be configured with custom words, and enter one or more custom words in the custom word input area corresponding to the standard words.
[0082] For example, the secondary label under the primary label "product" (i.e. the specific product name) can be used as a standard word. Figure 4 As shown in the figure, the custom word configuration interface can display the second-level labels under the first-level label "Product", such as "IPv6 Gateway", "Artificial Intelligence Platform", etc. Among them, each second-level label is a standard word, and each standard word can be set to correspond to a custom word. A standard word can correspond to 0, one, or more custom words. The first-level label to which the standard word belongs is the type of the standard word. Users can edit, delete, and other operations on the custom words corresponding to each standard word (i.e., second-level label) in this interface. In addition, Figure 4 As shown, the custom word configuration interface may provide a standard word search area. By entering a standard word / a fragment of a standard word in the search box, the corresponding standard word may be quickly searched and located.
[0083] In addition, the client may also submit a customized word corresponding to at least one standard word to the server through other means. For example, a user may send a file storing at least one customized word corresponding to a standard word to the server through the client. The server receives the file submitted by the client and reads at least one customized word corresponding to the standard word from the file. This embodiment does not specifically limit the implementation method by which the server obtains the customized word corresponding to at least one standard word submitted by the user through the client.
[0084] Step S302: Store the customized word corresponding to at least one standard word in the customized word library corresponding to the client.
[0085] After obtaining the customized word corresponding to the at least one standard word configured by the client, the server stores the customized word corresponding to the at least one standard word configured by the client in a customized word library corresponding to the client.
[0086] In the scheme of this embodiment, the user can customize at least one custom word corresponding to a standard word through the client, and build a custom word library corresponding to the client (user). When the user asks a question, the custom word (that is, the user's habitual words) in the user's query information can be rewritten as a standard word in the knowledge base, which can solve the problem of mismatch between the user's question preference and the data in the knowledge base, improve the recall rate of knowledge, and further improve the quality of generated reply information.
[0087] In an optional embodiment, the knowledge base of the question-answering system stores knowledge and original titles of the knowledge. In this embodiment, the server can add similar titles of knowledge to the knowledge base according to the customized word base corresponding to the client, and the amount of knowledge titles can be quickly expanded by replacing customized words, thereby improving the hit rate of user query information on knowledge in the knowledge base.
[0088] Furthermore, when searching the knowledge base according to the rewritten query to obtain knowledge that matches the rewritten query, the server can perform similarity matching between the rewritten query and the title of the knowledge in the knowledge base (including the original title of the knowledge and similar titles of the original title) to determine the knowledge that matches the rewritten query, which can further improve the recall rate of knowledge title matching in the knowledge base.
[0089] Optionally, the server adds similar titles of knowledge to the knowledge base according to the customized vocabulary corresponding to the client, which can be implemented in the following way:
[0090] According to the customized word library corresponding to the client, the customized words contained in the original title of the knowledge in the knowledge base are replaced with corresponding standard words to obtain similar titles of the knowledge; and the similar titles of the knowledge are added to the knowledge base.
[0091] For example, the server can perform named entity recognition (NER) on the original title of the knowledge to obtain entities contained in the original title, and replace entities belonging to customized words in the original title with corresponding standard words to replace customized words in the original title with corresponding standard words to obtain similar titles.
[0092] Optionally, when the server adds similar titles of knowledge to the knowledge base according to the customized word library corresponding to the client, it can also replace the customized words appearing in the original title of the knowledge with other customized words corresponding to the same standard words by other methods, which are not specifically limited here. Optionally, the server can also replace the standard words contained in the original title of the knowledge with corresponding customized words to obtain one or more similar titles. In this way, the amount of titles of knowledge in the knowledge base can be quickly expanded, thereby improving the hit rate of user query information on knowledge in the knowledge base.
[0093] Optionally, similar titles of knowledge can also be customized by the user. Specifically, in response to a request to add a similar title to any knowledge, the server can output a similar title adding interface to the client, output the knowledge and the original title of the knowledge on the similar title adding interface, and provide an input area for similar titles.
[0094] The user can enter similar titles of knowledge in the similar title input area provided in the similar title adding interface through the client. After the user completes the input, the client sends the user's input content in the input area (i.e., the similar title entered by the user) to the server. The server receives the input content in the input area and adds the input content as the similar title of knowledge to the knowledge base. In this way, the user can customize the similar titles of knowledge in the knowledge base, which can improve the hit rate of the user's query information on the knowledge in the knowledge base.
[0095] In an optional embodiment, the knowledge base of the question-answering system stores knowledge and classification labels of the knowledge. In this embodiment, the server can add synonymous labels of the knowledge to the knowledge base according to the customized word base corresponding to the client, and can quickly expand and enhance the classification labels in the knowledge base based on the customized word base, so that the classification labels of the knowledge base can better adapt to more application scenarios.
[0096] Specifically, the server can replace the customized words contained in the classification labels of the knowledge in the knowledge base with corresponding standard words according to the customized word base corresponding to the client, obtain the synonymous labels of the knowledge; and add the synonymous labels of the knowledge to the knowledge base.
[0097] Exemplarily, the server may perform named entity recognition (NER) on the classification tags in the knowledge base to obtain entities contained in the classification tags. Entities belonging to custom words in the classification tags are replaced with corresponding standard words to replace the custom words in the classification tags with corresponding standard words to obtain synonymous tags of the classification tags. Synonymous tags of the classification tags are added to the knowledge base.
[0098] For example, assuming there is a "downtime" label in the knowledge base of the question-answering system, the server can use the custom words (such as synonyms) "ramming machine" or "crash" corresponding to the classification label to increase the probability of the "downtime" label being retrieved and hit.
[0099] Furthermore, when searching the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query, the server can roughly screen the knowledge in the knowledge base according to the classification labels corresponding to the entities contained in the query information to obtain candidate knowledge whose classification labels match the entities contained in the query information; then perform similarity matching on the rewritten query and the candidate knowledge to obtain candidate knowledge matching the rewritten query. By first narrowing the search scope based on the classification labels and then performing similarity matching, not only the efficiency of knowledge retrieval can be improved, but also the accuracy and recall rate of knowledge recall can be improved.
[0100] For example, Figure 5 The flowchart of the knowledge matching of the search and rewriting query provided in this embodiment. Figure 5 As shown, according to the rewritten query, the knowledge base is searched to obtain the knowledge matching the rewritten query, which can be implemented in the following ways:
[0101] Step S501: Identify entity information included in the query information.
[0102] In this step, the server may use a named entity recognition (NER) algorithm / model to perform named entity recognition on the query information to obtain entity information contained in the query information.
[0103] The named entity recognition (NER) algorithm / model adopted by the server may be any NER algorithm / model, which is not specifically limited here.
[0104] Step S502: Replace the entities belonging to the customized words in the entity information with the corresponding standard words to obtain the standard entities included in the query information.
[0105] After obtaining the entity information contained in the query information, the entities belonging to the customized words in the entity information contained in the query information are replaced with the standard words corresponding to the customized words, so as to obtain the standard entities contained in the query information.
[0106] The standard entities included in the query information include entities belonging to standard words in the aforementioned entity information, and entities belonging to customized words in the aforementioned entity information replaced with standard words (ie, standard entities).
[0107] Step S503: According to the standard entities included in the query information, candidate knowledge is screened out from the knowledge base, and the classification labels of the candidate knowledge match the standard entities included in the query information.
[0108] After obtaining the standard entities contained in the query information, the standard entities contained in the query information are matched with the classification labels of the knowledge in the knowledge base, and the knowledge whose classification labels match the standard entities contained in the query information is screened out from the knowledge base as candidate knowledge.
[0109] Exemplarily, when the server matches the standard entity contained in the query information with the classification label of the knowledge in the knowledge base, it determines whether the classification label of the knowledge contains any standard entity contained in the query information. If the classification label of the knowledge contains at least one standard entity contained in the query information, it is determined that the classification label of the knowledge matches the standard entity contained in the query information, and the knowledge is used as candidate knowledge.
[0110] Step S504: perform similarity matching between the rewritten query and the title of the candidate knowledge, and determine the knowledge matching the rewritten query.
[0111] After candidate knowledge is obtained based on classification label screening, in this step, the similarity between the rewritten query and the title of the candidate knowledge in the screening result is calculated, and the candidate knowledge with a similarity greater than or equal to the recall similarity is regarded as the knowledge matching the rewritten query.
[0112] The recall similarity can be set and adjusted according to the needs of the actual application scenario. For example, the recall similarity can be set to 0.6, 0.7, etc., and is not specifically limited here.
[0113] It should be noted that in this embodiment, the similarity between the rewritten query and the title of any candidate knowledge can be calculated by any method for calculating the similarity between two texts, such as a method for calculating vector similarity, a method for calculating text similarity based on keywords, a method for predicting text similarity based on a machine learning model, etc., which is not specifically limited here. For example, the server can calculate the cosine similarity between the text vector of the rewritten query and the title vector of the candidate knowledge.
[0114] The solution of this embodiment, by identifying the entity information contained in the query information, replaces the entities belonging to the customized words in the entity information with the corresponding standard words, and obtains the standard entities contained in the query information; based on the standard entities contained in the query information, the candidate knowledge is screened out from the knowledge base, and the classification labels of the candidate knowledge match the standard entities contained in the query information, and the candidate knowledge related to the query information can be roughly screened out based on the classification labels; further, the rewritten query is matched with the title of the candidate knowledge for similarity, and the knowledge matching the rewritten query is determined. By quickly expanding and enhancing the classification labels in the knowledge base based on the customized vocabulary, the classification labels can be used for knowledge screening and filtering during retrieval, which can not only improve the efficiency of knowledge retrieval, but also improve the accuracy and recall rate of knowledge recall.
[0115] In an example scenario, there may be some less standardized knowledge in the knowledge base, such as knowledge containing non-professional terms. The server can also replace the customized words contained in the knowledge in the knowledge base with corresponding standard words according to the customized word library corresponding to the client, obtain new knowledge, and add the new knowledge and corresponding titles to the knowledge base. Among them, the title corresponding to the new knowledge can be the original title of the original knowledge before the customized words are replaced, or the title corresponding to the new knowledge can be a new title obtained by replacing the customized words contained in the original title of the original knowledge before the customized words are replaced with corresponding standard words. By replacing the customized words contained in the knowledge with corresponding standard words, the professionalism and accuracy of the knowledge can be improved, and then the quality of the response of the question and answer system can be improved.
[0116] For example, Figure 6 A flowchart of a custom word configuration process provided by an exemplary embodiment of the present application. Figure 6 As shown in the figure, the process of configuring custom words for the question-answering system is as follows:
[0117] S1. User configures a customized word: The user configures a customized word corresponding to at least one standard word through a client, and the client sends the customized word corresponding to the at least one standard word configured by the user to a server.
[0118] S2. Obtain user configuration: Receive a customized word corresponding to at least one standard word configured by the user through the client.
[0119] S3. Store in a custom word library: The server stores the custom word corresponding to at least one standard word configured by the user through the client in the corresponding custom word library.
[0120] S4. Add similar titles, synonymous tags, and new knowledge to the knowledge base based on the customized vocabulary.
[0121] The solution of this embodiment supports users to build a corresponding customized word library through the client, and the customized word library contains customized words corresponding to at least one standard word. Based on the customized word library corresponding to the client, the server can also add similar titles of knowledge in the knowledge base according to the customized word library corresponding to the client, and the title volume of knowledge can be quickly expanded by replacing customized words, thereby improving the hit rate of user query information on knowledge in the knowledge base. The server can also add synonymous tags of knowledge in the knowledge base based on the customized word library corresponding to the client, and can quickly expand and enhance the classification tags in the knowledge base based on the customized word library, so that the classification tags of the knowledge base can better adapt to more application scenarios. The server can also replace the customized words contained in the knowledge in the knowledge base with the corresponding standard words according to the customized word library corresponding to the client to obtain new knowledge, and add the new knowledge and the corresponding titles to the knowledge base, which can improve the professionalism and accuracy of the knowledge base, and then improve the answer quality of the question and answer system.
[0122] The present application also provides a human-computer interaction system, including a client and a server, wherein the server stores a customized word library corresponding to the client, and the customized word library contains at least one customized word corresponding to a standard word. Figure 7 This is an interactive flow chart of the human-computer interaction system provided in this embodiment. Figure 7 As shown, the human-computer interaction method flow is as follows:
[0123] Step S701: The client receives input query information and sends the query information to the server.
[0124] Step S702: The server receives query information sent by the client.
[0125] Step S703: The server replaces the customized words in the query information with corresponding standard words based on the customized word library corresponding to the client to obtain a rewritten query.
[0126] Step S704: The server searches the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query.
[0127] Step S705: The server generates reply information based on the knowledge matching the rewritten query.
[0128] Step S706: The server returns a response message to the client.
[0129] Step S707: The client outputs reply information.
[0130] In an optional embodiment, the client may receive the customized word corresponding to at least one standard word input, and send the customized word corresponding to the at least one standard word to the server. The server may receive the customized word corresponding to at least one standard word sent by the client, and store the customized word corresponding to the at least one standard word in the customized word library.
[0131] The implementation principle of this embodiment is specifically referred to the relevant contents of the aforementioned embodiments, which will not be repeated here.
[0132] In this embodiment, users are supported to build a corresponding custom word library through the client, and the custom word library contains at least one custom word corresponding to a standard word. In the question-answering process, in response to receiving the query information sent by the client, based on the custom word library corresponding to the client, the custom word in the query information is replaced with the corresponding standard word to obtain a rewritten query; according to the rewritten query, a search is performed in the knowledge base to obtain knowledge matching the rewritten query, and the knowledge required for generating a reply can be accurately recalled according to the habitual usage preferences of different users, thereby improving the recall rate of knowledge; further, the reply information is generated according to the knowledge matching the rewritten query, which can improve the quality of the generated reply information, thereby improving the quality of question-answering.
[0133] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application. Figure 8 As shown, the server includes: a memory 801 and a processor 802. The memory 801 is used to store computer-executable instructions and can be configured to store various other data to support operations on the server. The processor 802 is connected to the memory 801 in communication and is used to execute the computer-executable instructions stored in the memory 801 to implement the technical solution provided by any of the above method embodiments. The specific functions and technical effects that can be achieved are similar and will not be repeated here.
[0134] Optional, such as Figure 8 As shown, the server also includes: a firewall 803, a load balancer 804, a communication component 805, a power supply component 806 and other components. Figure 8 Only some components are shown schematically, which does not mean that the server only includes Figure 8 Components shown. Figure 8 In the description, the server is only taken as a cloud server deployed in the cloud as an example for exemplary description. The server can also be deployed locally, and this embodiment is not specifically limited here.
[0135] An embodiment of the present application also provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method of any of the aforementioned embodiments is implemented. The specific functions and technical effects that can be achieved are not repeated here.
[0136] The present application also provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor. The computer program is stored in a readable storage medium, and at least one processor of the server can read the computer program from the readable storage medium. At least one processor executes the computer program so that the server executes the technical solution provided by any of the above method embodiments. The specific functions and technical effects that can be achieved are not repeated here.
[0137] The embodiment of the present application provides a chip, including: a processing module and a communication interface, the processing module can execute the technical solution of the server in the aforementioned method embodiment. Optionally, the chip also includes a storage module (such as a memory), the storage module is used to store instructions, the processing module is used to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module enables the processing module to execute the technical solution provided by any of the aforementioned method embodiments.
[0138] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0139] It should be understood that the above processor can be a processing unit (Central Processing Unit, referred to as CPU), a graphics processing unit (graphics processing unit, referred to as GPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as DSP), application-specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in at least one processor.
[0140] The memory may include high-speed random access memory (RAM), and may also include non-volatile storage, such as at least one disk storage, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0141] The above storage may be an object storage service (OSS).
[0142] The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0143] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a mobile hotspot (WiFi), a second-generation mobile communication system (2G), a third-generation mobile communication system (3G), a fourth-generation mobile communication system (4G) / Long Term Evolution (LTE), a fifth-generation mobile communication system (5G) and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared technology, ultra-wide band (UWB) technology, Bluetooth technology and other technologies.
[0144] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.
[0145] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0146] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in a dedicated integrated circuit. Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0147] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0148] The order of the above-mentioned embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. In addition, in some of the processes described in the above-mentioned embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed or executed in parallel in the order in which they appear in this article, and are only used to distinguish between different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or less operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. The meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0150] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0151] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A human-computer interaction method, characterized in that: include: In response to receiving query information sent by a client, determining a custom word library corresponding to the client, the custom word library containing at least one custom word corresponding to a standard word; Based on the customized word library corresponding to the client, the customized words in the query information are replaced with corresponding standard words to obtain a rewritten query; Searching in a knowledge base according to the rewritten query to obtain knowledge matching the rewritten query; Reply information is generated based on the knowledge that matches the rewritten query.
2. The method according to claim 1, characterized in that Also includes: Acquire a custom word corresponding to at least one standard word input through the client; The customized word corresponding to the at least one standard word is stored in the customized word library corresponding to the client.
3. The method according to claim 2, characterized in that The obtaining of the customized word corresponding to the at least one standard word input by the client includes: In response to receiving a customized word configuration request from the client, outputting a customized word configuration interface to the client, the customized word configuration interface being used to customize the customized word corresponding to the standard word; A customized word corresponding to at least one standard word input in the customized word configuration interface through the client is received.
4. The method according to claim 1, characterized in that: The knowledge base stores knowledge and original titles of the knowledge, and the method further includes: According to the customized word library corresponding to the client, the customized words contained in the original title of the knowledge in the knowledge base are replaced with corresponding standard words to obtain similar titles of the knowledge; Similar titles of the knowledge are added to the knowledge base.
5. The method according to claim 1, characterized in that The knowledge base stores knowledge and original titles of the knowledge, and the method further includes: In response to a request to add a similar title to any knowledge, output a similar title adding interface to the client, output the knowledge and the original title of the knowledge on the similar title adding interface, and provide an input area for similar titles; The input content of the input area is obtained, and the input content is added to the knowledge base as a similar title of the knowledge.
6. The method according to claim 4 or 5, characterized in that: The step of searching a knowledge base according to the rewritten query to obtain knowledge matching the rewritten query includes: The rewritten query is matched with the title of knowledge in the knowledge base for similarity, and the knowledge matching the rewritten query is determined, wherein the title of the knowledge includes the original title of the knowledge and similar titles of the original title.
7. The method according to any one of claims 1 to 5, characterized in that The knowledge base stores knowledge and classification labels of the knowledge, and the method further includes: According to the customized word library corresponding to the client, the customized words contained in the classification labels of the knowledge in the knowledge base are replaced with corresponding standard words to obtain synonymous labels of the knowledge; Adding synonymous tags of the knowledge to the knowledge base.
8. The method according to claim 7, characterized in that The step of searching a knowledge base according to the rewritten query to obtain knowledge matching the rewritten query includes: Identifying entity information included in the query information; Replacing entities belonging to custom words in the entity information with corresponding standard words to obtain standard entities included in the query information; According to the standard entity included in the query information, candidate knowledge is screened out from the knowledge base, and the classification label of the candidate knowledge matches the standard entity included in the query information; The rewritten query is matched with the title of the candidate knowledge in terms of similarity to determine the knowledge matching the rewritten query.
9. The method according to any one of claims 1 to 5, characterized in that Also includes: According to the customized word library corresponding to the client, the customized words contained in the knowledge in the knowledge base are replaced with corresponding standard words to obtain new knowledge; The new knowledge and the corresponding title are added to the knowledge base.
10. A human-computer interaction system, characterized in that: include: Client and Server, The server stores a customized word library corresponding to the client, wherein the customized word library includes at least one customized word corresponding to a standard word; The client is used to receive input query information and send the query information to the server; The server is used to: receive query information sent by the client; Based on the customized word library corresponding to the client, the customized words in the query information are replaced with corresponding standard words to obtain a rewritten query; Searching the knowledge base according to the rewritten query to obtain knowledge matching the rewritten query; generating reply information according to the knowledge matching the rewritten query; and returning the reply information to the client; The client is further configured to output the reply information.
11. The human-computer interaction system according to claim 10, characterized in that: The client is also used to: receive a customized word corresponding to at least one standard word input, and send the customized word corresponding to the at least one standard word to the server; The server is also used to: receive a customized word corresponding to at least one standard word sent by the client, and store the customized word corresponding to the at least one standard word in the customized word library.
12. A server, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the server executes the method described in any one of claims 1-9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method and device for constructing question-answering system based on product use manual and computing equipment
CN110532265A
Information display method and device, equipment and storage medium
CN113111155A
Query search method, query information processing method, equipment and storage medium
CN117520477A
Retrieval processing method and related equipment
CN119537672A
Data processing method, device and computer program product
CN119807390A