User request optimization method, device and storage medium based on intelligent question-answering scenario
By identifying fuzzy points and clarifying interactions in the intelligent question-answering system, combined with large-scale model optimization, the problem of low precision in user request optimization in the existing technology is solved, and more accurate user request optimization and precise responses from the intelligent question-answering system are achieved.
Patent Information
- Application Number
- CN202510385164.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-03-28
AI Technical Summary
In the prior art, directly removing all stop words such as punctuation marks from user requests results in low optimization accuracy of user requests, cannot guarantee the replyability of user requests, and may lose important context information.
By receiving the initial user request, identifying the ambiguity points, judging whether it is necessary to interact with the user to clarify the ambiguity points, generating a clarification interaction request and receiving feedback results, the user request is optimized in stages based on the clarification interaction results, and further optimized using the large model.
The optimization accuracy of user requests is improved, making the optimized requests more in line with user intentions, realizing active optimization of user requests, and ensuring that the intelligent question-answering system provides more accurate responses.
Smart Images

Figure CN120317249B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a method, device and storage medium for optimizing user requests based on an intelligent question-and-answer scenario. Background Art
[0002] With the continuous development of science and technology, intelligent question-answering robots are becoming more and more popular. In order to enable intelligent question-answering robots to give users the feedback they want, it is first necessary to optimize the questions (requests) that users ask to the intelligent question-answering robots.
[0003] Currently, optimization is typically achieved by directly removing all stop words, such as punctuation, from user requests. However, passively removing stop words doesn't guarantee the answerability of user requests. Furthermore, some stop words may provide important contextual information about the question. Removing stop words can result in the intelligent question-answering system's response being inconsistent with the user's expectations, leading to lower optimization accuracy for user requests. Summary of the Invention
[0004] The present invention provides a user request optimization method, device and storage medium based on an intelligent question-answering scenario, which mainly aims to improve the optimization accuracy of user requests.
[0005] According to a first aspect of the present invention, a method for optimizing user requests based on an intelligent question-answering scenario is provided, comprising:
[0006] Receive initial user request;
[0007] Performing fuzzy point recognition on the initial user request to obtain a fuzzy point recognition result;
[0008] Based on the ambiguity point identification result, determining whether it is necessary to perform an ambiguity point clarification interaction with the requesting user in response to the initial user request; if the ambiguity point clarification interaction is necessary, generating a clarification interaction request based on the ambiguity point identification result, sending the clarification interaction request to the requesting user terminal, and receiving a clarification interaction result fed back by the requesting user terminal;
[0009] The initial user request is optimized in stages based on the clarification interaction result to obtain a stage-optimized user request, and the stage-optimized user request is input into the large model to continue request optimization to obtain an optimized user request.
[0010] Optionally, performing ambiguity identification on the initial user request to obtain an ambiguity identification result includes:
[0011] performing at least one of missing information identification and ambiguous word identification on the initial user request to obtain an ambiguous point identification result;
[0012] The method for identifying missing information for the initial user request includes:
[0013] Performing word segmentation processing on the initial user request to obtain each word segment, performing part-of-speech tagging on each word segment, and determining a core word, a dependent word, and a dependency relationship between the core word and the dependent word in each word segment based on each word segment and its corresponding part-of-speech;
[0014] Based on the core word, the dependent word, and the dependency relationship between the core word and the dependent word, a dependency tree is constructed, wherein the core word serves as a root node in the dependency tree, the dependent word serves as a branch node in the dependency tree, and the dependency relationship serves as a connecting branch between the corresponding root node and the branch node;
[0015] Based on the dependency tree, identifying missing information for the initial user request;
[0016] The method for identifying ambiguous words in the initial user request includes:
[0017] Determining keywords to be identified in the initial user request, and constructing sentences in different contexts for the keywords to be identified;
[0018] Determine the word vectors of the keyword to be identified in the sentence in each context respectively, and calculate the word vector similarity between each of the word vectors. If the word vector similarity is greater than a first preset similarity threshold, the keyword to be identified is determined to be an ambiguous word; otherwise, the keyword to be identified is determined to be a non-ambiguous word.
[0019] Optionally, generating a clarification interaction request based on the ambiguity point recognition result includes:
[0020] determining, based on the ambiguity point recognition result, an ambiguous word and an ambiguity type corresponding to the ambiguous word, and determining a clarification interaction method with the requesting user;
[0021] Based on the ambiguous word, the ambiguity type, and the clarification interaction mode, a clarification interaction request is generated. The method of generating the clarification interaction request based on the ambiguous word, the ambiguity type, and the clarification interaction mode includes:
[0022] Determine a clarification interaction request generation template based on the ambiguity type and the clarification interaction mode, and fill the ambiguity word into the clarification interaction request generation template to obtain the clarification interaction request; or
[0023] The ambiguous word, the initial user request, the clarification interaction mode, and the ambiguity type are input into a preset clarification interaction request prediction model to perform request prediction to obtain the clarification interaction request, wherein the preset clarification interaction request prediction model is pre-trained based on a sample data set with request labels.
[0024] Optionally, performing stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request includes:
[0025] The clarification interaction result includes at least one round of interaction content with the requesting user terminal, semantic role labeling is performed on each round of the interaction content and the initial user request, and based on the semantic role labeling results, core words and their associated modifying components are extracted from each round of the interaction content and the initial user request;
[0026] Based on the core words and their associated modifying components corresponding to the interaction content of each round and the initial user request, construct interaction segments corresponding to the interaction content of each round and the initial user request respectively;
[0027] A structured constraint framework is generated based on each of the interaction segments, and the stage optimization user request is generated based on the structured constraint framework.
[0028] Optionally, inputting the stage-optimized user request into the large model to continue request optimization to obtain an optimized user request includes:
[0029] Determining whether there is industry jargon in the user request for the stage optimization, and if so, determining explanation information corresponding to the industry jargon in a preset knowledge base;
[0030] Encoding the stage optimization user request into a request feature vector, determining a standard feature vector corresponding to each standard request in the preset knowledge base, and calculating a feature similarity between the stage optimization user request and each standard request based on the request feature vector and each standard feature vector;
[0031] Determining a target standard request whose feature similarity is greater than a second preset similarity threshold in each of the standard requests, and inputting the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request into the large model for request optimization to obtain the optimized user request;
[0032] After inputting the stage-optimized user request into the large model to continue request optimization and obtaining the optimized user request, the method further includes:
[0033] Determining request similarity between the optimized user request and the initial user request;
[0034] If the request similarity is greater than a third preset similarity threshold, it is determined that the optimized user request meets the intended requirements of the requesting user terminal; otherwise, the initial user request is optimized again.
[0035] Optionally, after sending the clarification interaction request to the requesting user terminal, the method further includes:
[0036] After a preset time has passed after the clarification interaction request is sent to the requesting user terminal, if no valid clarification interaction result is fed back by the requesting user terminal, a general optimization prompt message is generated and sent to the requesting user terminal, wherein the general optimization prompt message includes a confirmation control;
[0037] In response to the triggering operation of the confirmation control by the requesting user terminal, the initial user request is generally optimized.
[0038] Optionally, after receiving the clarification interaction result requested to be fed back by the user terminal, the method further includes:
[0039] The initial user request and the clarification interaction result are input into a preset classification model to predict the request sufficiency. If the predicted request sufficiency is greater than a preset threshold, the ambiguity clarification interaction with the requesting user terminal is stopped; otherwise, the ambiguity clarification interaction with the requesting user terminal is continued.
[0040] According to a second aspect of the present invention, there is provided a user request optimization device based on an intelligent question-answering scenario, comprising:
[0041] A receiving unit, configured to receive an initial user request;
[0042] an identification unit, configured to perform fuzzy point identification on the initial user request to obtain a fuzzy point identification result;
[0043] an interaction unit, configured to determine, based on the ambiguity point identification result, whether an ambiguity point clarification interaction with the requesting user is required in response to the initial user request; if an ambiguity point clarification interaction with the requesting user is required, generate a clarification interaction request based on the ambiguity point identification result, send the clarification interaction request to the requesting user terminal, and receive a clarification interaction result fed back by the requesting user terminal;
[0044] The optimization unit is used to perform stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request, and input the stage optimized user request into the large model to continue request optimization to obtain an optimized user request.
[0045] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the user request optimization method based on the intelligent question and answer scenario is implemented.
[0046] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the user request optimization method based on the intelligent question-and-answer scenario is implemented.
[0047] According to a user request optimization method, device and storage medium based on an intelligent question-and-answer scenario provided by the present invention, compared with the current method of directly removing all stop words such as punctuation in user requests to achieve user request optimization, the present invention receives an initial user request; and performs ambiguity identification on the initial user request to obtain an ambiguity identification result; then, based on the ambiguity identification result, determines whether it is necessary to perform ambiguity clarification interaction with the requesting user for the initial user request; if ambiguity clarification interaction with the requesting user is necessary, generates a clarification interaction request based on the ambiguity identification result, sends the clarification interaction request to the requesting user terminal, and receives the clarification interaction result fed back by the requesting user terminal; finally, performs stage-by-stage optimization on the initial user request based on the clarification interaction result to obtain a stage-optimized user request, and inputs the stage-optimized user request into a large model to continue request optimization to obtain an optimized user request. Therefore, by identifying the ambiguity points of the initial user request, in the case of ambiguity, multiple rounds of clarification interactions with the user are used to more accurately understand the user's intentions and needs, help the user express the problem more clearly, and finally optimize the initial user request according to the user's most accurate intentions and needs, thereby improving the optimization accuracy of the user request, that is, the optimized user request can be more in line with the user's intention, and active optimization of the user request can be achieved, so that the subsequent intelligent question and answer system can provide the user with a more accurate reply. At the same time, the embodiment of the present invention continues to optimize the optimized user request through a large model, which can further improve the optimization accuracy of the user request. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0049] Figure 1 A flowchart of a user request optimization method based on an intelligent question-answering scenario provided by an embodiment of the present invention is shown;
[0050] Figure 2A flowchart of another method for optimizing user requests based on an intelligent question-answering scenario provided by an embodiment of the present invention is shown;
[0051] Figure 3 A schematic diagram of a dependency tree structure provided by an embodiment of the present invention is shown;
[0052] Figure 4 A schematic diagram of the structure of a user request optimization device based on an intelligent question-answering scenario provided by an embodiment of the present invention is shown;
[0053] Figure 5 A schematic diagram showing the structure of another user request optimization device based on an intelligent question-answering scenario provided by an embodiment of the present invention is shown;
[0054] Figure 6 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0055] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0056] Currently, the method of directly removing all stop words such as punctuation marks in user requests to optimize user requests is passive. At the same time, some stop words may provide important contextual information about the problem. If stop words are removed, the optimization accuracy of user requests will be low.
[0057] In order to solve the above problems, the embodiment of the present invention provides a user request optimization method based on intelligent question-answering scenario, such as Figure 1 As shown, the method includes:
[0058] 101. Receive an initial user request.
[0059] For the embodiment of the present invention, the initial user request is a question asked by the user, such as the initial question input by the user into the intelligent question-answering system. The intelligent question-answering system may be an advertising data analysis platform in the advertising industry, etc.
[0060] 102. Perform fuzzy point recognition on the initial user request to obtain a fuzzy point recognition result.
[0061] In this embodiment of the present invention, ambiguities can be missing information, semantic ambiguity, or unclear objectives in the initial user request. For example, if the initial user request is "Help me check my order," the order number and time range are missing information in the user request. If the initial user request is "Apple's price has dropped," "apple" is semantically ambiguous, as it can refer to both fruit and a brand of mobile phone. If the initial user request is "How is that project progressing?", the specific project is not specified, indicating an unclear objective. Ultimately, the missing information, ambiguous information, and unclear objectives identified in the initial user request are determined as ambiguity point identification results.
[0062] 103. Based on the ambiguity point recognition result, determine whether it is necessary to perform ambiguity point clarification interaction with the requesting user in response to the initial user request. If ambiguity point clarification interaction is required, generate a clarification interaction request based on the ambiguity point recognition result, send the clarification interaction request to the requesting user terminal, and receive a clarification interaction result fed back by the requesting user terminal.
[0063] In an embodiment of the present invention, if at least one ambiguity point, such as missing information, ambiguous information, or unclear objectives, is identified in the initial user request, a clarification interaction with the requesting user is determined to be necessary regarding the ambiguity point, and the ambiguity point is resolved based on the clarification interaction result. For example, if the initial user request is "Help me optimize that ad," and the identified ambiguity point is the missing "ad identifier," the generated clarification interaction request may be "Which ad are you referring to?" If the initial user request is "I want a refund," and the identified ambiguity point is the missing "refund order number," the generated clarification interaction request based on the ambiguity point identification result may be "What is the order number you need a refund for?" The clarification interaction request is then sent to the requesting user terminal, and the requesting user at the requesting user terminal responds to the clarification interaction request, obtaining a clarification interaction result and returning it. In another embodiment of the present invention, the clarification interaction with the requesting user terminal can be multiple rounds of interaction. For example, the initial user request is "I want to improve my conversion rate," and the clarification interaction request is "Is it a search ad or a feed ad?" The user clarifies the first round of clarification interaction request, resulting in a clarification interaction result of "search ad." The next round of clarification interaction request generated based on the first round of clarification interaction result is "Do I need to optimize keywords or landing pages?" The user clarifies the clarification interaction request in this round, resulting in a clarification interaction result of "landing page." The results of each round of clarification interaction with the requesting user can then be structured and stored. For example, the user's answer can be stored in the conversation state tracking module to update the current context. For example, if the user answers "Budget 5000 yuan," the record is {budget:5000}. During the clarification interaction with the requesting user, conflict detection can also be performed on the clarification content. If the user's subsequent response contradicts the previous information, a confirmation prompt will be displayed. For example, if the user's clarification interaction result in the previous round is "The delivery area is Beijing", and the clarification interaction result in the next round is "Delivered to Shanghai", then a conflict in the user's clarification interaction is detected, and a conflict prompt message is generated, such as "You previously mentioned that the delivery area is Beijing. Do you need to change it?" The conflict prompt message is displayed to the requesting user, so that the user can correct the interaction content based on the conflict prompt message. It should be noted that the above example is only illustrative and does not specifically limit the embodiments of the present invention. The embodiments of the present invention use the ambiguity in the initial user request to conduct at least one round of clarification interaction with the user in real time, which can more accurately understand the user's intentions and needs. Ultimately, the user request is optimized based on the results of multiple rounds of interaction, which can achieve active dynamic optimization of the user request and improve the optimization accuracy of the user request. At the same time, by performing conflict detection on the clarification interaction results returned by the user, the embodiments of the present invention can avoid contradictions in the clarification interaction results fed back by the user, thereby further improving the optimization accuracy of the user request.
[0064] 104. Based on the clarified interaction result, the initial user request is optimized in stages to obtain a stage-optimized user request, and the stage-optimized user request is input into the large model to continue request optimization to obtain an optimized user request.
[0065] According to the embodiment of the present invention, after receiving at least one round of clarification interaction results from the requesting user, the initial user request can be optimized at this stage according to the clarification interaction results. For example, if the initial user request is "the relationship between this data and that data", and the ambiguity point recognition result is the lack of data name and time range, then the first round of clarification interaction request generated can be "which data is this data and which data respectively?" For the first round of clarification interaction request, if the clarification interaction result fed back by the user is "the sales data of product A and the sales data of product B", the second round of clarification interaction request generated according to the clarification interaction result replied by the user can be "please analyze the relationship between the sales data of product A and the sales data of product B within which time range?" For the second round of clarification interaction request, if the clarification interaction result fed back by the user is "this month", then each round of clarification interaction results and the initial user request can be gradually spliced together to achieve the optimization of the initial user request, and the stage-optimized user request is "the relationship between the sales data of product A this month and the sales data of product B this month".
[0066] Furthermore, since the stage-optimized user request is only a request that contains all the user's intended demand information, there may still be redundant information, unclear logic, and other problems in the stage-optimized user request. Therefore, in order to improve the optimization accuracy of the user request, it is necessary to use a large model to further optimize the stage-optimized user request. Prior to this, in order to improve the request optimization accuracy of the large model, it is first necessary to train and build the large model. Based on this, the method includes: obtaining an initial large model and obtaining a sample data set, wherein the sample data set includes sample initial user requests with annotated user request labels; dividing the sample data set into training data, validation data, and test data, using the training data to train the initial large model to adjust the parameters of the initial large model to minimize the difference between the predicted results and the annotated results. During the training process, the validation set is used to monitor the performance of the initial large model to prevent overfitting. By experimenting with different hyperparameter combinations (such as the learning rate and batch size of the initial large model), the optimal hyperparameter settings are found, thereby obtaining the trained initial large model. The trained initial large model is then tested using test data, and the trained initial large model that meets the test conditions is finally used as the large model. Meeting the test conditions can include meeting the required number of training times for the initial large model or meeting the required test accuracy for the trained initial large model. After building the large model, when applying it to optimize user requests, professionals in related fields can be invited to evaluate the optimized user requests and provide feedback and suggestions on aspects such as language expression and appeal. This allows for continuous fine-tuning of the large model's parameters to update the model and continuously improve its performance and adaptability. Strategies and rules for rewriting user requests can also be adjusted based on changing business needs and market trends, enabling the large model to better meet the needs of the corresponding industry.
[0067] Furthermore, after building the large model, the phased-optimized user requests are directly input into the large model, which then outputs the optimized user requests. For example, if the initial user request is "Analyze data trends," after the initial request is phased-optimized based on the results of clarification interactions with the user, the phased-optimized user request is then input into the large model for further optimization. The resulting optimized user request might be "Analyze the trends of the company's online sales data from January to December 2023." The large model can remove redundant information from the phased-optimized user requests and convert complex sentences into simpler ones, thereby simplifying the language structure of the phased-optimized user requests. By removing redundant information, the user request can avoid excessive use of unnecessary modifiers, repetitive expressions, or complex sentence structures. For example, "I want to understand the overall data changes in a business scenario that is not particularly complex" can be simplified to "I want to understand the data changes in a specific business scenario." By converting complex sentences into simpler ones, the system's recognition capabilities can be enhanced, allowing for better responses to users. For example, simple subject-verb-object structures can be prioritized to express questions. For example, "Analyze the trends in sales data over the past year" is more concise and clear than "What trends are present in sales data over the past year? I want to analyze this aspect." This facilitates the intelligent question-answering system's understanding and processing. In another embodiment of the present invention, a stage-optimization user request containing multiple aspects and steps can be split into several logically related sub-questions. For example, if the stage-optimization user request is "Analyze customer purchasing behavior, predict future purchasing trends, and formulate marketing strategies," the macro model can be used to split the stage-optimization user request into: "Analyze current customer purchasing behavior characteristics," "Predict future customer purchasing trends based on historical data," and "Formulate marketing strategies based on analysis and prediction results." This allows the intelligent question-answering system to gradually process each sub-question, improving the accuracy of understanding and processing. Furthermore, the macro model can also rationally use logical connectives to manage the logic within the stage-optimization user request. For example, if the stage-optimization user request is "Recent product sales are poor, and I don't know how to address this situation," the macro model can optimize the stage-optimization user request using logical connectives to obtain the optimized user request, "Because product sales have recently declined, I need to analyze the reasons for the sales decline and find corresponding solutions." Therefore, the embodiment of the present invention continues to optimize the stage-optimized user requests through a large model, and can simplify the language structure and perform logical layer processing on the stage-optimized user requests, thereby further improving the optimization accuracy of user requests and improving the intelligent question-answering system's ability to understand and process user requests.
[0068] In another embodiment of the present invention, in order to improve the optimization accuracy of stage-optimized user requests, multiple different models can be pre-trained and used to optimize the stage-optimized user requests, respectively, to obtain user requests optimized by different models. Finally, the user requests optimized by different models are fused to obtain the optimized user requests. Subsequently, in order to improve the accuracy of the intelligent question-answering system's responses, key information can be identified in the optimized user requests and the key information can be annotated with punctuation, bolding, or other preset identifiers, i.e., the key information is highlighted. In this way, the annotated user request is input into the intelligent question-answering system, and the intelligent question-answering system can search for questions and respond based on the annotated key information. For example, if the optimized user request is "Analyze the main factors affecting product sales, including price, promotional activities, market competition, etc.", if the key information of price is to be analyzed in detail, the price can be sorted first, or the price can be highlighted, bolded, or other identifiers. Furthermore, the optimized user request can be converted to a matching format based on different intelligent question-answering systems for integration with the intelligent question-answering system.
[0069] According to a user request optimization method based on an intelligent question-and-answer scenario provided by the present invention, compared with the current method of directly removing all stop words such as punctuation marks in user requests to achieve user request optimization, the present invention receives an initial user request; and performs ambiguity identification on the initial user request to obtain an ambiguity identification result; then, based on the ambiguity identification result, determines whether it is necessary to perform ambiguity clarification interaction with the requesting user for the initial user request; if ambiguity clarification interaction with the requesting user is necessary, generates a clarification interaction request based on the ambiguity identification result, sends the clarification interaction request to the requesting user terminal, and receives the clarification interaction result fed back by the requesting user terminal; finally, performs stage-by-stage optimization on the initial user request based on the clarification interaction result to obtain a stage-optimized user request, and inputs the stage-optimized user request into a large model to continue request optimization to obtain an optimized user request. Therefore, by identifying the ambiguity points of the initial user request, in the case of ambiguity, multiple rounds of clarification interactions with the user are used to more accurately understand the user's intentions and needs, help the user express the problem more clearly, and finally optimize the initial user request according to the user's most accurate intentions and needs, thereby improving the optimization accuracy of the user request, that is, the optimized user request can be more in line with the user's intention, and active optimization of the user request can be achieved, so that the subsequent intelligent question and answer system can provide the user with a more accurate reply. At the same time, the embodiment of the present invention continues to optimize the optimized user request through a large model, which can further improve the optimization accuracy of the user request.
[0070] Furthermore, in order to better illustrate the above process of optimizing user requests, as a refinement and extension of the above embodiment, the embodiment of the present invention provides another method for optimizing user requests based on the intelligent question-answering scenario, such as Figure 2 As shown, the method includes:
[0071] 201. Receive an initial user request.
[0072] Specifically, the initial user request can be any form of request such as text information, image information, voice information, etc. input by the user. If it is image information and voice information, the image information and voice information need to be converted into text information so that the text information can be optimized later.
[0073] 202. Identify missing information for the initial user request and obtain a missing information identification result.
[0074] For the embodiment of the present invention, in order to optimize the information integrity of the initial user request, it is first necessary to identify missing information in the initial user request. Based on this, step 202 specifically includes: performing word segmentation processing on the initial user request to obtain each word segmentation, performing part-of-speech tagging on each word segmentation, and determining the core word, dependency word, and dependency relationship between the core word and the dependency word in each word segmentation based on each word segmentation and the part of speech corresponding to each word segmentation; constructing a dependency tree based on the core word, the dependency word, and the dependency relationship between the core word and the dependency word, wherein the core word serves as the root node in the dependency tree, the dependency word serves as the branch node in the dependency tree, and the dependency relationship serves as the connecting branch between the corresponding root node and the branch node; based on the dependency tree, identifying missing information in the initial user request.
[0075] Specifically, the initial user request is first segmented using a word segmentation tool, and each segmented word is tagged with parts of speech, such as nouns, verbs, adjectives, etc. Based on each analysis and its corresponding part-of-speech tagging results, the dominant content words (such as nouns / verbs) are determined in each segmented word as core words, and the segmented words with modifying components corresponding to the core words are determined as dependent words. For example, if the initial user request is "Query air tickets from Beijing to Shanghai", the word segmentation result is ["query", "from", "Beijing", "to", "Shanghai", "of", "air tickets"], and the corresponding part-of-speech tagging result is ["verb", "preposition", "place name", "particle", "place name", "particle", "noun"]. The identified core word is "query" (verb, governing the entire action), and the dependency words and their dependency relationships with the core word are: "air tickets" (noun, action object), "Beijing" (noun, starting point), "Shanghai" (noun, end point), "from... to..." (prepositional structure, indicating spatial relationship). Then, with the core word as the root node, the dependency words as branch nodes, and the dependency relationships as connecting branches, a tree diagram representing the structure of the initial user request is constructed, namely, a dependency tree, as shown in Figure 1. Figure 3 As shown, a visual display form of the dependency tree is shown. Furthermore, a preset dependency structure database that matches the business scenario to which the initial user request belongs is obtained, and the preset dependency structure database stores the standard dependency structure under the business scenario. The dependency tree is checked based on the standard dependency structure to obtain the missing information in the dependency tree. For example, there is a date parameter in the standard dependency structure, but there is no date in the dependency tree, then it is determined that the date information is missing in the initial user request. For example, the initial user request "query for air tickets from Beijing to Shanghai" lacks a specific date for querying air tickets. The embodiment of the present invention identifies the missing information in the user request by constructing a dependency tree. Since the dependency tree structure is clear, simple and intuitive, it can improve the recognition efficiency and accuracy of missing information.
[0076] 203. Perform ambiguous word recognition on the initial user request to obtain an ambiguous word recognition result. The missing information recognition result and the ambiguous word recognition result are collectively referred to as a fuzzy point recognition result.
[0077] For the embodiment of the present invention, in order to optimize the ambiguous information in the initial user request, it is first necessary to identify ambiguous words in the initial user request. Based on this, step 203 specifically includes: determining the keywords to be identified in the initial user request, and constructing sentences in different contexts for the keywords to be identified; respectively determining the word vectors of the keywords to be identified in the sentences in each context, and calculating the word vector similarity between each of the word vectors. If the word vector similarity is greater than a first preset similarity threshold, the keyword to be identified is determined to be an ambiguous word; otherwise, the keyword to be identified is determined to be a non-ambiguous word.
[0078] Among them, the first preset similarity threshold is set according to actual needs. Specifically, the initial user request is first segmented to obtain each segmentation, and then the keywords to be identified that may be ambiguous are preliminarily screened out in each segmentation. For example, a pre-built polysemous word library can be used to identify ambiguous words (keywords to be identified) in each segmentation, and then sentences in different contexts are generated for the keywords to be identified. For example, if the keyword to be identified is "apple", the sentences generated in different contexts are "[Apple] company releases new products" and "Eat [apple] to supplement vitamins". Then, a context embedding model such as ELMo or BERT model is used to generate context-related vectors (word vectors) of the keywords to be identified in each context, and then the cosine similarity between the word vectors in different contexts is calculated. If the cosine similarity is greater than the first preset similarity threshold, the keyword to be identified is determined to be an ambiguous word (polysemous word). The embodiment of the present invention identifies ambiguous words by constructing sentences for the keywords to be identified in different contexts, which can quantify the semantic stability of ambiguous words in different contexts and provide a clear basis for judgment. At the same time, the embodiment of the present invention avoids deviations in understanding user intentions by identifying ambiguous words in the initial user request, thereby improving the optimization accuracy of the user request.
[0079] 204. Based on the ambiguity point recognition result, determine whether it is necessary to perform ambiguity point clarification interaction with the requesting user in response to the initial user request. If it is necessary to perform ambiguity point clarification interaction with the requesting user, generate a clarification interaction request based on the ambiguity point recognition result, send the clarification interaction request to the requesting user terminal, and receive a clarification interaction result fed back by the requesting user terminal.
[0080] In an embodiment of the present invention, if ambiguities such as missing information, ambiguous words, or unclear objectives are identified in the initial user request, a clarification interaction with the requesting user is required to address the ambiguities. Prior to the clarification interaction, a clarification interaction request must first be generated. To this end, step 204 specifically includes: determining, based on the ambiguity point identification results, an ambiguous word and the ambiguity type corresponding to the ambiguous word, and determining a clarification interaction method with the requesting user; generating a clarification interaction request based on the ambiguous word, the ambiguity type, and the clarification interaction method. The method for generating the clarification interaction request based on the ambiguous word, the ambiguity type, and the clarification interaction method includes: determining a clarification interaction request generation template based on the ambiguity type and the clarification interaction method, and filling the ambiguity word into the clarification interaction request generation template to obtain the clarification interaction request; or inputting the ambiguous word, the initial user request, the clarification interaction method, and the ambiguity type into a preset clarification interaction request prediction model for request prediction to obtain the clarification interaction request, wherein the preset clarification interaction request prediction model is pre-trained based on a sample dataset with request labels.
[0081] Among them, fuzzy types include information missing type, semantic ambiguity type, unclear target type, etc. For example, information missing type: missing key parameters (such as "how much is the budget?" "delivery area?"), semantic ambiguity type: the presence of polysemous words or vague expressions (such as the time range in "process as soon as possible"), and unclear target type: general requirements (such as "optimize advertising effects" without specifying specific indicators). Clarification interaction methods include closed interaction methods, open interaction methods, and suggestion interaction methods. For example, closed interaction methods: provide limited options and quickly confirm information, such as "Is your question about advertising or data analysis?" Open interaction methods: guide users to add details, such as "Which aspects of advertising do you want to optimize?" Suggestion interaction methods: recommend options based on common scenarios, such as "You may need to provide an advertising ID or delivery date to facilitate further processing."
[0082] Specifically, if the initial user request is "Help me check my order," the ambiguous word is the order number, and the ambiguous type is the missing information type. The clarification interaction method is then determined based on specific needs. If the determined clarification interaction method is open, the generated clarification interaction request may be "Excuse me, which order number do you want to check?" Furthermore, different clarification interaction methods and ambiguous types correspond to different clarification interaction request generation templates. These clarification interaction request generation templates contain both general and customized form text. For example, the clarification interaction request generation template for the missing information type and open interaction method is "Excuse me, which XXX are you referring to?" If the ambiguous word is the order number, the order number is filled in the corresponding position in the clarification interaction request generation template, resulting in a clarification interaction request "Excuse me, which order number are you referring to?" In another embodiment of the present invention, a clarification interaction request can also be generated using a preset clarification interaction request prediction model. To improve model accuracy, the preset clarification interaction request prediction model must first be trained and constructed. The method includes: obtaining a preset initial clarification interaction request prediction model and a sample dataset, wherein the sample dataset includes sample user requests annotated with a request interaction request label, fuzzy words in the sample user requests, and clarification interaction methods; dividing the sample dataset into training data and testing data, training the preset initial clarification interaction request prediction model using the training data, and testing the trained preset initial clarification interaction request prediction model using the testing data. Finally, the preset initial clarification interaction request prediction model that meets the test conditions is used as the preset clarification interaction request prediction model. Meeting the test conditions can include, for example, a required number of training times or a required prediction accuracy of the trained preset initial clarification interaction request prediction model. Furthermore, the fuzzy words, initial user request, clarification interaction method, and fuzzy type are input into the preset clarification interaction request prediction model to perform request prediction, thereby obtaining a clarification interaction request.
[0083] In another embodiment of the present invention, in order to improve the interaction effect with the requesting user, multiple clarification interaction requests can also be generated for the initial user request. Based on this, the method includes: determining the complexity of the initial user request, and if the complexity is greater than a preset threshold (the preset threshold is set according to actual needs), then determining different clarification interaction dimensions, and generating multiple sub-clarification interaction requests according to different clarification interaction dimensions, and determining the clarification priority of each clarification interaction request according to the importance of the ambiguity point in each clarification interaction request, and sending each sub-clarification interaction request to the requesting user terminal in the order of clarification priority from high to low to perform clarification interaction with the requesting user. For example, if the initial user request is "How to make advertising more effective?", clarification interaction requests can be generated in sequence according to clarification dimensions such as budget, audience, and creativity. In this way, by clarifying complex user requests according to multiple clarification dimensions, the interaction effect with the requesting user can be improved.
[0084] In another embodiment of the present invention, dynamic conversation state tracking technology can be used to trace back the conversation history and generate clarification requests based on the historical traceback results. For example, this can identify implicit ambiguities in multiple rounds of conversation. If a user mentions "that report" during the third round of clarification, it is necessary to link it to "last week's advertising report" mentioned in previous rounds and generate an inquiry-style clarification request, such as "Is the report you are referring to the advertising report from last week?"
[0085] Furthermore, after generating a clarification interaction request, the clarification interaction request is sent to the requesting user, and the requesting user replies based on the clarification interaction request to obtain a clarification interaction result. After receiving the clarification interaction result fed back by the requesting user, it is also necessary to determine whether the clarification interaction with the requesting user is ended, that is, to determine whether it is necessary to continue the clarification interaction with the requesting user. Based on this, the method includes: inputting the initial user request and the clarification interaction result into a preset classification model to predict the request adequacy. If the predicted request adequacy is greater than a preset threshold, stopping the ambiguity point clarification interaction with the requesting user terminal; otherwise, continuing the ambiguity point clarification interaction with the requesting user terminal.
[0086] Among them, the preset classification model can be a model such as SVM, BERT, etc.; the preset threshold is set according to actual needs. Specifically, the preset classification model is used to judge whether the initial user request and the clarification interaction result are sufficient to solve the problem, that is, whether the adequacy of the current information meets the requirements. If the requirements are met, the clarification interaction with the requesting user is ended, otherwise the clarification interaction with the requesting user needs to continue. Furthermore, if no user feedback is received after sending a clarification interaction request to the requesting user, the processing method for this situation is: after the preset time of sending the clarification interaction request to the requesting user terminal, if no effective clarification interaction result is received from the requesting user terminal, a general optimization prompt information is generated and sent to the requesting user terminal, wherein a confirmation control exists in the general optimization prompt information; in response to the triggering operation of the confirmation control by the requesting user terminal, the initial user request is generally optimized.
[0087] The preset time is a time set according to actual needs; the effective clarification interaction result may be that no clarification interaction result is received, or the clarification interaction result received does not clarify key information.
[0088] Specifically, if no effective clarification interaction result is received after the preset time, an information search can be performed directly for the initial user request, or a prompt message of general optimization suggestions can be displayed to the user. The prompt message contains a confirmation control. When the user clicks the confirmation control, the initial user request is directly optimized according to the general optimization method.
[0089] 205. Based on the clarified interaction result, the initial user request is optimized in stages to obtain a stage-optimized user request, and the stage-optimized user request is input into the large model to continue request optimization to obtain an optimized user request.
[0090] For the embodiment of the present invention, after determining the clarification interaction result, it is necessary to optimize the initial user request based on the clarification interaction result. Based on this, step 205 specifically includes: the clarification interaction result includes at least one round of interaction content between the requesting user terminal, and each round of the interaction content and the initial user request are semantically labeled, and based on the semantic role labeling results, the core words and their associated modifying components are extracted from each round of the interaction content and the initial user request respectively; based on the core words and their associated modifying components corresponding to each round of the interaction content and the initial user request, the interaction fragments corresponding to each round of the interaction content and the initial user request are constructed respectively; based on each of the interaction fragments, a structured constraint framework is generated, and based on the structured constraint framework, the stage-optimized user request is generated.
[0091] Specifically, the core words (predicates) and their associated semantic roles (such as agent, patient, time, place, etc.) in each round of interaction content and initial user request are identified through semantic role labeling. Core words: core predicates (such as "query", "cancel") or key entities (such as "order", "member") in the conversation. Modifiers: limiting conditions for core words (such as "last week", "Beijing area"), negative expressions (such as "does not include"), etc. For example, the interaction content and initial user request in each round are "check last week's orders, not the canceled ones", the core word is: check (predicate), and the modifying components include: time adverbial: "last week", patient: "order", exclusion condition: "cancelled" (with the negative word "don't"). Next, an interaction fragment is constructed. For example, if the initial user request is "check orders," the corresponding interaction fragment is "check {object = order}." If the first round of interaction content is "last week's," the corresponding interaction fragment is "check {time = last week}." If the third round of interaction content is "not canceled," the corresponding interaction fragment is "check {exclusion condition = canceled}." A structured constraint framework is then constructed based on the logical constraints. Logical constraints include hard constraints and soft constraints. Hard constraints are mandatory conditions (e.g., "exclude canceled orders" → status ≠ canceled); soft constraints are preferred but not mandatory conditions (e.g., "prefer electronic version" → preference = electronic version). When constructing the structured constraint framework, the core word serves as the framework backbone, and modifiers are mapped into sentences by type. For example, if the structured constraint framework corresponding to the above interaction fragment is "check {object = order, time = last week, exclusion condition = canceled}," the final stage-optimized user request generated by the structured constraint framework becomes "Please check your orders from March 1 to 7, 2024, and exclude canceled orders." The embodiment of the present invention optimizes user requests by extracting core words and modifying components, and can parse the deep semantics in user requests through dependency relationships, thereby improving the optimization accuracy of user requests. At the same time, focusing on core words can reduce the amount of calculation.
[0092] In another embodiment of the present invention, after determining the interaction fragments corresponding to each round of interaction content and the initial user request, in order to reduce the amount of calculation and thus improve the optimization efficiency of the user request, each interaction fragment can also be screened. The specific screening method is to determine the context dependency, entity co-occurrence frequency, and user feedback strength of each interaction fragment, and based on the context dependency, entity co-occurrence frequency, and user feedback strength, determine the weight coefficient of each interaction fragment, and based on the weight coefficient, screen out effective interaction fragments from each interaction fragment, and finally generate a structured constraint framework based on the effective interaction fragments, and generate the stage optimization user request based on the structured constraint framework.
[0093] Specifically, dependency analysis is performed on each dialogue segment, a dependency tree is constructed, and key relationships are extracted based on the dependency tree: the core predicate and its direct modifiers (such as objects, time adverbials, and negations) are identified, and the dependency path depth is recorded. Scoring rules: Importance weight: The direct modifiers of the core predicate (such as "cancel [membership]") are assigned a basic score (such as 1.0), and the indirect modifiers (such as the secondary attributive "last month's") are attenuated according to the path depth (such as the weight × 0.7 for each level of depth increase). Negation detection: The weight of segments containing negation words (such as "not" and "cancel") is increased by 50% (because the correction intention is key). This allows the contextual dependency relationship of each interaction segment to be obtained. Entities are extracted in each interaction segment, and the number of occurrences of the entity in the current interaction segment and the total number of occurrences in each interaction segment are determined to obtain the entity co-occurrence frequency of each interaction segment. Furthermore, the requesting user's direct actions on each interaction segment, such as deletion, modification, and confirmation, are recorded. Each action is assigned a corresponding score. The user feedback strength of each interaction segment is then determined based on the scores. Finally, a weight coefficient is determined for each interaction segment based on contextual dependencies, entity co-occurrence frequency, and user feedback strength. Segments with a weight coefficient greater than a preset weight threshold (the preset weight threshold is set based on actual needs) are identified as valid interaction segments. Subsequently, stage optimization user requests are generated based on the valid interaction segments.
[0094] Furthermore, in order to further improve the optimization accuracy of user requests, user requests can be further optimized. Based on this, step 205 specifically includes: judging whether there is industry jargon in the user request for optimization at the stage, and if so, determining the explanation information corresponding to the industry jargon in the preset knowledge base; encoding the user request for optimization at the stage into a request feature vector, determining the standard feature vector corresponding to each standard request in the preset knowledge base, and calculating the feature similarity between the user request for optimization at the stage and each standard request based on the request feature vector and each standard feature vector; determining in each standard request that the feature similarity is greater than the first The method further comprises: determining a target standard request with a second preset similarity threshold, and inputting the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request into the large model for request optimization to obtain the optimized user request; after inputting the stage-optimized user request into the large model for continuing request optimization to obtain the optimized user request, the method further comprises: determining the request similarity between the optimized user request and the initial user request; if the request similarity is greater than a third preset similarity threshold, determining that the optimized user request meets the intention requirements of the requesting user terminal, otherwise re-optimizing the initial user request.
[0095] Among them, the preset knowledge base is pre-built, and the preset knowledge base corresponding to the industry type can be determined based on the industry type of the initial user request; the preset knowledge base contains explanation information corresponding to a variety of industry jargons, as well as a variety of standard user requests; the second preset similarity threshold and the third preset similarity threshold are both set according to actual needs.
[0096] Specifically, each word segment in the stage-optimized user request can be matched with various industry jargons in a preset knowledge base. Based on the matching results, the industry jargon in the stage-optimized user request can be identified, and the corresponding explanations of the industry jargon in the stage-optimized user request can be extracted from the preset knowledge base. Simultaneously, a pre-trained language model is used to encode the stage-optimized user and each standard user request in the preset knowledge base, converting them into vector representations. Based on the vector representations, similarities such as cosine similarity and Euclidean distance are calculated between the stage-optimized user request and each standard request. A target standard request with the required similarity is selected. Finally, the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request are input into the large model for request optimization, resulting in an optimized user request. Specifically, the stage-optimized user request is supplemented, improved, and its sentence structure adjusted using the industry jargon explanation information and the target standard request, making the stage-optimized user request more specific and clear. Furthermore, the language style of the user request can be adjusted based on common expressions in the preset knowledge base to better align with industry standards and practices. Furthermore, to improve the optimization accuracy of user requests, the optimized user request needs to be verified. The semantic similarity between the optimized user request and the initial user request can be determined. If the semantic similarity meets the requirements, the optimized user request is determined to have not deviated from the requesting user's intention. If the semantic similarity does not meet the requirements, the user request needs to be optimized again. The final optimized user request is returned to the user, and relevant knowledge base reference information can be provided to help the user better understand the problem.
[0097] According to another user request optimization method based on an intelligent question-and-answer scenario provided by the present invention, compared with the current method of directly removing all stop words such as punctuation marks in user requests to achieve user request optimization, the present invention receives an initial user request; and performs ambiguity identification on the initial user request to obtain an ambiguity identification result; then, based on the ambiguity identification result, determines whether it is necessary to perform ambiguity clarification interaction with the requesting user for the initial user request; if ambiguity clarification interaction with the requesting user is necessary, generates a clarification interaction request based on the ambiguity identification result, sends the clarification interaction request to the requesting user terminal, and receives the clarification interaction result fed back by the requesting user terminal; finally, performs stage-by-stage optimization on the initial user request based on the clarification interaction result to obtain a stage-optimized user request, and inputs the stage-optimized user request into a large model to continue request optimization to obtain an optimized user request. Therefore, by identifying the ambiguity points of the initial user request, in the case of ambiguity, multiple rounds of clarification interactions with the user are used to more accurately understand the user's intentions and needs, help the user express the problem more clearly, and finally optimize the initial user request according to the user's most accurate intentions and needs, thereby improving the optimization accuracy of the user request, that is, the optimized user request can be more in line with the user's intention, and active optimization of the user request can be achieved, so that the subsequent intelligent question and answer system can provide the user with a more accurate reply. At the same time, the embodiment of the present invention continues to optimize the optimized user request through a large model, which can further improve the optimization accuracy of the user request.
[0098] Further, as Figure 1 The specific implementation of the present invention provides a user request optimization device based on intelligent question-answering scenario, such as Figure 4 As shown, the device includes: a receiving unit 31, an identification unit 32, an interaction unit 33, and an optimization unit 34.
[0099] The receiving unit 31 may be configured to receive an initial user request.
[0100] The identification unit 32 may be configured to perform fuzzy point identification on the initial user request to obtain a fuzzy point identification result.
[0101] The interaction unit 33 may be configured to determine, based on the ambiguity point identification result, whether an ambiguity point clarification interaction is required with the requesting user in response to the initial user request; if an ambiguity point clarification interaction is required with the requesting user, generate a clarification interaction request based on the ambiguity point identification result, send the clarification interaction request to the requesting user terminal, and receive a clarification interaction result fed back by the requesting user terminal.
[0102] The optimization unit 34 can be used to perform stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request, and input the stage optimized user request into the large model to continue request optimization to obtain an optimized user request.
[0103] In a specific application scenario, in order to identify the fuzzy points of the initial user request, such as Figure 5 As shown, the identification unit 32 may be specifically configured to perform at least one of missing information identification and ambiguous word identification on the initial user request to obtain an ambiguous point identification result.
[0104] In a specific application scenario, in order to identify missing information for an initial user request, the identification unit 32 includes a part-of-speech tagging module 321 , a first construction module 322 , and an identification module 323 .
[0105] The part-of-speech tagging module 321 can be used to perform word segmentation processing on the initial user request, obtain each participle, perform part-of-speech tagging on each participle, and determine the core word, dependent word, and the dependency relationship between the core word and the dependent word in each participle based on each participle and the part of speech corresponding to each participle.
[0106] The first construction module 322 can be used to construct a dependency tree based on the core word, the dependency word, and the dependency relationship between the core word and the dependency word, wherein the core word serves as the root node in the dependency tree, the dependency word serves as the branch node in the dependency tree, and the dependency relationship serves as the connecting branch between the corresponding root node and the branch node.
[0107] The identification module 323 may be configured to identify missing information for the initial user request based on the dependency tree.
[0108] In a specific application scenario, in order to perform ambiguous word recognition on an initial user request, the recognition unit 32 further includes a first calculation module 324 .
[0109] The first constructing module 322 may also be used to determine keywords to be identified in the initial user request, and construct sentences in different contexts for the keywords to be identified.
[0110] The first calculation module 324 can be used to respectively determine the word vectors of the keyword to be identified in the sentence in each context, and calculate the word vector similarity between each of the word vectors. If the word vector similarity is greater than a first preset similarity threshold, the keyword to be identified is determined to be an ambiguous word; otherwise, the keyword to be identified is determined to be a non-ambiguous word.
[0111] In a specific application scenario, in order to generate a clarification interaction request, the interaction unit 33 includes a determination module 331 and a first generation module 332 .
[0112] The determination module 331 may be configured to determine an ambiguous word and an ambiguous type corresponding to the ambiguous word based on the ambiguity point recognition result, and determine a clarification interaction method with the requesting user.
[0113] The first generating module 332 may be configured to generate a clarification interaction request based on the ambiguous word, the ambiguous type, and the clarification interaction mode.
[0114] In a specific application scenario, in order to generate a clarification interaction request, the first generation module 332 can be specifically used to determine a clarification interaction request generation template based on the fuzzy type and the clarification interaction method, and fill the fuzzy words into the clarification interaction request generation template to obtain the clarification interaction request; or, input the fuzzy words, the initial user request, the clarification interaction method, and the fuzzy type into a preset clarification interaction request prediction model to perform request prediction to obtain the clarification interaction request, wherein the preset clarification interaction request prediction model is pre-trained based on a sample data set with request labels.
[0115] In a specific application scenario, in order to perform phase optimization on the initial user request, the optimization unit 34 includes a marking module 341 , a second construction module 342 , and a second generation module 343 .
[0116] The labeling module 341 can be used to clarify that the interaction result includes at least one round of interaction content with the requesting user terminal, perform semantic role labeling on each round of the interaction content and the initial user request, and based on the semantic role labeling results, extract core words and their associated modifying components for each round of the interaction content and the initial user request.
[0117] The second construction module 342 can be used to construct interaction segments corresponding to each round of interaction content and the initial user request based on the core words and their associated modifying components corresponding to each round of interaction content and the initial user request.
[0118] The second generating module 343 may be configured to generate a structured constraint framework based on each interaction segment, and generate the stage optimization user request based on the structured constraint framework.
[0119] In a specific application scenario, in order to continue optimizing the stage optimization user request, the optimization unit 34 further includes a judgment module 344 , a second calculation module 345 , and an optimization module 346 .
[0120] The judgment module 344 may be used to judge whether there is industry jargon in the stage optimization user request, and if so, determine the explanation information corresponding to the industry jargon in a preset knowledge base.
[0121] The second calculation module 345 can be used to encode the stage optimization user request into a request feature vector, determine the standard feature vector corresponding to each standard request in the preset knowledge base, and based on the request feature vector and each standard feature vector, respectively calculate the feature similarity between the stage optimization user request and each standard request.
[0122] The optimization module 346 can be used to determine the target standard request whose feature similarity is greater than the second preset similarity threshold in each of the standard requests, and input the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request into the large model for request optimization to obtain the optimized user request.
[0123] In a specific application scenario, in order to determine the optimization effect of the optimized user request, the device further includes a testing unit 35 .
[0124] The verification unit 35 can be used to determine the request similarity between the optimized user request and the initial user request; if the request similarity is greater than a third preset similarity threshold, it is determined that the optimized user request meets the intended requirements of the requesting user terminal, otherwise the initial user request is re-optimized.
[0125] In a specific application scenario, in the event of a failure in interaction with the user, in order to optimize the user request, the optimization unit 34 can also be used to generate a general optimization prompt message and send it to the requesting user terminal if no effective clarification interaction result is received from the requesting user terminal within a preset time after the clarification interaction request is sent to the requesting user terminal, wherein a confirmation control exists in the general optimization prompt message; in response to the triggering operation of the confirmation control by the requesting user terminal, the initial user request is generally optimized.
[0126] In a specific application scenario, in order to determine the stopping condition of the clarification interaction, the apparatus further includes a prediction unit 36 .
[0127] The prediction unit 36 may be configured to input the initial user request and the clarification interaction result into a preset classification model to predict request adequacy. If the predicted request adequacy is greater than a preset threshold, the ambiguity clarification interaction with the requesting user terminal is stopped; otherwise, the ambiguity clarification interaction with the requesting user terminal is continued.
[0128] It should be noted that for other corresponding descriptions of the functional modules involved in the user request optimization device based on the intelligent question-answering scenario provided by the embodiment of the present invention, please refer to Figure 1 The corresponding description of the method shown will not be repeated here.
[0129] Based on the above Figure 1 The method shown, accordingly, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps: receiving an initial user request; performing ambiguity point identification on the initial user request to obtain an ambiguity point identification result; judging, based on the ambiguity point identification result, whether it is necessary to perform ambiguity point clarification interaction with the requesting user for the initial user request; if ambiguity point clarification interaction with the requesting user is necessary, generating a clarification interaction request based on the ambiguity point identification result, sending the clarification interaction request to the requesting user terminal, and receiving a clarification interaction result fed back by the requesting user terminal; performing stage optimization on the initial user request based on the clarification interaction result to obtain a stage-optimized user request, and inputting the stage-optimized user request into a large model to continue request optimization to obtain an optimized user request.
[0130] Based on the above Figure 1 The method shown and Figure 4 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of a computer device, such as Figure 6 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43. When the processor 41 executes the program, the following steps are implemented: receiving an initial user request; performing ambiguity point identification on the initial user request to obtain an ambiguity point identification result; based on the ambiguity point identification result, determining whether it is necessary to perform ambiguity point clarification interaction with the requesting user for the initial user request; if ambiguity point clarification interaction with the requesting user is necessary, generating a clarification interaction request based on the ambiguity point identification result, sending the clarification interaction request to the requesting user terminal, and receiving the clarification interaction result fed back by the requesting user terminal; performing stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request, and inputting the stage optimized user request into the large model for further request optimization to obtain an optimized user request.
[0131] According to the technical solution of the present invention, the present invention receives an initial user request, identifies ambiguity points on the initial user request, and obtains an ambiguity point identification result. Then, based on the ambiguity point identification result, it is determined whether it is necessary to perform ambiguity clarification interaction with the requesting user for the initial user request. If ambiguity clarification interaction with the requesting user is required, a clarification interaction request is generated based on the ambiguity point identification result, the clarification interaction request is sent to the requesting user terminal, and a clarification interaction result fed back by the requesting user terminal is received. Finally, based on the clarification interaction result, the initial user request is stage-optimized to obtain a stage-optimized user request, and the stage-optimized user request is input into a large model to continue request optimization to obtain an optimized user request. Therefore, by identifying the ambiguity points of the initial user request, in the case of ambiguity, multiple rounds of clarification interactions with the user are used to more accurately understand the user's intentions and needs, help the user express the problem more clearly, and finally optimize the initial user request according to the user's most accurate intentions and needs, thereby improving the optimization accuracy of the user request, that is, the optimized user request can be more in line with the user's intention, and active optimization of the user request can be achieved, so that the subsequent intelligent question and answer system can provide the user with a more accurate reply. At the same time, the embodiment of the present invention continues to optimize the optimized user request through a large model, which can further improve the optimization accuracy of the user request.
[0132] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0133] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A user request optimization method based on intelligent question-answering scenario, characterized in that: include: receiving an initial user request; Performing fuzzy point recognition on the initial user request to obtain a fuzzy point recognition result; Based on the ambiguity point identification result, determining whether it is necessary to perform an ambiguity point clarification interaction with the requesting user in response to the initial user request; if the ambiguity point clarification interaction is necessary, generating a clarification interaction request based on the ambiguity point identification result, sending the clarification interaction request to the requesting user terminal, and receiving a clarification interaction result fed back by the requesting user terminal; Performing stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request, and inputting the stage optimized user request into the large model to continue request optimization to obtain an optimized user request; Performing stage optimization on the initial user request based on the clarification interaction result to obtain a stage optimized user request includes: The clarified interaction result includes at least one round of interaction content with the requesting user terminal, and semantic role labeling is performed on each round of the interaction content and the initial user request. Based on the semantic role labeling results, core words and their associated modifying components are extracted from each round of the interaction content and the initial user request respectively; based on the core words and their associated modifying components corresponding to each round of the interaction content and the initial user request, interaction fragments corresponding to each round of the interaction content and the initial user request are constructed respectively; the context dependency, entity co-occurrence frequency, and user feedback strength of each interaction fragment are determined, and based on the context dependency, entity co-occurrence frequency, and user feedback strength, a weight coefficient of each interaction fragment is determined; based on the weight coefficient, effective interaction fragments are screened out from each interaction fragment, and finally a structured constraint framework is generated according to the effective interaction fragments, and the stage optimization user request is generated based on the structured constraint framework; Input the optimized user request in the above stage into the big model to continue request optimization, and obtain the optimized user request, including: Determine whether there is industry jargon in the stage-optimized user request. If so, determine the explanation information corresponding to the industry jargon in the preset knowledge base; encode the stage-optimized user request into a request feature vector, determine the standard feature vector corresponding to each standard request in the preset knowledge base, and calculate the feature similarity between the stage-optimized user request and each standard request based on the request feature vector and each standard feature vector; determine the target standard request whose feature similarity is greater than the second preset similarity threshold in each standard request, and input the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request into the large model for request optimization to obtain the optimized user request; after inputting the stage-optimized user request into the large model to continue request optimization to obtain the optimized user request, the method also includes: determining the request similarity between the optimized user request and the initial user request; if the request similarity is greater than the third preset similarity threshold, determine that the optimized user request meets the intention requirements of the requesting user terminal, otherwise re-optimize the initial user request.
2. The method according to claim 1, characterized in that The performing fuzzy point recognition on the initial user request to obtain a fuzzy point recognition result includes: performing at least one of missing information identification and ambiguous word identification on the initial user request to obtain an ambiguous point identification result; The method for identifying missing information for the initial user request includes: Performing word segmentation processing on the initial user request to obtain each word segment, performing part-of-speech tagging on each word segment, and determining a core word, a dependent word, and a dependency relationship between the core word and the dependent word in each word segment based on each word segment and its corresponding part-of-speech; Based on the core word, the dependent word, and the dependency relationship between the core word and the dependent word, a dependency tree is constructed, wherein the core word serves as a root node in the dependency tree, the dependent word serves as a branch node in the dependency tree, and the dependency relationship serves as a connecting branch between the corresponding root node and the branch node; Based on the dependency tree, identifying missing information for the initial user request; The method for identifying ambiguous words in the initial user request includes: Determining keywords to be identified in the initial user request, and constructing sentences in different contexts for the keywords to be identified; Determine the word vectors of the keyword to be identified in the sentence in each context respectively, and calculate the word vector similarity between each of the word vectors. If the word vector similarity is greater than a first preset similarity threshold, the keyword to be identified is determined to be an ambiguous word; otherwise, the keyword to be identified is determined to be a non-ambiguous word.
3. The method according to claim 1, characterized in that The generating of a clarification interaction request based on the ambiguity point recognition result includes: determining, based on the ambiguity point recognition result, an ambiguous word and an ambiguity type corresponding to the ambiguous word, and determining a clarification interaction method with the requesting user; Based on the ambiguous word, the ambiguity type, and the clarification interaction mode, a clarification interaction request is generated. The method of generating the clarification interaction request based on the ambiguous word, the ambiguity type, and the clarification interaction mode includes: Determine a clarification interaction request generation template based on the ambiguity type and the clarification interaction mode, and fill the ambiguity word into the clarification interaction request generation template to obtain the clarification interaction request; or The ambiguous word, the initial user request, the clarification interaction mode, and the ambiguity type are input into a preset clarification interaction request prediction model to perform request prediction to obtain the clarification interaction request, wherein the preset clarification interaction request prediction model is pre-trained based on a sample data set with request labels.
4. The method according to claim 1, wherein After sending the clarification interaction request to the requesting user terminal, the method further includes: After a preset time has passed after the clarification interaction request is sent to the requesting user terminal, if no valid clarification interaction result is fed back by the requesting user terminal, a general optimization prompt message is generated and sent to the requesting user terminal, wherein the general optimization prompt message includes a confirmation control; In response to the triggering operation of the confirmation control by the requesting user terminal, the initial user request is generally optimized.
5. The method according to claim 1, characterized in that After receiving the clarification interaction result requested to be fed back by the user terminal, the method further includes: The initial user request and the clarification interaction result are input into a preset classification model to predict the request sufficiency. If the predicted request sufficiency is greater than a preset threshold, the ambiguity clarification interaction with the requesting user terminal is stopped; otherwise, the ambiguity clarification interaction with the requesting user terminal is continued.
6. A user request optimization device based on intelligent question-answering scenario, characterized in that: include: A receiving unit, configured to receive an initial user request; an identification unit, configured to perform fuzzy point identification on the initial user request to obtain a fuzzy point identification result; an interaction unit, configured to determine, based on the ambiguity point identification result, whether an ambiguity point clarification interaction with the requesting user is required in response to the initial user request; if an ambiguity point clarification interaction with the requesting user is required, generate a clarification interaction request based on the ambiguity point identification result, send the clarification interaction request to the requesting user terminal, and receive a clarification interaction result fed back by the requesting user terminal; an optimization unit, configured to perform stage optimization on the initial user request based on the clarification interaction result to obtain a stage-optimized user request, and input the stage-optimized user request into the large model to continue request optimization to obtain an optimized user request; Based on the clarification interaction result, the initial user request is stage-optimized to obtain a stage-optimized user request, including: the clarification interaction result includes at least one round of interaction content with the requesting user terminal, semantic role labeling is performed on each round of the interaction content and the initial user request, and based on the semantic role labeling result, core words and their associated modifying components are extracted from each round of the interaction content and the initial user request respectively; based on the core words and their associated modifying components corresponding to each round of the interaction content and the initial user request, interaction fragments corresponding to each round of the interaction content and the initial user request are constructed respectively; the context dependency, entity co-occurrence frequency, and user feedback strength of each interaction fragment are determined, and based on the context dependency, entity co-occurrence frequency, and user feedback strength, the weight coefficient of each interaction fragment is determined; based on the weight coefficient, effective interaction fragments are screened out from each interaction fragment, and finally a structured constraint framework is generated according to the effective interaction fragments, and based on the structured constraint framework, the stage-optimized user request is generated; the stage-optimized user request is input into the large model to continue request optimization to obtain an optimized user request , including: judging whether there is industry jargon in the stage-optimized user request, and if so, determining the explanation information corresponding to the industry jargon in the preset knowledge base; encoding the stage-optimized user request into a request feature vector, determining the standard feature vector corresponding to each standard request in the preset knowledge base, and calculating the feature similarity between the stage-optimized user request and each standard request based on the request feature vector and each standard feature vector; determining a target standard request whose feature similarity is greater than a second preset similarity threshold in each standard request, and inputting the explanation information corresponding to the industry jargon, the target standard request, and the stage-optimized user request into the large model for request optimization to obtain the optimized user request; inputting the stage-optimized user request into the large model to continue request optimization, and after obtaining the optimized user request, determining the request similarity between the optimized user request and the initial user request; if the request similarity is greater than a third preset similarity threshold, determining that the optimized user request meets the intention requirements of the requesting user terminal, otherwise re-optimizing the initial user request.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Question reply generation method and device, electronic equipment and storage medium
CN118964557A
Machine learning model optimization explainability
US20240403658A1